web-music-score 6.0.0-pre.5 → 6.0.1

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 (35) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/audio/index.d.ts +1 -1
  3. package/dist/audio/index.js +1 -1
  4. package/dist/audio/index.mjs +4 -4
  5. package/dist/audio-cg/index.js +1 -1
  6. package/dist/audio-cg/index.mjs +4 -4
  7. package/dist/audio-synth/index.js +1 -1
  8. package/dist/audio-synth/index.mjs +4 -4
  9. package/dist/{chunk-JP3PJICN.mjs → chunk-EDHJ4ZRB.mjs} +3 -3
  10. package/dist/{chunk-U2D4H5TI.mjs → chunk-IUXO5M6R.mjs} +3 -3
  11. package/dist/{chunk-Y67RBHW2.mjs → chunk-IW4YD7XE.mjs} +2 -2
  12. package/dist/{chunk-6R3N7WJC.mjs → chunk-OHH32J6I.mjs} +3 -3
  13. package/dist/{chunk-G3HIPFVF.mjs → chunk-OM25LPIN.mjs} +2 -2
  14. package/dist/{chunk-DQFQEO6F.mjs → chunk-VTNNVMRE.mjs} +4 -4
  15. package/dist/core/index.js +2 -2
  16. package/dist/core/index.mjs +5 -5
  17. package/dist/iife/audio-cg.js +1 -1
  18. package/dist/iife/index.js +12 -12
  19. package/dist/{music-objects-D-xO1oti.d.ts → music-objects-Bef-fs1f.d.ts} +8 -4
  20. package/dist/{note-CJuq5aBy.d.ts → note-RVXvpfyV.d.ts} +1 -1
  21. package/dist/pieces/index.d.ts +3 -3
  22. package/dist/pieces/index.js +2 -2
  23. package/dist/pieces/index.mjs +3 -3
  24. package/dist/react-ui/index.d.ts +3 -3
  25. package/dist/react-ui/index.js +1 -1
  26. package/dist/react-ui/index.mjs +2 -2
  27. package/dist/{scale-DxGqFxlv.d.ts → scale-B1M10_fu.d.ts} +2 -2
  28. package/dist/score/index.d.ts +9 -9
  29. package/dist/score/index.js +101 -40
  30. package/dist/score/index.mjs +105 -44
  31. package/dist/{tempo-pCAa6qgo.d.ts → tempo-D-JF-8b_.d.ts} +1 -1
  32. package/dist/theory/index.d.ts +5 -5
  33. package/dist/theory/index.js +1 -1
  34. package/dist/theory/index.mjs +4 -4
  35. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
- import { N as Note, A as Accidental } from './note-CJuq5aBy.js';
2
- import { R as RhythmProps, N as NoteLength, h as NoteLengthStr, k as TupletRatio, c as Tempo, K as KeySignature, a as TimeSignature } from './tempo-pCAa6qgo.js';
1
+ import { N as Note, A as Accidental } from './note-RVXvpfyV.js';
2
+ import { R as RhythmProps, N as NoteLength, h as NoteLengthStr, k as TupletRatio, c as Tempo, K as KeySignature, a as TimeSignature } from './tempo-D-JF-8b_.js';
3
3
  import { AnchoredRect, UniMap, Rect, Vec } from '@tspro/ts-utils-lib';
4
4
 
5
5
  /** Staff preset values for score configuration. */
