@tspro/web-music-score 3.2.0 → 4.0.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 (38) hide show
  1. package/CHANGELOG.md +26 -10
  2. package/README.md +189 -331
  3. package/dist/audio/index.d.ts +1 -1
  4. package/dist/audio/index.js +1 -1
  5. package/dist/audio/index.mjs +2 -2
  6. package/dist/audio-cg/index.js +1 -1
  7. package/dist/audio-cg/index.mjs +2 -2
  8. package/dist/{chunk-LCTM7BID.mjs → chunk-D643HZHM.mjs} +2 -2
  9. package/dist/core/index.js +2 -2
  10. package/dist/core/index.mjs +3 -3
  11. package/dist/{guitar-C2Cp71NZ.d.ts → guitar-cNmE-EvH.d.ts} +1 -1
  12. package/dist/iife/index.global.js +11 -11
  13. package/dist/{interface-BlNl69uT.d.ts → interface-7k8qGG44.d.ts} +89 -81
  14. package/dist/{interface-Bn5HFt_U.d.mts → interface-XoKiryoV.d.mts} +88 -80
  15. package/dist/{note-BFa43I86.d.ts → note-CcVdUFqS.d.ts} +1 -1
  16. package/dist/pieces/index.d.mts +2 -2
  17. package/dist/pieces/index.d.ts +3 -3
  18. package/dist/pieces/index.js +4 -7
  19. package/dist/pieces/index.mjs +8 -11
  20. package/dist/react-ui/index.d.mts +3 -3
  21. package/dist/react-ui/index.d.ts +5 -5
  22. package/dist/react-ui/index.js +1 -1
  23. package/dist/react-ui/index.mjs +2 -2
  24. package/dist/{scale-DRR-t4Kr.d.mts → scale-C2pCNxdE.d.mts} +4 -3
  25. package/dist/{scale-ebJm37q1.d.ts → scale-CvPbJvfN.d.ts} +5 -4
  26. package/dist/score/index.d.mts +98 -31
  27. package/dist/score/index.d.ts +99 -32
  28. package/dist/score/index.js +748 -567
  29. package/dist/score/index.mjs +755 -574
  30. package/dist/tempo-BAYoZ_Li.d.mts +187 -0
  31. package/dist/tempo-r2sb6Ku2.d.ts +187 -0
  32. package/dist/theory/index.d.mts +3 -3
  33. package/dist/theory/index.d.ts +6 -6
  34. package/dist/theory/index.js +221 -78
  35. package/dist/theory/index.mjs +218 -76
  36. package/package.json +2 -2
  37. package/dist/tempo-B4h5Ktob.d.mts +0 -104
  38. package/dist/tempo-DgqDEsn0.d.ts +0 -104
@@ -1,25 +1,22 @@
1
- /* WebMusicScore v3.2.0 | (c) 2023 PahkaSoft | MIT License | Includes: Tone.js (MIT License) */
2
- import "../chunk-LCTM7BID.mjs";
1
+ /* WebMusicScore v4.0.0 | (c) 2023 PahkaSoft | MIT License | Includes: Tone.js (MIT License) */
2
+ import "../chunk-D643HZHM.mjs";
3
3
 
4
4
  // src/pieces/frere-jacques.ts
5
- import { NoteLength, ScaleType } from "@tspro/web-music-score/theory";
6
- import { DocumentBuilder, StaffPreset } from "@tspro/web-music-score/score";
5
+ import { DocumentBuilder } from "@tspro/web-music-score/score";
7
6
  function createFrereJacques() {
8
- return new DocumentBuilder().setScoreConfiguration(StaffPreset.GuitarTreble).setHeader("Frere Jacques").addMeasure().setKeySignature("G", ScaleType.Major).setTimeSignature("4/4").addNote(0, "G3", NoteLength.Quarter).addNote(0, "A3", NoteLength.Quarter).addNote(0, "B3", NoteLength.Quarter).addNote(0, "G3", NoteLength.Quarter).addMeasure().addNote(0, "G3", NoteLength.Quarter).addNote(0, "A3", NoteLength.Quarter).addNote(0, "B3", NoteLength.Quarter).addNote(0, "G3", NoteLength.Quarter).addMeasure().addNote(0, "B3", NoteLength.Quarter).addNote(0, "C4", NoteLength.Quarter).addNote(0, "D4", NoteLength.Half).endRow().addMeasure().addNote(0, "B3", NoteLength.Quarter).addNote(0, "C4", NoteLength.Quarter).addNote(0, "D4", NoteLength.Half).addMeasure().addNote(0, "D4", NoteLength.Eighth).addNote(0, "E4", NoteLength.Eighth).addNote(0, "D4", NoteLength.Eighth).addNote(0, "C4", NoteLength.Eighth).addNote(0, "B3", NoteLength.Quarter).addNote(0, "G3", NoteLength.Quarter).endRow().addMeasure().addNote(0, "D4", NoteLength.Eighth).addNote(0, "E4", NoteLength.Eighth).addNote(0, "D4", NoteLength.Eighth).addNote(0, "C4", NoteLength.Eighth).addNote(0, "B3", NoteLength.Quarter).addNote(0, "G3", NoteLength.Quarter).addMeasure().addNote(0, "G3", NoteLength.Quarter).addNote(0, "D3", NoteLength.Quarter).addNote(0, "G3", NoteLength.Half).addMeasure().addNote(0, "G3", NoteLength.Quarter).addNote(0, "D3", NoteLength.Quarter).addNote(0, "G3", NoteLength.Half).getDocument();
7
+ return new DocumentBuilder().setScoreConfiguration("guitarTreble").setHeader("Frere Jacques").addMeasure().setKeySignature("G", "Major").setTimeSignature("4/4").addNote(0, "G3", "4n").addNote(0, "A3", "4n").addNote(0, "B3", "4n").addNote(0, "G3", "4n").addMeasure().addNote(0, "G3", "4n").addNote(0, "A3", "4n").addNote(0, "B3", "4n").addNote(0, "G3", "4n").addMeasure().addNote(0, "B3", "4n").addNote(0, "C4", "4n").addNote(0, "D4", "2n").endRow().addMeasure().addNote(0, "B3", "4n").addNote(0, "C4", "4n").addNote(0, "D4", "2n").addMeasure().addNote(0, "D4", "8n").addNote(0, "E4", "8n").addNote(0, "D4", "8n").addNote(0, "C4", "8n").addNote(0, "B3", "4n").addNote(0, "G3", "4n").endRow().addMeasure().addNote(0, "D4", "8n").addNote(0, "E4", "8n").addNote(0, "D4", "8n").addNote(0, "C4", "8n").addNote(0, "B3", "4n").addNote(0, "G3", "4n").addMeasure().addNote(0, "G3", "4n").addNote(0, "D3", "4n").addNote(0, "G3", "2n").addMeasure().addNote(0, "G3", "4n").addNote(0, "D3", "4n").addNote(0, "G3", "2n").getDocument();
9
8
  }
10
9
 
11
10
  // src/pieces/greensleeves.ts
