VexFlowGraphicalNote.ts 761 B

12345678910111213141516171819
  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. // ToDo: don't use accidental info here - set it in factory.
  11. this.vfpitch = VexFlowConverter.pitch(note.Pitch, activeClef);
  12. } else {
  13. this.vfpitch = undefined;
  14. }
  15. }
  16. public vfpitch: [string, string, ClefInstruction];
  17. }