@@ -657,7 +657,7 @@ declare class ObjBeamGroup extends MusicObject {
657
657
  private get color();
658
658
  layout(ctx: RenderContext): void;
659
659
  updateRect(): void;
660
- updateStemTips(): void;
660
+ updateNoteStemTips(): void;
661
661
  offset(dx: number, dy: number): void;
662
662
  draw(ctx: RenderContext): void;
663
663
  private setBeamCounts;
@@ -697,6 +697,8 @@ declare class ObjRest extends MusicObject {
697
697
  get measure(): ObjMeasure;
698
698
  get row(): ObjScoreRow;
699
699
  get noteLength(): NoteLength;
700
+ private getDiatonicIdFromStaffPos;
701
+ getDiatonicIdOnLine(diatonicId: number): number;
700
702
  getDiatonicId(staff?: ObjStaff): number;
701
703
  get stemDir(): Stem.Up | Stem.Down;
702
704
  updateRunningArguments(diatonicId: number, stemDir: Stem.Up | Stem.Down, stringNumbers: StringNumber[]): void;
@@ -940,7 +942,9 @@ declare class ObjExtensionLine extends MusicObject {
940
942
  constructor(measure: ObjMeasure, line: ObjNotationLine, extension: Extension, cols: ExtensionObjectAll[]);
941
943
  get row(): ObjScoreRow;
942
944
  getMusicInterface(): MExtensionLine;
945
+ private getLeftObj;
943
946
  private getLineLeft;
947
+ private getRightObj;
944
948
  private getLineRight;
945
949
  layoutFitToMeasure(ctx: RenderContext): void;
946
950
  pick(x: number, y: number): MusicObject[];
@@ -1072,7 +1076,7 @@ declare class ObjMeasure extends MusicObject {
1072
1076
  private addRhythmSymbol;
1073
1077
  addNoteGroup(voiceId: VoiceId, notes: (Note | string)[], noteLength: NoteLength | NoteLengthStr, options?: NoteOptions, tupletRatio?: TupletRatio): ObjNoteGroup;
1074
1078
  addRest(voiceId: VoiceId, restLength: NoteLength | NoteLengthStr, options?: RestOptions, tupletRatio?: TupletRatio): ObjRest;
1075
- addLyrics(staffTabOrGroups: StaffTabOrGroups | undefined, verse: VerseNumber, lyricsLength: NoteLength | NoteLengthStr, lyricsText: string, lyricsOptions: LyricsOptions): void;
1079
+ addLyrics(staffTabOrGroups: StaffTabOrGroups | undefined, verse: VerseNumber, lyricsText: string, lyricsLength: NoteLength | NoteLengthStr, lyricsOptions: LyricsOptions): void;
1076
1080
  /**
1077
1081
  *
1078
1082
  * @param positionTicks - get ObjRhythmColumn with positionTicks. Insert new if necessary.
@@ -300,7 +300,7 @@ declare class Note {
300
300
  * @param b - Note b.
301
301
  * @returns - -1, 0 or 1.
302
302
  */
303
- static compareFunc(a: Note, b: Note): 1 | -1 | 0;
303
+ static compareFunc(a: Note, b: Note): 1 | 0 | -1;
304
304
  }
305
305
 
306
306
  export { type Accidental as A, DefaultPitchNotation as D, GuitarNoteLabel as G, Note as N, type ParsedNote as P, SymbolSet as S, type NoteLetter as a, PitchNotation as b, PitchNotationList as c, DefaultGuitarNoteLabel as d, GuitarNoteLabelList as e, validateGuitarNoteLabel as f, getPitchNotationName as g, validatePitchNotation as v };
@@ -1,6 +1,6 @@
1
- import { M as MDocument } from '../music-objects-D-xO1oti.js';
2
- import '../note-CJuq5aBy.js';
3
- import '../tempo-pCAa6qgo.js';
1
+ import { M as MDocument } from '../music-objects-Bef-fs1f.js';
2
+ import '../note-RVXvpfyV.js';
3
+ import '../tempo-D-JF-8b_.js';
4
4
  import '@tspro/ts-utils-lib';
5
5
 
6
6
  /**
@@ -1,4 +1,4 @@
1
- /* WebMusicScore v6.0.0-pre.5 | (c) 2023-2025 Stefan Brockmann | MIT License | Includes: Tone.js (MIT License), Color Name to Code (MIT License) */
1
+ /* WebMusicScore v6.0.1 | (c) 2023-2025 Stefan Brockmann | MIT License | Includes: Tone.js (MIT License), Color Name to Code (MIT License) */
2
2
  "use strict";
3
3
  var __defProp = Object.defineProperty;
4
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -50,7 +50,7 @@ function createFrereJacques() {
50
50
  return new import_score3.DocumentBuilder().setHeader("Fr\xE8re Jacques", "Traditional").setScoreConfiguration([
51
51
  { type: "staff", clef: "G", voiceId: 0, instrument: "!{Piano" },
52
52
  { type: "staff", clef: "F", voiceId: 1, instrument: "!{Piano" }
53
- ]).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();
53
+ ]).setMeasuresPerRow(2).addMeasure().setKeySignature("D Major").setTimeSignature("4/4").addNote(0, "D4", "4n", { stem: "up" }).addLyrics(1, "Are", "4n").addNote(0, "E4", "4n").addLyrics(1, "you", "4n").addNote(0, "F#4", "4n").addLyrics(1, "sleep", "4n", { hyphen: "-" }).addNote(0, "D4", "4n").addLyrics(1, "ing?", "4n").addRest(1, "1n", { staffPos: "F3" }).addMeasure().addNote(0, "D4", "4n").addLyrics(1, "Are", "4n").addNote(0, "E4", "4n").addLyrics(1, "you", "4n").addNote(0, "F#4", "4n").addLyrics(1, "sleep", "4n", { hyphen: "-" }).addNote(0, "D4", "4n").addLyrics(1, "ing?", "4n").addRest(1, "1n", { staffPos: "F3" }).addMeasure().addNavigation("startRepeat").addNote(0, "F#4", "4n").addLyrics(1, "Bro", "4n", { hyphen: "-" }).addNote(0, "G4", "4n").addLyrics(1, "ther", "4n").addNote(0, "A4", "2n").addLyrics(1, "John?", "4n").addNote(1, "D3", "4n", { stem: "down" }).addLyricsTo(1, 1, "Are", "4n").addNote(1, "E3", "4n").addLyricsTo(1, 1, "you", "4n").addNote(1, "F#3", "4n").addLyricsTo(1, 1, "sleep", "4n", { hyphen: "-" }).addNote(1, "D3", "4n").addLyricsTo(1, 1, "ing?", "4n").addMeasure().addNote(0, "F#4", "4n").addLyrics(1, "Bro", "4n", { hyphen: "-" }).addNote(0, "G4", "4n").addLyrics(1, "ther", "4n").addNote(0, "A4", "2n").addLyrics(1, "John?", "4n").addNote(1, "D3", "4n").addLyricsTo(1, 1, "Are", "4n").addNote(1, "E3", "4n").addLyricsTo(1, 1, "you", "4n").addNote(1, "F#3", "4n").addLyricsTo(1, 1, "sleep", "4n", { hyphen: "-" }).addNote(1, "D3", "4n").addLyricsTo(1, 1, "ing?", "4n").addMeasure().addNote(0, "A4", "8n").addLyrics(1, "Morn", "8n", { hyphen: "-" }).addNote(0, "B4", "8n").addLyrics(1, "ing", "8n").addNote(0, "A4", "8n").addLyrics(1, "bells", "8n").addNote(0, "G4", "8n").addLyrics(1, "are", "8n").addNote(0, "F#4", "4n").addLyrics(1, "ring", "4n", { hyphen: "-" }).addNote(0, "D4", "4n").addLyrics(1, "ing!", "4n").addNote(1, "F#3", "4n").addLyricsTo(1, 1, "Bro", "4n", { hyphen: "-" }).addNote(1, "G3", "4n").addLyricsTo(1, 1, "ther", "4n").addNote(1, "A3", "2n").addLyricsTo(1, 1, "John?", "2n").addMeasure().addNote(0, "A4", "8n").addLyrics(1, "Morn", "8n", { hyphen: "-" }).addNote(0, "B4", "8n").addLyrics(1, "ing", "8n").addNote(0, "A4", "8n").addLyrics(1, "bells", "8n").addNote(0, "G4", "8n").addLyrics(1, "are", "8n").addNote(0, "F#4", "4n").addLyrics(1, "ring", "4n", { hyphen: "-" }).addNote(0, "D4", "4n").addLyrics(1, "ing!", "4n").addNote(1, "F#3", "4n").addLyricsTo(1, 1, "Bro", "4n", { hyphen: "-" }).addNote(1, "G3", "4n").addLyricsTo(1, 1, "ther", "4n").addNote(1, "A3", "2n").addLyricsTo(1, 1, "John?", "2n").addMeasure().addNote(0, "D4", "4n").addLyrics(1, "Ding", "4n").addChord(0, ["C#4", "A4"], "4n").addLyrics(1, "ding", "4n").addNote(0, "D4", "4n").addLyrics(1, "dong!", "4n").addRest(0, "4n").addNote(1, "A3", "8n").addLyricsTo(1, 1, "Morn", "8n", { hyphen: "-" }).addNote(1, "B3", "8n").addLyricsTo(1, 1, "ing", "8n").addNote(1, "A3", "8n").addLyricsTo(1, 1, "bells", "8n").addNote(1, "G3", "8n").addLyricsTo(1, 1, "are", "8n").addNote(1, "F#3", "4n").addLyricsTo(1, 1, "ring", "4n", { hyphen: "-" }).addNote(1, "D3", "4n").addLyricsTo(1, 1, "ing!", "4n").addMeasure().addNote(0, "D4", "4n").addLyrics(1, "Ding", "4n").addChord(0, ["C#4", "A4"], "4n").addLyrics(1, "ding", "4n").addNote(0, "D4", "4n").addLyrics(1, "dong!", "4n").addRest(0, "4n").addNote(1, "A3", "8n").addLyricsTo(1, 1, "Morn", "8n", { hyphen: "-" }).addNote(1, "B3", "8n").addLyricsTo(1, 1, "ing", "8n").addNote(1, "A3", "8n").addLyricsTo(1, 1, "bells", "8n").addNote(1, "G3", "8n").addLyricsTo(1, 1, "are", "8n").addNote(1, "F#3", "4n").addLyricsTo(1, 1, "ring", "4n", { hyphen: "-" }).addNote(1, "D3", "4n").addLyricsTo(1, 1, "ing!", "4n").addMeasure().setMeasuresPerRow(4).addNote(0, "D4", "4n").addLyrics(1, "Are", "4n").addNote(0, "E4", "4n").addLyrics(1, "you", "4n").addNote(0, "F#4", "4n").addLyrics(1, "sleep", "4n", { hyphen: "-" }).addNote(0, "D4", "4n").addLyrics(1, "ing?", "4n").addNote(1, "D3", "4n").addLyricsTo(1, 1, "Ding", "4n").addChord(1, ["C#3", "A3"], "4n").addLyricsTo(1, 1, "ding", "4n").addNote(1, "D3", "4n").addLyricsTo(1, 1, "dong!", "4n").addRest(1, "4n").addMeasure().addNavigation("endRepeat").addNote(0, "D4", "4n").addLyrics(1, "Are", "4n").addNote(0, "E4", "4n").addLyrics(1, "you", "4n").addNote(0, "F#4", "4n").addLyrics(1, "sleep", "4n", { hyphen: "-" }).addNote(0, "D4", "4n").addLyrics(1, "ing?", "4n").addNote(1, "D3", "4n").addLyricsTo(1, 1, "Ding", "4n").addChord(1, ["C#3", "A3"], "4n").addLyricsTo(1, 1, "ding", "4n").addNote(1, "D3", "4n").addLyricsTo(1, 1, "dong!", "4n").addRest(1, "4n").addMeasure().addNote(0, "F#4", "4n").addLyrics(1, "YES", "4n").addNote(0, "D4", "4n").addLyrics(1, "I'm", "4n").addNote(0, "F#4", "4n").addLyrics(1, "SLEEP", "4n", { hyphen: "-" }).addNote(0, "D4", "4n").addLyrics(1, "ING", "4n").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, "Please", "4n").addNote(0, "C#4", "8n").addLyrics(1, "GO", "8n").addNote(0, "C#4", "8n").addLyrics(1, "A", "8n", { hyphen: "-" }).addNote(0, "D4", "2n").addLyrics(1, "WAY!", "4n").addNote(1, "D3", "4n").addNote(1, "E3", "4n").addNote(1, "F#3", "2n").getDocument();
54
54
  }
