IGraphicalSymbolFactory.ts 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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. import { TechnicalInstruction } from "../VoiceData/Instructions/TechnicalInstruction";
  16. import { GraphicalVoiceEntry } from "../Graphical/GraphicalVoiceEntry";
  17. import { VoiceEntry } from "../VoiceData/VoiceEntry";
  18. export interface IGraphicalSymbolFactory {
  19. createMusicSystem(page: GraphicalMusicPage, systemIndex: number): MusicSystem;
  20. createStaffLine(parentSystem: MusicSystem, parentStaff: Staff): StaffLine;
  21. createStaffMeasure(sourceMeasure: SourceMeasure, staff: Staff): StaffMeasure;
  22. createExtraStaffMeasure(staffLine: StaffLine): StaffMeasure;
  23. createStaffEntry(sourceStaffEntry: SourceStaffEntry, measure: StaffMeasure): GraphicalStaffEntry;
  24. createGraceStaffEntry(staffEntryParent: GraphicalStaffEntry, measure: StaffMeasure): GraphicalStaffEntry;
  25. createVoiceEntry(parentVoiceEntry: VoiceEntry, parentStaffEntry: GraphicalStaffEntry): GraphicalVoiceEntry;
  26. createNote(
  27. note: Note,
  28. graphicalVoiceEntry: GraphicalVoiceEntry,
  29. activeClef: ClefInstruction,
  30. octaveShift: OctaveEnum,
  31. graphicalNoteLength: Fraction): GraphicalNote;
  32. createGraceNote(
  33. note: Note,
  34. graphicalVoiceEntry: GraphicalVoiceEntry,
  35. activeClef: ClefInstruction,
  36. octaveShift: OctaveEnum): GraphicalNote;
  37. addGraphicalAccidental(graphicalNote: GraphicalNote, pitch: Pitch, grace: boolean, graceScalingFactor: number): void;
  38. addFermataAtTiedEndNote(tiedNote: Note, graphicalStaffEntry: GraphicalStaffEntry): void;
  39. createGraphicalTechnicalInstruction(
  40. technicalInstruction: TechnicalInstruction,
  41. graphicalStaffEntry: GraphicalStaffEntry): void;
  42. createInStaffClef(graphicalStaffEntry: GraphicalStaffEntry, clefInstruction: ClefInstruction): void;
  43. createChordSymbol(
  44. sourceStaffEntry: SourceStaffEntry,
  45. graphicalStaffEntry: GraphicalStaffEntry,
  46. transposeHalftones: number): void;
  47. }