@tspro/web-music-score 4.1.0 → 4.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/README.md +64 -31
  3. package/dist/audio/index.js +1 -1
  4. package/dist/audio/index.mjs +2 -2
  5. package/dist/audio-cg/index.js +1 -1
  6. package/dist/audio-cg/index.mjs +2 -2
  7. package/dist/{chunk-MHNTJ6FU.mjs → chunk-5NWLGWHS.mjs} +2 -2
  8. package/dist/chunk-7MNV5JN6.mjs +264 -0
  9. package/dist/core/index.js +2 -2
  10. package/dist/core/index.mjs +3 -3
  11. package/dist/iife/index.global.js +11 -11
  12. package/dist/{music-objects-DIaqNPjs.d.mts → music-objects-3Hxlkxy6.d.mts} +105 -19
  13. package/dist/{music-objects-xJJNlFwK.d.ts → music-objects-CI7IjsjE.d.ts} +105 -19
  14. package/dist/pieces/index.d.mts +2 -2
  15. package/dist/pieces/index.d.ts +2 -2
  16. package/dist/pieces/index.js +2 -2
  17. package/dist/pieces/index.mjs +3 -3
  18. package/dist/react-ui/index.d.mts +3 -3
  19. package/dist/react-ui/index.d.ts +3 -3
  20. package/dist/react-ui/index.js +1 -1
  21. package/dist/react-ui/index.mjs +2 -2
  22. package/dist/{scale-DQNA-YLD.d.ts → scale-DGx3tJH4.d.ts} +1 -1
  23. package/dist/{scale-bnD0WnMV.d.mts → scale-DQP3b9Zx.d.mts} +1 -1
  24. package/dist/score/index.d.mts +43 -21
  25. package/dist/score/index.d.ts +43 -21
  26. package/dist/score/index.js +776 -249
  27. package/dist/score/index.mjs +495 -219
  28. package/dist/{tempo-Bp1UzsrZ.d.ts → tempo-GrstpD9G.d.ts} +2 -0
  29. package/dist/{tempo-S85Q7uJA.d.mts → tempo-dkctPkCS.d.mts} +2 -0
  30. package/dist/theory/index.d.mts +3 -3
  31. package/dist/theory/index.d.ts +3 -3
  32. package/dist/theory/index.js +4 -1
  33. package/dist/theory/index.mjs +28 -269
  34. package/package.json +6 -2
@@ -1,5 +1,5 @@
1
1
  import { N as Note, A as Accidental } from './note-eA2xPPiG.mjs';
2
- import { R as RhythmProps, N as NoteLength, i as NoteLengthStr, k as TupletRatio, d as Tempo, K as KeySignature, b as TimeSignature } from './tempo-S85Q7uJA.mjs';
2
+ import { R as RhythmProps, N as NoteLength, i as NoteLengthStr, k as TupletRatio, d as Tempo, K as KeySignature, b as TimeSignature } from './tempo-dkctPkCS.mjs';
3
3
  import { Vec2 } from '@tspro/ts-utils-lib';
4
4
 
5
5
  /**
@@ -256,14 +256,18 @@ type TabConfig = {
256
256
  };
257
257
  /** Score configuration. */
258
258
  type ScoreConfiguration = StaffConfig | TabConfig | (StaffConfig | TabConfig)[];
259
- /** VoiceId type. */
259
+ /** Voice id. */
260
260
  type VoiceId = 0 | 1 | 2 | 3;
261
- /** Get supported VoiceIds. Returns [0, 1, 2, 3]. */
261
+ /** Get supported voice ids. Returns [0, 1, 2, 3]. */
262
262
  declare function getVoiceIds(): ReadonlyArray<VoiceId>;
263
- /** Strng number type. */
263
+ /** Strng number. */
264
264
  type StringNumber = 1 | 2 | 3 | 4 | 5 | 6;
265
- /** Get strin numbers. Returns [0, 1, 2, 3, 4, 5]. */
265
+ /** Get string numbers. Returns [0, 1, 2, 3, 4, 5]. */
266
266
  declare function getStringNumbers(): ReadonlyArray<StringNumber>;
267
+ /** Verse number. */
268
+ type VerseNumber = 1 | 2 | 3;
269
+ /** Get supported verse numbers. Returns [1, 2, 3]. */
270
+ declare function getVerseNumbers(): ReadonlyArray<VerseNumber>;
267
271
  /** Stem direction enum. */
