IGraphicalSymbolFactory.ts 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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";
  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. createTabStaffMeasure(sourceMeasure: SourceMeasure, staff: Staff): GraphicalMeasure;
  24. createExtraGraphicalMeasure(staffLine: StaffLine): GraphicalMeasure;
  25. createStaffEntry(sourceStaffEntry: SourceStaffEntry, measure: GraphicalMeasure): GraphicalStaffEntry;
  26. createVoiceEntry(parentVoiceEntry: VoiceEntry, parentStaffEntry: GraphicalStaffEntry): GraphicalVoiceEntry;
  27. createNote(
  28. note: Note,
  29. graphicalVoiceEntry: GraphicalVoiceEntry,
  30. activeClef: ClefInstruction,
  31. octaveShift: OctaveEnum,
  32. graphicalNoteLength: Fraction): GraphicalNote;
  33. createGraceNote(
  34. note: Note,
  35. graphicalVoiceEntry: GraphicalVoiceEntry,
  36. activeClef: ClefInstruction,
  37. octaveShift: OctaveEnum): GraphicalNote;
  38. addGraphicalAccidental(graphicalNote: GraphicalNote, pitch: Pitch): void;
  39. addFermataAtTiedEndNote(tiedNote: Note, graphicalStaffEntry: GraphicalStaffEntry): void;
  40. createGraphicalTechnicalInstruction(
  41. technicalInstruction: TechnicalInstruction,
  42. graphicalStaffEntry: GraphicalStaffEntry): void;
  43. createInStaffClef(graphicalStaffEntry: GraphicalStaffEntry, clefInstruction: ClefInstruction): void;
  44. createChordSymbols(
  45. sourceStaffEntry: SourceStaffEntry,
  46. graphicalStaffEntry: GraphicalStaffEntry,
  47. keyInstruction: KeyInstruction,
  48. transposeHalftones: number): void;
  49. }