12
- import { NoteLength as NoteLength2, ScaleType as ScaleType2 } from "@tspro/web-music-score/theory";
13
- import { Arpeggio, Navigation, StaffPreset as StaffPreset2, Stem, Label, DocumentBuilder as DocumentBuilder2 } from "@tspro/web-music-score/score";
11
+ import { Navigation, DocumentBuilder as DocumentBuilder2 } from "@tspro/web-music-score/score";
14
12
  function createGreensleeves() {
15
- return new DocumentBuilder2().setScoreConfiguration(StaffPreset2.GuitarTreble).setHeader("Greensleeves").addMeasure().setKeySignature("C", ScaleType2.Major).setTimeSignature("6/8").setTempo(140).addNote(0, "A3", NoteLength2.Eighth).addMeasure().addNavigation(Navigation.StartRepeat).addNote(0, "C4", NoteLength2.Quarter, { stem: Stem.Up }).addLabel(Label.Chord, "Am").addNote(0, "D4", NoteLength2.Eighth).addNote(0, "E4", NoteLength2.Eighth, { dotted: true }).addNote(0, "F4", NoteLength2.Sixteenth).addNote(0, "E4", NoteLength2.Eighth).addNote(1, "A2", NoteLength2.Eighth, { stem: Stem.Down }).addNote(1, "E3", NoteLength2.Quarter).addNote(1, "A2", NoteLength2.Eighth).addNote(1, "E3", NoteLength2.Quarter).addMeasure().addNote(0, "D4", NoteLength2.Quarter, { stem: Stem.Up }).addLabel(Label.Chord, "G").addNote(0, "B3", NoteLength2.Eighth).addNote(0, "G3", NoteLength2.Eighth, { dotted: true }).addLabel(Label.Chord, "Em").addNote(0, "A3", NoteLength2.Sixteenth).addNote(0, "B3", NoteLength2.Eighth).addNote(1, "G2", NoteLength2.Eighth, { stem: Stem.Down }).addNote(1, "D3", NoteLength2.Quarter).addNote(1, "E2", NoteLength2.Eighth).addNote(1, "B2", NoteLength2.Quarter).addMeasure().addNote(0, "C4", NoteLength2.Quarter, { stem: Stem.Up }).addLabel(Label.Chord, "Am").addNote(0, "A3", NoteLength2.Eighth).addNote(0, "A3", NoteLength2.Eighth, { dotted: true }).addLabel(Label.Chord, "F").addNote(0, "G#3", NoteLength2.Sixteenth).addNote(0, "A3", NoteLength2.Eighth).addNote(1, "A2", NoteLength2.Eighth, { stem: Stem.Down }).addNote(1, "E3", NoteLength2.Quarter).addNote(1, "F2", NoteLength2.Eighth).addNote(1, "A2", NoteLength2.Quarter).addMeasure().addNote(0, "B3", NoteLength2.Quarter, { stem: Stem.Up }).addLabel(Label.Chord, "E").addNote(0, "G#3", NoteLength2.Eighth).addNote(0, "E3", NoteLength2.Quarter).addNote(0, "A3", NoteLength2.Eighth).addNote(1, "E2", NoteLength2.Eighth, { stem: Stem.Down }).addNote(1, "B2", NoteLength2.Quarter).addNote(1, "E2", NoteLength2.Eighth).addNote(1, "B2", NoteLength2.Quarter).endRow().addMeasure().addNote(0, "C4", NoteLength2.Quarter, { stem: Stem.Up }).addLabel(Label.Chord, "Am").addNote(0, "D4", NoteLength2.Eighth).addNote(0, "E4", NoteLength2.Eighth, { dotted: true }).addNote(0, "F4", NoteLength2.Sixteenth).addNote(0, "E4", NoteLength2.Eighth).addNote(1, "A2", NoteLength2.Eighth, { stem: Stem.Down }).addNote(1, "E3", NoteLength2.Quarter).addNote(1, "A2", NoteLength2.Eighth).addNote(1, "E3", NoteLength2.Quarter).addMeasure().addNote(0, "D4", NoteLength2.Quarter, { stem: Stem.Up }).addLabel(Label.Chord, "G").addNote(0, "B3", NoteLength2.Eighth).addNote(0, "G3", NoteLength2.Eighth, { dotted: true }).addLabel(Label.Chord, "Em").addNote(0, "A3", NoteLength2.Sixteenth).addNote(0, "B3", NoteLength2.Eighth).addNote(1, "G2", NoteLength2.Eighth, { stem: Stem.Down }).addNote(1, "D3", NoteLength2.Quarter).addNote(1, "E2", NoteLength2.Eighth).addNote(1, "B2", NoteLength2.Quarter).addMeasure().addNote(0, "C4", NoteLength2.Eighth, { dotted: true, stem: Stem.Up }).addLabel(Label.Chord, "Am").addNote(0, "B3", NoteLength2.Sixteenth).addNote(0, "A3", NoteLength2.Eighth).addNote(0, "G#3", NoteLength2.Eighth, { dotted: true }).addLabel(Label.Chord, "E").addNote(0, "F#3", NoteLength2.Sixteenth).addNote(0, "G#3", NoteLength2.Eighth).addNote(1, "A2", NoteLength2.Eighth, { stem: Stem.Down }).addNote(1, "E3", NoteLength2.Quarter).addNote(1, "E2", NoteLength2.Eighth).addNote(1, "B2", NoteLength2.Quarter).addMeasure().addNote(0, "A3", NoteLength2.Quarter, { dotted: true, stem: Stem.Up }).addLabel(Label.Chord, "Am").addNote(0, "A3", NoteLength2.Quarter, { dotted: true }).addNote(1, "A2", NoteLength2.Eighth, { stem: Stem.Down }).addNote(1, "E3", NoteLength2.Eighth).addNote(1, "C4", NoteLength2.Eighth).addNote(1, "A2", NoteLength2.Quarter, { dotted: true }).endRow().addMeasure().addChord(0, ["C3", "E3", "G3", "C4", "G4"], NoteLength2.Quarter, { dotted: true, arpeggio: Arpeggio.Up, stem: Stem.Up }).addLabel(Label.Chord, "C").addNote(0, "G4", NoteLength2.Eighth, { dotted: true }).addNote(0, "F#4", NoteLength2.Sixteenth).addNote(0, "E4", NoteLength2.Eighth).addRest(1, NoteLength2.Quarter, { dotted: true, hide: true }).addNote(1, "C3", NoteLength2.Eighth, { stem: Stem.Down }).addNote(1, "G3", NoteLength2.Quarter).addMeasure().addNote(0, "D4", NoteLength2.Quarter, { stem: Stem.Up }).addLabel(Label.Chord, "G").addNote(0, "B3", NoteLength2.Eighth).addNote(0, "G3", NoteLength2.Eighth, { dotted: true }).addLabel(Label.Chord, "Em").addNote(0, "A3", NoteLength2.Sixteenth).addNote(0, "B3", NoteLength2.Eighth).addNote(1, "G2", NoteLength2.Eighth, { stem: Stem.Down }).addNote(1, "D3", NoteLength2.Quarter).addNote(1, "E2", NoteLength2.Eighth).addNote(1, "B2", NoteLength2.Quarter).addMeasure().addNote(0, "C4", NoteLength2.Quarter, { stem: Stem.Up }).addLabel(Label.Chord, "Am").addNote(0, "A3", NoteLength2.Eighth).addNote(0, "A3", NoteLength2.Eighth, { dotted: true }).addLabel(Label.Chord, "F").addNote(0, "G#3", NoteLength2.Sixteenth).addNote(0, "A3", NoteLength2.Eighth).addNote(1, "A2", NoteLength2.Eighth, { stem: Stem.Down }).addNote(1, "E3", NoteLength2.Quarter).addNote(1, "F2", NoteLength2.Eighth).addNote(1, "A2", NoteLength2.Quarter).addMeasure().addNote(0, "B3", NoteLength2.Quarter, { stem: Stem.Up }).addLabel(Label.Chord, "E").addNote(0, "G#3", NoteLength2.Eighth).addNote(0, "E3", NoteLength2.Quarter, { dotted: true }).addNote(1, "E2", NoteLength2.Eighth, { stem: Stem.Down }).addNote(1, "B2", NoteLength2.Quarter).addNote(1, "E2", NoteLength2.Eighth).addNote(1, "B2", NoteLength2.Eighth).addNote(1, "E3", NoteLength2.Eighth).endRow().addMeasure().addNote(0, "G4", NoteLength2.Quarter, { dotted: true, stem: Stem.Up }).addLabel(Label.Chord, "C").addNote(0, "G4", NoteLength2.Eighth, { dotted: true }).addNote(0, "F#4", NoteLength2.Sixteenth).addNote(0, "E4", NoteLength2.Eighth).addNote(1, "C3", NoteLength2.Eighth, { stem: Stem.Down }).addNote(1, "G3", NoteLength2.Eighth).addNote(1, "C4", NoteLength2.Eighth).addNote(1, "C3", NoteLength2.Eighth).addNote(1, "G3", NoteLength2.Quarter).addMeasure().addNote(0, "D4", NoteLength2.Quarter, { stem: Stem.Up }).addLabel(Label.Chord, "G").addNote(0, "B3", NoteLength2.Eighth).addNote(0, "G3", NoteLength2.Eighth, { dotted: true }).addLabel(Label.Chord, "Em").addNote(0, "A3", NoteLength2.Sixteenth).addNote(0, "B3", NoteLength2.Eighth).addNote(1, "G2", NoteLength2.Eighth, { stem: Stem.Down }).addNote(1, "D3", NoteLength2.Quarter).addNote(1, "E2", NoteLength2.Eighth).addNote(1, "B2", NoteLength2.Quarter).addMeasure().addNote(0, "C4", NoteLength2.Eighth, { dotted: true, stem: Stem.Up }).addLabel(Label.Chord, "Am").addNote(0, "B3", NoteLength2.Sixteenth).addNote(0, "A3", NoteLength2.Eighth).addNote(0, "G#3", NoteLength2.Eighth, { dotted: true }).addLabel(Label.Chord, "E").addNote(0, "F#3", NoteLength2.Sixteenth).addNote(0, "G#3", NoteLength2.Eighth).addNote(1, "A2", NoteLength2.Eighth, { stem: Stem.Down }).addNote(1, "E3", NoteLength2.Quarter).addNote(1, "E2", NoteLength2.Eighth).addNote(1, "B2", NoteLength2.Quarter).addMeasure().addNavigation(Navigation.Ending, 1).addNavigation(Navigation.EndRepeat).addNote(0, "A3", NoteLength2.Quarter, { dotted: true, stem: Stem.Up }).addLabel(Label.Chord, "Am").addNote(0, "A3", NoteLength2.Quarter).addNote(0, "A3", NoteLength2.Eighth).addNote(1, "A2", NoteLength2.Eighth, { stem: Stem.Down }).addNote(1, "E3", NoteLength2.Eighth).addNote(1, "C4", NoteLength2.Eighth).addNote(1, "A2", NoteLength2.Quarter, { dotted: true }).addMeasure().addNavigation(Navigation.Ending, 2).addNote(0, "A3", NoteLength2.Quarter, { dotted: true, stem: Stem.Up }).addLabel(Label.Chord, "Am").addNote(0, "A3", NoteLength2.Quarter, { dotted: true }).addFermata().addNote(1, "A2", NoteLength2.Eighth, { stem: Stem.Down }).addNote(1, "E3", NoteLength2.Eighth).addNote(1, "C4", NoteLength2.Eighth).addNote(1, "A2", NoteLength2.Quarter, { dotted: true }).getDocument();
13
+ return new DocumentBuilder2().setScoreConfiguration("guitarTreble").setHeader("Greensleeves").addMeasure().setKeySignature("C", "Major").setTimeSignature("6/8").setTempo(140).addNote(0, "A3", "8n").addMeasure().addNavigation(Navigation.StartRepeat).addNote(0, "C4", "4n", { stem: "up" }).addLabel("chord", "Am").addNote(0, "D4", "8n").addNote(0, "E4", "8.").addNote(0, "F4", "16n").addNote(0, "E4", "8n").addNote(1, "A2", "8n", { stem: "down" }).addNote(1, "E3", "4n").addNote(1, "A2", "8n").addNote(1, "E3", "4n").addMeasure().addNote(0, "D4", "4n", { stem: "up" }).addLabel("chord", "G").addNote(0, "B3", "8n").addNote(0, "G3", "8.").addLabel("chord", "Em").addNote(0, "A3", "16n").addNote(0, "B3", "8n").addNote(1, "G2", "8n", { stem: "down" }).addNote(1, "D3", "4n").addNote(1, "E2", "8n").addNote(1, "B2", "4n").addMeasure().addNote(0, "C4", "4n", { stem: "up" }).addLabel("chord", "Am").addNote(0, "A3", "8n").addNote(0, "A3", "8.").addLabel("chord", "F").addNote(0, "G#3", "16n").addNote(0, "A3", "8n").addNote(1, "A2", "8n", { stem: "down" }).addNote(1, "E3", "4n").addNote(1, "F2", "8n").addNote(1, "A2", "4n").addMeasure().addNote(0, "B3", "4n", { stem: "up" }).addLabel("chord", "E").addNote(0, "G#3", "8n").addNote(0, "E3", "4n").addNote(0, "A3", "8n").addNote(1, "E2", "8n", { stem: "down" }).addNote(1, "B2", "4n").addNote(1, "E2", "8n").addNote(1, "B2", "4n").endRow().addMeasure().addNote(0, "C4", "4n", { stem: "up" }).addLabel("chord", "Am").addNote(0, "D4", "8n").addNote(0, "E4", "8.").addNote(0, "F4", "16n").addNote(0, "E4", "8n").addNote(1, "A2", "8n", { stem: "down" }).addNote(1, "E3", "4n").addNote(1, "A2", "8n").addNote(1, "E3", "4n").addMeasure().addNote(0, "D4", "4n", { stem: "up" }).addLabel("chord", "G").addNote(0, "B3", "8n").addNote(0, "G3", "8.").addLabel("chord", "Em").addNote(0, "A3", "16n").addNote(0, "B3", "8n").addNote(1, "G2", "8n", { stem: "down" }).addNote(1, "D3", "4n").addNote(1, "E2", "8n").addNote(1, "B2", "4n").addMeasure().addNote(0, "C4", "8.", { stem: "up" }).addLabel("chord", "Am").addNote(0, "B3", "16n").addNote(0, "A3", "8n").addNote(0, "G#3", "8.").addLabel("chord", "E").addNote(0, "F#3", "16n").addNote(0, "G#3", "8n").addNote(1, "A2", "8n", { stem: "down" }).addNote(1, "E3", "4n").addNote(1, "E2", "8n").addNote(1, "B2", "4n").addMeasure().addNote(0, "A3", "4.", { stem: "up" }).addLabel("chord", "Am").addNote(0, "A3", "4.").addNote(1, "A2", "8n", { stem: "down" }).addNote(1, "E3", "8n").addNote(1, "C4", "8n").addNote(1, "A2", "4.").endRow().addMeasure().addChord(0, ["C3", "E3", "G3", "C4", "G4"], "4.", { arpeggio: "up", stem: "up" }).addLabel("chord", "C").addNote(0, "G4", "8.").addNote(0, "F#4", "16n").addNote(0, "E4", "8n").addRest(1, "4.", { hide: true }).addNote(1, "C3", "8n", { stem: "down" }).addNote(1, "G3", "4n").addMeasure().addNote(0, "D4", "4n", { stem: "up" }).addLabel("chord", "G").addNote(0, "B3", "8n").addNote(0, "G3", "8.").addLabel("chord", "Em").addNote(0, "A3", "16n").addNote(0, "B3", "8n").addNote(1, "G2", "8n", { stem: "down" }).addNote(1, "D3", "4n").addNote(1, "E2", "8n").addNote(1, "B2", "4n").addMeasure().addNote(0, "C4", "4n", { stem: "up" }).addLabel("chord", "Am").addNote(0, "A3", "8n").addNote(0, "A3", "8.").addLabel("chord", "F").addNote(0, "G#3", "16n").addNote(0, "A3", "8n").addNote(1, "A2", "8n", { stem: "down" }).addNote(1, "E3", "4n").addNote(1, "F2", "8n").addNote(1, "A2", "4n").addMeasure().addNote(0, "B3", "4n", { stem: "up" }).addLabel("chord", "E").addNote(0, "G#3", "8n").addNote(0, "E3", "4.").addNote(1, "E2", "8n", { stem: "down" }).addNote(1, "B2", "4n").addNote(1, "E2", "8n").addNote(1, "B2", "8n").addNote(1, "E3", "8n").endRow().addMeasure().addNote(0, "G4", "4.", { stem: "up" }).addLabel("chord", "C").addNote(0, "G4", "8.").addNote(0, "F#4", "16n").addNote(0, "E4", "8n").addNote(1, "C3", "8n", { stem: "down" }).addNote(1, "G3", "8n").addNote(1, "C4", "8n").addNote(1, "C3", "8n").addNote(1, "G3", "4n").addMeasure().addNote(0, "D4", "4n", { stem: "up" }).addLabel("chord", "G").addNote(0, "B3", "8n").addNote(0, "G3", "8.").addLabel("chord", "Em").addNote(0, "A3", "16n").addNote(0, "B3", "8n").addNote(1, "G2", "8n", { stem: "down" }).addNote(1, "D3", "4n").addNote(1, "E2", "8n").addNote(1, "B2", "4n").addMeasure().addNote(0, "C4", "8.", { stem: "up" }).addLabel("chord", "Am").addNote(0, "B3", "16n").addNote(0, "A3", "8n").addNote(0, "G#3", "8.").addLabel("chord", "E").addNote(0, "F#3", "16n").addNote(0, "G#3", "8n").addNote(1, "A2", "8n", { stem: "down" }).addNote(1, "E3", "4n").addNote(1, "E2", "8n").addNote(1, "B2", "4n").addMeasure().addNavigation("ending", 1).addNavigation("endRepeat").addNote(0, "A3", "4.", { stem: "up" }).addLabel("chord", "Am").addNote(0, "A3", "4n").addNote(0, "A3", "8n").addNote(1, "A2", "8n", { stem: "down" }).addNote(1, "E3", "8n").addNote(1, "C4", "8n").addNote(1, "A2", "4.").addMeasure().addNavigation("ending", 2).addNote(0, "A3", "4.", { stem: "up" }).addLabel("chord", "Am").addNote(0, "A3", "4.").addFermata().addNote(1, "A2", "8n", { stem: "down" }).addNote(1, "E3", "8n").addNote(1, "C4", "8n").addNote(1, "A2", "4.").getDocument();
16
14
  }