55
55
 
56
56
  // src/pieces/greensleeves.ts
@@ -1,5 +1,5 @@
1
- /* WebMusicScore v6.0.0-pre.5 | (c) 2023-2025 Stefan Brockmann | MIT License | Includes: Tone.js (MIT License), Color Name to Code (MIT License) */
2
- import "../chunk-G3HIPFVF.mjs";
1
+ /* WebMusicScore v6.0.1 | (c) 2023-2025 Stefan Brockmann | MIT License | Includes: Tone.js (MIT License), Color Name to Code (MIT License) */
2
+ import "../chunk-OM25LPIN.mjs";
3
3
 
4
4
  // src/pieces/andante-diabelli.ts
5
5
  import { DocumentBuilder } from "web-music-score/score";
@@ -22,7 +22,7 @@ function createFrereJacques() {
22
22
  return new DocumentBuilder3().setHeader("Fr\xE8re Jacques", "Traditional").setScoreConfiguration([
23
23
  { type: "staff", clef: "G", voiceId: 0, instrument: "!{Piano" },
24
24
  { type: "staff", clef: "F", voiceId: 1, instrument: "!{Piano" }
25
- ]).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();
25
+ ]).setMeasuresPerRow(2).addMeasure().setKeySignature("D Major").setTimeSignature("4/4").addNote(0, "D4", "4n", { stem: "up" }).addLyrics(1, "Are", "4n").addNote(0, "E4", "4n").addLyrics(1, "you", "4n").addNote(0, "F#4", "4n").addLyrics(1, "sleep", "4n", { hyphen: "-" }).addNote(0, "D4", "4n").addLyrics(1, "ing?", "4n").addRest(1, "1n", { staffPos: "F3" }).addMeasure().addNote(0, "D4", "4n").addLyrics(1, "Are", "4n").addNote(0, "E4", "4n").addLyrics(1, "you", "4n").addNote(0, "F#4", "4n").addLyrics(1, "sleep", "4n", { hyphen: "-" }).addNote(0, "D4", "4n").addLyrics(1, "ing?", "4n").addRest(1, "1n", { staffPos: "F3" }).addMeasure().addNavigation("startRepeat").addNote(0, "F#4", "4n").addLyrics(1, "Bro", "4n", { hyphen: "-" }).addNote(0, "G4", "4n").addLyrics(1, "ther", "4n").addNote(0, "A4", "2n").addLyrics(1, "John?", "4n").addNote(1, "D3", "4n", { stem: "down" }).addLyricsTo(1, 1, "Are", "4n").addNote(1, "E3", "4n").addLyricsTo(1, 1, "you", "4n").addNote(1, "F#3", "4n").addLyricsTo(1, 1, "sleep", "4n", { hyphen: "-" }).addNote(1, "D3", "4n").addLyricsTo(1, 1, "ing?", "4n").addMeasure().addNote(0, "F#4", "4n").addLyrics(1, "Bro", "4n", { hyphen: "-" }).addNote(0, "G4", "4n").addLyrics(1, "ther", "4n").addNote(0, "A4", "2n").addLyrics(1, "John?", "4n").addNote(1, "D3", "4n").addLyricsTo(1, 1, "Are", "4n").addNote(1, "E3", "4n").addLyricsTo(1, 1, "you", "4n").addNote(1, "F#3", "4n").addLyricsTo(1, 1, "sleep", "4n", { hyphen: "-" }).addNote(1, "D3", "4n").addLyricsTo(1, 1, "ing?", "4n").addMeasure().addNote(0, "A4", "8n").addLyrics(1, "Morn", "8n", { hyphen: "-" }).addNote(0, "B4", "8n").addLyrics(1, "ing", "8n").addNote(0, "A4", "8n").addLyrics(1, "bells", "8n").addNote(0, "G4", "8n").addLyrics(1, "are", "8n").addNote(0, "F#4", "4n").addLyrics(1, "ring", "4n", { hyphen: "-" }).addNote(0, "D4", "4n").addLyrics(1, "ing!", "4n").addNote(1, "F#3", "4n").addLyricsTo(1, 1, "Bro", "4n", { hyphen: "-" }).addNote(1, "G3", "4n").addLyricsTo(1, 1, "ther", "4n").addNote(1, "A3", "2n").addLyricsTo(1, 1, "John?", "2n").addMeasure().addNote(0, "A4", "8n").addLyrics(1, "Morn", "8n", { hyphen: "-" }).addNote(0, "B4", "8n").addLyrics(1, "ing", "8n").addNote(0, "A4", "8n").addLyrics(1, "bells", "8n").addNote(0, "G4", "8n").addLyrics(1, "are", "8n").addNote(0, "F#4", "4n").addLyrics(1, "ring", "4n", { hyphen: "-" }).addNote(0, "D4", "4n").addLyrics(1, "ing!", "4n").addNote(1, "F#3", "4n").addLyricsTo(1, 1, "Bro", "4n", { hyphen: "-" }).addNote(1, "G3", "4n").addLyricsTo(1, 1, "ther", "4n").addNote(1, "A3", "2n").addLyricsTo(1, 1, "John?", "2n").addMeasure().addNote(0, "D4", "4n").addLyrics(1, "Ding", "4n").addChord(0, ["C#4", "A4"], "4n").addLyrics(1, "ding", "4n").addNote(0, "D4", "4n").addLyrics(1, "dong!", "4n").addRest(0, "4n").addNote(1, "A3", "8n").addLyricsTo(1, 1, "Morn", "8n", { hyphen: "-" }).addNote(1, "B3", "8n").addLyricsTo(1, 1, "ing", "8n").addNote(1, "A3", "8n").addLyricsTo(1, 1, "bells", "8n").addNote(1, "G3", "8n").addLyricsTo(1, 1, "are", "8n").addNote(1, "F#3", "4n").addLyricsTo(1, 1, "ring", "4n", { hyphen: "-" }).addNote(1, "D3", "4n").addLyricsTo(1, 1, "ing!", "4n").addMeasure().addNote(0, "D4", "4n").addLyrics(1, "Ding", "4n").addChord(0, ["C#4", "A4"], "4n").addLyrics(1, "ding", "4n").addNote(0, "D4", "4n").addLyrics(1, "dong!", "4n").addRest(0, "4n").addNote(1, "A3", "8n").addLyricsTo(1, 1, "Morn", "8n", { hyphen: "-" }).addNote(1, "B3", "8n").addLyricsTo(1, 1, "ing", "8n").addNote(1, "A3", "8n").addLyricsTo(1, 1, "bells", "8n").addNote(1, "G3", "8n").addLyricsTo(1, 1, "are", "8n").addNote(1, "F#3", "4n").addLyricsTo(1, 1, "ring", "4n", { hyphen: "-" }).addNote(1, "D3", "4n").addLyricsTo(1, 1, "ing!", "4n").addMeasure().setMeasuresPerRow(4).addNote(0, "D4", "4n").addLyrics(1, "Are", "4n").addNote(0, "E4", "4n").addLyrics(1, "you", "4n").addNote(0, "F#4", "4n").addLyrics(1, "sleep", "4n", { hyphen: "-" }).addNote(0, "D4", "4n").addLyrics(1, "ing?", "4n").addNote(1, "D3", "4n").addLyricsTo(1, 1, "Ding", "4n").addChord(1, ["C#3", "A3"], "4n").addLyricsTo(1, 1, "ding", "4n").addNote(1, "D3", "4n").addLyricsTo(1, 1, "dong!", "4n").addRest(1, "4n").addMeasure().addNavigation("endRepeat").addNote(0, "D4", "4n").addLyrics(1, "Are", "4n").addNote(0, "E4", "4n").addLyrics(1, "you", "4n").addNote(0, "F#4", "4n").addLyrics(1, "sleep", "4n", { hyphen: "-" }).addNote(0, "D4", "4n").addLyrics(1, "ing?", "4n").addNote(1, "D3", "4n").addLyricsTo(1, 1, "Ding", "4n").addChord(1, ["C#3", "A3"], "4n").addLyricsTo(1, 1, "ding", "4n").addNote(1, "D3", "4n").addLyricsTo(1, 1, "dong!", "4n").addRest(1, "4n").addMeasure().addNote(0, "F#4", "4n").addLyrics(1, "YES", "4n").addNote(0, "D4", "4n").addLyrics(1, "I'm", "4n").addNote(0, "F#4", "4n").addLyrics(1, "SLEEP", "4n", { hyphen: "-" }).addNote(0, "D4", "4n").addLyrics(1, "ING", "4n").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, "Please", "4n").addNote(0, "C#4", "8n").addLyrics(1, "GO", "8n").addNote(0, "C#4", "8n").addLyrics(1, "A", "8n", { hyphen: "-" }).addNote(0, "D4", "2n").addLyrics(1, "WAY!", "4n").addNote(1, "D3", "4n").addNote(1, "E3", "4n").addNote(1, "F#3", "2n").getDocument();
26
26
  }
