IGraphicalSymbolFactory.ts 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. import {ClefInstruction} from "../VoiceData/Instructions/ClefInstruction";
  2. import {Fraction} from "../../Common/DataObjects/Fraction";
  3. import {GraphicalMusicPage} from "../Graphical/GraphicalMusicPage";
  4. import {GraphicalNote} from "../Graphical/GraphicalNote";
  5. import {GraphicalStaffEntry} from "../Graphical/GraphicalStaffEntry";
  6. import {MusicSystem} from "../Graphical/MusicSystem";
  7. import {Note} from "../VoiceData/Note";
  8. import {OctaveEnum} from "../VoiceData/Expressions/ContinuousExpressions/OctaveShift";
  9. import {Pitch} from "../../Common/DataObjects/Pitch";
  10. import {SourceMeasure} from "../VoiceData/SourceMeasure";
  11. import {SourceStaffEntry} from "../VoiceData/SourceStaffEntry";
  12. import {Staff} from "../VoiceData/Staff";
  13. import {StaffLine} from "../Graphical/StaffLine";
  14. import {StaffMeasure} from "../Graphical/StaffMeasure";
  15. export interface IGraphicalSymbolFactory {
  16. createMusicSystem(page: GraphicalMusicPage, systemIndex: number): MusicSystem;
  17. createStaffLine(parentSystem: MusicSystem, parentStaff: Staff): StaffLine;
  18. createStaffMeasure(sourceMeasure: SourceMeasure, staff: Staff): StaffMeasure;
  19. createExtraStaffMeasure(staffLine: StaffLine): StaffMeasure;
  20. createStaffEntry(sourceStaffEntry: SourceStaffEntry, measure: StaffMeasure): GraphicalStaffEntry;
  21. createGraceStaffEntry(staffEntryParent: GraphicalStaffEntry, measure: StaffMeasure): GraphicalStaffEntry;
  22. createNote(
  23. note: Note, graphicalStaffEntry: GraphicalStaffEntry,
  24. activeClef: ClefInstruction,
  25. octaveShift: OctaveEnum,
  26. graphicalNoteLength: Fraction): GraphicalNote;
  27. createGraceNote(
  28. note: Note,
  29. graphicalStaffEntry: GraphicalStaffEntry,
  30. activeClef: ClefInstruction,
  31. octaveShift: OctaveEnum): GraphicalNote;
  32. addGraphicalAccidental(graphicalNote: GraphicalNote, pitch: Pitch, grace: boolean, graceScalingFactor: number): void;
  33. addFermataAtTiedEndNote(tiedNote: Note, graphicalStaffEntry: GraphicalStaffEntry): void;
  34. createInStaffClef(graphicalStaffEntry: GraphicalStaffEntry, clefInstruction: ClefInstruction): void;
  35. createChordSymbol(
  36. sourceStaffEntry: SourceStaffEntry,
  37. graphicalStaffEntry: GraphicalStaffEntry,
  38. transposeHalftones: number): void;
  39. }