vexflow-musicxml
Version:
MusicXml Parser for vexflow
18 lines (15 loc) • 377 B
JavaScript
import { XmlObject } from './XmlObject';
export class Key extends XmlObject {
constructor(...node) {
super(...node);
this.Fifths = this.getNum('fifths');
this.Mode = this.getText('mode');
// Default is always Major
if (this.Mode === '') {
this.Mode = 'major';
}
}
toString() {
return `Fifths: ${this.Fifths} Mode: ${this.Mode}`;
}
}