27
27
 
28
28
  // src/pieces/greensleeves.ts
@@ -1,8 +1,8 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import * as React from 'react';
3
- import { M as MDocument, a8 as Paint, o as ScoreEventListener, r as MPlaybackButtons } from '../music-objects-D-xO1oti.js';
4
- import '../note-CJuq5aBy.js';
5
- import '../tempo-pCAa6qgo.js';
3
+ import { M as MDocument, a8 as Paint, o as ScoreEventListener, r as MPlaybackButtons } from '../music-objects-Bef-fs1f.js';
4
+ import '../note-RVXvpfyV.js';
5
+ import '../tempo-D-JF-8b_.js';
6
6
  import '@tspro/ts-utils-lib';
7
7
 
8
8
  interface MusicScoreViewProps {
@@ -1,4 +1,4 @@
1
- /* WebMusicScore v6.0.0-pre.5 | (c) 2023-2025 Stefan Brockmann | MIT License | Includes: Tone.js (MIT License), Color Name to Code (MIT License) */
1
+ /* WebMusicScore v6.0.1 | (c) 2023-2025 Stefan Brockmann | MIT License | Includes: Tone.js (MIT License), Color Name to Code (MIT License) */
2
2
  "use strict";
3
3
  var __create = Object.create;
4
4
  var __defProp = Object.defineProperty;
@@ -1,7 +1,7 @@
1
- /* WebMusicScore v6.0.0-pre.5 | (c) 2023-2025 Stefan Brockmann | MIT License | Includes: Tone.js (MIT License), Color Name to Code (MIT License) */
1
+ /* WebMusicScore v6.0.1 | (c) 2023-2025 Stefan Brockmann | MIT License | Includes: Tone.js (MIT License), Color Name to Code (MIT License) */
2
2
  import {
3
3
  __publicField
4
- } from "../chunk-G3HIPFVF.mjs";
4
+ } from "../chunk-OM25LPIN.mjs";
5
5
 
6
6
  // src/react-ui/music-score-view.tsx
7
7
  import * as React from "react";
@@ -1,5 +1,5 @@
1
- import { N as Note, S as SymbolSet } from './note-CJuq5aBy.js';
2
- import { K as KeySignature } from './tempo-pCAa6qgo.js';
1
+ import { N as Note, S as SymbolSet } from './note-RVXvpfyV.js';
2
+ import { K as KeySignature } from './tempo-D-JF-8b_.js';
3
3
 
