IGraphicalSymbolFactory.ts 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. import {ClefInstruction} from "../VoiceData/Instructions/ClefInstruction";
  2. import {Fraction} from "../../Common/DataObjects/Fraction";
  3. import {GraphicalNote} from "../Graphical/GraphicalNote";
  4. import {GraphicalStaffEntry} from "../Graphical/GraphicalStaffEntry";
  5. import {MusicSystem} from "../Graphical/MusicSystem";
  6. import {Note} from "../VoiceData/Note";
  7. import {OctaveEnum} from "../VoiceData/Expressions/ContinuousExpressions/OctaveShift";
  8. import {Pitch} from "../../Common/DataObjects/Pitch";
  9. import {SourceMeasure} from "../VoiceData/SourceMeasure";
  10. import {SourceStaffEntry} from "../VoiceData/SourceStaffEntry";
  11. import {Staff} from "../VoiceData/Staff";
  12. import {StaffLine} from "../Graphical/StaffLine";
  13. import {GraphicalMeasure} from "../Graphical/GraphicalMeasure";
  14. import { TechnicalInstruction } from "../VoiceData/Instructions/TechnicalInstruction";
  15. import { GraphicalVoiceEntry } from "../Graphical/GraphicalVoiceEntry";
  16. import { VoiceEntry } from "../VoiceData/VoiceEntry";
  17. import { EngravingRules } from "../Graphical/EngravingRules";
  18. import { KeyInstruction } from "../VoiceData/Instructions/KeyInstruction";
  19. export interface IGraphicalSymbolFactory {
  20. createMusicSystem(systemIndex: number, rules: EngravingRules): MusicSystem;
  21. createStaffLine(parentSystem: MusicSystem, parentStaff: Staff): StaffLine;
  22. createGraphicalMeasure(sourceMeasure: SourceMeasure, staff: Staff): GraphicalMeasure;
  23. createMultiRestMeasure(sourceMeasure: SourceMeasure, staff: Staff): GraphicalMeasure;
  24. createTabStaffMeasure(sourceMeasure: SourceMeasure, staff: Staff): GraphicalMeasure;
  25. createExtraGraphicalMeasure(staffLine: StaffLine): GraphicalMeasure;
  26. createStaffEntry(sourceStaffEntry: SourceStaffEntry, measure: GraphicalMeasure): GraphicalStaffEntry;
  27. createVoiceEntry(parentVoiceEntry: VoiceEntry, parentStaffEntry: GraphicalStaffEntry): GraphicalVoiceEntry;
  28. createNote(
  29. note: Note,
  30. graphicalVoiceEntry: GraphicalVoiceEntry,
  31. activeClef: ClefInstruction,
  32. octaveShift: OctaveEnum,
  33. graphicalNoteLength: Fraction): GraphicalNote;
  34. createGraceNote(
  35. note: Note,
  36. graphicalVoiceEntry: GraphicalVoiceEntry,
  37. activeClef: ClefInstruction,
  38. octaveShift: OctaveEnum): GraphicalNote;
  39. addGraphicalAccidental(graphicalNote: GraphicalNote, pitch: Pitch): void;
  40. addFermataAtTiedEndNote(tiedNote: Note, graphicalStaffEntry: GraphicalStaffEntry): void;
  41. createGraphicalTechnicalInstruction(
  42. technicalInstruction: TechnicalInstruction,
  43. graphicalStaffEntry: GraphicalStaffEntry): void;
  44. createInStaffClef(graphicalStaffEntry: GraphicalStaffEntry, clefInstruction: ClefInstruction): void;
  45. createChordSymbols(
  46. sourceStaffEntry: SourceStaffEntry,
  47. graphicalStaffEntry: GraphicalStaffEntry,
  48. keyInstruction: KeyInstruction,
  49. transposeHalftones: number): void;
  50. }