17
15
 
18
16
  // src/pieces/andante-diabelli.ts
19
- import { NoteLength as NoteLength3, ScaleType as ScaleType3 } from "@tspro/web-music-score/theory";
20
- import { NoteAnchor, Navigation as Navigation2, Annotation, StaffPreset as StaffPreset3, Stem as Stem2, DocumentBuilder as DocumentBuilder3, Connective } from "@tspro/web-music-score/score";
17
+ import { DocumentBuilder as DocumentBuilder3 } from "@tspro/web-music-score/score";
21
18
  function createAndanteByDiabelli() {
22
- return new DocumentBuilder3().setScoreConfiguration(StaffPreset3.GuitarTreble).setHeader("Andante", "A. Diabelli").addMeasure().setKeySignature("D", ScaleType3.Major).setTimeSignature("3/4").setTempo(80).addRest(0, NoteLength3.Eighth, { staffPos: "G4" }).addAnnotation(Annotation.Dynamics, "p").addNote(0, "F#4", NoteLength3.Eighth, { stem: Stem2.Up }).addNote(0, "G4", NoteLength3.Eighth).addConnective(Connective.Slur, 2, NoteAnchor.Below).addNote(0, "F#4", NoteLength3.Eighth).addNote(0, "E4", NoteLength3.Eighth).addNote(0, "D4", NoteLength3.Eighth).addNote(1, "D3", NoteLength3.Half, { dotted: true, stem: Stem2.Down }).addMeasure().addNote(0, "C#4", NoteLength3.Eighth).addConnective(Connective.Slur, 2, NoteAnchor.Below).addNote(0, "D4", NoteLength3.Eighth).addNote(0, "E4", NoteLength3.Eighth).addNote(0, "F#4", NoteLength3.Eighth).addNote(0, "G4", NoteLength3.Quarter).addNote(1, "A2", NoteLength3.Half, { dotted: true }).addMeasure().addRest(0, NoteLength3.Eighth, { staffPos: "B3" }).addAnnotation(Annotation.Dynamics, "f").addNote(0, "A3", NoteLength3.Eighth).addNote(0, "G#3", NoteLength3.Eighth).addConnective(Connective.Slur, 2, NoteAnchor.Below).addNote(0, "A3", NoteLength3.Eighth).addNote(0, "B3", NoteLength3.Eighth).addNote(0, "C#4", NoteLength3.Eighth).addNote(1, "A2", NoteLength3.Half, { dotted: true }).endRow().addMeasure().addNote(0, "D4", NoteLength3.Eighth, { string: 3 }).addNote(0, "E4", NoteLength3.Eighth).addNote(0, "F#4", NoteLength3.Eighth).addNote(0, "G4", NoteLength3.Eighth).addNote(0, "A4", NoteLength3.Quarter).addNote(1, "D3", NoteLength3.Half, { dotted: true }).addMeasure().addRest(0, NoteLength3.Eighth, { staffPos: "G4" }).addAnnotation(Annotation.Dynamics, "p").addNote(0, "F#4", NoteLength3.Eighth).addNote(0, "G4", NoteLength3.Eighth).addConnective(Connective.Slur, 2, NoteAnchor.Below).addNote(0, "F#4", NoteLength3.Eighth).addNote(0, "E4", NoteLength3.Eighth).addNote(0, "D4", NoteLength3.Eighth).addNote(1, "D3", NoteLength3.Half, { dotted: true }).addMeasure().addNote(0, "C#4", NoteLength3.Eighth).addConnective(Connective.Slur, 2, NoteAnchor.Below).addNote(0, "D4", NoteLength3.Eighth).addNote(0, "E4", NoteLength3.Eighth).addNote(0, "F#4", NoteLength3.Eighth).addNote(0, "G4", NoteLength3.Quarter).addNote(1, "A2", NoteLength3.Half, { dotted: true }).endRow().addMeasure().addRest(0, NoteLength3.Eighth, { staffPos: "B3" }).addAnnotation(Annotation.Dynamics, "f").addNote(0, "A3", NoteLength3.Eighth).addNote(0, "G#3", NoteLength3.Eighth).addConnective(Connective.Slur, 2, NoteAnchor.Below).addNote(0, "A3", NoteLength3.Eighth).addNote(0, "B3", NoteLength3.Eighth).addNote(0, "C#4", NoteLength3.Eighth).addNote(1, "A2", NoteLength3.Half, { dotted: true }).addMeasure().addNote(0, "D4", NoteLength3.Quarter).addRest(1, NoteLength3.Quarter, { staffPos: "D3" }).addNote(0, "D3", NoteLength3.Quarter).addNote(1, "D3", NoteLength3.Quarter).addRest(1, NoteLength3.Quarter, { staffPos: "B3" }).addNavigation(Navigation2.EndRepeat).addMeasure().addRest(0, NoteLength3.Eighth, { staffPos: "D4" }).addAnnotation(Annotation.Dynamics, "f").addNote(0, "D4", NoteLength3.Eighth).addNote(0, "E4", NoteLength3.Eighth).addConnective(Connective.Slur, 2, NoteAnchor.Below).addNote(0, "D4", NoteLength3.Eighth).addNote(0, "C#4", NoteLength3.Eighth).addNote(0, "B3", NoteLength3.Eighth).addNote(1, "E2", NoteLength3.Half, { dotted: true }).endRow().addMeasure().addNote(0, "C#4", NoteLength3.Eighth).addConnective(Connective.Slur, 2, NoteAnchor.Below).addNote(0, "D4", NoteLength3.Eighth).addNote(0, "E4", NoteLength3.Eighth).addNote(0, "F#4", NoteLength3.Eighth).addNote(0, "E4", NoteLength3.Quarter).addNote(1, "A2", NoteLength3.Half, { dotted: true }).addMeasure().addRest(0, NoteLength3.Eighth, { staffPos: "B3" }).addAnnotation(Annotation.Dynamics, "p").addNote(0, "E3", NoteLength3.Eighth).addNote(0, "D#3", NoteLength3.Eighth).addConnective(Connective.Slur, 2, NoteAnchor.Below).addNote(0, "E3", NoteLength3.Eighth).addNote(0, "F#3", NoteLength3.Eighth).addNote(0, "G#3", NoteLength3.Eighth).addNote(1, "E2", NoteLength3.Half, { dotted: true }).addMeasure().addNote(0, "A3", NoteLength3.Eighth).addConnective(Connective.Slur, 2, NoteAnchor.Below).addNote(0, "G#3", NoteLength3.Eighth).addNote(0, "A3", NoteLength3.Eighth).addNote(0, "B3", NoteLength3.Eighth).addNote(0, "C#4", NoteLength3.Quarter).addNote(1, "A2", NoteLength3.Half, { dotted: true }).endRow().addMeasure().addRest(0, NoteLength3.Eighth, { staffPos: "G4" }).addAnnotation(Annotation.Dynamics, "f").addNote(0, "G4", NoteLength3.Eighth).addNote(0, "A4", NoteLength3.Eighth).addConnective(Connective.Slur, 2, NoteAnchor.Below).addNote(0, "G4", NoteLength3.Eighth).addNote(0, "F#4", NoteLength3.Eighth).addNote(0, "E4", NoteLength3.Eighth).addNote(1, "A2", NoteLength3.Half, { dotted: true }).addMeasure().addNote(0, "D4", NoteLength3.Eighth).addNote(0, "C#4", NoteLength3.Eighth).addNote(0, "D4", NoteLength3.Eighth).addNote(0, "E4", NoteLength3.Eighth).addNote(0, "F#4", NoteLength3.Quarter).addNote(1, "D3", NoteLength3.Half, { dotted: true }).addMeasure().addRest(0, NoteLength3.Eighth, { staffPos: "B3" }).addAnnotation(Annotation.Dynamics, "ff").addNote(0, "A3", NoteLength3.Eighth).addNote(0, "G#3", NoteLength3.Eighth).addConnective(Connective.Slur, 2, NoteAnchor.Below).addNote(0, "A3", NoteLength3.Eighth).addNote(0, "B3", NoteLength3.Eighth).addNote(0, "C#4", NoteLength3.Eighth).addNote(1, "A2", NoteLength3.Half, { dotted: true }).addMeasure().addNote(0, "D4", NoteLength3.Quarter).addRest(1, NoteLength3.Quarter, { staffPos: "D3" }).addNote(0, "D3", NoteLength3.Quarter).addNote(1, "D3", NoteLength3.Quarter).addRest(1, NoteLength3.Quarter, { staffPos: "B3" }).endSong().getDocument();
19
+ return new DocumentBuilder3().setScoreConfiguration("guitarTreble").setHeader("Andante", "A. Diabelli").addMeasure().setKeySignature("D", "Major").setTimeSignature("3/4").setTempo(80).addRest(0, "8n", { staffPos: "G4" }).addAnnotation("dynamics", "p").addNote(0, "F#4", "8n", { stem: "up" }).addNote(0, "G4", "8n").addConnective("slur", 2, "below").addNote(0, "F#4", "8n").addNote(0, "E4", "8n").addNote(0, "D4", "8n").addNote(1, "D3", "2.", { stem: "down" }).addMeasure().addNote(0, "C#4", "8n").addConnective("slur", 2, "below").addNote(0, "D4", "8n").addNote(0, "E4", "8n").addNote(0, "F#4", "8n").addNote(0, "G4", "4n").addNote(1, "A2", "2.").addMeasure().addRest(0, "8n", { staffPos: "B3" }).addAnnotation("dynamics", "f").addNote(0, "A3", "8n").addNote(0, "G#3", "8n").addConnective("slur", 2, "below").addNote(0, "A3", "8n").addNote(0, "B3", "8n").addNote(0, "C#4", "8n").addNote(1, "A2", "2.").endRow().addMeasure().addNote(0, "D4", "8n", { string: 3 }).addNote(0, "E4", "8n").addNote(0, "F#4", "8n").addNote(0, "G4", "8n").addNote(0, "A4", "4n").addNote(1, "D3", "2.").addMeasure().addRest(0, "8n", { staffPos: "G4" }).addAnnotation("dynamics", "p").addNote(0, "F#4", "8n").addNote(0, "G4", "8n").addConnective("slur", 2, "below").addNote(0, "F#4", "8n").addNote(0, "E4", "8n").addNote(0, "D4", "8n").addNote(1, "D3", "2.").addMeasure().addNote(0, "C#4", "8n").addConnective("slur", 2, "below").addNote(0, "D4", "8n").addNote(0, "E4", "8n").addNote(0, "F#4", "8n").addNote(0, "G4", "4n").addNote(1, "A2", "2.").endRow().addMeasure().addRest(0, "8n", { staffPos: "B3" }).addAnnotation("dynamics", "f").addNote(0, "A3", "8n").addNote(0, "G#3", "8n").addConnective("slur", 2, "below").addNote(0, "A3", "8n").addNote(0, "B3", "8n").addNote(0, "C#4", "8n").addNote(1, "A2", "2.").addMeasure().addNote(0, "D4", "4n").addRest(1, "4n", { staffPos: "D3" }).addNote(0, "D3", "4n").addNote(1, "D3", "4n").addRest(1, "4n", { staffPos: "B3" }).addNavigation("endRepeat").addMeasure().addRest(0, "8n", { staffPos: "D4" }).addAnnotation("dynamics", "f").addNote(0, "D4", "8n").addNote(0, "E4", "8n").addConnective("slur", 2, "below").addNote(0, "D4", "8n").addNote(0, "C#4", "8n").addNote(0, "B3", "8n").addNote(1, "E2", "2.").endRow().addMeasure().addNote(0, "C#4", "8n").addConnective("slur", 2, "below").addNote(0, "D4", "8n").addNote(0, "E4", "8n").addNote(0, "F#4", "8n").addNote(0, "E4", "4n").addNote(1, "A2", "2.").addMeasure().addRest(0, "8n", { staffPos: "B3" }).addAnnotation("dynamics", "p").addNote(0, "E3", "8n").addNote(0, "D#3", "8n").addConnective("slur", 2, "below").addNote(0, "E3", "8n").addNote(0, "F#3", "8n").addNote(0, "G#3", "8n").addNote(1, "E2", "2.").addMeasure().addNote(0, "A3", "8n").addConnective("slur", 2, "below").addNote(0, "G#3", "8n").addNote(0, "A3", "8n").addNote(0, "B3", "8n").addNote(0, "C#4", "4n").addNote(1, "A2", "2.").endRow().addMeasure().addRest(0, "8n", { staffPos: "G4" }).addAnnotation("dynamics", "f").addNote(0, "G4", "8n").addNote(0, "A4", "8n").addConnective("slur", 2, "below").addNote(0, "G4", "8n").addNote(0, "F#4", "8n").addNote(0, "E4", "8n").addNote(1, "A2", "2.").addMeasure().addNote(0, "D4", "8n").addNote(0, "C#4", "8n").addNote(0, "D4", "8n").addNote(0, "E4", "8n").addNote(0, "F#4", "4n").addNote(1, "D3", "2.").addMeasure().addRest(0, "8n", { staffPos: "B3" }).addAnnotation("dynamics", "ff").addNote(0, "A3", "8n").addNote(0, "G#3", "8n").addConnective("slur", 2, "below").addNote(0, "A3", "8n").addNote(0, "B3", "8n").addNote(0, "C#4", "8n").addNote(1, "A2", "2.").addMeasure().addNote(0, "D4", "4n").addRest(1, "4n", { staffPos: "D3" }).addNote(0, "D3", "4n").addNote(1, "D3", "4n").addRest(1, "4n", { staffPos: "B3" }).endSong().getDocument();
23
20
  }