4
4
  /** Interval direction type. */
5
5
  type IntervalDirection = "Unison" | "Ascending" | "Descending";
@@ -1,8 +1,8 @@
1
- import { N as NoteOptions, R as RestOptions, S as StaffPreset, a as ScoreConfiguration, M as MDocument, b as MeasureOptions, V as VoiceId, T as TupletOptions, c as VerseNumber, L as LyricsOptions, d as StaffTabOrGroups, F as Fermata, e as Navigation, A as AnnotationText, f as Annotation, g as Label, C as Connective, h as TieType, i as NoteAnchor, j as VerticalPosition } from '../music-objects-D-xO1oti.js';
2
- export { ao as Arpeggio, aa as BaseConfig, a9 as Clef, a5 as ColorKey, a7 as ColorKeyPart, as as DynamicsAnnotation, aq as LyricsAlign, ar as LyricsHyphen, t as MAccidental, v as MArpeggio, H as MBarLineLeft, G as MBarLineRight, w as MBeamGroup, u as MConnective, y as MEnding, a4 as MExtensionLine, z as MFermata, B as MHeader, D as MImage, a3 as MLyrics, E as MMeasure, J as MNoteGroup, r as MPlaybackButtons, p as MPlayer, q as MRenderContext, P as MRest, U as MRhythmColumn, W as MScoreRow, X as MScoreRowGroup, a1 as MSpecialText, Y as MStaff, I as MStaffBarLine, x as MStaffBeamGroup, K as MStaffNoteGroup, Q as MStaffRest, _ as MStaffSignature, Z as MTab, O as MTabNoteGroup, a0 as MTabRhythm, $ as MTabSignature, a2 as MText, s as MusicInterface, a8 as Paint, au as PlayState, av as PlayStateChangeListener, l as ScoreEvent, o as ScoreEventListener, k as ScoreEventType, n as ScoreObjectEvent, m as ScoreStaffPosEvent, ab as StaffConfig, ap as StaffTabOrGroup, an as Stem, ag as StringNumber, ac as TabConfig, at as TempoAnnotation, a6 as colorKey, ah as getStringNumbers, ak as getVerseNumbers, ad as getVoiceIds, ai as isStringNumber, al as isVerseNumber, ae as isVoiceId, aj as validateStringNumber, am as validateVerseNumber, af as validateVoiceId } from '../music-objects-D-xO1oti.js';
3
- import { N as Note } from '../note-CJuq5aBy.js';
4
- import { S as ScaleType, c as Scale } from '../scale-DxGqFxlv.js';
5
- import { N as NoteLength, h as NoteLengthStr, K as KeySignature, a as TimeSignature, T as TimeSignatures, B as BeamGrouping, k as TupletRatio } from '../tempo-pCAa6qgo.js';
1
+ import { N as NoteOptions, R as RestOptions, S as StaffPreset, a as ScoreConfiguration, M as MDocument, b as MeasureOptions, V as VoiceId, T as TupletOptions, c as VerseNumber, L as LyricsOptions, d as StaffTabOrGroups, F as Fermata, e as Navigation, A as AnnotationText, f as Annotation, g as Label, C as Connective, h as TieType, i as NoteAnchor, j as VerticalPosition } from '../music-objects-Bef-fs1f.js';
2
+ export { ao as Arpeggio, aa as BaseConfig, a9 as Clef, a5 as ColorKey, a7 as ColorKeyPart, as as DynamicsAnnotation, aq as LyricsAlign, ar as LyricsHyphen, t as MAccidental, v as MArpeggio, H as MBarLineLeft, G as MBarLineRight, w as MBeamGroup, u as MConnective, y as MEnding, a4 as MExtensionLine, z as MFermata, B as MHeader, D as MImage, a3 as MLyrics, E as MMeasure, J as MNoteGroup, r as MPlaybackButtons, p as MPlayer, q as MRenderContext, P as MRest, U as MRhythmColumn, W as MScoreRow, X as MScoreRowGroup, a1 as MSpecialText, Y as MStaff, I as MStaffBarLine, x as MStaffBeamGroup, K as MStaffNoteGroup, Q as MStaffRest, _ as MStaffSignature, Z as MTab, O as MTabNoteGroup, a0 as MTabRhythm, $ as MTabSignature, a2 as MText, s as MusicInterface, a8 as Paint, au as PlayState, av as PlayStateChangeListener, l as ScoreEvent, o as ScoreEventListener, k as ScoreEventType, n as ScoreObjectEvent, m as ScoreStaffPosEvent, ab as StaffConfig, ap as StaffTabOrGroup, an as Stem, ag as StringNumber, ac as TabConfig, at as TempoAnnotation, a6 as colorKey, ah as getStringNumbers, ak as getVerseNumbers, ad as getVoiceIds, ai as isStringNumber, al as isVerseNumber, ae as isVoiceId, aj as validateStringNumber, am as validateVerseNumber, af as validateVoiceId } from '../music-objects-Bef-fs1f.js';
3
+ import { N as Note } from '../note-RVXvpfyV.js';
4
+ import { S as ScaleType, c as Scale } from '../scale-B1M10_fu.js';
5
+ import { N as NoteLength, h as NoteLengthStr, K as KeySignature, a as TimeSignature, T as TimeSignatures, B as BeamGrouping, k as TupletRatio } from '../tempo-D-JF-8b_.js';
6
6
  import '@tspro/ts-utils-lib';
7
7
 
8
8
  /** Tuplet builder type. */
