VexFlowGraphicalNote.ts 688 B

123456789101112131415161718
  1. import {GraphicalNote} from "../GraphicalNote";
  2. import {Note} from "../../VoiceData/Note";
  3. import {GraphicalStaffEntry} from "../GraphicalStaffEntry";
  4. import {ClefInstruction} from "../../VoiceData/Instructions/ClefInstruction";
  5. import {VexFlowConverter} from "./VexFlowConverter";
  6. export class VexFlowGraphicalNote extends GraphicalNote {
  7. constructor(note: Note, parent: GraphicalStaffEntry, activeClef: ClefInstruction) {
  8. super(note, parent);
  9. if (note.Pitch) {
  10. this.vfpitch = VexFlowConverter.pitch(note.Pitch, activeClef);
  11. } else {
  12. this.vfpitch = undefined;
  13. }
  14. }
  15. public vfpitch: [string, string, ClefInstruction];
  16. }