24
21
  export {
25
22
  createAndanteByDiabelli,
@@ -1,10 +1,10 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import * as React from 'react';
3
- import { c as Scale, S as ScaleType } from '../scale-DRR-t4Kr.mjs';
3
+ import { c as Scale, S as ScaleType } from '../scale-C2pCNxdE.mjs';
4
4
  import { b as PitchNotation, G as GuitarNoteLabel, N as Note } from '../note-BFa43I86.mjs';
5
5
  import { H as Handedness } from '../guitar-DggbM2UL.mjs';
6
- import { D as DivRect, M as MDocument, i as ScoreEventListener, W as MRenderer, X as MPlaybackButtons } from '../interface-Bn5HFt_U.mjs';
7
- import '../tempo-B4h5Ktob.mjs';
6
+ import { D as DivRect, M as MDocument, k as ScoreEventListener, Y as MRenderer, Z as MPlaybackButtons } from '../interface-XoKiryoV.mjs';
7
+ import '../tempo-BAYoZ_Li.mjs';
8
8
  import '@tspro/ts-utils-lib';
9
9
 
10
10
  interface CircleOfFifthsProps {
@@ -1,10 +1,10 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import * as React from 'react';
3
- import { c as Scale, S as ScaleType } from '../scale-ebJm37q1.js';
4
- import { b as PitchNotation, G as GuitarNoteLabel, N as Note } from '../note-BFa43I86.js';
5
- import { H as Handedness } from '../guitar-C2Cp71NZ.js';
6
- import { D as DivRect, M as MDocument, i as ScoreEventListener, W as MRenderer, X as MPlaybackButtons } from '../interface-BlNl69uT.js';
7
- import '../tempo-DgqDEsn0.js';
3
+ import { c as Scale, S as ScaleType } from '../scale-CvPbJvfN.js';
4
+ import { b as PitchNotation, G as GuitarNoteLabel, N as Note } from '../note-CcVdUFqS.js';
5
+ import { H as Handedness } from '../guitar-cNmE-EvH.js';
6
+ import { D as DivRect, M as MDocument, k as ScoreEventListener, Y as MRenderer, Z as MPlaybackButtons } from '../interface-7k8qGG44.js';
7
+ import '../tempo-r2sb6Ku2.js';
8
8
  import '@tspro/ts-utils-lib';
9
9
 
10
10
  interface CircleOfFifthsProps {
@@ -1,4 +1,4 @@
1
- /* WebMusicScore v3.2.0 | (c) 2023 PahkaSoft | MIT License | Includes: Tone.js (MIT License) */
1
+ /* WebMusicScore v4.0.0 | (c) 2023 PahkaSoft | MIT License | Includes: Tone.js (MIT License) */
2
2
  "use strict";
3
3
  var __create = Object.create;
4
4
  var __defProp = Object.defineProperty;
@@ -1,7 +1,7 @@
1
- /* WebMusicScore v3.2.0 | (c) 2023 PahkaSoft | MIT License | Includes: Tone.js (MIT License) */
1
+ /* WebMusicScore v4.0.0 | (c) 2023 PahkaSoft | MIT License | Includes: Tone.js (MIT License) */
2
2
  import {
3
3
  __publicField
4
- } from "../chunk-LCTM7BID.mjs";
4
+ } from "../chunk-D643HZHM.mjs";
5
5
 
6
6
  // src/react-ui/circle-of-fifths.tsx
7
7
  import * as React from "react";
@@ -1,5 +1,5 @@
1
1
  import { N as Note, S as SymbolSet } from './note-BFa43I86.mjs';
2
- import { K as KeySignature } from './tempo-B4h5Ktob.mjs';
2
+ import { K as KeySignature } from './tempo-BAYoZ_Li.mjs';
3
3
 
4
4
  type IntervalDirection = "Unison" | "Ascending" | "Descending";
5
5
  type IntervalQuality = "Perfect" | "Major" | "minor" | "Augmented" | "Doubly Augmented" | "diminished" | "doubly diminished";
@@ -66,9 +66,10 @@ declare class ScaleFactory {
66
66
  hasScale(tonic: string): boolean;
67
67
  }
68
68
  declare function getScaleFactoryList(): ReadonlyArray<ScaleFactory | string>;
69
- declare function getScaleFactory(scaleType: ScaleType): ScaleFactory;
69
+ declare function getScaleFactory(scaleType: ScaleType | `${ScaleType}`): ScaleFactory;
70
70
  declare function validateScaleType(scaleType: unknown): ScaleType;
71
- declare function getScale(tonic: string, scaleType: ScaleType): Scale;
71
+ declare function getScale(tonic: string, scaleType: ScaleType | `${ScaleType}`): Scale;
72
+ declare function getScale(scale: string): Scale;
72
73
  declare function getDefaultScale(): Scale;
73
74
 
74
75
  export { type Degree as D, type IntervalDirection as I, ScaleType as S, type IntervalQuality as a, Interval as b, Scale as c, ScaleFactory as d, getScaleFactory as e, validateScaleType as f, getScaleFactoryList as g, getScale as h, getDefaultScale as i, validateIntervalQuality as v };
@@ -1,5 +1,5 @@
1
- import { N as Note, S as SymbolSet } from './note-BFa43I86.js';
2
- import { K as KeySignature } from './tempo-DgqDEsn0.js';
1
+ import { N as Note, S as SymbolSet } from './note-CcVdUFqS.js';
2
+ import { K as KeySignature } from './tempo-r2sb6Ku2.js';
3
3
 
4
4
  type IntervalDirection = "Unison" | "Ascending" | "Descending";
5
5
  type IntervalQuality = "Perfect" | "Major" | "minor" | "Augmented" | "Doubly Augmented" | "diminished" | "doubly diminished";
@@ -66,9 +66,10 @@ declare class ScaleFactory {
66
66
  hasScale(tonic: string): boolean;
67
67
  }
68
68
  declare function getScaleFactoryList(): ReadonlyArray<ScaleFactory | string>;
69
- declare function getScaleFactory(scaleType: ScaleType): ScaleFactory;
69
+ declare function getScaleFactory(scaleType: ScaleType | `${ScaleType}`): ScaleFactory;
70
70
  declare function validateScaleType(scaleType: unknown): ScaleType;
71
- declare function getScale(tonic: string, scaleType: ScaleType): Scale;
71
+ declare function getScale(tonic: string, scaleType: ScaleType | `${ScaleType}`): Scale;
72
+ declare function getScale(scale: string): Scale;
72
73
  declare function getDefaultScale(): Scale;
73
74
 
74
75
  export { type Degree as D, type IntervalDirection as I, ScaleType as S, type IntervalQuality as a, Interval as b, Scale as c, ScaleFactory as d, getScaleFactory as e, validateScaleType as f, getScaleFactoryList as g, getScale as h, getDefaultScale as i, validateIntervalQuality as v };
@@ -1,54 +1,121 @@
1
- import { S as StaffPreset, a as ScoreConfiguration, M as MDocument, N as NoteOptions, R as RestOptions, F as Fermata, b as StaffTabOrGroups, c as Navigation, L as Label, A as Annotation, C as Connective, T as TieType, d as NoteAnchor, V as VerticalPosition } from '../interface-Bn5HFt_U.mjs';
2
- export { a4 as Arpeggio, Y as Clef, a5 as ConnectiveSpan, D as DivRect, k as MAccidental, m as MArpeggio, v as MBarLineLeft, u as MBarLineRight, n as MBeamGroup, l as MConnective, p as MEnding, Q as MExtensionLine, q as MFermata, r as MHeader, s as MImage, t as MMeasure, x as MNoteGroup, X as MPlaybackButtons, U as MPlayer, W as MRenderer, B as MRest, G as MRhythmColumn, H as MScoreRow, K as MSignature, O as MSpecialText, I as MStaff, o as MStaffBeamGroup, y as MStaffNoteGroup, E as MStaffRest, w as MStaffTabBarLine, J as MTab, z as MTabNoteGroup, P as MText, j as MusicInterface, a7 as PlayState, a8 as PlayStateChangeListener, f as ScoreEvent, i as ScoreEventListener, e as ScoreEventType, h as ScoreObjectEvent, g as ScoreStaffPosEvent, Z as StaffConfig, a6 as StaffTabOrGroup, a3 as Stem, a1 as StringNumber, _ as TabConfig, $ as VoiceId, a2 as getStringNumbers, a0 as getVoiceIds } from '../interface-Bn5HFt_U.mjs';
1
+ import { N as NoteOptions, R as RestOptions, S as StaffPreset, a as ScoreConfiguration, M as MDocument, V as VoiceId, T as TupletOptions, F as Fermata, b as StaffTabOrGroups, c as Navigation, A as Annotation, L as Label, C as Connective, d as TieType, e as NoteAnchor, f as VerticalPosition } from '../interface-XoKiryoV.mjs';
2
+ export { a5 as Arpeggio, _ as Clef, D as DivRect, m as MAccidental, o as MArpeggio, x as MBarLineLeft, w as MBarLineRight, p as MBeamGroup, n as MConnective, r as MEnding, W as MExtensionLine, s as MFermata, t as MHeader, u as MImage, v as MMeasure, z as MNoteGroup, Z as MPlaybackButtons, X as MPlayer, Y as MRenderer, G as MRest, I as MRhythmColumn, J as MScoreRow, P as MSignature, Q as MSpecialText, K as MStaff, q as MStaffBeamGroup, B as MStaffNoteGroup, H as MStaffRest, y as MStaffTabBarLine, O as MTab, E as MTabNoteGroup, U as MText, l as MusicInterface, a7 as PlayState, a8 as PlayStateChangeListener, h as ScoreEvent, k as ScoreEventListener, g as ScoreEventType, j as ScoreObjectEvent, i as ScoreStaffPosEvent, $ as StaffConfig, a6 as StaffTabOrGroup, a4 as Stem, a2 as StringNumber, a0 as TabConfig, a3 as getStringNumbers, a1 as getVoiceIds } from '../interface-XoKiryoV.mjs';
3
3
  import { N as Note } from '../note-BFa43I86.mjs';
4
- import { S as ScaleType, c as Scale } from '../scale-DRR-t4Kr.mjs';
5
- import { K as KeySignature, a as TimeSignature, T as TimeSignatureString, N as NoteLength } from '../tempo-B4h5Ktob.mjs';
4
+ import { S as ScaleType, c as Scale } from '../scale-C2pCNxdE.mjs';
5
+ import { N as NoteLength, h as NoteLengthStr, K as KeySignature, a as TimeSignature, T as TimeSignatureString, j as TupletRatio } from '../tempo-BAYoZ_Li.mjs';
6
6
  import '@tspro/ts-utils-lib';
7
7
 
8
+ declare enum DynamicsAnnotations {
9
+ cresc = "cresc.",
10
+ decresc = "decresc.",
11
+ dim = "dim.",
12
+ ppp = "ppp",
13
+ pp = "pp",
14
+ p = "p",
15
+ mp = "mp",
16
+ m = "m",
17
+ mf = "mf",
18
+ f = "f",
19
+ ff = "ff",
20
+ fff = "fff"
21
+ }
22
+ declare enum TempoAnnotations {
23
+ accel = "accel.",
24
+ rit = "rit.",
25
+ a_tempo = "a tempo"
26
+ }
27
+ type AnnotationsType = `${DynamicsAnnotations}` | `${TempoAnnotations}`;
28
+
29
+ type TupletBuilder = {
30
+ addNote: (note: Note | string, noteLength: NoteLength | NoteLengthStr, options?: NoteOptions) => TupletBuilder;
31
+ addChord: (notes: (Note | string)[], noteLength: NoteLength | NoteLengthStr, options?: NoteOptions) => TupletBuilder;
32
+ addRest: (restLength: NoteLength | NoteLengthStr, options?: RestOptions) => TupletBuilder;
33
+ };
34
+ type ExtensionBuilder = {
35
+ notes: (noteLength: NoteLength | NoteLengthStr, noteCount?: number) => ExtensionBuilder;
36
+ measures: (measureCount: number) => ExtensionBuilder;
37
+ infinity: () => ExtensionBuilder;
38
+ hide: () => ExtensionBuilder;
39
+ };
8
40
  declare class DocumentBuilder {
9
41
  private readonly doc;
10
42
  constructor();
11
- setScoreConfiguration(staffPreset: StaffPreset): DocumentBuilder;
43
+ setScoreConfiguration(staffPreset: StaffPreset | `${StaffPreset}`): DocumentBuilder;
12
44
  setScoreConfiguration(config: ScoreConfiguration): DocumentBuilder;
13
45
  private getMeasure;
14
46
  getDocument(): MDocument;
15
47
  setHeader(title?: string, composer?: string, arranger?: string): DocumentBuilder;
16
48
  setMeasuresPerRow(measuresPerRow: number): DocumentBuilder;
17
49
  addMeasure(): DocumentBuilder;
18
- setKeySignature(tonic: string, scaleType: ScaleType): DocumentBuilder;
50
+ setKeySignature(tonic: string, scaleType: ScaleType | `${ScaleType}`): DocumentBuilder;
19
51
  setKeySignature(keySignature: KeySignature): DocumentBuilder;
52
+ setKeySignature(keySignature: string): DocumentBuilder;
20
53
  setKeySignature(scale: Scale): DocumentBuilder;
21
54
  setTimeSignature(timeSignature: TimeSignature | TimeSignatureString): DocumentBuilder;
22
- setTempo(beatsPerMinute: number, beatLength?: NoteLength, dotted?: boolean): DocumentBuilder;
23
- addNote(voiceId: number, note: Note | string, noteLength: NoteLength, options?: NoteOptions): DocumentBuilder;
24
- addChord(voiceId: number, notes: (Note | string)[], noteLength: NoteLength, options?: NoteOptions): DocumentBuilder;
25
- addRest(voiceId: number, restLength: NoteLength, options?: RestOptions): DocumentBuilder;
55
+ setTempo(beatsPerMinute: number): DocumentBuilder;
56
+ setTempo(beatsPerMinute: number, beatLength: NoteLength | NoteLengthStr): DocumentBuilder;
57
+ /** @deprecated - Use dotted beatLength instead (e.g. "4..") */
58
+ setTempo(beatsPerMinute: number, beatLength: NoteLength | NoteLengthStr, dotted: boolean | number): DocumentBuilder;
59
+ addNote(voiceId: number, note: Note | string, noteLength: NoteLength | NoteLengthStr, options?: NoteOptions): DocumentBuilder;
60
+ addChord(voiceId: number, notes: (Note | string)[], noteLength: NoteLength | NoteLengthStr, options?: NoteOptions): DocumentBuilder;
61
+ addRest(voiceId: number, restLength: NoteLength | NoteLengthStr, options?: RestOptions): DocumentBuilder;
62
+ /**
63
+ * Usage:
64
+ * <pre>
65
+ * addTuplet(0, Theory.Tuplet.Triplet, notes => {
66
+ * notes.addNote("G3", Theory.NoteLength.Eighth);
67
+ * notes.addNote("B3", Theory.NoteLength.Eighth);
68
+ * notes.addNote("D4", Theory.NoteLength.Eighth);
69
+ * });
70
+ * </pre>
71
+ *
72
+ * @param voiceId
73
+ * @param tupletRatio - You can also use Theory.Tuplet presets (e.g. Theory.Tuplet.Triplet).
74
+ * @param tupletBuilder
75
+ * @returns
76
+ */
77
+ addTuplet(voiceId: VoiceId, tupletRatio: TupletRatio & TupletOptions, tupletBuilder: (notes: TupletBuilder) => void): DocumentBuilder;
26
78
  private addFermataInternal;
27
- addFermata(fermata?: Fermata): DocumentBuilder;
79
+ addFermata(fermata?: Fermata | `${Fermata}`): DocumentBuilder;
28
80
  /** @param staffTabOrGroups - staff/tab index (0=top), staff/tab name, or staff group name. */
29
- addFermataTo(staffTabOrGroups: StaffTabOrGroups, fermata?: Fermata): DocumentBuilder;
81
+ addFermataTo(staffTabOrGroups: StaffTabOrGroups, fermata?: Fermata | `${Fermata}`): DocumentBuilder;
30
82
  private addNavigationInternal;
31
- addNavigation(navigation: Navigation): DocumentBuilder;
32
- addNavigation(navigation: Navigation.EndRepeat, playCount: number): DocumentBuilder;
33
- addNavigation(navigation: Navigation.Ending, ...passages: number[]): DocumentBuilder;
83
+ addNavigation(navigation: Navigation | `${Navigation}`): DocumentBuilder;
84
+ addNavigation(navigation: Navigation.EndRepeat | `${Navigation.EndRepeat}`, playCount: number): DocumentBuilder;
85
+ addNavigation(navigation: Navigation.Ending | `${Navigation.Ending}`, ...passages: number[]): DocumentBuilder;
34
86
  /** @param staffTabOrGroups - staff/tab index (0=top), staff/tab name, or staff group name. */
35
- addNavigationTo(staffTabOrGroups: StaffTabOrGroups, navigation: Navigation): DocumentBuilder;
87
+ addNavigationTo(staffTabOrGroups: StaffTabOrGroups, navigation: Navigation | `${Navigation}`): DocumentBuilder;
36
88
  /** @param staffTabOrGroups - staff/tab index (0=top), staff/tab name, or staff group name. */
37
- addNavigationTo(staffTabOrGroups: StaffTabOrGroups, navigation: Navigation.EndRepeat, playCount: number): DocumentBuilder;
89
+ addNavigationTo(staffTabOrGroups: StaffTabOrGroups, navigation: Navigation.EndRepeat | `${Navigation.EndRepeat}`, playCount: number): DocumentBuilder;
38
90
  /** @param staffTabOrGroups - staff/tab index (0=top), staff/tab name, or staff group name. */
39
- addNavigationTo(staffTabOrGroups: StaffTabOrGroups, navigation: Navigation.Ending, ...passages: number[]): DocumentBuilder;
40
- private addLabelInternal;
41
- addLabel(label: Label, text: string): DocumentBuilder;
42
- /** @param staffTabOrGroups - staff/tab index (0=top), staff/tab name, or staff group name. */
43
- addLabelTo(staffTabOrGroups: StaffTabOrGroups, label: Label, text: string): DocumentBuilder;
91
+ addNavigationTo(staffTabOrGroups: StaffTabOrGroups, navigation: Navigation.Ending | `${Navigation.Ending}`, ...passages: number[]): DocumentBuilder;
44
92
  private addAnnotationInternal;
45
- addAnnotation(annotation: Annotation, text: string): DocumentBuilder;
93
+ addAnnotation(text: AnnotationsType): DocumentBuilder;
94
+ addAnnotation(annotation: Annotation | `${Annotation}`, text: string): DocumentBuilder;
95
+ /** @param staffTabOrGroups - staff/tab index (0=top), staff/tab name, or staff group name. */
96
+ addAnnotationTo(staffTabOrGroups: StaffTabOrGroups, text: AnnotationsType): DocumentBuilder;
97
+ /** @param staffTabOrGroups - staff/tab index (0=top), staff/tab name, or staff group name. */
98
+ addAnnotationTo(staffTabOrGroups: StaffTabOrGroups, annotation: Annotation | `${Annotation}`, text: string): DocumentBuilder;
99
+ private addLabelInternal;
100
+ addLabel(label: Label | `${Label}`, text: string): DocumentBuilder;
46
101
  /** @param staffTabOrGroups - staff/tab index (0=top), staff/tab name, or staff group name. */
47
- addAnnotationTo(staffTabOrGroups: StaffTabOrGroups, annotation: Annotation, text: string): DocumentBuilder;
48
- addConnective(connective: Connective.Tie, tieSpan?: number | TieType, notAnchor?: NoteAnchor): DocumentBuilder;
49
- addConnective(connective: Connective.Slur, slurSpan?: number, notAnchor?: NoteAnchor): DocumentBuilder;
50
- addConnective(connective: Connective.Slide, notAnchor?: NoteAnchor): DocumentBuilder;
51
- addExtension(extensionLength: NoteLength | number, extensionVisible?: boolean): DocumentBuilder;
102
+ addLabelTo(staffTabOrGroups: StaffTabOrGroups, label: Label | `${Label}`, text: string): DocumentBuilder;
103
+ addConnective(connective: Connective.Tie | `${Connective.Tie}`, tieSpan?: number | TieType | `${TieType}`, notAnchor?: NoteAnchor | `${NoteAnchor}`): DocumentBuilder;
104
+ addConnective(connective: Connective.Slur | `${Connective.Slur}`, slurSpan?: number, notAnchor?: NoteAnchor | `${NoteAnchor}`): DocumentBuilder;
105
+ addConnective(connective: Connective.Slide | `${Connective.Slide}`, notAnchor?: NoteAnchor | `${NoteAnchor}`): DocumentBuilder;
106
+ /**
107
+ * Extension length example:
108
+ * <pre>
109
+ * addExtension(ext => ext.notes("1n", 2)) // length is 2 whole notes
110
+ * addExtension(ext => ext.measures(3).hide()) // length is 3 measures, hidden
111
+ * addExtension(ext => ext.measures(1).notes("8n")) // length is 1 measure + 1 eigth note
112
+ * addExtension(ext => ext.infinity()) // length is as long as possible
113
+ * </pre>
114
+ * @param extensionLength
115
+ * @param extensionVisible
116
+ * @returns
117
+ */
118
+ addExtension(extensionBuilder?: (ext: ExtensionBuilder) => void): DocumentBuilder;
52
119
  /**
53
120
  *
54
121
  * @param groupName - Name of staff group.
@@ -56,12 +123,12 @@ declare class DocumentBuilder {
56
123
  * @param verticalPosition - Vertical position, are elements added above, below or both.
57
124
  * @returns
58
125
  */
59
- addStaffGroup(groupName: string, staffsTabsAndGroups: number | string | (number | string)[], verticalPosition?: VerticalPosition): DocumentBuilder;
126
+ addStaffGroup(groupName: string, staffsTabsAndGroups: number | string | (number | string)[], verticalPosition?: VerticalPosition | `${VerticalPosition}`): DocumentBuilder;
60
127
  endSong(): DocumentBuilder;
61
128
  endSection(): DocumentBuilder;
62
129
  endRow(): DocumentBuilder;
63
- completeRests(voiceId?: number): DocumentBuilder;
130
+ completeRests(voiceId?: VoiceId | VoiceId[]): DocumentBuilder;
64
131
  addScaleArpeggio(scale: Scale, bottomNote: string, numOctaves: number): DocumentBuilder;
65
132
  }
66
133
 
67
- export { Annotation, Connective, DocumentBuilder, Fermata, Label, MDocument, Navigation, NoteAnchor, NoteOptions, RestOptions, ScoreConfiguration, StaffPreset, StaffTabOrGroups, TieType, VerticalPosition };
134
+ export { Annotation, Connective, DocumentBuilder, type ExtensionBuilder, Fermata, Label, MDocument, Navigation, NoteAnchor, NoteOptions, RestOptions, ScoreConfiguration, StaffPreset, StaffTabOrGroups, TieType, type TupletBuilder, TupletOptions, VerticalPosition, VoiceId };
@@ -1,54 +1,121 @@
1
- import { S as StaffPreset, a as ScoreConfiguration, M as MDocument, N as NoteOptions, R as RestOptions, F as Fermata, b as StaffTabOrGroups, c as Navigation, L as Label, A as Annotation, C as Connective, T as TieType, d as NoteAnchor, V as VerticalPosition } from '../interface-BlNl69uT.js';
2
- export { a4 as Arpeggio, Y as Clef, a5 as ConnectiveSpan, D as DivRect, k as MAccidental, m as MArpeggio, v as MBarLineLeft, u as MBarLineRight, n as MBeamGroup, l as MConnective, p as MEnding, Q as MExtensionLine, q as MFermata, r as MHeader, s as MImage, t as MMeasure, x as MNoteGroup, X as MPlaybackButtons, U as MPlayer, W as MRenderer, B as MRest, G as MRhythmColumn, H as MScoreRow, K as MSignature, O as MSpecialText, I as MStaff, o as MStaffBeamGroup, y as MStaffNoteGroup, E as MStaffRest, w as MStaffTabBarLine, J as MTab, z as MTabNoteGroup, P as MText, j as MusicInterface, a7 as PlayState, a8 as PlayStateChangeListener, f as ScoreEvent, i as ScoreEventListener, e as ScoreEventType, h as ScoreObjectEvent, g as ScoreStaffPosEvent, Z as StaffConfig, a6 as StaffTabOrGroup, a3 as Stem, a1 as StringNumber, _ as TabConfig, $ as VoiceId, a2 as getStringNumbers, a0 as getVoiceIds } from '../interface-BlNl69uT.js';
3
- import { N as Note } from '../note-BFa43I86.js';
4
- import { S as ScaleType, c as Scale } from '../scale-ebJm37q1.js';
5
- import { K as KeySignature, a as TimeSignature, T as TimeSignatureString, N as NoteLength } from '../tempo-DgqDEsn0.js';
1
+ import { N as NoteOptions, R as RestOptions, S as StaffPreset, a as ScoreConfiguration, M as MDocument, V as VoiceId, T as TupletOptions, F as Fermata, b as StaffTabOrGroups, c as Navigation, A as Annotation, L as Label, C as Connective, d as TieType, e as NoteAnchor, f as VerticalPosition } from '../interface-7k8qGG44.js';
2
+ export { a5 as Arpeggio, _ as Clef, D as DivRect, m as MAccidental, o as MArpeggio, x as MBarLineLeft, w as MBarLineRight, p as MBeamGroup, n as MConnective, r as MEnding, W as MExtensionLine, s as MFermata, t as MHeader, u as MImage, v as MMeasure, z as MNoteGroup, Z as MPlaybackButtons, X as MPlayer, Y as MRenderer, G as MRest, I as MRhythmColumn, J as MScoreRow, P as MSignature, Q as MSpecialText, K as MStaff, q as MStaffBeamGroup, B as MStaffNoteGroup, H as MStaffRest, y as MStaffTabBarLine, O as MTab, E as MTabNoteGroup, U as MText, l as MusicInterface, a7 as PlayState, a8 as PlayStateChangeListener, h as ScoreEvent, k as ScoreEventListener, g as ScoreEventType, j as ScoreObjectEvent, i as ScoreStaffPosEvent, $ as StaffConfig, a6 as StaffTabOrGroup, a4 as Stem, a2 as StringNumber, a0 as TabConfig, a3 as getStringNumbers, a1 as getVoiceIds } from '../interface-7k8qGG44.js';
3
+ import { N as Note } from '../note-CcVdUFqS.js';
4
+ import { S as ScaleType, c as Scale } from '../scale-CvPbJvfN.js';
5
+ import { N as NoteLength, h as NoteLengthStr, K as KeySignature, a as TimeSignature, T as TimeSignatureString, j as TupletRatio } from '../tempo-r2sb6Ku2.js';
6
6
  import '@tspro/ts-utils-lib';
7
7
 
8
+ declare enum DynamicsAnnotations {
9
+ cresc = "cresc.",
10
+ decresc = "decresc.",
11
+ dim = "dim.",
12
+ ppp = "ppp",
13
+ pp = "pp",
14
+ p = "p",
15
+ mp = "mp",
16
+ m = "m",
17
+ mf = "mf",
18
+ f = "f",
19
+ ff = "ff",
20
+ fff = "fff"
21
+ }
22
+ declare enum TempoAnnotations {
23
+ accel = "accel.",
24
+ rit = "rit.",
25
+ a_tempo = "a tempo"
26
+ }
27
+ type AnnotationsType = `${DynamicsAnnotations}` | `${TempoAnnotations}`;
28
+
29
+ type TupletBuilder = {
30
+ addNote: (note: Note | string, noteLength: NoteLength | NoteLengthStr, options?: NoteOptions) => TupletBuilder;
31
+ addChord: (notes: (Note | string)[], noteLength: NoteLength | NoteLengthStr, options?: NoteOptions) => TupletBuilder;
32
+ addRest: (restLength: NoteLength | NoteLengthStr, options?: RestOptions) => TupletBuilder;
33
+ };
34
+ type ExtensionBuilder = {
35
+ notes: (noteLength: NoteLength | NoteLengthStr, noteCount?: number) => ExtensionBuilder;
36
+ measures: (measureCount: number) => ExtensionBuilder;
37
+ infinity: () => ExtensionBuilder;
38
+ hide: () => ExtensionBuilder;
39
+ };
8
40
  declare class DocumentBuilder {
9
41
  private readonly doc;
10
42
  constructor();
11
- setScoreConfiguration(staffPreset: StaffPreset): DocumentBuilder;
43
+ setScoreConfiguration(staffPreset: StaffPreset | `${StaffPreset}`): DocumentBuilder;
12
44
  setScoreConfiguration(config: ScoreConfiguration): DocumentBuilder;
13
45
  private getMeasure;
14
46
  getDocument(): MDocument;
15
47
  setHeader(title?: string, composer?: string, arranger?: string): DocumentBuilder;
16
48
  setMeasuresPerRow(measuresPerRow: number): DocumentBuilder;
17
49
  addMeasure(): DocumentBuilder;
18
- setKeySignature(tonic: string, scaleType: ScaleType): DocumentBuilder;
50
+ setKeySignature(tonic: string, scaleType: ScaleType | `${ScaleType}`): DocumentBuilder;
19
51
  setKeySignature(keySignature: KeySignature): DocumentBuilder;
52
+ setKeySignature(keySignature: string): DocumentBuilder;
20
53
  setKeySignature(scale: Scale): DocumentBuilder;
21
54
  setTimeSignature(timeSignature: TimeSignature | TimeSignatureString): DocumentBuilder;
22
- setTempo(beatsPerMinute: number, beatLength?: NoteLength, dotted?: boolean): DocumentBuilder;
23
- addNote(voiceId: number, note: Note | string, noteLength: NoteLength, options?: NoteOptions): DocumentBuilder;
24
- addChord(voiceId: number, notes: (Note | string)[], noteLength: NoteLength, options?: NoteOptions): DocumentBuilder;
25
- addRest(voiceId: number, restLength: NoteLength, options?: RestOptions): DocumentBuilder;
55
+ setTempo(beatsPerMinute: number): DocumentBuilder;
56
+ setTempo(beatsPerMinute: number, beatLength: NoteLength | NoteLengthStr): DocumentBuilder;
57
+ /** @deprecated - Use dotted beatLength instead (e.g. "4..") */
58
+ setTempo(beatsPerMinute: number, beatLength: NoteLength | NoteLengthStr, dotted: boolean | number): DocumentBuilder;
59
+ addNote(voiceId: number, note: Note | string, noteLength: NoteLength | NoteLengthStr, options?: NoteOptions): DocumentBuilder;
60
+ addChord(voiceId: number, notes: (Note | string)[], noteLength: NoteLength | NoteLengthStr, options?: NoteOptions): DocumentBuilder;
61
+ addRest(voiceId: number, restLength: NoteLength | NoteLengthStr, options?: RestOptions): DocumentBuilder;
62
+ /**
63
+ * Usage:
64
+ * <pre>
65
+ * addTuplet(0, Theory.Tuplet.Triplet, notes => {
66
+ * notes.addNote("G3", Theory.NoteLength.Eighth);
67
+ * notes.addNote("B3", Theory.NoteLength.Eighth);
68
+ * notes.addNote("D4", Theory.NoteLength.Eighth);
69
+ * });
70
+ * </pre>
71
+ *
72
+ * @param voiceId
73
+ * @param tupletRatio - You can also use Theory.Tuplet presets (e.g. Theory.Tuplet.Triplet).
74
+ * @param tupletBuilder
75
+ * @returns
76
+ */
77
+ addTuplet(voiceId: VoiceId, tupletRatio: TupletRatio & TupletOptions, tupletBuilder: (notes: TupletBuilder) => void): DocumentBuilder;
26
78
  private addFermataInternal;
27
- addFermata(fermata?: Fermata): DocumentBuilder;
79
+ addFermata(fermata?: Fermata | `${Fermata}`): DocumentBuilder;
28
80
  /** @param staffTabOrGroups - staff/tab index (0=top), staff/tab name, or staff group name. */
29
- addFermataTo(staffTabOrGroups: StaffTabOrGroups, fermata?: Fermata): DocumentBuilder;
81
+ addFermataTo(staffTabOrGroups: StaffTabOrGroups, fermata?: Fermata | `${Fermata}`): DocumentBuilder;
30
82
  private addNavigationInternal;
31
- addNavigation(navigation: Navigation): DocumentBuilder;
32
- addNavigation(navigation: Navigation.EndRepeat, playCount: number): DocumentBuilder;
33
- addNavigation(navigation: Navigation.Ending, ...passages: number[]): DocumentBuilder;
83
+ addNavigation(navigation: Navigation | `${Navigation}`): DocumentBuilder;
84
+ addNavigation(navigation: Navigation.EndRepeat | `${Navigation.EndRepeat}`, playCount: number): DocumentBuilder;
85
+ addNavigation(navigation: Navigation.Ending | `${Navigation.Ending}`, ...passages: number[]): DocumentBuilder;
34
86
  /** @param staffTabOrGroups - staff/tab index (0=top), staff/tab name, or staff group name. */
35
- addNavigationTo(staffTabOrGroups: StaffTabOrGroups, navigation: Navigation): DocumentBuilder;
87
+ addNavigationTo(staffTabOrGroups: StaffTabOrGroups, navigation: Navigation | `${Navigation}`): DocumentBuilder;
36
88
  /** @param staffTabOrGroups - staff/tab index (0=top), staff/tab name, or staff group name. */
37
- addNavigationTo(staffTabOrGroups: StaffTabOrGroups, navigation: Navigation.EndRepeat, playCount: number): DocumentBuilder;
89
+ addNavigationTo(staffTabOrGroups: StaffTabOrGroups, navigation: Navigation.EndRepeat | `${Navigation.EndRepeat}`, playCount: number): DocumentBuilder;
38
90
  /** @param staffTabOrGroups - staff/tab index (0=top), staff/tab name, or staff group name. */
39
- addNavigationTo(staffTabOrGroups: StaffTabOrGroups, navigation: Navigation.Ending, ...passages: number[]): DocumentBuilder;
40
- private addLabelInternal;
41
- addLabel(label: Label, text: string): DocumentBuilder;
42
- /** @param staffTabOrGroups - staff/tab index (0=top), staff/tab name, or staff group name. */
43
- addLabelTo(staffTabOrGroups: StaffTabOrGroups, label: Label, text: string): DocumentBuilder;
91
+ addNavigationTo(staffTabOrGroups: StaffTabOrGroups, navigation: Navigation.Ending | `${Navigation.Ending}`, ...passages: number[]): DocumentBuilder;
44
92
  private addAnnotationInternal;
45
- addAnnotation(annotation: Annotation, text: string): DocumentBuilder;
93
+ addAnnotation(text: AnnotationsType): DocumentBuilder;
94
+ addAnnotation(annotation: Annotation | `${Annotation}`, text: string): DocumentBuilder;
95
+ /** @param staffTabOrGroups - staff/tab index (0=top), staff/tab name, or staff group name. */
96
+ addAnnotationTo(staffTabOrGroups: StaffTabOrGroups, text: AnnotationsType): DocumentBuilder;
97
+ /** @param staffTabOrGroups - staff/tab index (0=top), staff/tab name, or staff group name. */
98
+ addAnnotationTo(staffTabOrGroups: StaffTabOrGroups, annotation: Annotation | `${Annotation}`, text: string): DocumentBuilder;
99
+ private addLabelInternal;
100
+ addLabel(label: Label | `${Label}`, text: string): DocumentBuilder;
46
101
  /** @param staffTabOrGroups - staff/tab index (0=top), staff/tab name, or staff group name. */
47
- addAnnotationTo(staffTabOrGroups: StaffTabOrGroups, annotation: Annotation, text: string): DocumentBuilder;
48
- addConnective(connective: Connective.Tie, tieSpan?: number | TieType, notAnchor?: NoteAnchor): DocumentBuilder;
49
- addConnective(connective: Connective.Slur, slurSpan?: number, notAnchor?: NoteAnchor): DocumentBuilder;
50
- addConnective(connective: Connective.Slide, notAnchor?: NoteAnchor): DocumentBuilder;
51
- addExtension(extensionLength: NoteLength | number, extensionVisible?: boolean): DocumentBuilder;
102
+ addLabelTo(staffTabOrGroups: StaffTabOrGroups, label: Label | `${Label}`, text: string): DocumentBuilder;
103
+ addConnective(connective: Connective.Tie | `${Connective.Tie}`, tieSpan?: number | TieType | `${TieType}`, notAnchor?: NoteAnchor | `${NoteAnchor}`): DocumentBuilder;
104
+ addConnective(connective: Connective.Slur | `${Connective.Slur}`, slurSpan?: number, notAnchor?: NoteAnchor | `${NoteAnchor}`): DocumentBuilder;
105
+ addConnective(connective: Connective.Slide | `${Connective.Slide}`, notAnchor?: NoteAnchor | `${NoteAnchor}`): DocumentBuilder;
106
+ /**
107
+ * Extension length example:
108
+ * <pre>
109
+ * addExtension(ext => ext.notes("1n", 2)) // length is 2 whole notes
110
+ * addExtension(ext => ext.measures(3).hide()) // length is 3 measures, hidden
111
+ * addExtension(ext => ext.measures(1).notes("8n")) // length is 1 measure + 1 eigth note
112
+ * addExtension(ext => ext.infinity()) // length is as long as possible
113
+ * </pre>
114
+ * @param extensionLength
115
+ * @param extensionVisible
116
+ * @returns
117
+ */
118
+ addExtension(extensionBuilder?: (ext: ExtensionBuilder) => void): DocumentBuilder;
52
119
  /**
53
120
  *
54
121
  * @param groupName - Name of staff group.
@@ -56,12 +123,12 @@ declare class DocumentBuilder {
56
123
  * @param verticalPosition - Vertical position, are elements added above, below or both.
57
124
  * @returns
58
125
  */
59
- addStaffGroup(groupName: string, staffsTabsAndGroups: number | string | (number | string)[], verticalPosition?: VerticalPosition): DocumentBuilder;
126
+ addStaffGroup(groupName: string, staffsTabsAndGroups: number | string | (number | string)[], verticalPosition?: VerticalPosition | `${VerticalPosition}`): DocumentBuilder;
60
127
  endSong(): DocumentBuilder;
61
128
  endSection(): DocumentBuilder;
62
129
  endRow(): DocumentBuilder;
63
- completeRests(voiceId?: number): DocumentBuilder;
130
+ completeRests(voiceId?: VoiceId | VoiceId[]): DocumentBuilder;
64
131
  addScaleArpeggio(scale: Scale, bottomNote: string, numOctaves: number): DocumentBuilder;
65
132
  }
66
133
 
67
- export { Annotation, Connective, DocumentBuilder, Fermata, Label, MDocument, Navigation, NoteAnchor, NoteOptions, RestOptions, ScoreConfiguration, StaffPreset, StaffTabOrGroups, TieType, VerticalPosition };
134
+ export { Annotation, Connective, DocumentBuilder, type ExtensionBuilder, Fermata, Label, MDocument, Navigation, NoteAnchor, NoteOptions, RestOptions, ScoreConfiguration, StaffPreset, StaffTabOrGroups, TieType, type TupletBuilder, TupletOptions, VerticalPosition, VoiceId };