268
272
  declare enum Stem {
269
273
  /** Auto stem direction. */
@@ -361,6 +365,29 @@ type TupletOptions = {
361
365
  /** Show tuplet ratio (e.g. "3:2") instead of number of parts (e.g. "3"). */
362
366
  showRatio?: boolean;
363
367
  };
368
+ /** Lyrics text/syllable alignment.*/
369
+ declare enum LyricsAlign {
370
+ /** Left align lyrics text/syllable. */
371
+ Left = "left",
372
+ /** Center align lyrics text/syllable. */
373
+ Center = "center",
374
+ /** Right align lyrics text/syllable. */
375
+ Right = "right"
376
+ }
377
+ /** Lyrics hyphen.*/
378
+ declare enum LyricsHyphen {
379
+ /** Hyphen. */
380
+ Hyphen = "-",
381
+ /** Extender. */
382
+ Extender = "---"
383
+ }
384
+ /** Lyrics options. */
385
+ type LyricsOptions = {
386
+ /** Alignment of lyrics text/syllable. */
387
+ align?: LyricsAlign | `${LyricsAlign}`;
388
+ /** Hyphen or extender after lyrics text/syllable. */
389
+ hyphen?: LyricsHyphen | `${LyricsHyphen}`;
390
+ };
364
391
  /** Fermata enum. */
365
392
  declare enum Fermata {
366
393
  /** Anchor fermata to note/rest. */
@@ -660,7 +687,7 @@ declare class ObjTabNoteGroup extends MusicObject {
660
687
  }
661
688
  declare class ObjNoteGroup extends MusicObject {
662
689
  readonly col: ObjRhythmColumn;
663
- readonly voiceId: number;
690
+ readonly voiceId: VoiceId;
664
691
  readonly notes: ReadonlyArray<Note>;
665
692
  readonly minDiatonicId: number;
666
693
  readonly maxDiatonicId: number;
@@ -681,7 +708,7 @@ declare class ObjNoteGroup extends MusicObject {
681
708
  private readonly staffObjects;
682
709
  private readonly tabObjects;
683
710
  readonly mi: MNoteGroup;
684
- constructor(col: ObjRhythmColumn, voiceId: number, notes: ReadonlyArray<Note>, noteLength: NoteLength | NoteLengthStr, options?: NoteOptions, tupletRatio?: TupletRatio);
711
+ constructor(col: ObjRhythmColumn, voiceId: VoiceId, notes: ReadonlyArray<Note>, noteLength: NoteLength | NoteLengthStr, options?: NoteOptions, tupletRatio?: TupletRatio);
685
712
  getMusicInterface(): MNoteGroup;
686
713
  get doc(): ObjDocument;
687
714
  get measure(): ObjMeasure;
@@ -803,7 +830,7 @@ declare class ObjStaffRest extends MusicObject {
803
830
  }
804
831
  declare class ObjRest extends MusicObject {
805
832
  readonly col: ObjRhythmColumn;
806
- readonly voiceId: number;
833
+ readonly voiceId: VoiceId;
807
834
  readonly ownStemDir: Stem.Up | Stem.Down;
808
835
  readonly ownDiatonicId: number;
809
836
  readonly color: string;
@@ -813,7 +840,7 @@ declare class ObjRest extends MusicObject {
813
840
  private beamGroup?;
814
841
  readonly staffObjects: ObjStaffRest[];
815
842
  readonly mi: MRest;
816
- constructor(col: ObjRhythmColumn, voiceId: number, noteLength: NoteLength | NoteLengthStr, options?: RestOptions, tupletRatio?: TupletRatio);
843
+ constructor(col: ObjRhythmColumn, voiceId: VoiceId, noteLength: NoteLength | NoteLengthStr, options?: RestOptions, tupletRatio?: TupletRatio);
817
844
  getMusicInterface(): MRest;
818
845
  get doc(): ObjDocument;
819
846
  get measure(): ObjMeasure;
@@ -841,6 +868,34 @@ declare class ObjRest extends MusicObject {
841
868
  draw(renderer: Renderer): void;
842
869
  }
843
870
 
871
+ declare class LyricsContainer {
872
+ readonly col: ObjRhythmColumn;
873
+ readonly lyricsObjects: ObjLyrics[];
874
+ readonly rhythmProps: RhythmProps;
875
+ constructor(col: ObjRhythmColumn, lyricsLength: NoteLength);
876
+ addLyricsObject(lyricsObj: ObjLyrics): void;
877
+ }
878
+ declare class ObjLyrics extends MusicObject {
879
+ readonly col: ObjRhythmColumn;
880
+ readonly verse: VerseNumber;
881
+ readonly line: ObjNotationLine;
882
+ readonly vpos: VerticalPos;
883
+ private nextLyricsObject?;
884
+ private readonly color;
885
+ private readonly hyphen?;
886
+ private readonly text;
887
+ readonly mi: MLyrics;
888
+ constructor(col: ObjRhythmColumn, verse: VerseNumber, line: ObjNotationLine, vpos: VerticalPos, lyricsText: string, lyricsOptions?: LyricsOptions);
889
+ getMusicInterface(): MLyrics;
890
+ get measure(): ObjMeasure;
891
+ getText(): string;
892
+ setNextLyricsObject(lyricsObj: ObjLyrics): void;
893
+ pick(x: number, y: number): MusicObject[];
894
+ layout(renderer: Renderer): void;
895
+ offset(dx: number, dy: number): void;
896
+ draw(renderer: Renderer): void;
897
+ }
898
+
844
899
  type ScorePlayerNote = {
845
900
  note: Note;
846
901
  ticks: number;
@@ -848,10 +903,17 @@ type ScorePlayerNote = {
848
903
  slur: undefined | "first" | "slurred";
849
904
  };
850
905
  type RhythmSymbol = ObjNoteGroup | ObjRest;
906
+ type LyricsContainerData = {
907
+ lyricsContainer: LyricsContainer;
908
+ verse: VerseNumber;
909
+ line: ObjNotationLine;
910
+ vpos: VerticalPos;
911
+ };
851
912
  declare class ObjRhythmColumn extends MusicObject {
852
913
  readonly measure: ObjMeasure;
853
914
  readonly positionTicks: number;
854
915
  private readonly voiceSymbol;
916
+ private readonly lyricsContainers;
855
917
  private minDiatonicId?;
856
918
  private maxDiatonicId?;
857
919
  private staffMinDiatonicId;
@@ -885,8 +947,10 @@ declare class ObjRhythmColumn extends MusicObject {
885
947
  pick(x: number, y: number): MusicObject[];
886
948
  hasArpeggio(): boolean;
887
949
  getArpeggioDir(): Arpeggio;
888
- setVoiceSymbol(voiceId: number, symbol: RhythmSymbol): void;
889
- getVoiceSymbol(voiceId: number): RhythmSymbol | undefined;
950
+ setVoiceSymbol(voiceId: VoiceId, symbol: RhythmSymbol): void;
951
+ getVoiceSymbol(voiceId: VoiceId): RhythmSymbol | undefined;
952
+ getLyricsContainerDatas(): ReadonlyArray<LyricsContainerData>;
953
+ getLyricsContainer(verse: VerseNumber, line: ObjNotationLine, vpos: VerticalPos, lyricsLength?: NoteLength): LyricsContainer | undefined;
890
954
  getMinWidth(): number;
891
955
  setupNoteHeadDisplacements(): void;
892
956
  getNoteHeadDisplacement(noteGroup: ObjNoteGroup, note: Note): -1 | 0 | 1;
@@ -1035,6 +1099,7 @@ declare class ObjMeasure extends MusicObject {
1035
1099
  private endRepeatPlayCount;
1036
1100
  private endRepeatPlayCountText?;
1037
1101
  private staticObjectsCache;
1102
+ private lyricsObjectsCache;
1038
1103
  readonly mi: MMeasure;
1039
1104
  constructor(row: ObjScoreRow);
1040
1105
  getMusicInterface(): MMeasure;
@@ -1089,8 +1154,9 @@ declare class ObjMeasure extends MusicObject {
1089
1154
  hasEndSection(): boolean;
1090
1155
  endRow(): void;
1091
1156
  private addRhythmSymbol;
1092
- addNoteGroup(voiceId: number, notes: (Note | string)[], noteLength: NoteLength | NoteLengthStr, options?: NoteOptions, tupletRatio?: TupletRatio): ObjNoteGroup;
1093
- addRest(voiceId: number, restLength: NoteLength | NoteLengthStr, options?: RestOptions, tupletRatio?: TupletRatio): ObjRest;
1157
+ addNoteGroup(voiceId: VoiceId, notes: (Note | string)[], noteLength: NoteLength | NoteLengthStr, options?: NoteOptions, tupletRatio?: TupletRatio): ObjNoteGroup;
1158
+ addRest(voiceId: VoiceId, restLength: NoteLength | NoteLengthStr, options?: RestOptions, tupletRatio?: TupletRatio): ObjRest;
1159
+ addLyrics(staffTabOrGroups: StaffTabOrGroups | undefined, verse: VerseNumber, lyricsLength: NoteLength | NoteLengthStr, lyricsText: string, lyricsOptions: LyricsOptions): void;
1094
1160
  /**
1095
1161
  *
1096
1162
  * @param positionTicks - get ObjRhythmColumn with positionTicks. Insert new if necessary.
@@ -1107,6 +1173,8 @@ declare class ObjMeasure extends MusicObject {
1107
1173
  getMinWidth(): number;
1108
1174
  getStaffLineLeft(): number;
1109
1175
  getStaffLineRight(): number;
1176
+ private getLyricsObjects;
1177
+ getPrevLyricsObject(lyricsObj: ObjLyrics): ObjLyrics | undefined;
1110
1178
  getStaticObjects(line: ObjNotationLine): ReadonlyArray<MusicObject>;
1111
1179
  removeLayoutObjects(musicObj: MusicObject): void;
1112
1180
  addConnectiveObject(connective: ObjConnective): void;
@@ -1119,7 +1187,7 @@ declare class ObjMeasure extends MusicObject {
1119
1187
  private static setupBeamGroup;
1120
1188
  getBarLineLeft(): ObjBarLineLeft;
1121
1189
  getBarLineRight(): ObjBarLineRight;
1122
- getVoiceSymbols(voiceId: number): ReadonlyArray<RhythmSymbol>;
1190
+ getVoiceSymbols(voiceId: VoiceId): ReadonlyArray<RhythmSymbol>;
1123
1191
  completeRests(voiceId?: VoiceId | VoiceId[]): void;
1124
1192
  requestLayout(): void;
1125
1193
  layout(renderer: Renderer): void;
@@ -1216,7 +1284,7 @@ declare class ObjDocument extends MusicObject {
1216
1284
  addMeasure(): ObjMeasure;
1217
1285
  addStaffGroup(groupName: string, layoutElements: number | string | (number | string)[], verticalPosition: VerticalPosition): void;
1218
1286
  getStaffGroup(groupName: string): StaffGroup | undefined;
1219
- getVoiceSymbols(voiceId: number): ReadonlyArray<RhythmSymbol>;
1287
+ getVoiceSymbols(voiceId: VoiceId): ReadonlyArray<RhythmSymbol>;
1220
1288
  removeLayoutObjects(musicObj: MusicObject): void;
1221
1289
  private forEachMeasure;
1222
1290
  resetMeasures(): void;
@@ -1397,13 +1465,16 @@ declare enum LayoutGroupId {
1397
1465
  Ending = 3,
1398
1466
  TempoAnnotation = 4,
1399
1467
  DynamicsAnnotation = 5,
1400
- ChordLabel = 6
1468
+ ChordLabel = 6,
1469
+ LyricsVerse1 = 7,
1470
+ LyricsVerse2 = 8,
1471
+ LyricsVerse3 = 9
1401
1472
  }
1402
1473
  declare enum VerticalPos {
1403
1474
  Above = 0,
1404
1475
  Below = 1
1405
1476
  }
1406
- type LayoutableMusicObject = ObjText | ObjSpecialText | ObjExtensionLine | ObjFermata | ObjEnding;
1477
+ type LayoutableMusicObject = ObjText | ObjSpecialText | ObjExtensionLine | ObjFermata | ObjEnding | ObjLyrics;
1407
1478
  declare class StaffGroup {
1408
1479
  readonly groupName: string;
1409
1480
  readonly staffsTabsAndGroups: number | string | (number | string)[];
@@ -2161,7 +2232,7 @@ declare class MRhythmColumn extends MusicInterface {
2161
2232
  * @param voiceId - Voice id.
2162
2233
  * @returns - Note group, rest or undefined.
2163
2234
  */
2164
- getRhythmSymbol(voiceId: number): MNoteGroup | MRest | undefined;
2235
+ getRhythmSymbol(voiceId: VoiceId): MNoteGroup | MRest | undefined;
2165
2236
  /**
2166
2237
  * Get symbol (note group or rest) of this column for given voice id.
2167
2238
  * @deprecated - Use getRhythmSymbol(voiceId) instead.
@@ -2295,6 +2366,21 @@ declare class MText extends MusicInterface {
2295
2366
  */
2296
2367
  getText(): string;
2297
2368
  }
2369
+ /** Lyrics object. */
2370
+ declare class MLyrics extends MusicInterface {
2371
+ private readonly obj;
2372
+ /** Object name. */
2373
+ static readonly Name = "Lyrics";
2374
+ /** @internal */
2375
+ constructor(obj: ObjLyrics);
2376
+ /** @internal */
2377
+ getMusicObject(): ObjLyrics;
2378
+ /**
2379
+ * Get lyrics text.
2380
+ * @returns - Lyrics text.
2381
+ */
2382
+ getText(): string;
2383
+ }
2298
2384
  /** Extension line object. */
2299
2385
  declare class MExtensionLine extends MusicInterface {
2300
2386
  private readonly obj;
@@ -2306,4 +2392,4 @@ declare class MExtensionLine extends MusicInterface {
2306
2392
  getMusicObject(): ObjExtensionLine;
2307
2393
  }
2308
2394
 
2309
- export { Clef as $, type AnnotationText as A, MBarLineRight as B, Connective as C, DivRect as D, MBarLineLeft as E, Fermata as F, MStaffTabBarLine as G, MNoteGroup as H, MStaffNoteGroup as I, MTabNoteGroup as J, MRest as K, Label as L, MDocument as M, type NoteOptions as N, MStaffRest as O, MRhythmColumn as P, MScoreRow as Q, type RestOptions as R, StaffPreset as S, type TupletOptions as T, MStaff as U, type VoiceId as V, MTab as W, MSignature as X, MSpecialText as Y, MText as Z, MExtensionLine as _, type ScoreConfiguration as a, type StaffConfig as a0, type TabConfig as a1, getVoiceIds as a2, type StringNumber as a3, getStringNumbers as a4, Stem as a5, Arpeggio as a6, type StaffTabOrGroup as a7, DynamicsAnnotation as a8, TempoAnnotation as a9, PlayState as aa, type PlayStateChangeListener as ab, type StaffTabOrGroups as b, Navigation as c, Annotation as d, TieType as e, NoteAnchor as f, VerticalPosition as g, type ScoreEventType as h, ScoreEvent as i, ScoreStaffPosEvent as j, ScoreObjectEvent as k, type ScoreEventListener as l, MPlayer as m, MRenderer as n, MPlaybackButtons as o, MusicInterface as p, MAccidental as q, MConnective as r, MArpeggio as s, MBeamGroup as t, MStaffBeamGroup as u, MEnding as v, MFermata as w, MHeader as x, MImage as y, MMeasure as z };
2395
+ export { MText as $, type AnnotationText as A, MImage as B, Connective as C, DivRect as D, MMeasure as E, Fermata as F, MBarLineRight as G, MBarLineLeft as H, MStaffTabBarLine as I, MNoteGroup as J, MStaffNoteGroup as K, type LyricsOptions as L, MDocument as M, type NoteOptions as N, MTabNoteGroup as O, MRest as P, MStaffRest as Q, type RestOptions as R, StaffPreset as S, type TupletOptions as T, MRhythmColumn as U, type VoiceId as V, MScoreRow as W, MStaff as X, MTab as Y, MSignature as Z, MSpecialText as _, type ScoreConfiguration as a, MLyrics as a0, MExtensionLine as a1, Clef as a2, type StaffConfig as a3, type TabConfig as a4, getVoiceIds as a5, type StringNumber as a6, getStringNumbers as a7, getVerseNumbers as a8, Stem as a9, Arpeggio as aa, type StaffTabOrGroup as ab, LyricsAlign as ac, LyricsHyphen as ad, DynamicsAnnotation as ae, TempoAnnotation as af, PlayState as ag, type PlayStateChangeListener as ah, type VerseNumber as b, type StaffTabOrGroups as c, Navigation as d, Annotation as e, Label as f, TieType as g, NoteAnchor as h, VerticalPosition as i, type ScoreEventType as j, ScoreEvent as k, ScoreStaffPosEvent as l, ScoreObjectEvent as m, type ScoreEventListener as n, MPlayer as o, MRenderer as p, MPlaybackButtons as q, MusicInterface as r, MAccidental as s, MConnective as t, MArpeggio as u, MBeamGroup as v, MStaffBeamGroup as w, MEnding as x, MFermata as y, MHeader as z };
@@ -1,5 +1,5 @@
1
1
  import { N as Note, A as Accidental } from './note-eA2xPPiG.js';
2
- import { R as RhythmProps, N as NoteLength, i as NoteLengthStr, k as TupletRatio, d as Tempo, K as KeySignature, b as TimeSignature } from './tempo-Bp1UzsrZ.js';
2
+ import { R as RhythmProps, N as NoteLength, i as NoteLengthStr, k as TupletRatio, d as Tempo, K as KeySignature, b as TimeSignature } from './tempo-GrstpD9G.js';
3
3
  import { Vec2 } from '@tspro/ts-utils-lib';
4
4
 
5
5
  /**
@@ -256,14 +256,18 @@ type TabConfig = {
256
256
  };
257
257
  /** Score configuration. */
258
258
  type ScoreConfiguration = StaffConfig | TabConfig | (StaffConfig | TabConfig)[];
259
- /** VoiceId type. */
259
+ /** Voice id. */
260
260
  type VoiceId = 0 | 1 | 2 | 3;
261
- /** Get supported VoiceIds. Returns [0, 1, 2, 3]. */
261
+ /** Get supported voice ids. Returns [0, 1, 2, 3]. */
262
262
  declare function getVoiceIds(): ReadonlyArray<VoiceId>;
263
- /** Strng number type. */
263
+ /** Strng number. */
264
264
  type StringNumber = 1 | 2 | 3 | 4 | 5 | 6;
265
- /** Get strin numbers. Returns [0, 1, 2, 3, 4, 5]. */
265
+ /** Get string numbers. Returns [0, 1, 2, 3, 4, 5]. */
266
266
  declare function getStringNumbers(): ReadonlyArray<StringNumber>;
267
+ /** Verse number. */
268
+ type VerseNumber = 1 | 2 | 3;
269
+ /** Get supported verse numbers. Returns [1, 2, 3]. */
270
+ declare function getVerseNumbers(): ReadonlyArray<VerseNumber>;
267
271
  /** Stem direction enum. */
268
272
  declare enum Stem {
269
273
  /** Auto stem direction. */
@@ -361,6 +365,29 @@ type TupletOptions = {
361
365
  /** Show tuplet ratio (e.g. "3:2") instead of number of parts (e.g. "3"). */
362
366
  showRatio?: boolean;
363
367
  };
368
+ /** Lyrics text/syllable alignment.*/
369
+ declare enum LyricsAlign {
370
+ /** Left align lyrics text/syllable. */
371
+ Left = "left",
372
+ /** Center align lyrics text/syllable. */
373
+ Center = "center",
374
+ /** Right align lyrics text/syllable. */
375
+ Right = "right"
376
+ }
377
+ /** Lyrics hyphen.*/
378
+ declare enum LyricsHyphen {
379
+ /** Hyphen. */
380
+ Hyphen = "-",
381
+ /** Extender. */
382
+ Extender = "---"
383
+ }
384
+ /** Lyrics options. */
385
+ type LyricsOptions = {
386
+ /** Alignment of lyrics text/syllable. */
387
+ align?: LyricsAlign | `${LyricsAlign}`;
388
+ /** Hyphen or extender after lyrics text/syllable. */
389
+ hyphen?: LyricsHyphen | `${LyricsHyphen}`;
390
+ };
364
391
  /** Fermata enum. */
365
392
  declare enum Fermata {
366
393
  /** Anchor fermata to note/rest. */
@@ -660,7 +687,7 @@ declare class ObjTabNoteGroup extends MusicObject {
660
687
  }
661
688
  declare class ObjNoteGroup extends MusicObject {
662
689
  readonly col: ObjRhythmColumn;
663
- readonly voiceId: number;
690
+ readonly voiceId: VoiceId;
664
691
  readonly notes: ReadonlyArray<Note>;
665
692
  readonly minDiatonicId: number;
666
693
  readonly maxDiatonicId: number;
@@ -681,7 +708,7 @@ declare class ObjNoteGroup extends MusicObject {
681
708
  private readonly staffObjects;
682
709
  private readonly tabObjects;
683
710
  readonly mi: MNoteGroup;
684
- constructor(col: ObjRhythmColumn, voiceId: number, notes: ReadonlyArray<Note>, noteLength: NoteLength | NoteLengthStr, options?: NoteOptions, tupletRatio?: TupletRatio);
711
+ constructor(col: ObjRhythmColumn, voiceId: VoiceId, notes: ReadonlyArray<Note>, noteLength: NoteLength | NoteLengthStr, options?: NoteOptions, tupletRatio?: TupletRatio);
685
712
  getMusicInterface(): MNoteGroup;
686
713
  get doc(): ObjDocument;
687
714
  get measure(): ObjMeasure;
@@ -803,7 +830,7 @@ declare class ObjStaffRest extends MusicObject {
803
830
  }
804
831
  declare class ObjRest extends MusicObject {
805
832
  readonly col: ObjRhythmColumn;
806
- readonly voiceId: number;
833
+ readonly voiceId: VoiceId;
807
834
  readonly ownStemDir: Stem.Up | Stem.Down;
808
835
  readonly ownDiatonicId: number;
809
836
  readonly color: string;
@@ -813,7 +840,7 @@ declare class ObjRest extends MusicObject {
813
840
  private beamGroup?;
814
841
  readonly staffObjects: ObjStaffRest[];
815
842
  readonly mi: MRest;
816
- constructor(col: ObjRhythmColumn, voiceId: number, noteLength: NoteLength | NoteLengthStr, options?: RestOptions, tupletRatio?: TupletRatio);
843
+ constructor(col: ObjRhythmColumn, voiceId: VoiceId, noteLength: NoteLength | NoteLengthStr, options?: RestOptions, tupletRatio?: TupletRatio);
817
844
  getMusicInterface(): MRest;
818
845
  get doc(): ObjDocument;
819
846
  get measure(): ObjMeasure;
@@ -841,6 +868,34 @@ declare class ObjRest extends MusicObject {
841
868
  draw(renderer: Renderer): void;
842
869
  }
843
870
 
871
+ declare class LyricsContainer {
872
+ readonly col: ObjRhythmColumn;
873
+ readonly lyricsObjects: ObjLyrics[];
874
+ readonly rhythmProps: RhythmProps;
875
+ constructor(col: ObjRhythmColumn, lyricsLength: NoteLength);
876
+ addLyricsObject(lyricsObj: ObjLyrics): void;
877
+ }
878
+ declare class ObjLyrics extends MusicObject {
879
+ readonly col: ObjRhythmColumn;
880
+ readonly verse: VerseNumber;
881
+ readonly line: ObjNotationLine;
882
+ readonly vpos: VerticalPos;
883
+ private nextLyricsObject?;
884
+ private readonly color;
885
+ private readonly hyphen?;
886
+ private readonly text;
887
+ readonly mi: MLyrics;
888
+ constructor(col: ObjRhythmColumn, verse: VerseNumber, line: ObjNotationLine, vpos: VerticalPos, lyricsText: string, lyricsOptions?: LyricsOptions);
889
+ getMusicInterface(): MLyrics;
890
+ get measure(): ObjMeasure;
891
+ getText(): string;
892
+ setNextLyricsObject(lyricsObj: ObjLyrics): void;
893
+ pick(x: number, y: number): MusicObject[];
894
+ layout(renderer: Renderer): void;
895
+ offset(dx: number, dy: number): void;
896
+ draw(renderer: Renderer): void;
897
+ }
898
+
844
899
  type ScorePlayerNote = {
845
900
  note: Note;
846
901
  ticks: number;
@@ -848,10 +903,17 @@ type ScorePlayerNote = {
848
903
  slur: undefined | "first" | "slurred";
849
904
  };
850
905
  type RhythmSymbol = ObjNoteGroup | ObjRest;
906
+ type LyricsContainerData = {
907
+ lyricsContainer: LyricsContainer;
908
+ verse: VerseNumber;
909
+ line: ObjNotationLine;
910
+ vpos: VerticalPos;
911
+ };
851
912
  declare class ObjRhythmColumn extends MusicObject {
852
913
  readonly measure: ObjMeasure;
853
914
  readonly positionTicks: number;
854
915
  private readonly voiceSymbol;
916
+ private readonly lyricsContainers;
855
917
  private minDiatonicId?;
856
918
  private maxDiatonicId?;
857
919
  private staffMinDiatonicId;
@@ -885,8 +947,10 @@ declare class ObjRhythmColumn extends MusicObject {
885
947
  pick(x: number, y: number): MusicObject[];
886
948
  hasArpeggio(): boolean;
887
949
  getArpeggioDir(): Arpeggio;
888
- setVoiceSymbol(voiceId: number, symbol: RhythmSymbol): void;
889
- getVoiceSymbol(voiceId: number): RhythmSymbol | undefined;
950
+ setVoiceSymbol(voiceId: VoiceId, symbol: RhythmSymbol): void;
951
+ getVoiceSymbol(voiceId: VoiceId): RhythmSymbol | undefined;
952
+ getLyricsContainerDatas(): ReadonlyArray<LyricsContainerData>;
953
+ getLyricsContainer(verse: VerseNumber, line: ObjNotationLine, vpos: VerticalPos, lyricsLength?: NoteLength): LyricsContainer | undefined;
890
954
  getMinWidth(): number;
891
955
  setupNoteHeadDisplacements(): void;
892
956
  getNoteHeadDisplacement(noteGroup: ObjNoteGroup, note: Note): -1 | 0 | 1;
@@ -1035,6 +1099,7 @@ declare class ObjMeasure extends MusicObject {
1035
1099
  private endRepeatPlayCount;
1036
1100
  private endRepeatPlayCountText?;
1037
1101
  private staticObjectsCache;
1102
+ private lyricsObjectsCache;
1038
1103
  readonly mi: MMeasure;
1039
1104
  constructor(row: ObjScoreRow);
1040
1105
  getMusicInterface(): MMeasure;
@@ -1089,8 +1154,9 @@ declare class ObjMeasure extends MusicObject {
1089
1154
  hasEndSection(): boolean;
1090
1155
  endRow(): void;
1091
1156
  private addRhythmSymbol;
1092
- addNoteGroup(voiceId: number, notes: (Note | string)[], noteLength: NoteLength | NoteLengthStr, options?: NoteOptions, tupletRatio?: TupletRatio): ObjNoteGroup;
1093
- addRest(voiceId: number, restLength: NoteLength | NoteLengthStr, options?: RestOptions, tupletRatio?: TupletRatio): ObjRest;
1157
+ addNoteGroup(voiceId: VoiceId, notes: (Note | string)[], noteLength: NoteLength | NoteLengthStr, options?: NoteOptions, tupletRatio?: TupletRatio): ObjNoteGroup;
1158
+ addRest(voiceId: VoiceId, restLength: NoteLength | NoteLengthStr, options?: RestOptions, tupletRatio?: TupletRatio): ObjRest;
1159
+ addLyrics(staffTabOrGroups: StaffTabOrGroups | undefined, verse: VerseNumber, lyricsLength: NoteLength | NoteLengthStr, lyricsText: string, lyricsOptions: LyricsOptions): void;
1094
1160
  /**
1095
1161
  *
1096
1162
  * @param positionTicks - get ObjRhythmColumn with positionTicks. Insert new if necessary.
@@ -1107,6 +1173,8 @@ declare class ObjMeasure extends MusicObject {
1107
1173
  getMinWidth(): number;
1108
1174
  getStaffLineLeft(): number;
1109
1175
  getStaffLineRight(): number;
1176
+ private getLyricsObjects;
1177
+ getPrevLyricsObject(lyricsObj: ObjLyrics): ObjLyrics | undefined;
1110
1178
  getStaticObjects(line: ObjNotationLine): ReadonlyArray<MusicObject>;
1111
1179
  removeLayoutObjects(musicObj: MusicObject): void;
1112
1180
  addConnectiveObject(connective: ObjConnective): void;
@@ -1119,7 +1187,7 @@ declare class ObjMeasure extends MusicObject {
1119
1187
  private static setupBeamGroup;
1120
1188
  getBarLineLeft(): ObjBarLineLeft;
1121
1189
  getBarLineRight(): ObjBarLineRight;
1122
- getVoiceSymbols(voiceId: number): ReadonlyArray<RhythmSymbol>;
1190
+ getVoiceSymbols(voiceId: VoiceId): ReadonlyArray<RhythmSymbol>;
1123
1191
  completeRests(voiceId?: VoiceId | VoiceId[]): void;
1124
1192
  requestLayout(): void;
1125
1193
  layout(renderer: Renderer): void;
@@ -1216,7 +1284,7 @@ declare class ObjDocument extends MusicObject {
1216
1284
  addMeasure(): ObjMeasure;
1217
1285
  addStaffGroup(groupName: string, layoutElements: number | string | (number | string)[], verticalPosition: VerticalPosition): void;
1218
1286
  getStaffGroup(groupName: string): StaffGroup | undefined;
1219
- getVoiceSymbols(voiceId: number): ReadonlyArray<RhythmSymbol>;
1287
+ getVoiceSymbols(voiceId: VoiceId): ReadonlyArray<RhythmSymbol>;
1220
1288
  removeLayoutObjects(musicObj: MusicObject): void;
1221
1289
  private forEachMeasure;
1222
1290
  resetMeasures(): void;
@@ -1397,13 +1465,16 @@ declare enum LayoutGroupId {
1397
1465
  Ending = 3,
1398
1466
  TempoAnnotation = 4,
1399
1467
  DynamicsAnnotation = 5,
1400
- ChordLabel = 6
1468
+ ChordLabel = 6,
1469
+ LyricsVerse1 = 7,
1470
+ LyricsVerse2 = 8,
1471
+ LyricsVerse3 = 9
1401
1472
  }
1402
1473
  declare enum VerticalPos {
1403
1474
  Above = 0,
1404
1475
  Below = 1
1405
1476
  }
1406
- type LayoutableMusicObject = ObjText | ObjSpecialText | ObjExtensionLine | ObjFermata | ObjEnding;
1477
+ type LayoutableMusicObject = ObjText | ObjSpecialText | ObjExtensionLine | ObjFermata | ObjEnding | ObjLyrics;
1407
1478
  declare class StaffGroup {
1408
1479
  readonly groupName: string;
1409
1480
  readonly staffsTabsAndGroups: number | string | (number | string)[];
@@ -2161,7 +2232,7 @@ declare class MRhythmColumn extends MusicInterface {
2161
2232
  * @param voiceId - Voice id.
2162
2233
  * @returns - Note group, rest or undefined.
2163
2234
  */
2164
- getRhythmSymbol(voiceId: number): MNoteGroup | MRest | undefined;
2235
+ getRhythmSymbol(voiceId: VoiceId): MNoteGroup | MRest | undefined;
2165
2236
  /**
2166
2237
  * Get symbol (note group or rest) of this column for given voice id.
2167
2238
  * @deprecated - Use getRhythmSymbol(voiceId) instead.
@@ -2295,6 +2366,21 @@ declare class MText extends MusicInterface {
2295
2366
  */
2296
2367
  getText(): string;
2297
2368
  }
2369
+ /** Lyrics object. */
2370
+ declare class MLyrics extends MusicInterface {
2371
+ private readonly obj;
2372
+ /** Object name. */
2373
+ static readonly Name = "Lyrics";
2374
+ /** @internal */
2375
+ constructor(obj: ObjLyrics);
2376
+ /** @internal */
2377
+ getMusicObject(): ObjLyrics;
2378
+ /**
2379
+ * Get lyrics text.
2380
+ * @returns - Lyrics text.
2381
+ */
2382
+ getText(): string;
2383
+ }
2298
2384
  /** Extension line object. */
2299
2385
  declare class MExtensionLine extends MusicInterface {
2300
2386
  private readonly obj;
@@ -2306,4 +2392,4 @@ declare class MExtensionLine extends MusicInterface {
2306
2392
  getMusicObject(): ObjExtensionLine;
2307
2393
  }
2308
2394
 
2309
- export { Clef as $, type AnnotationText as A, MBarLineRight as B, Connective as C, DivRect as D, MBarLineLeft as E, Fermata as F, MStaffTabBarLine as G, MNoteGroup as H, MStaffNoteGroup as I, MTabNoteGroup as J, MRest as K, Label as L, MDocument as M, type NoteOptions as N, MStaffRest as O, MRhythmColumn as P, MScoreRow as Q, type RestOptions as R, StaffPreset as S, type TupletOptions as T, MStaff as U, type VoiceId as V, MTab as W, MSignature as X, MSpecialText as Y, MText as Z, MExtensionLine as _, type ScoreConfiguration as a, type StaffConfig as a0, type TabConfig as a1, getVoiceIds as a2, type StringNumber as a3, getStringNumbers as a4, Stem as a5, Arpeggio as a6, type StaffTabOrGroup as a7, DynamicsAnnotation as a8, TempoAnnotation as a9, PlayState as aa, type PlayStateChangeListener as ab, type StaffTabOrGroups as b, Navigation as c, Annotation as d, TieType as e, NoteAnchor as f, VerticalPosition as g, type ScoreEventType as h, ScoreEvent as i, ScoreStaffPosEvent as j, ScoreObjectEvent as k, type ScoreEventListener as l, MPlayer as m, MRenderer as n, MPlaybackButtons as o, MusicInterface as p, MAccidental as q, MConnective as r, MArpeggio as s, MBeamGroup as t, MStaffBeamGroup as u, MEnding as v, MFermata as w, MHeader as x, MImage as y, MMeasure as z };
2395
+ export { MText as $, type AnnotationText as A, MImage as B, Connective as C, DivRect as D, MMeasure as E, Fermata as F, MBarLineRight as G, MBarLineLeft as H, MStaffTabBarLine as I, MNoteGroup as J, MStaffNoteGroup as K, type LyricsOptions as L, MDocument as M, type NoteOptions as N, MTabNoteGroup as O, MRest as P, MStaffRest as Q, type RestOptions as R, StaffPreset as S, type TupletOptions as T, MRhythmColumn as U, type VoiceId as V, MScoreRow as W, MStaff as X, MTab as Y, MSignature as Z, MSpecialText as _, type ScoreConfiguration as a, MLyrics as a0, MExtensionLine as a1, Clef as a2, type StaffConfig as a3, type TabConfig as a4, getVoiceIds as a5, type StringNumber as a6, getStringNumbers as a7, getVerseNumbers as a8, Stem as a9, Arpeggio as aa, type StaffTabOrGroup as ab, LyricsAlign as ac, LyricsHyphen as ad, DynamicsAnnotation as ae, TempoAnnotation as af, PlayState as ag, type PlayStateChangeListener as ah, type VerseNumber as b, type StaffTabOrGroups as c, Navigation as d, Annotation as e, Label as f, TieType as g, NoteAnchor as h, VerticalPosition as i, type ScoreEventType as j, ScoreEvent as k, ScoreStaffPosEvent as l, ScoreObjectEvent as m, type ScoreEventListener as n, MPlayer as o, MRenderer as p, MPlaybackButtons as q, MusicInterface as r, MAccidental as s, MConnective as t, MArpeggio as u, MBeamGroup as v, MStaffBeamGroup as w, MEnding as x, MFermata as y, MHeader as z };
@@ -1,6 +1,6 @@
1
- import { M as MDocument } from '../music-objects-DIaqNPjs.mjs';
1
+ import { M as MDocument } from '../music-objects-3Hxlkxy6.mjs';
2
2
  import '../note-eA2xPPiG.mjs';
3
- import '../tempo-S85Q7uJA.mjs';
3
+ import '../tempo-dkctPkCS.mjs';
4
4
  import '@tspro/ts-utils-lib';
5
5
 
6
6
  /**
@@ -1,6 +1,6 @@
1
- import { M as MDocument } from '../music-objects-xJJNlFwK.js';
1
+ import { M as MDocument } from '../music-objects-CI7IjsjE.js';
2
2
  import '../note-eA2xPPiG.js';
3
- import '../tempo-Bp1UzsrZ.js';
3
+ import '../tempo-GrstpD9G.js';
4
4
  import '@tspro/ts-utils-lib';
5
5
 
6
6
  /**
@@ -1,4 +1,4 @@
1
- /* WebMusicScore v4.1.0 | (c) 2023 PahkaSoft | MIT License | Includes: Tone.js (MIT License) */
1
+ /* WebMusicScore v4.2.0 | (c) 2023 PahkaSoft | MIT License | Includes: Tone.js (MIT License) */
2
2
  "use strict";
3
3
  var __defProp = Object.defineProperty;
4
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -33,7 +33,7 @@ function createFrereJacques() {
33
33
  return new import_score.DocumentBuilder().setHeader("Fr\xE8re Jacques", "Traditional").setScoreConfiguration([
34
34
  { type: "staff", clef: "G", voiceIds: [0] },
35
35
  { type: "staff", clef: "F", voiceIds: [1] }
36
- ]).setMeasuresPerRow(2).addMeasure().setKeySignature("D Major").setTimeSignature("4/4").addNote(0, "D4", "4n", { stem: "up" }).addNote(0, "E4", "4n").addNote(0, "F#4", "4n").addNote(0, "D4", "4n").addRest(1, "1n", { staffPos: "F3" }).addMeasure().addNote(0, "D4", "4n").addNote(0, "E4", "4n").addNote(0, "F#4", "4n").addNote(0, "D4", "4n").addRest(1, "1n", { staffPos: "F3" }).addMeasure().addNavigation("startRepeat").addNote(0, "F#4", "4n").addNote(0, "G4", "4n").addNote(0, "A4", "2n").addNote(1, "D3", "4n", { stem: "down" }).addNote(1, "E3", "4n").addNote(1, "F#3", "4n").addNote(1, "D3", "4n").addMeasure().addNote(0, "F#4", "4n").addNote(0, "G4", "4n").addNote(0, "A4", "2n").addNote(1, "D3", "4n").addNote(1, "E3", "4n").addNote(1, "F#3", "4n").addNote(1, "D3", "4n").addMeasure().addNote(0, "A4", "8n").addNote(0, "B4", "8n").addNote(0, "A4", "8n").addNote(0, "G4", "8n").addNote(0, "F#4", "4n").addNote(0, "D4", "4n").addNote(1, "F#3", "4n").addNote(1, "G3", "4n").addNote(1, "A3", "2n").addMeasure().addNote(0, "A4", "8n").addNote(0, "B4", "8n").addNote(0, "A4", "8n").addNote(0, "G4", "8n").addNote(0, "F#4", "4n").addNote(0, "D4", "4n").addNote(1, "F#3", "4n").addNote(1, "G3", "4n").addNote(1, "A3", "2n").addMeasure().addNote(0, "D4", "4n").addChord(0, ["C#4", "A4"], "4n").addNote(0, "D4", "4n").addRest(0, "4n").addNote(1, "A3", "8n").addNote(1, "B3", "8n").addNote(1, "A3", "8n").addNote(1, "G3", "8n").addNote(1, "F#3", "4n").addNote(1, "D3", "4n").addMeasure().addNote(0, "D4", "4n").addChord(0, ["C#4", "A4"], "4n").addNote(0, "D4", "4n").addRest(0, "4n").addNote(1, "A3", "8n").addNote(1, "B3", "8n").addNote(1, "A3", "8n").addNote(1, "G3", "8n").addNote(1, "F#3", "4n").addNote(1, "D3", "4n").addMeasure().setMeasuresPerRow(4).addNavigation("ending", 1).addNote(0, "D4", "4n").addNote(0, "E4", "4n").addNote(0, "F#4", "4n").addNote(0, "D4", "4n").addNote(1, "D3", "4n").addChord(1, ["C#3", "A3"], "4n").addNote(1, "D3", "4n").addRest(1, "4n").addMeasure().addNavigation("endRepeat").addNote(0, "D4", "4n").addNote(0, "E4", "4n").addNote(0, "F#4", "4n").addNote(0, "D4", "4n").addNote(1, "D3", "4n").addChord(1, ["C#3", "A3"], "4n").addNote(1, "D3", "4n").addRest(1, "4n").addMeasure().addNavigation("ending", 2).addNote(0, "F#4", "4n").addNote(0, "D4", "4n").addNote(0, "F#4", "4n").addNote(0, "D4", "4n").addNote(1, "A3", "4n").addNote(1, "F#3", "4n").addNote(1, "A3", "4n").addNote(1, "F#3", "4n").addMeasure().addNote(0, "A3", "4n").addNote(0, "C#4", "8n").addNote(0, "C#4", "8n").addNote(0, "D4", "2n").addNote(1, "D3", "4n").addNote(1, "E3", "4n").addNote(1, "F#3", "2n").getDocument();
36
+ ]).setMeasuresPerRow(2).addMeasure().setKeySignature("D Major").setTimeSignature("4/4").addNote(0, "D4", "4n", { stem: "up" }).addLyrics(1, "4n", "Are").addNote(0, "E4", "4n").addLyrics(1, "4n", "you").addNote(0, "F#4", "4n").addLyrics(1, "4n", "sleep", { hyphen: "-" }).addNote(0, "D4", "4n").addLyrics(1, "4n", "ing?").addRest(1, "1n", { staffPos: "F3" }).addMeasure().addNote(0, "D4", "4n").addLyrics(1, "4n", "Are").addNote(0, "E4", "4n").addLyrics(1, "4n", "you").addNote(0, "F#4", "4n").addLyrics(1, "4n", "sleep", { hyphen: "-" }).addNote(0, "D4", "4n").addLyrics(1, "4n", "ing?").addRest(1, "1n", { staffPos: "F3" }).addMeasure().addNavigation("startRepeat").addNote(0, "F#4", "4n").addLyrics(1, "4n", "Bro", { hyphen: "-" }).addNote(0, "G4", "4n").addLyrics(1, "4n", "ther").addNote(0, "A4", "2n").addLyrics(1, "4n", "John?").addNote(1, "D3", "4n", { stem: "down" }).addLyricsTo(1, 1, "4n", "Are").addNote(1, "E3", "4n").addLyricsTo(1, 1, "4n", "you").addNote(1, "F#3", "4n").addLyricsTo(1, 1, "4n", "sleep", { hyphen: "-" }).addNote(1, "D3", "4n").addLyricsTo(1, 1, "4n", "ing?").addMeasure().addNote(0, "F#4", "4n").addLyrics(1, "4n", "Bro", { hyphen: "-" }).addNote(0, "G4", "4n").addLyrics(1, "4n", "ther").addNote(0, "A4", "2n").addLyrics(1, "4n", "John?").addNote(1, "D3", "4n").addLyricsTo(1, 1, "4n", "Are").addNote(1, "E3", "4n").addLyricsTo(1, 1, "4n", "you").addNote(1, "F#3", "4n").addLyricsTo(1, 1, "4n", "sleep", { hyphen: "-" }).addNote(1, "D3", "4n").addLyricsTo(1, 1, "4n", "ing?").addMeasure().addNote(0, "A4", "8n").addLyrics(1, "8n", "Morn", { hyphen: "-" }).addNote(0, "B4", "8n").addLyrics(1, "8n", "ing").addNote(0, "A4", "8n").addLyrics(1, "8n", "bells").addNote(0, "G4", "8n").addLyrics(1, "8n", "are").addNote(0, "F#4", "4n").addLyrics(1, "4n", "ring", { hyphen: "-" }).addNote(0, "D4", "4n").addLyrics(1, "4n", "ing!").addNote(1, "F#3", "4n").addLyricsTo(1, 1, "4n", "Bro", { hyphen: "-" }).addNote(1, "G3", "4n").addLyricsTo(1, 1, "4n", "ther").addNote(1, "A3", "2n").addLyricsTo(1, 1, "2n", "John?").addMeasure().addNote(0, "A4", "8n").addLyrics(1, "8n", "Morn", { hyphen: "-" }).addNote(0, "B4", "8n").addLyrics(1, "8n", "ing").addNote(0, "A4", "8n").addLyrics(1, "8n", "bells").addNote(0, "G4", "8n").addLyrics(1, "8n", "are").addNote(0, "F#4", "4n").addLyrics(1, "4n", "ring", { hyphen: "-" }).addNote(0, "D4", "4n").addLyrics(1, "4n", "ing!").addNote(1, "F#3", "4n").addLyricsTo(1, 1, "4n", "Bro", { hyphen: "-" }).addNote(1, "G3", "4n").addLyricsTo(1, 1, "4n", "ther").addNote(1, "A3", "2n").addLyricsTo(1, 1, "2n", "John?").addMeasure().addNote(0, "D4", "4n").addLyrics(1, "4n", "Ding").addChord(0, ["C#4", "A4"], "4n").addLyrics(1, "4n", "ding").addNote(0, "D4", "4n").addLyrics(1, "4n", "dong!").addRest(0, "4n").addNote(1, "A3", "8n").addLyricsTo(1, 1, "8n", "Morn", { hyphen: "-" }).addNote(1, "B3", "8n").addLyricsTo(1, 1, "8n", "ing").addNote(1, "A3", "8n").addLyricsTo(1, 1, "8n", "bells").addNote(1, "G3", "8n").addLyricsTo(1, 1, "8n", "are").addNote(1, "F#3", "4n").addLyricsTo(1, 1, "4n", "ring", { hyphen: "-" }).addNote(1, "D3", "4n").addLyricsTo(1, 1, "4n", "ing!").addMeasure().addNote(0, "D4", "4n").addLyrics(1, "4n", "Ding").addChord(0, ["C#4", "A4"], "4n").addLyrics(1, "4n", "ding").addNote(0, "D4", "4n").addLyrics(1, "4n", "dong!").addRest(0, "4n").addNote(1, "A3", "8n").addLyricsTo(1, 1, "8n", "Morn", { hyphen: "-" }).addNote(1, "B3", "8n").addLyricsTo(1, 1, "8n", "ing").addNote(1, "A3", "8n").addLyricsTo(1, 1, "8n", "bells").addNote(1, "G3", "8n").addLyricsTo(1, 1, "8n", "are").addNote(1, "F#3", "4n").addLyricsTo(1, 1, "4n", "ring", { hyphen: "-" }).addNote(1, "D3", "4n").addLyricsTo(1, 1, "4n", "ing!").addMeasure().setMeasuresPerRow(4).addNote(0, "D4", "4n").addLyrics(1, "4n", "Are").addNote(0, "E4", "4n").addLyrics(1, "4n", "you").addNote(0, "F#4", "4n").addLyrics(1, "4n", "sleep", { hyphen: "-" }).addNote(0, "D4", "4n").addLyrics(1, "4n", "ing?").addNote(1, "D3", "4n").addLyricsTo(1, 1, "4n", "Ding").addChord(1, ["C#3", "A3"], "4n").addLyricsTo(1, 1, "4n", "ding").addNote(1, "D3", "4n").addLyricsTo(1, 1, "4n", "dong!").addRest(1, "4n").addMeasure().addNavigation("endRepeat").addNote(0, "D4", "4n").addLyrics(1, "4n", "Are").addNote(0, "E4", "4n").addLyrics(1, "4n", "you").addNote(0, "F#4", "4n").addLyrics(1, "4n", "sleep", { hyphen: "-" }).addNote(0, "D4", "4n").addLyrics(1, "4n", "ing?").addNote(1, "D3", "4n").addLyricsTo(1, 1, "4n", "Ding").addChord(1, ["C#3", "A3"], "4n").addLyricsTo(1, 1, "4n", "ding").addNote(1, "D3", "4n").addLyricsTo(1, 1, "4n", "dong!").addRest(1, "4n").addMeasure().addNote(0, "F#4", "4n").addLyrics(1, "4n", "YES").addNote(0, "D4", "4n").addLyrics(1, "4n", "I'm").addNote(0, "F#4", "4n").addLyrics(1, "4n", "SLEEP", { hyphen: "-" }).addNote(0, "D4", "4n").addLyrics(1, "4n", "ING").addNote(1, "A3", "4n").addNote(1, "F#3", "4n").addNote(1, "A3", "4n").addNote(1, "F#3", "4n").addMeasure().addNote(0, "A3", "4n").addLyrics(1, "4n", "Please").addNote(0, "C#4", "8n").addLyrics(1, "8n", "GO").addNote(0, "C#4", "8n").addLyrics(1, "8n", "A", { hyphen: "-" }).addNote(0, "D4", "2n").addLyrics(1, "4n", "WAY!").addNote(1, "D3", "4n").addNote(1, "E3", "4n").addNote(1, "F#3", "2n").getDocument();
37
37
  }
38
38
 
39
39
  // src/pieces/greensleeves.ts
@@ -1,5 +1,5 @@
1
- /* WebMusicScore v4.1.0 | (c) 2023 PahkaSoft | MIT License | Includes: Tone.js (MIT License) */
2
- import "../chunk-MHNTJ6FU.mjs";
1
+ /* WebMusicScore v4.2.0 | (c) 2023 PahkaSoft | MIT License | Includes: Tone.js (MIT License) */
2
+ import "../chunk-5NWLGWHS.mjs";
3
3
 
4
4
  // src/pieces/frere-jacques.ts
5
5
  import { DocumentBuilder } from "@tspro/web-music-score/score";
@@ -7,7 +7,7 @@ function createFrereJacques() {
7
7
  return new DocumentBuilder().setHeader("Fr\xE8re Jacques", "Traditional").setScoreConfiguration([
8
8
  { type: "staff", clef: "G", voiceIds: [0] },
9
9
  { type: "staff", clef: "F", voiceIds: [1] }
10
- ]).setMeasuresPerRow(2).addMeasure().setKeySignature("D Major").setTimeSignature("4/4").addNote(0, "D4", "4n", { stem: "up" }).addNote(0, "E4", "4n").addNote(0, "F#4", "4n").addNote(0, "D4", "4n").addRest(1, "1n", { staffPos: "F3" }).addMeasure().addNote(0, "D4", "4n").addNote(0, "E4", "4n").addNote(0, "F#4", "4n").addNote(0, "D4", "4n").addRest(1, "1n", { staffPos: "F3" }).addMeasure().addNavigation("startRepeat").addNote(0, "F#4", "4n").addNote(0, "G4", "4n").addNote(0, "A4", "2n").addNote(1, "D3", "4n", { stem: "down" }).addNote(1, "E3", "4n").addNote(1, "F#3", "4n").addNote(1, "D3", "4n").addMeasure().addNote(0, "F#4", "4n").addNote(0, "G4", "4n").addNote(0, "A4", "2n").addNote(1, "D3", "4n").addNote(1, "E3", "4n").addNote(1, "F#3", "4n").addNote(1, "D3", "4n").addMeasure().addNote(0, "A4", "8n").addNote(0, "B4", "8n").addNote(0, "A4", "8n").addNote(0, "G4", "8n").addNote(0, "F#4", "4n").addNote(0, "D4", "4n").addNote(1, "F#3", "4n").addNote(1, "G3", "4n").addNote(1, "A3", "2n").addMeasure().addNote(0, "A4", "8n").addNote(0, "B4", "8n").addNote(0, "A4", "8n").addNote(0, "G4", "8n").addNote(0, "F#4", "4n").addNote(0, "D4", "4n").addNote(1, "F#3", "4n").addNote(1, "G3", "4n").addNote(1, "A3", "2n").addMeasure().addNote(0, "D4", "4n").addChord(0, ["C#4", "A4"], "4n").addNote(0, "D4", "4n").addRest(0, "4n").addNote(1, "A3", "8n").addNote(1, "B3", "8n").addNote(1, "A3", "8n").addNote(1, "G3", "8n").addNote(1, "F#3", "4n").addNote(1, "D3", "4n").addMeasure().addNote(0, "D4", "4n").addChord(0, ["C#4", "A4"], "4n").addNote(0, "D4", "4n").addRest(0, "4n").addNote(1, "A3", "8n").addNote(1, "B3", "8n").addNote(1, "A3", "8n").addNote(1, "G3", "8n").addNote(1, "F#3", "4n").addNote(1, "D3", "4n").addMeasure().setMeasuresPerRow(4).addNavigation("ending", 1).addNote(0, "D4", "4n").addNote(0, "E4", "4n").addNote(0, "F#4", "4n").addNote(0, "D4", "4n").addNote(1, "D3", "4n").addChord(1, ["C#3", "A3"], "4n").addNote(1, "D3", "4n").addRest(1, "4n").addMeasure().addNavigation("endRepeat").addNote(0, "D4", "4n").addNote(0, "E4", "4n").addNote(0, "F#4", "4n").addNote(0, "D4", "4n").addNote(1, "D3", "4n").addChord(1, ["C#3", "A3"], "4n").addNote(1, "D3", "4n").addRest(1, "4n").addMeasure().addNavigation("ending", 2).addNote(0, "F#4", "4n").addNote(0, "D4", "4n").addNote(0, "F#4", "4n").addNote(0, "D4", "4n").addNote(1, "A3", "4n").addNote(1, "F#3", "4n").addNote(1, "A3", "4n").addNote(1, "F#3", "4n").addMeasure().addNote(0, "A3", "4n").addNote(0, "C#4", "8n").addNote(0, "C#4", "8n").addNote(0, "D4", "2n").addNote(1, "D3", "4n").addNote(1, "E3", "4n").addNote(1, "F#3", "2n").getDocument();
10
+ ]).setMeasuresPerRow(2).addMeasure().setKeySignature("D Major").setTimeSignature("4/4").addNote(0, "D4", "4n", { stem: "up" }).addLyrics(1, "4n", "Are").addNote(0, "E4", "4n").addLyrics(1, "4n", "you").addNote(0, "F#4", "4n").addLyrics(1, "4n", "sleep", { hyphen: "-" }).addNote(0, "D4", "4n").addLyrics(1, "4n", "ing?").addRest(1, "1n", { staffPos: "F3" }).addMeasure().addNote(0, "D4", "4n").addLyrics(1, "4n", "Are").addNote(0, "E4", "4n").addLyrics(1, "4n", "you").addNote(0, "F#4", "4n").addLyrics(1, "4n", "sleep", { hyphen: "-" }).addNote(0, "D4", "4n").addLyrics(1, "4n", "ing?").addRest(1, "1n", { staffPos: "F3" }).addMeasure().addNavigation("startRepeat").addNote(0, "F#4", "4n").addLyrics(1, "4n", "Bro", { hyphen: "-" }).addNote(0, "G4", "4n").addLyrics(1, "4n", "ther").addNote(0, "A4", "2n").addLyrics(1, "4n", "John?").addNote(1, "D3", "4n", { stem: "down" }).addLyricsTo(1, 1, "4n", "Are").addNote(1, "E3", "4n").addLyricsTo(1, 1, "4n", "you").addNote(1, "F#3", "4n").addLyricsTo(1, 1, "4n", "sleep", { hyphen: "-" }).addNote(1, "D3", "4n").addLyricsTo(1, 1, "4n", "ing?").addMeasure().addNote(0, "F#4", "4n").addLyrics(1, "4n", "Bro", { hyphen: "-" }).addNote(0, "G4", "4n").addLyrics(1, "4n", "ther").addNote(0, "A4", "2n").addLyrics(1, "4n", "John?").addNote(1, "D3", "4n").addLyricsTo(1, 1, "4n", "Are").addNote(1, "E3", "4n").addLyricsTo(1, 1, "4n", "you").addNote(1, "F#3", "4n").addLyricsTo(1, 1, "4n", "sleep", { hyphen: "-" }).addNote(1, "D3", "4n").addLyricsTo(1, 1, "4n", "ing?").addMeasure().addNote(0, "A4", "8n").addLyrics(1, "8n", "Morn", { hyphen: "-" }).addNote(0, "B4", "8n").addLyrics(1, "8n", "ing").addNote(0, "A4", "8n").addLyrics(1, "8n", "bells").addNote(0, "G4", "8n").addLyrics(1, "8n", "are").addNote(0, "F#4", "4n").addLyrics(1, "4n", "ring", { hyphen: "-" }).addNote(0, "D4", "4n").addLyrics(1, "4n", "ing!").addNote(1, "F#3", "4n").addLyricsTo(1, 1, "4n", "Bro", { hyphen: "-" }).addNote(1, "G3", "4n").addLyricsTo(1, 1, "4n", "ther").addNote(1, "A3", "2n").addLyricsTo(1, 1, "2n", "John?").addMeasure().addNote(0, "A4", "8n").addLyrics(1, "8n", "Morn", { hyphen: "-" }).addNote(0, "B4", "8n").addLyrics(1, "8n", "ing").addNote(0, "A4", "8n").addLyrics(1, "8n", "bells").addNote(0, "G4", "8n").addLyrics(1, "8n", "are").addNote(0, "F#4", "4n").addLyrics(1, "4n", "ring", { hyphen: "-" }).addNote(0, "D4", "4n").addLyrics(1, "4n", "ing!").addNote(1, "F#3", "4n").addLyricsTo(1, 1, "4n", "Bro", { hyphen: "-" }).addNote(1, "G3", "4n").addLyricsTo(1, 1, "4n", "ther").addNote(1, "A3", "2n").addLyricsTo(1, 1, "2n", "John?").addMeasure().addNote(0, "D4", "4n").addLyrics(1, "4n", "Ding").addChord(0, ["C#4", "A4"], "4n").addLyrics(1, "4n", "ding").addNote(0, "D4", "4n").addLyrics(1, "4n", "dong!").addRest(0, "4n").addNote(1, "A3", "8n").addLyricsTo(1, 1, "8n", "Morn", { hyphen: "-" }).addNote(1, "B3", "8n").addLyricsTo(1, 1, "8n", "ing").addNote(1, "A3", "8n").addLyricsTo(1, 1, "8n", "bells").addNote(1, "G3", "8n").addLyricsTo(1, 1, "8n", "are").addNote(1, "F#3", "4n").addLyricsTo(1, 1, "4n", "ring", { hyphen: "-" }).addNote(1, "D3", "4n").addLyricsTo(1, 1, "4n", "ing!").addMeasure().addNote(0, "D4", "4n").addLyrics(1, "4n", "Ding").addChord(0, ["C#4", "A4"], "4n").addLyrics(1, "4n", "ding").addNote(0, "D4", "4n").addLyrics(1, "4n", "dong!").addRest(0, "4n").addNote(1, "A3", "8n").addLyricsTo(1, 1, "8n", "Morn", { hyphen: "-" }).addNote(1, "B3", "8n").addLyricsTo(1, 1, "8n", "ing").addNote(1, "A3", "8n").addLyricsTo(1, 1, "8n", "bells").addNote(1, "G3", "8n").addLyricsTo(1, 1, "8n", "are").addNote(1, "F#3", "4n").addLyricsTo(1, 1, "4n", "ring", { hyphen: "-" }).addNote(1, "D3", "4n").addLyricsTo(1, 1, "4n", "ing!").addMeasure().setMeasuresPerRow(4).addNote(0, "D4", "4n").addLyrics(1, "4n", "Are").addNote(0, "E4", "4n").addLyrics(1, "4n", "you").addNote(0, "F#4", "4n").addLyrics(1, "4n", "sleep", { hyphen: "-" }).addNote(0, "D4", "4n").addLyrics(1, "4n", "ing?").addNote(1, "D3", "4n").addLyricsTo(1, 1, "4n", "Ding").addChord(1, ["C#3", "A3"], "4n").addLyricsTo(1, 1, "4n", "ding").addNote(1, "D3", "4n").addLyricsTo(1, 1, "4n", "dong!").addRest(1, "4n").addMeasure().addNavigation("endRepeat").addNote(0, "D4", "4n").addLyrics(1, "4n", "Are").addNote(0, "E4", "4n").addLyrics(1, "4n", "you").addNote(0, "F#4", "4n").addLyrics(1, "4n", "sleep", { hyphen: "-" }).addNote(0, "D4", "4n").addLyrics(1, "4n", "ing?").addNote(1, "D3", "4n").addLyricsTo(1, 1, "4n", "Ding").addChord(1, ["C#3", "A3"], "4n").addLyricsTo(1, 1, "4n", "ding").addNote(1, "D3", "4n").addLyricsTo(1, 1, "4n", "dong!").addRest(1, "4n").addMeasure().addNote(0, "F#4", "4n").addLyrics(1, "4n", "YES").addNote(0, "D4", "4n").addLyrics(1, "4n", "I'm").addNote(0, "F#4", "4n").addLyrics(1, "4n", "SLEEP", { hyphen: "-" }).addNote(0, "D4", "4n").addLyrics(1, "4n", "ING").addNote(1, "A3", "4n").addNote(1, "F#3", "4n").addNote(1, "A3", "4n").addNote(1, "F#3", "4n").addMeasure().addNote(0, "A3", "4n").addLyrics(1, "4n", "Please").addNote(0, "C#4", "8n").addLyrics(1, "8n", "GO").addNote(0, "C#4", "8n").addLyrics(1, "8n", "A", { hyphen: "-" }).addNote(0, "D4", "2n").addLyrics(1, "4n", "WAY!").addNote(1, "D3", "4n").addNote(1, "E3", "4n").addNote(1, "F#3", "2n").getDocument();
11
11
  }
12
12
 
13
13
  // src/pieces/greensleeves.ts