@@ -221,22 +221,22 @@ declare class DocumentBuilder {
221
221
  /**
222
222
  * Add lyrics to current measure.
223
223
  * @param verse - Verse number (e.g. 1).
224
- * @param lyricsLength - Lyrics text length (e.g. "2n").
225
224
  * @param lyricsText - Lyrics text (empty space if omitted), single value or array.
225
+ * @param lyricsLength - Lyrics text length (e.g. "2n").
226
226
  * @param lyricsOptions - Lyrics options.
227
227
  * @returns - This document builder instance.
228
228
  */
229
- addLyrics(verse: VerseNumber, lyricsLength: NoteLength | NoteLengthStr, lyricsText?: string | string[], lyricsOptions?: LyricsOptions): DocumentBuilder;
229
+ addLyrics(verse: VerseNumber, lyricsText: string | string[], lyricsLength: NoteLength | NoteLengthStr, lyricsOptions?: LyricsOptions): DocumentBuilder;
230
230
  /**
231
231
  * Add lyrics to current measure to given staff/tab/group.
232
232
  * @param staffTabOrGroups - staff/tab index (0=top), staff/tab name, or staff group name.
233
233
  * @param verse - Verse number (e.g. 1).
234
- * @param lyricsLength - Lyrics text length (e.g. "2n").
235
234
  * @param lyricsText - Lyrics text (empty space if omitted), single value or array.
235
+ * @param lyricsLength - Lyrics text length (e.g. "2n").
236
236
  * @param lyricsOptions - Lyrics options.
237
237
  * @returns - This document builder instance.
238
238
  */
239
- addLyricsTo(staffTabOrGroups: StaffTabOrGroups, verse: VerseNumber, lyricsLength: NoteLength | NoteLengthStr, lyricsText?: string | string[], lyricsOptions?: LyricsOptions): DocumentBuilder;
239
+ addLyricsTo(staffTabOrGroups: StaffTabOrGroups, verse: VerseNumber, lyricsText: string | string[], lyricsLength: NoteLength | NoteLengthStr, lyricsOptions?: LyricsOptions): DocumentBuilder;
240
240
  private addFermataInternal;
241
241
  /**
242
242
  * Add fermata to current measure.
@@ -1,4 +1,4 @@
1
- /* WebMusicScore v6.0.0-pre.5 | (c) 2023-2025 Stefan Brockmann | MIT License | Includes: Tone.js (MIT License), Color Name to Code (MIT License) */
1
+ /* WebMusicScore v6.0.1 | (c) 2023-2025 Stefan Brockmann | MIT License | Includes: Tone.js (MIT License), Color Name to Code (MIT License) */
2
2
  "use strict";
3
3
  var __create = Object.create;
4
4
  var __defProp = Object.defineProperty;
@@ -5619,17 +5619,6 @@ var ObjArpeggio = class extends MusicObject {
5619
5619
  // src/score/engine/obj-rest.ts
5620
5620
  var import_theory3 = require("web-music-score/theory");
5621
5621
  var import_core4 = require("web-music-score/core");
5622
- function getDiatonicIdFromStaffPos(staffPos) {
5623
- if (typeof staffPos === "number") {
5624
- return import_theory3.Note.getChromaticNote(staffPos).diatonicId;
5625
- } else if (typeof staffPos === "string") {
5626
- return import_theory3.Note.getNote(staffPos).diatonicId;
5627
- } else if (staffPos instanceof import_theory3.Note) {
5628
- return staffPos.diatonicId;
5629
- } else {
5630
- return void 0;
5631
- }
5632
- }
5633
5622
  var ObjStaffRest = class extends MusicObject {
5634
5623
  constructor(staff, rest) {
5635
5624
  super(staff);
@@ -5676,11 +5665,8 @@ var _ObjRest = class _ObjRest extends MusicObject {
5676
5665
  __publicField(this, "beamGroup");
5677
5666
  __publicField(this, "staffObjects", []);
5678
5667
  __publicField(this, "mi");
5679
- this.setDiatonicId = (_b = getDiatonicIdFromStaffPos((_a = this.options) == null ? void 0 : _a.staffPos)) != null ? _b : _ObjRest.UndefinedDiatonicId;
5680
- let staves = this.row.getStaves().filter((staff) => staff.containsVoiceId(this.voiceId));
5681
- if (this.setDiatonicId !== _ObjRest.UndefinedDiatonicId && staves.length > 0 && staves[0].isSpace(this.setDiatonicId)) {
5682
- this.setDiatonicId += this.setDiatonicId >= staves[0].middleLineDiatonicId ? 1 : -1;
5683
- }
5668
+ this.setDiatonicId = (_b = this.getDiatonicIdFromStaffPos((_a = this.options) == null ? void 0 : _a.staffPos)) != null ? _b : _ObjRest.UndefinedDiatonicId;
5669
+ this.setDiatonicId = this.getDiatonicIdOnLine(this.setDiatonicId);
5684
5670
  this.runningDiatonicId = this.setDiatonicId;
5685
5671
  this.runningStemDir = "up" /* Up */;
5686
5672
  this.color = (_c = options == null ? void 0 : options.color) != null ? _c : colorKey("staff.rest");
@@ -5704,6 +5690,25 @@ var _ObjRest = class _ObjRest extends MusicObject {
5704
5690
  get noteLength() {
5705
5691
  return this.rhythmProps.noteLength;
5706
5692
  }
5693
+ getDiatonicIdFromStaffPos(staffPos) {
5694
+ if (typeof staffPos === "number") {
5695
+ return import_theory3.Note.getChromaticNote(staffPos).diatonicId;
5696
+ } else if (typeof staffPos === "string") {
5697
+ return import_theory3.Note.getNote(staffPos).diatonicId;
5698
+ } else if (staffPos instanceof import_theory3.Note) {
5699
+ return staffPos.diatonicId;
5700
+ } else {
5701
+ return void 0;
5702
+ }
5703
+ }
5704
+ getDiatonicIdOnLine(diatonicId) {
5705
+ let staves = this.row.getStaves().filter((staff) => staff.containsVoiceId(this.voiceId));
5706
+ if (diatonicId !== _ObjRest.UndefinedDiatonicId && staves.length > 0 && staves[0].isSpace(diatonicId)) {
5707
+ return diatonicId += diatonicId >= staves[0].middleLineDiatonicId ? 1 : -1;
5708
+ } else {
5709
+ return diatonicId;
5710
+ }
5711
+ }
5707
5712
  getDiatonicId(staff) {
5708
5713
  if (this.runningDiatonicId === _ObjRest.UndefinedDiatonicId) {
5709
5714
  if (staff) {
@@ -7022,17 +7027,15 @@ var _Extension = class _Extension extends MusicObjectLink {
7022
7027
  let range = new ExtensionRange(curColumn);
7023
7028
  let ticksLeft = length;
7024
7029
  while (true) {
7025
- if (ticksLeft <= 0) return range;
7030
+ if (!curColumn || ticksLeft <= 0) return range;
7026
7031
  const stopObject = this.whatStopped(curColumn);
7027
7032
  if (stopObject !== void 0) {
7028
7033
  range.setStopObject(stopObject);
7029
7034
  return range;
7030
7035
  }
7036
+ range.addColumn(curColumn);
7031
7037
  ticksLeft -= curColumn.getTicksToNextColumn();
7032
7038
  curColumn = curColumn.getNextColumn();
7033
- if (!curColumn) return range;
7034
- if (ticksLeft > 0)
7035
- range.addColumn(curColumn);
7036
7039
  }
7037
7040
  }
7038
7041
  };
@@ -7062,6 +7065,9 @@ function getNavigationString(navigation) {
7062
7065
  return navigation[0].toUpperCase() + navigation.substring(1);
7063
7066
  }
7064
7067
  }
7068
+ function isDynamicsText(text) {
7069
+ return guard_exports.isEnumValue(text, DynamicsAnnotation);
7070
+ }
7065
7071
  function getDynamicsVolume(text) {
7066
7072
  if (/^(p+|f+|m|mp|mf)$/.test(text)) {
7067
7073
  let volume = 0.5 - utils_exports.Str.charCount(text, "p") * 0.1 + utils_exports.Str.charCount(text, "f") * 0.1;
@@ -7070,6 +7076,9 @@ function getDynamicsVolume(text) {
7070
7076
  return void 0;
7071
7077
  }
7072
7078
  }
7079
+ function isTempoText(text) {
7080
+ return guard_exports.isEnumValue(text, TempoAnnotation);
7081
+ }
7073
7082
  function getAnnotation(text) {
7074
7083
  if (guard_exports.isEnumValue(text, DynamicsAnnotation)) {
7075
7084
  return "dynamics" /* Dynamics */;
@@ -7278,7 +7287,7 @@ var Player = class _Player {
7278
7287
  let volumeMap = new UniMap();
7279
7288
  const pushSpeed = (col, speed) => speedMap.getOrCreate(col, []).push(speed);
7280
7289
  const pushVolume = (col, volume) => volumeMap.getOrCreate(col, []).push(volume);
7281
- this.playerColumnSequence.forEach((col) => {
7290
+ this.playerColumnSequence.forEach((col, colId) => {
7282
7291
  if (!(col instanceof ObjRhythmColumn)) {
7283
7292
  return;
7284
7293
  }
@@ -7289,8 +7298,8 @@ var Player = class _Player {
7289
7298
  curSpeed = 1;
7290
7299
  } else if ((vol = getDynamicsVolume(text)) !== void 0) {
7291
7300
  curVolume = vol;
7292
- } else if (layoutObj.musicObj.getLink() instanceof Extension) {
7293
- let extension = layoutObj.musicObj.getLink();
7301
+ } else if (isTempoText(text) || isDynamicsText(text)) {
7302
+ let extension = layoutObj.musicObj.getLink() instanceof Extension ? layoutObj.musicObj.getLink() : new Extension(layoutObj, col, Infinity, false, "solid", "bottom");
7294
7303
  const range = extension.getRange();
7295
7304
  const stopText = range.stopObject ? getTextContent(range.stopObject) : "";
7296
7305
  let totalTicks = utils_exports.Math.sum(range.columnRange.map((c) => c.getTicksToNextColumn()));
@@ -8160,7 +8169,7 @@ var ObjBeamGroup = class _ObjBeamGroup extends MusicObject {
8160
8169
  }
8161
8170
  }
8162
8171
  }
8163
- updateStemTips() {
8172
+ updateNoteStemTips() {
8164
8173
  this.staffObjects.forEach((obj) => {
8165
8174
  let left = obj.points[0];
8166
8175
  let right = obj.points[obj.points.length - 1];
@@ -8364,6 +8373,17 @@ var ObjFermata = class extends MusicObject {
8364
8373
  };
8365
8374
 
8366
8375
  // src/score/engine/obj-extension-line.ts
8376
+ function getRow(obj) {
8377
+ let o = obj;
8378
+ while (o) {
8379
+ if (o.row instanceof ObjScoreRow)
8380
+ return o.row;
8381
+ if (o.measure instanceof ObjMeasure)
8382
+ return o.measure.row;
8383
+ o = o.getParent();
8384
+ }
8385
+ return void 0;
8386
+ }
8367
8387
  function isExtensionStartObject(obj) {
8368
8388
  return obj instanceof ObjText || obj instanceof ObjSpecialText;
8369
8389
  }
@@ -8387,8 +8407,11 @@ var ObjExtensionLine = class extends MusicObject {
8387
8407
  getMusicInterface() {
8388
8408
  return this.mi;
8389
8409
  }
8410
+ getLeftObj() {
8411
+ return this.cols[0];
8412
+ }
8390
8413
  getLineLeft(ctx) {
8391
- let obj = this.cols[0];
8414
+ let obj = this.getLeftObj();
8392
8415
  if (isExtensionStartObject(obj))
8393
8416
  return obj.getRect().right + ctx.unitSize;
8394
8417
  if (obj instanceof ObjBarLineLeft)
@@ -8400,8 +8423,18 @@ var ObjExtensionLine = class extends MusicObject {
8400
8423
  }
8401
8424
  return obj.getRect().right;
8402
8425
  }
8426
+ getRightObj() {
8427
+ const obj = this.cols[this.cols.length - 1];
8428
+ if (isExtensionStopObject(obj)) {
8429
+ const objRow = getRow(obj);
8430
+ const prevObj = this.cols[this.cols.length - 2];
8431
+ const prevObjRow = getRow(prevObj);
8432
+ return objRow && prevObjRow && objRow !== prevObjRow ? prevObj : obj;
8433
+ }
8434
+ return obj;
8435
+ }
8403
8436
  getLineRight(ctx) {
8404
- let obj = this.cols[this.cols.length - 1];
8437
+ let obj = this.getRightObj();
8405
8438
  if (isExtensionStopObject(obj))
8406
8439
  return obj.getRect().left - ctx.unitSize;
8407
8440
  if (obj instanceof ObjRhythmColumn) {
@@ -8441,7 +8474,7 @@ var ObjExtensionLine = class extends MusicObject {
8441
8474
  ctx.setLineDash([]);
8442
8475
  let tails = this.extension.getTails();
8443
8476
  let last = tails[tails.length - 1];
8444
- if (this === last && !isExtensionStopObject(this.cols[this.cols.length - 1])) {
8477
+ if (this === last && !isExtensionStopObject(this.getRightObj())) {
8445
8478
  let tipH = rect.anchorY > this.line.getRect().anchorY ? -ctx.unitSize : ctx.unitSize;
8446
8479
  ctx.strokeLine(rect.right, rect.anchorY, rect.right, rect.anchorY + tipH);
8447
8480
  }
@@ -9708,7 +9741,7 @@ var ObjMeasure = class extends MusicObject {
9708
9741
  this.addRhythmSymbol(rest);
9709
9742
  return rest;
9710
9743
  }
9711
- addLyrics(staffTabOrGroups, verse, lyricsLength, lyricsText, lyricsOptions) {
9744
+ addLyrics(staffTabOrGroups, verse, lyricsText, lyricsLength, lyricsOptions) {
9712
9745
  this.forEachStaffGroup(staffTabOrGroups, 1 /* Below */, (line, vpos) => {
9713
9746
  var _a;
9714
9747
  let col = this.getRhythmColumn({ verse, line, vpos });
@@ -10048,6 +10081,34 @@ var ObjMeasure = class extends MusicObject {
10048
10081
  this.signatures.push(signature);
10049
10082
  }
10050
10083
  });
10084
+ getVoiceIds().forEach((voiceId) => {
10085
+ const staff = this.row.getStaves()[0];
10086
+ if (!staff || !staff.containsVoiceId(voiceId))
10087
+ return;
10088
+ this.beamGroups.forEach((b) => {
10089
+ const symbols = b.getSymbols();
10090
+ symbols.forEach((sym, restId) => {
10091
+ if (!(sym instanceof ObjRest && sym.setDiatonicId === ObjRest.UndefinedDiatonicId))
10092
+ return;
10093
+ let leftNoteId = restId;
10094
+ let rightNoteId = restId;
10095
+ while (symbols[leftNoteId] instanceof ObjRest) leftNoteId--;
10096
+ while (symbols[rightNoteId] instanceof ObjRest) rightNoteId++;
10097
+ let newRestDiatonicId;
10098
+ if (leftNoteId < 0 && rightNoteId <= symbols.length - 1) {
10099
+ newRestDiatonicId = symbols[rightNoteId].getDiatonicId(staff);
10100
+ } else if (leftNoteId >= 0 && rightNoteId > symbols.length - 1) {
10101
+ newRestDiatonicId = symbols[leftNoteId].getDiatonicId(staff);
10102
+ } else if (leftNoteId >= 0 && rightNoteId <= symbols.length - 1) {
10103
+ newRestDiatonicId = Math.round(
10104
+ (symbols[leftNoteId].getDiatonicId(staff) + symbols[rightNoteId].getDiatonicId(staff)) / 2
10105
+ );
10106
+ }
10107
+ if (newRestDiatonicId !== void 0)
10108
+ sym.updateRunningArguments(newRestDiatonicId, b.stemDir, []);
10109
+ });
10110
+ });
10111
+ });
10051
10112
  this.tabStringNotes.length = 0;
10052
10113
  if (this.isFirstMeasureInRow()) {
10053
10114
  this.row.getTabs().forEach((tab) => {
@@ -10144,7 +10205,7 @@ var ObjMeasure = class extends MusicObject {
10144
10205
  });
10145
10206
  }
10146
10207
  alignStemsToBeams() {
10147
- this.beamGroups.forEach((b) => b.updateStemTips());
10208
+ this.beamGroups.forEach((b) => b.updateNoteStemTips());
10148
10209
  }
10149
10210
  layoutDone() {
10150
10211
  this.columns.forEach((col) => col.layoutDone());
@@ -11551,7 +11612,7 @@ var import_theory13 = require("web-music-score/theory");
11551
11612
  var import_core16 = require("web-music-score/core");
11552
11613
  var assertingFunction = "";
11553
11614
  function setAssertFunction(fnName, ...fnArgs) {
11554
- let argsStr = fnArgs.map((arg) => JSON.stringify(arg)).join(", ");
11615
+ let argsStr = fnArgs.map((arg) => utils_exports.Str.stringify(arg)).join(", ");
11555
11616
  assertingFunction = `DocumentBuilder.${fnName}(${argsStr})`;
11556
11617
  }
11557
11618
  function assertArg(...conditions) {
@@ -11893,7 +11954,7 @@ var _DocumentBuilder = class _DocumentBuilder {
11893
11954
  ObjBeamGroup.createTuplet(tupletSymbols, tupletRatio);
11894
11955
  return this;
11895
11956
  }
11896
- addLyricsInternal(staffTabOrGroups, verse, lyricsLength, lyricsText, lyricsOptions) {
11957
+ addLyricsInternal(staffTabOrGroups, verse, lyricsText, lyricsLength, lyricsOptions) {
11897
11958
  var _a;
11898
11959
  assertStaffTabOrGRoups(staffTabOrGroups);
11899
11960
  assertArg(
@@ -11909,36 +11970,36 @@ var _DocumentBuilder = class _DocumentBuilder {
11909
11970
  (_a = lyricsOptions.align) != null ? _a : lyricsOptions.align = this.currentLyricsAlign;
11910
11971
  }
11911
11972
  if (guard_exports.isArray(lyricsText)) {
11912
- lyricsText.forEach((text) => this.getMeasure().addLyrics(staffTabOrGroups, verse, lyricsLength, text, lyricsOptions));
11973
+ lyricsText.forEach((text) => this.getMeasure().addLyrics(staffTabOrGroups, verse, text, lyricsLength, lyricsOptions));
11913
11974
  } else {
11914
- this.getMeasure().addLyrics(staffTabOrGroups, verse, lyricsLength, lyricsText, lyricsOptions);
11975
+ this.getMeasure().addLyrics(staffTabOrGroups, verse, lyricsText, lyricsLength, lyricsOptions);
11915
11976
  }
11916
11977
  return this;
11917
11978
  }
11918
11979
  /**
11919
11980
  * Add lyrics to current measure.
11920
11981
  * @param verse - Verse number (e.g. 1).
11921
- * @param lyricsLength - Lyrics text length (e.g. "2n").
11922
11982
  * @param lyricsText - Lyrics text (empty space if omitted), single value or array.
11983
+ * @param lyricsLength - Lyrics text length (e.g. "2n").
11923
11984
  * @param lyricsOptions - Lyrics options.
11924
11985
  * @returns - This document builder instance.
11925
11986
  */
11926
- addLyrics(verse, lyricsLength, lyricsText, lyricsOptions) {
11987
+ addLyrics(verse, lyricsText, lyricsLength, lyricsOptions) {
11927
11988
  setAssertFunction("addLyrics", verse, lyricsLength, lyricsText, lyricsOptions);
11928
- return this.addLyricsInternal(void 0, verse, lyricsLength, lyricsText != null ? lyricsText : "", lyricsOptions);
11989
+ return this.addLyricsInternal(void 0, verse, lyricsText, lyricsLength, lyricsOptions);
11929
11990
  }
11930
11991
  /**
11931
11992
  * Add lyrics to current measure to given staff/tab/group.
11932
11993
  * @param staffTabOrGroups - staff/tab index (0=top), staff/tab name, or staff group name.
11933
11994
  * @param verse - Verse number (e.g. 1).
11934
- * @param lyricsLength - Lyrics text length (e.g. "2n").
11935
11995
  * @param lyricsText - Lyrics text (empty space if omitted), single value or array.
11996
+ * @param lyricsLength - Lyrics text length (e.g. "2n").
11936
11997
  * @param lyricsOptions - Lyrics options.
11937
11998
  * @returns - This document builder instance.
11938
11999
  */
11939
- addLyricsTo(staffTabOrGroups, verse, lyricsLength, lyricsText, lyricsOptions) {
12000
+ addLyricsTo(staffTabOrGroups, verse, lyricsText, lyricsLength, lyricsOptions) {
11940
12001
  setAssertFunction("addLyricsTo", verse, lyricsLength, lyricsText, lyricsOptions);
11941
- return this.addLyricsInternal(staffTabOrGroups, verse, lyricsLength, lyricsText != null ? lyricsText : "", lyricsOptions);
12002
+ return this.addLyricsInternal(staffTabOrGroups, verse, lyricsText, lyricsLength, lyricsOptions);
11942
12003
  }
11943
12004
  addFermataInternal(staffTabOrGroups, fermata) {
11944
12005
  assertStaffTabOrGRoups(staffTabOrGroups);