@tspro/web-music-score 3.2.0 → 4.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 (51) hide show
  1. package/CHANGELOG.md +38 -10
  2. package/README.md +189 -331
  3. package/dist/audio/index.d.mts +40 -1
  4. package/dist/audio/index.d.ts +40 -1
  5. package/dist/audio/index.js +1 -1
  6. package/dist/audio/index.mjs +2 -2
  7. package/dist/audio-cg/index.d.mts +3 -0
  8. package/dist/audio-cg/index.d.ts +3 -0
  9. package/dist/audio-cg/index.js +1 -1
  10. package/dist/audio-cg/index.mjs +2 -2
  11. package/dist/{chunk-LCTM7BID.mjs → chunk-YFPLOHP2.mjs} +2 -2
  12. package/dist/core/index.d.mts +12 -0
  13. package/dist/core/index.d.ts +12 -0
  14. package/dist/core/index.js +3 -2
  15. package/dist/core/index.mjs +4 -3
  16. package/dist/guitar-CaZJDA05.d.ts +35 -0
  17. package/dist/guitar-DdexKdN6.d.mts +35 -0
  18. package/dist/iife/index.global.js +11 -11
  19. package/dist/{interface-Bn5HFt_U.d.mts → music-objects-DJQ4d2OA.d.mts} +640 -136
  20. package/dist/{interface-BlNl69uT.d.ts → music-objects-Dc3kR-XF.d.ts} +640 -136
  21. package/dist/note-eA2xPPiG.d.mts +294 -0
  22. package/dist/note-eA2xPPiG.d.ts +294 -0
  23. package/dist/pieces/index.d.mts +22 -3
  24. package/dist/pieces/index.d.ts +22 -3
  25. package/dist/pieces/index.js +7 -7
  26. package/dist/pieces/index.mjs +11 -11
  27. package/dist/react-ui/index.d.mts +166 -17
  28. package/dist/react-ui/index.d.ts +166 -17
  29. package/dist/react-ui/index.js +78 -1
  30. package/dist/react-ui/index.mjs +79 -2
  31. package/dist/scale-B2Icbetz.d.ts +230 -0
  32. package/dist/scale-BbDJTbrG.d.mts +230 -0
  33. package/dist/score/index.d.mts +359 -39
  34. package/dist/score/index.d.ts +359 -39
  35. package/dist/score/index.js +1252 -594
  36. package/dist/score/index.mjs +1255 -599
  37. package/dist/tempo-CtUhvJbr.d.mts +369 -0
  38. package/dist/tempo-Dt8aHpol.d.ts +369 -0
  39. package/dist/theory/index.d.mts +29 -13
  40. package/dist/theory/index.d.ts +29 -13
  41. package/dist/theory/index.js +583 -96
  42. package/dist/theory/index.mjs +580 -94
  43. package/package.json +2 -2
  44. package/dist/guitar-C2Cp71NZ.d.ts +0 -17
  45. package/dist/guitar-DggbM2UL.d.mts +0 -17
  46. package/dist/note-BFa43I86.d.mts +0 -85
  47. package/dist/note-BFa43I86.d.ts +0 -85
  48. package/dist/scale-DRR-t4Kr.d.mts +0 -74
  49. package/dist/scale-ebJm37q1.d.ts +0 -74
  50. package/dist/tempo-B4h5Ktob.d.mts +0 -104
  51. package/dist/tempo-DgqDEsn0.d.ts +0 -104
@@ -1,4 +1,4 @@
1
- /* WebMusicScore v3.2.0 | (c) 2023 PahkaSoft | MIT License | Includes: Tone.js (MIT License) */
1
+ /* WebMusicScore v4.0.1 | (c) 2023 PahkaSoft | MIT License | Includes: Tone.js (MIT License) */
2
2
  "use strict";
3
3
  var __defProp = Object.defineProperty;
4
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -28,24 +28,24 @@ __export(pieces_exports, {
28
28
  module.exports = __toCommonJS(pieces_exports);
29
29
 
30
30
  // src/pieces/frere-jacques.ts
31
- var import_theory = require("@tspro/web-music-score/theory");
32
31
  var import_score = require("@tspro/web-music-score/score");
33
32
  function createFrereJacques() {
34
- return new import_score.DocumentBuilder().setScoreConfiguration(import_score.StaffPreset.GuitarTreble).setHeader("Frere Jacques").addMeasure().setKeySignature("G", import_theory.ScaleType.Major).setTimeSignature("4/4").addNote(0, "G3", import_theory.NoteLength.Quarter).addNote(0, "A3", import_theory.NoteLength.Quarter).addNote(0, "B3", import_theory.NoteLength.Quarter).addNote(0, "G3", import_theory.NoteLength.Quarter).addMeasure().addNote(0, "G3", import_theory.NoteLength.Quarter).addNote(0, "A3", import_theory.NoteLength.Quarter).addNote(0, "B3", import_theory.NoteLength.Quarter).addNote(0, "G3", import_theory.NoteLength.Quarter).addMeasure().addNote(0, "B3", import_theory.NoteLength.Quarter).addNote(0, "C4", import_theory.NoteLength.Quarter).addNote(0, "D4", import_theory.NoteLength.Half).endRow().addMeasure().addNote(0, "B3", import_theory.NoteLength.Quarter).addNote(0, "C4", import_theory.NoteLength.Quarter).addNote(0, "D4", import_theory.NoteLength.Half).addMeasure().addNote(0, "D4", import_theory.NoteLength.Eighth).addNote(0, "E4", import_theory.NoteLength.Eighth).addNote(0, "D4", import_theory.NoteLength.Eighth).addNote(0, "C4", import_theory.NoteLength.Eighth).addNote(0, "B3", import_theory.NoteLength.Quarter).addNote(0, "G3", import_theory.NoteLength.Quarter).endRow().addMeasure().addNote(0, "D4", import_theory.NoteLength.Eighth).addNote(0, "E4", import_theory.NoteLength.Eighth).addNote(0, "D4", import_theory.NoteLength.Eighth).addNote(0, "C4", import_theory.NoteLength.Eighth).addNote(0, "B3", import_theory.NoteLength.Quarter).addNote(0, "G3", import_theory.NoteLength.Quarter).addMeasure().addNote(0, "G3", import_theory.NoteLength.Quarter).addNote(0, "D3", import_theory.NoteLength.Quarter).addNote(0, "G3", import_theory.NoteLength.Half).addMeasure().addNote(0, "G3", import_theory.NoteLength.Quarter).addNote(0, "D3", import_theory.NoteLength.Quarter).addNote(0, "G3", import_theory.NoteLength.Half).getDocument();
33
+ return new import_score.DocumentBuilder().setHeader("Frere Jacques").setScoreConfiguration([
34
+ { type: "staff", clef: "G", voiceIds: [0] },
35
+ { type: "staff", clef: "F", voiceIds: [1] }
36
+ ]).setMeasuresPerRow(2).addMeasure().setKeySignature("D Major").setTimeSignature("4/4").addNote(0, "D4", "4n", { stem: "up" }).addNote(0, "E4", "4n").addNote(0, "F#4", "4n").addNote(0, "D4", "4n").addRest(1, "1n", { staffPos: "F3" }).addMeasure().addNote(0, "D4", "4n").addNote(0, "E4", "4n").addNote(0, "F#4", "4n").addNote(0, "D4", "4n").addRest(1, "1n", { staffPos: "F3" }).addMeasure().addNavigation("startRepeat").addNote(0, "F#4", "4n").addNote(0, "G4", "4n").addNote(0, "A4", "2n").addNote(1, "D3", "4n", { stem: "down" }).addNote(1, "E3", "4n").addNote(1, "F#3", "4n").addNote(1, "D3", "4n").addMeasure().addNote(0, "F#4", "4n").addNote(0, "G4", "4n").addNote(0, "A4", "2n").addNote(1, "D3", "4n").addNote(1, "E3", "4n").addNote(1, "F#3", "4n").addNote(1, "D3", "4n").addMeasure().addNote(0, "A4", "8n").addNote(0, "B4", "8n").addNote(0, "A4", "8n").addNote(0, "G4", "8n").addNote(0, "F#4", "4n").addNote(0, "D4", "4n").addNote(1, "F#3", "4n").addNote(1, "G3", "4n").addNote(1, "A3", "2n").addMeasure().addNote(0, "A4", "8n").addNote(0, "B4", "8n").addNote(0, "A4", "8n").addNote(0, "G4", "8n").addNote(0, "F#4", "4n").addNote(0, "D4", "4n").addNote(1, "F#3", "4n").addNote(1, "G3", "4n").addNote(1, "A3", "2n").addMeasure().addNote(0, "D4", "4n").addChord(0, ["C#4", "A4"], "4n").addNote(0, "D4", "4n").addRest(0, "4n").addNote(1, "A3", "8n").addNote(1, "B3", "8n").addNote(1, "A3", "8n").addNote(1, "G3", "8n").addNote(1, "F#3", "4n").addNote(1, "D3", "4n").addMeasure().addNote(0, "D4", "4n").addChord(0, ["C#4", "A4"], "4n").addNote(0, "D4", "4n").addRest(0, "4n").addNote(1, "A3", "8n").addNote(1, "B3", "8n").addNote(1, "A3", "8n").addNote(1, "G3", "8n").addNote(1, "F#3", "4n").addNote(1, "D3", "4n").addMeasure().setMeasuresPerRow(4).addNavigation("ending", 1).addNote(0, "D4", "4n").addNote(0, "E4", "4n").addNote(0, "F#4", "4n").addNote(0, "D4", "4n").addNote(1, "D3", "4n").addChord(1, ["C#3", "A3"], "4n").addNote(1, "D3", "4n").addRest(1, "4n").addMeasure().addNavigation("endRepeat").addNote(0, "D4", "4n").addNote(0, "E4", "4n").addNote(0, "F#4", "4n").addNote(0, "D4", "4n").addNote(1, "D3", "4n").addChord(1, ["C#3", "A3"], "4n").addNote(1, "D3", "4n").addRest(1, "4n").addMeasure().addNavigation("ending", 2).addNote(0, "F#4", "4n").addNote(0, "D4", "4n").addNote(0, "F#4", "4n").addNote(0, "D4", "4n").addNote(1, "A3", "4n").addNote(1, "F#3", "4n").addNote(1, "A3", "4n").addNote(1, "F#3", "4n").addMeasure().addNote(0, "A3", "4n").addNote(0, "C#4", "8n").addNote(0, "C#4", "8n").addNote(0, "D4", "2n").addNote(1, "D3", "4n").addNote(1, "E3", "4n").addNote(1, "F#3", "2n").getDocument();
35
37
  }
36
38
 
37
39
  // src/pieces/greensleeves.ts
38
- var import_theory2 = require("@tspro/web-music-score/theory");
39
40
  var import_score2 = require("@tspro/web-music-score/score");
40
41
  function createGreensleeves() {
41
- return new import_score2.DocumentBuilder().setScoreConfiguration(import_score2.StaffPreset.GuitarTreble).setHeader("Greensleeves").addMeasure().setKeySignature("C", import_theory2.ScaleType.Major).setTimeSignature("6/8").setTempo(140).addNote(0, "A3", import_theory2.NoteLength.Eighth).addMeasure().addNavigation(import_score2.Navigation.StartRepeat).addNote(0, "C4", import_theory2.NoteLength.Quarter, { stem: import_score2.Stem.Up }).addLabel(import_score2.Label.Chord, "Am").addNote(0, "D4", import_theory2.NoteLength.Eighth).addNote(0, "E4", import_theory2.NoteLength.Eighth, { dotted: true }).addNote(0, "F4", import_theory2.NoteLength.Sixteenth).addNote(0, "E4", import_theory2.NoteLength.Eighth).addNote(1, "A2", import_theory2.NoteLength.Eighth, { stem: import_score2.Stem.Down }).addNote(1, "E3", import_theory2.NoteLength.Quarter).addNote(1, "A2", import_theory2.NoteLength.Eighth).addNote(1, "E3", import_theory2.NoteLength.Quarter).addMeasure().addNote(0, "D4", import_theory2.NoteLength.Quarter, { stem: import_score2.Stem.Up }).addLabel(import_score2.Label.Chord, "G").addNote(0, "B3", import_theory2.NoteLength.Eighth).addNote(0, "G3", import_theory2.NoteLength.Eighth, { dotted: true }).addLabel(import_score2.Label.Chord, "Em").addNote(0, "A3", import_theory2.NoteLength.Sixteenth).addNote(0, "B3", import_theory2.NoteLength.Eighth).addNote(1, "G2", import_theory2.NoteLength.Eighth, { stem: import_score2.Stem.Down }).addNote(1, "D3", import_theory2.NoteLength.Quarter).addNote(1, "E2", import_theory2.NoteLength.Eighth).addNote(1, "B2", import_theory2.NoteLength.Quarter).addMeasure().addNote(0, "C4", import_theory2.NoteLength.Quarter, { stem: import_score2.Stem.Up }).addLabel(import_score2.Label.Chord, "Am").addNote(0, "A3", import_theory2.NoteLength.Eighth).addNote(0, "A3", import_theory2.NoteLength.Eighth, { dotted: true }).addLabel(import_score2.Label.Chord, "F").addNote(0, "G#3", import_theory2.NoteLength.Sixteenth).addNote(0, "A3", import_theory2.NoteLength.Eighth).addNote(1, "A2", import_theory2.NoteLength.Eighth, { stem: import_score2.Stem.Down }).addNote(1, "E3", import_theory2.NoteLength.Quarter).addNote(1, "F2", import_theory2.NoteLength.Eighth).addNote(1, "A2", import_theory2.NoteLength.Quarter).addMeasure().addNote(0, "B3", import_theory2.NoteLength.Quarter, { stem: import_score2.Stem.Up }).addLabel(import_score2.Label.Chord, "E").addNote(0, "G#3", import_theory2.NoteLength.Eighth).addNote(0, "E3", import_theory2.NoteLength.Quarter).addNote(0, "A3", import_theory2.NoteLength.Eighth).addNote(1, "E2", import_theory2.NoteLength.Eighth, { stem: import_score2.Stem.Down }).addNote(1, "B2", import_theory2.NoteLength.Quarter).addNote(1, "E2", import_theory2.NoteLength.Eighth).addNote(1, "B2", import_theory2.NoteLength.Quarter).endRow().addMeasure().addNote(0, "C4", import_theory2.NoteLength.Quarter, { stem: import_score2.Stem.Up }).addLabel(import_score2.Label.Chord, "Am").addNote(0, "D4", import_theory2.NoteLength.Eighth).addNote(0, "E4", import_theory2.NoteLength.Eighth, { dotted: true }).addNote(0, "F4", import_theory2.NoteLength.Sixteenth).addNote(0, "E4", import_theory2.NoteLength.Eighth).addNote(1, "A2", import_theory2.NoteLength.Eighth, { stem: import_score2.Stem.Down }).addNote(1, "E3", import_theory2.NoteLength.Quarter).addNote(1, "A2", import_theory2.NoteLength.Eighth).addNote(1, "E3", import_theory2.NoteLength.Quarter).addMeasure().addNote(0, "D4", import_theory2.NoteLength.Quarter, { stem: import_score2.Stem.Up }).addLabel(import_score2.Label.Chord, "G").addNote(0, "B3", import_theory2.NoteLength.Eighth).addNote(0, "G3", import_theory2.NoteLength.Eighth, { dotted: true }).addLabel(import_score2.Label.Chord, "Em").addNote(0, "A3", import_theory2.NoteLength.Sixteenth).addNote(0, "B3", import_theory2.NoteLength.Eighth).addNote(1, "G2", import_theory2.NoteLength.Eighth, { stem: import_score2.Stem.Down }).addNote(1, "D3", import_theory2.NoteLength.Quarter).addNote(1, "E2", import_theory2.NoteLength.Eighth).addNote(1, "B2", import_theory2.NoteLength.Quarter).addMeasure().addNote(0, "C4", import_theory2.NoteLength.Eighth, { dotted: true, stem: import_score2.Stem.Up }).addLabel(import_score2.Label.Chord, "Am").addNote(0, "B3", import_theory2.NoteLength.Sixteenth).addNote(0, "A3", import_theory2.NoteLength.Eighth).addNote(0, "G#3", import_theory2.NoteLength.Eighth, { dotted: true }).addLabel(import_score2.Label.Chord, "E").addNote(0, "F#3", import_theory2.NoteLength.Sixteenth).addNote(0, "G#3", import_theory2.NoteLength.Eighth).addNote(1, "A2", import_theory2.NoteLength.Eighth, { stem: import_score2.Stem.Down }).addNote(1, "E3", import_theory2.NoteLength.Quarter).addNote(1, "E2", import_theory2.NoteLength.Eighth).addNote(1, "B2", import_theory2.NoteLength.Quarter).addMeasure().addNote(0, "A3", import_theory2.NoteLength.Quarter, { dotted: true, stem: import_score2.Stem.Up }).addLabel(import_score2.Label.Chord, "Am").addNote(0, "A3", import_theory2.NoteLength.Quarter, { dotted: true }).addNote(1, "A2", import_theory2.NoteLength.Eighth, { stem: import_score2.Stem.Down }).addNote(1, "E3", import_theory2.NoteLength.Eighth).addNote(1, "C4", import_theory2.NoteLength.Eighth).addNote(1, "A2", import_theory2.NoteLength.Quarter, { dotted: true }).endRow().addMeasure().addChord(0, ["C3", "E3", "G3", "C4", "G4"], import_theory2.NoteLength.Quarter, { dotted: true, arpeggio: import_score2.Arpeggio.Up, stem: import_score2.Stem.Up }).addLabel(import_score2.Label.Chord, "C").addNote(0, "G4", import_theory2.NoteLength.Eighth, { dotted: true }).addNote(0, "F#4", import_theory2.NoteLength.Sixteenth).addNote(0, "E4", import_theory2.NoteLength.Eighth).addRest(1, import_theory2.NoteLength.Quarter, { dotted: true, hide: true }).addNote(1, "C3", import_theory2.NoteLength.Eighth, { stem: import_score2.Stem.Down }).addNote(1, "G3", import_theory2.NoteLength.Quarter).addMeasure().addNote(0, "D4", import_theory2.NoteLength.Quarter, { stem: import_score2.Stem.Up }).addLabel(import_score2.Label.Chord, "G").addNote(0, "B3", import_theory2.NoteLength.Eighth).addNote(0, "G3", import_theory2.NoteLength.Eighth, { dotted: true }).addLabel(import_score2.Label.Chord, "Em").addNote(0, "A3", import_theory2.NoteLength.Sixteenth).addNote(0, "B3", import_theory2.NoteLength.Eighth).addNote(1, "G2", import_theory2.NoteLength.Eighth, { stem: import_score2.Stem.Down }).addNote(1, "D3", import_theory2.NoteLength.Quarter).addNote(1, "E2", import_theory2.NoteLength.Eighth).addNote(1, "B2", import_theory2.NoteLength.Quarter).addMeasure().addNote(0, "C4", import_theory2.NoteLength.Quarter, { stem: import_score2.Stem.Up }).addLabel(import_score2.Label.Chord, "Am").addNote(0, "A3", import_theory2.NoteLength.Eighth).addNote(0, "A3", import_theory2.NoteLength.Eighth, { dotted: true }).addLabel(import_score2.Label.Chord, "F").addNote(0, "G#3", import_theory2.NoteLength.Sixteenth).addNote(0, "A3", import_theory2.NoteLength.Eighth).addNote(1, "A2", import_theory2.NoteLength.Eighth, { stem: import_score2.Stem.Down }).addNote(1, "E3", import_theory2.NoteLength.Quarter).addNote(1, "F2", import_theory2.NoteLength.Eighth).addNote(1, "A2", import_theory2.NoteLength.Quarter).addMeasure().addNote(0, "B3", import_theory2.NoteLength.Quarter, { stem: import_score2.Stem.Up }).addLabel(import_score2.Label.Chord, "E").addNote(0, "G#3", import_theory2.NoteLength.Eighth).addNote(0, "E3", import_theory2.NoteLength.Quarter, { dotted: true }).addNote(1, "E2", import_theory2.NoteLength.Eighth, { stem: import_score2.Stem.Down }).addNote(1, "B2", import_theory2.NoteLength.Quarter).addNote(1, "E2", import_theory2.NoteLength.Eighth).addNote(1, "B2", import_theory2.NoteLength.Eighth).addNote(1, "E3", import_theory2.NoteLength.Eighth).endRow().addMeasure().addNote(0, "G4", import_theory2.NoteLength.Quarter, { dotted: true, stem: import_score2.Stem.Up }).addLabel(import_score2.Label.Chord, "C").addNote(0, "G4", import_theory2.NoteLength.Eighth, { dotted: true }).addNote(0, "F#4", import_theory2.NoteLength.Sixteenth).addNote(0, "E4", import_theory2.NoteLength.Eighth).addNote(1, "C3", import_theory2.NoteLength.Eighth, { stem: import_score2.Stem.Down }).addNote(1, "G3", import_theory2.NoteLength.Eighth).addNote(1, "C4", import_theory2.NoteLength.Eighth).addNote(1, "C3", import_theory2.NoteLength.Eighth).addNote(1, "G3", import_theory2.NoteLength.Quarter).addMeasure().addNote(0, "D4", import_theory2.NoteLength.Quarter, { stem: import_score2.Stem.Up }).addLabel(import_score2.Label.Chord, "G").addNote(0, "B3", import_theory2.NoteLength.Eighth).addNote(0, "G3", import_theory2.NoteLength.Eighth, { dotted: true }).addLabel(import_score2.Label.Chord, "Em").addNote(0, "A3", import_theory2.NoteLength.Sixteenth).addNote(0, "B3", import_theory2.NoteLength.Eighth).addNote(1, "G2", import_theory2.NoteLength.Eighth, { stem: import_score2.Stem.Down }).addNote(1, "D3", import_theory2.NoteLength.Quarter).addNote(1, "E2", import_theory2.NoteLength.Eighth).addNote(1, "B2", import_theory2.NoteLength.Quarter).addMeasure().addNote(0, "C4", import_theory2.NoteLength.Eighth, { dotted: true, stem: import_score2.Stem.Up }).addLabel(import_score2.Label.Chord, "Am").addNote(0, "B3", import_theory2.NoteLength.Sixteenth).addNote(0, "A3", import_theory2.NoteLength.Eighth).addNote(0, "G#3", import_theory2.NoteLength.Eighth, { dotted: true }).addLabel(import_score2.Label.Chord, "E").addNote(0, "F#3", import_theory2.NoteLength.Sixteenth).addNote(0, "G#3", import_theory2.NoteLength.Eighth).addNote(1, "A2", import_theory2.NoteLength.Eighth, { stem: import_score2.Stem.Down }).addNote(1, "E3", import_theory2.NoteLength.Quarter).addNote(1, "E2", import_theory2.NoteLength.Eighth).addNote(1, "B2", import_theory2.NoteLength.Quarter).addMeasure().addNavigation(import_score2.Navigation.Ending, 1).addNavigation(import_score2.Navigation.EndRepeat).addNote(0, "A3", import_theory2.NoteLength.Quarter, { dotted: true, stem: import_score2.Stem.Up }).addLabel(import_score2.Label.Chord, "Am").addNote(0, "A3", import_theory2.NoteLength.Quarter).addNote(0, "A3", import_theory2.NoteLength.Eighth).addNote(1, "A2", import_theory2.NoteLength.Eighth, { stem: import_score2.Stem.Down }).addNote(1, "E3", import_theory2.NoteLength.Eighth).addNote(1, "C4", import_theory2.NoteLength.Eighth).addNote(1, "A2", import_theory2.NoteLength.Quarter, { dotted: true }).addMeasure().addNavigation(import_score2.Navigation.Ending, 2).addNote(0, "A3", import_theory2.NoteLength.Quarter, { dotted: true, stem: import_score2.Stem.Up }).addLabel(import_score2.Label.Chord, "Am").addNote(0, "A3", import_theory2.NoteLength.Quarter, { dotted: true }).addFermata().addNote(1, "A2", import_theory2.NoteLength.Eighth, { stem: import_score2.Stem.Down }).addNote(1, "E3", import_theory2.NoteLength.Eighth).addNote(1, "C4", import_theory2.NoteLength.Eighth).addNote(1, "A2", import_theory2.NoteLength.Quarter, { dotted: true }).getDocument();
42
+ return new import_score2.DocumentBuilder().setScoreConfiguration("guitarTreble").setHeader("Greensleeves").addMeasure().setKeySignature("C", "Major").setTimeSignature("6/8").setTempo(140).addNote(0, "A3", "8n").addMeasure().addNavigation(import_score2.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();
42
43
  }
43
44
 
44
45
  // src/pieces/andante-diabelli.ts
45
- var import_theory3 = require("@tspro/web-music-score/theory");
46
46
  var import_score3 = require("@tspro/web-music-score/score");
47
47
  function createAndanteByDiabelli() {
48
- return new import_score3.DocumentBuilder().setScoreConfiguration(import_score3.StaffPreset.GuitarTreble).setHeader("Andante", "A. Diabelli").addMeasure().setKeySignature("D", import_theory3.ScaleType.Major).setTimeSignature("3/4").setTempo(80).addRest(0, import_theory3.NoteLength.Eighth, { staffPos: "G4" }).addAnnotation(import_score3.Annotation.Dynamics, "p").addNote(0, "F#4", import_theory3.NoteLength.Eighth, { stem: import_score3.Stem.Up }).addNote(0, "G4", import_theory3.NoteLength.Eighth).addConnective(import_score3.Connective.Slur, 2, import_score3.NoteAnchor.Below).addNote(0, "F#4", import_theory3.NoteLength.Eighth).addNote(0, "E4", import_theory3.NoteLength.Eighth).addNote(0, "D4", import_theory3.NoteLength.Eighth).addNote(1, "D3", import_theory3.NoteLength.Half, { dotted: true, stem: import_score3.Stem.Down }).addMeasure().addNote(0, "C#4", import_theory3.NoteLength.Eighth).addConnective(import_score3.Connective.Slur, 2, import_score3.NoteAnchor.Below).addNote(0, "D4", import_theory3.NoteLength.Eighth).addNote(0, "E4", import_theory3.NoteLength.Eighth).addNote(0, "F#4", import_theory3.NoteLength.Eighth).addNote(0, "G4", import_theory3.NoteLength.Quarter).addNote(1, "A2", import_theory3.NoteLength.Half, { dotted: true }).addMeasure().addRest(0, import_theory3.NoteLength.Eighth, { staffPos: "B3" }).addAnnotation(import_score3.Annotation.Dynamics, "f").addNote(0, "A3", import_theory3.NoteLength.Eighth).addNote(0, "G#3", import_theory3.NoteLength.Eighth).addConnective(import_score3.Connective.Slur, 2, import_score3.NoteAnchor.Below).addNote(0, "A3", import_theory3.NoteLength.Eighth).addNote(0, "B3", import_theory3.NoteLength.Eighth).addNote(0, "C#4", import_theory3.NoteLength.Eighth).addNote(1, "A2", import_theory3.NoteLength.Half, { dotted: true }).endRow().addMeasure().addNote(0, "D4", import_theory3.NoteLength.Eighth, { string: 3 }).addNote(0, "E4", import_theory3.NoteLength.Eighth).addNote(0, "F#4", import_theory3.NoteLength.Eighth).addNote(0, "G4", import_theory3.NoteLength.Eighth).addNote(0, "A4", import_theory3.NoteLength.Quarter).addNote(1, "D3", import_theory3.NoteLength.Half, { dotted: true }).addMeasure().addRest(0, import_theory3.NoteLength.Eighth, { staffPos: "G4" }).addAnnotation(import_score3.Annotation.Dynamics, "p").addNote(0, "F#4", import_theory3.NoteLength.Eighth).addNote(0, "G4", import_theory3.NoteLength.Eighth).addConnective(import_score3.Connective.Slur, 2, import_score3.NoteAnchor.Below).addNote(0, "F#4", import_theory3.NoteLength.Eighth).addNote(0, "E4", import_theory3.NoteLength.Eighth).addNote(0, "D4", import_theory3.NoteLength.Eighth).addNote(1, "D3", import_theory3.NoteLength.Half, { dotted: true }).addMeasure().addNote(0, "C#4", import_theory3.NoteLength.Eighth).addConnective(import_score3.Connective.Slur, 2, import_score3.NoteAnchor.Below).addNote(0, "D4", import_theory3.NoteLength.Eighth).addNote(0, "E4", import_theory3.NoteLength.Eighth).addNote(0, "F#4", import_theory3.NoteLength.Eighth).addNote(0, "G4", import_theory3.NoteLength.Quarter).addNote(1, "A2", import_theory3.NoteLength.Half, { dotted: true }).endRow().addMeasure().addRest(0, import_theory3.NoteLength.Eighth, { staffPos: "B3" }).addAnnotation(import_score3.Annotation.Dynamics, "f").addNote(0, "A3", import_theory3.NoteLength.Eighth).addNote(0, "G#3", import_theory3.NoteLength.Eighth).addConnective(import_score3.Connective.Slur, 2, import_score3.NoteAnchor.Below).addNote(0, "A3", import_theory3.NoteLength.Eighth).addNote(0, "B3", import_theory3.NoteLength.Eighth).addNote(0, "C#4", import_theory3.NoteLength.Eighth).addNote(1, "A2", import_theory3.NoteLength.Half, { dotted: true }).addMeasure().addNote(0, "D4", import_theory3.NoteLength.Quarter).addRest(1, import_theory3.NoteLength.Quarter, { staffPos: "D3" }).addNote(0, "D3", import_theory3.NoteLength.Quarter).addNote(1, "D3", import_theory3.NoteLength.Quarter).addRest(1, import_theory3.NoteLength.Quarter, { staffPos: "B3" }).addNavigation(import_score3.Navigation.EndRepeat).addMeasure().addRest(0, import_theory3.NoteLength.Eighth, { staffPos: "D4" }).addAnnotation(import_score3.Annotation.Dynamics, "f").addNote(0, "D4", import_theory3.NoteLength.Eighth).addNote(0, "E4", import_theory3.NoteLength.Eighth).addConnective(import_score3.Connective.Slur, 2, import_score3.NoteAnchor.Below).addNote(0, "D4", import_theory3.NoteLength.Eighth).addNote(0, "C#4", import_theory3.NoteLength.Eighth).addNote(0, "B3", import_theory3.NoteLength.Eighth).addNote(1, "E2", import_theory3.NoteLength.Half, { dotted: true }).endRow().addMeasure().addNote(0, "C#4", import_theory3.NoteLength.Eighth).addConnective(import_score3.Connective.Slur, 2, import_score3.NoteAnchor.Below).addNote(0, "D4", import_theory3.NoteLength.Eighth).addNote(0, "E4", import_theory3.NoteLength.Eighth).addNote(0, "F#4", import_theory3.NoteLength.Eighth).addNote(0, "E4", import_theory3.NoteLength.Quarter).addNote(1, "A2", import_theory3.NoteLength.Half, { dotted: true }).addMeasure().addRest(0, import_theory3.NoteLength.Eighth, { staffPos: "B3" }).addAnnotation(import_score3.Annotation.Dynamics, "p").addNote(0, "E3", import_theory3.NoteLength.Eighth).addNote(0, "D#3", import_theory3.NoteLength.Eighth).addConnective(import_score3.Connective.Slur, 2, import_score3.NoteAnchor.Below).addNote(0, "E3", import_theory3.NoteLength.Eighth).addNote(0, "F#3", import_theory3.NoteLength.Eighth).addNote(0, "G#3", import_theory3.NoteLength.Eighth).addNote(1, "E2", import_theory3.NoteLength.Half, { dotted: true }).addMeasure().addNote(0, "A3", import_theory3.NoteLength.Eighth).addConnective(import_score3.Connective.Slur, 2, import_score3.NoteAnchor.Below).addNote(0, "G#3", import_theory3.NoteLength.Eighth).addNote(0, "A3", import_theory3.NoteLength.Eighth).addNote(0, "B3", import_theory3.NoteLength.Eighth).addNote(0, "C#4", import_theory3.NoteLength.Quarter).addNote(1, "A2", import_theory3.NoteLength.Half, { dotted: true }).endRow().addMeasure().addRest(0, import_theory3.NoteLength.Eighth, { staffPos: "G4" }).addAnnotation(import_score3.Annotation.Dynamics, "f").addNote(0, "G4", import_theory3.NoteLength.Eighth).addNote(0, "A4", import_theory3.NoteLength.Eighth).addConnective(import_score3.Connective.Slur, 2, import_score3.NoteAnchor.Below).addNote(0, "G4", import_theory3.NoteLength.Eighth).addNote(0, "F#4", import_theory3.NoteLength.Eighth).addNote(0, "E4", import_theory3.NoteLength.Eighth).addNote(1, "A2", import_theory3.NoteLength.Half, { dotted: true }).addMeasure().addNote(0, "D4", import_theory3.NoteLength.Eighth).addNote(0, "C#4", import_theory3.NoteLength.Eighth).addNote(0, "D4", import_theory3.NoteLength.Eighth).addNote(0, "E4", import_theory3.NoteLength.Eighth).addNote(0, "F#4", import_theory3.NoteLength.Quarter).addNote(1, "D3", import_theory3.NoteLength.Half, { dotted: true }).addMeasure().addRest(0, import_theory3.NoteLength.Eighth, { staffPos: "B3" }).addAnnotation(import_score3.Annotation.Dynamics, "ff").addNote(0, "A3", import_theory3.NoteLength.Eighth).addNote(0, "G#3", import_theory3.NoteLength.Eighth).addConnective(import_score3.Connective.Slur, 2, import_score3.NoteAnchor.Below).addNote(0, "A3", import_theory3.NoteLength.Eighth).addNote(0, "B3", import_theory3.NoteLength.Eighth).addNote(0, "C#4", import_theory3.NoteLength.Eighth).addNote(1, "A2", import_theory3.NoteLength.Half, { dotted: true }).addMeasure().addNote(0, "D4", import_theory3.NoteLength.Quarter).addRest(1, import_theory3.NoteLength.Quarter, { staffPos: "D3" }).addNote(0, "D3", import_theory3.NoteLength.Quarter).addNote(1, "D3", import_theory3.NoteLength.Quarter).addRest(1, import_theory3.NoteLength.Quarter, { staffPos: "B3" }).endSong().getDocument();
48
+ return new import_score3.DocumentBuilder().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();
49
49
  }
50
50
  // Annotate the CommonJS export names for ESM import in node:
51
51
  0 && (module.exports = {
@@ -1,25 +1,25 @@
1
- /* WebMusicScore v3.2.0 | (c) 2023 PahkaSoft | MIT License | Includes: Tone.js (MIT License) */
2
- import "../chunk-LCTM7BID.mjs";
1
+ /* WebMusicScore v4.0.1 | (c) 2023 PahkaSoft | MIT License | Includes: Tone.js (MIT License) */
2
+ import "../chunk-YFPLOHP2.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().setHeader("Frere Jacques").setScoreConfiguration([
8
+ { type: "staff", clef: "G", voiceIds: [0] },
9
+ { type: "staff", clef: "F", voiceIds: [1] }
10
+ ]).setMeasuresPerRow(2).addMeasure().setKeySignature("D Major").setTimeSignature("4/4").addNote(0, "D4", "4n", { stem: "up" }).addNote(0, "E4", "4n").addNote(0, "F#4", "4n").addNote(0, "D4", "4n").addRest(1, "1n", { staffPos: "F3" }).addMeasure().addNote(0, "D4", "4n").addNote(0, "E4", "4n").addNote(0, "F#4", "4n").addNote(0, "D4", "4n").addRest(1, "1n", { staffPos: "F3" }).addMeasure().addNavigation("startRepeat").addNote(0, "F#4", "4n").addNote(0, "G4", "4n").addNote(0, "A4", "2n").addNote(1, "D3", "4n", { stem: "down" }).addNote(1, "E3", "4n").addNote(1, "F#3", "4n").addNote(1, "D3", "4n").addMeasure().addNote(0, "F#4", "4n").addNote(0, "G4", "4n").addNote(0, "A4", "2n").addNote(1, "D3", "4n").addNote(1, "E3", "4n").addNote(1, "F#3", "4n").addNote(1, "D3", "4n").addMeasure().addNote(0, "A4", "8n").addNote(0, "B4", "8n").addNote(0, "A4", "8n").addNote(0, "G4", "8n").addNote(0, "F#4", "4n").addNote(0, "D4", "4n").addNote(1, "F#3", "4n").addNote(1, "G3", "4n").addNote(1, "A3", "2n").addMeasure().addNote(0, "A4", "8n").addNote(0, "B4", "8n").addNote(0, "A4", "8n").addNote(0, "G4", "8n").addNote(0, "F#4", "4n").addNote(0, "D4", "4n").addNote(1, "F#3", "4n").addNote(1, "G3", "4n").addNote(1, "A3", "2n").addMeasure().addNote(0, "D4", "4n").addChord(0, ["C#4", "A4"], "4n").addNote(0, "D4", "4n").addRest(0, "4n").addNote(1, "A3", "8n").addNote(1, "B3", "8n").addNote(1, "A3", "8n").addNote(1, "G3", "8n").addNote(1, "F#3", "4n").addNote(1, "D3", "4n").addMeasure().addNote(0, "D4", "4n").addChord(0, ["C#4", "A4"], "4n").addNote(0, "D4", "4n").addRest(0, "4n").addNote(1, "A3", "8n").addNote(1, "B3", "8n").addNote(1, "A3", "8n").addNote(1, "G3", "8n").addNote(1, "F#3", "4n").addNote(1, "D3", "4n").addMeasure().setMeasuresPerRow(4).addNavigation("ending", 1).addNote(0, "D4", "4n").addNote(0, "E4", "4n").addNote(0, "F#4", "4n").addNote(0, "D4", "4n").addNote(1, "D3", "4n").addChord(1, ["C#3", "A3"], "4n").addNote(1, "D3", "4n").addRest(1, "4n").addMeasure().addNavigation("endRepeat").addNote(0, "D4", "4n").addNote(0, "E4", "4n").addNote(0, "F#4", "4n").addNote(0, "D4", "4n").addNote(1, "D3", "4n").addChord(1, ["C#3", "A3"], "4n").addNote(1, "D3", "4n").addRest(1, "4n").addMeasure().addNavigation("ending", 2).addNote(0, "F#4", "4n").addNote(0, "D4", "4n").addNote(0, "F#4", "4n").addNote(0, "D4", "4n").addNote(1, "A3", "4n").addNote(1, "F#3", "4n").addNote(1, "A3", "4n").addNote(1, "F#3", "4n").addMeasure().addNote(0, "A3", "4n").addNote(0, "C#4", "8n").addNote(0, "C#4", "8n").addNote(0, "D4", "2n").addNote(1, "D3", "4n").addNote(1, "E3", "4n").addNote(1, "F#3", "2n").getDocument();
9
11
  }
10
12
 
11
13
  // 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";
14
+ import { Navigation, DocumentBuilder as DocumentBuilder2 } from "@tspro/web-music-score/score";
14
15
  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();
16
+ 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
17
  }
17
18
 
18
19
  // 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";
20
+ import { DocumentBuilder as DocumentBuilder3 } from "@tspro/web-music-score/score";
21
21
  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();
22
+ 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
23
  }
24
24
  export {
25
25
  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';
4
- import { b as PitchNotation, G as GuitarNoteLabel, N as Note } from '../note-BFa43I86.mjs';
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';
3
+ import { c as Scale, S as ScaleType } from '../scale-BbDJTbrG.mjs';
4
+ import { b as PitchNotation, G as GuitarNoteLabel, N as Note } from '../note-eA2xPPiG.mjs';
5
+ import { H as Handedness } from '../guitar-DdexKdN6.mjs';
6
+ import { D as DivRect, M as MDocument, l as ScoreEventListener, n as MRenderer, o as MPlaybackButtons } from '../music-objects-DJQ4d2OA.mjs';
7
+ import '../tempo-CtUhvJbr.mjs';
8
8
  import '@tspro/ts-utils-lib';
9
9
 
10
10
  interface CircleOfFifthsProps {
@@ -12,61 +12,167 @@ interface CircleOfFifthsProps {
12
12
  scale: Scale;
13
13
  onScaleChange: (scale: Scale) => void;
14
14
  }
15
+ /**
16
+ * Circle of fifths react component.
17
+ * <pre>
18
+ * // Using with React TSX/JSX
19
+ * import * as ScoreUI from "@tspro/web-music-score/react-ui";
20
+ * import * as Theory from "@tspro/web-music-score/theory";
21
+ *
22
+ * // Render function of react component.
23
+ * render() {
24
+ * const curScale = Theory.getScale("C Major");
25
+ *
26
+ * const onChangeScale = (newScale: Theory.Scale) => {
27
+ * console.log("New scale is " + newScale.getScaleName());
28
+ * }
29
+ *
30
+ * return &lt;&gt;
31
+ * &lt;ScoreUI.CircleOfFifths
32
+ * style={{ position: "relative", padding: "0.5em" }}
33
+ * scale={curScale}
34
+ * onScaleChange={onChangeScale} /&gt;
35
+ * &lt;/&gt;;
36
+ * }
37
+ * </pre>
38
+ */
15
39
  declare class CircleOfFifths extends React.Component<CircleOfFifthsProps, {}> {
16
40
  constructor(props: CircleOfFifthsProps);
17
41
  onScaleChange(tonic: string, scaleType: ScaleType): void;
18
42
  render(): react_jsx_runtime.JSX.Element;
19
43
  }
20
44
 
45
+ /** Fret position props. */
21
46
  declare class FretPosition {
22
47
  readonly guitarCtx: GuitarContext;
23
48
  readonly stringId: number;
24
49
  readonly fretId: number;
25
50
  readonly chromaticId: number;
51
+ /** Note of this fret position. */
26
52
  readonly note: Note;
53
+ /** Is note of this fret position a scale note? */
27
54
  readonly isScaleNote: boolean;
55
+ /** Is note of this fret position a scale root note? */
28
56
  readonly isScaleRootNote: boolean;
57
+ /** Is note circle/text of this fret position visible? */
29
58
  isVisible: boolean;
59
+ /** Text (e.g. note name) of this fret position. */
30
60
  text: string;
61
+ /** Text color. */
31
62
  textColor: string;
63
+ /** Fill color of note circle. */
32
64
  fillColor: string | undefined;
65
+ /** Border color of note circle. */
33
66
  borderColor: string | undefined;
67
+ /** Is barre? (Reserved for future) */
34
68
  isBarre: boolean;
69
+ /**
70
+ * Create new fret position object instance.
71
+ * @param guitarCtx - Guitar context.
72
+ * @param stringId - String index in range [0, 5].
73
+ * @param fretId - Fret index, 0 = open string fret position.
74
+ * @param chromaticId - Chromatic id.
75
+ */
35
76
  constructor(guitarCtx: GuitarContext, stringId: number, fretId: number, chromaticId: number);
77
+ /** Chromatic class getter. */
36
78
  get chromaticClass(): number;
79
+ /** Show note circle/text of this fret position. */
37
80
  show(): void;
81
+ /** Hide note circle/text of this fret position. */
38
82
  hide(): void;
83
+ /** Set default note name. */
39
84
  setDefaultText(): void;
85
+ /** Set default fill color of note circle. */
40
86
  setDefaultFillColor(): void;
87
+ /** Set default border color of note circle. */
41
88
  setDefaultBorderColor(showBorder?: boolean): void;
42
89
  }
90
+ /** Guitar context class. */
43
91
  declare class GuitarContext {
44
92
  readonly tuningName: string;
45
93
  readonly scale: Scale;
46
94
  readonly handedness: Handedness;
47
95
  readonly pitchNotation: PitchNotation;
48
96
  readonly guitarNoteLabel: GuitarNoteLabel;
97
+ /** Maximum fret index value. */
49
98
  readonly maxFretId: number;
50
99
  private readonly fretPositionTable;
51
100
  private readonly tuningStrings;
101
+ /**
102
+ * Create new guitar context object instance.
103
+ * @param tuningName - Tuning name (e.g. "Standard").
104
+ * @param scale - Scale.
105
+ * @param handedness - Handedness.
106
+ * @param pitchNotation - Pitch notation.
107
+ * @param guitarNoteLabel - Guitar note label type.
108
+ */
52
109
  constructor(tuningName: string, scale: Scale, handedness: Handedness, pitchNotation: PitchNotation, guitarNoteLabel: GuitarNoteLabel);
110
+ /**
111
+ * Get fret position object.
112
+ * @param stringId - String index in range [0,5].
113
+ * @param fretId - Fret index, 0 = open string fret position.
114
+ * @returns - Fret position object.
115
+ */
53
116
  getFretPosition(stringId: number, fretId: number): Readonly<FretPosition>;
117
+ /**
118
+ * Get tuning value (Note) of given string.
119
+ * @param stringId - STring index in range [0, 5].
120
+ * @returns - Note of given string played unfretted.
121
+ */
54
122
  getStringTuning(stringId: number): Note;
123
+ /**
124
+ * Get tuning overview (e.g. "E2 - A2 - D3 - G3 - B3 - E4").
125
+ * @returns - Tuning overview string.
126
+ */
55
127
  getTuningOverview(): string;
128
+ /**
129
+ * Create copy of this guitar context with new tuning name.
130
+ * @param tuningName - New tuning name.
131
+ * @returns - Guitar context.
132
+ */
56
133
  alterTuningName(tuningName: string): GuitarContext;
134
+ /**
135
+ * Create copy of this guitar context with new scale.
136
+ * @param scale - New scale.
137
+ * @returns - Guitar context.
138
+ */
57
139
  alterScale(scale: Scale): GuitarContext;
140
+ /**
141
+ * Create copy of this guitar context with handedness.
142
+ * @param handedness - New handedness.
143
+ * @returns - Guitar context.
144
+ */
58
145
  alterHandedness(handedness: Handedness): GuitarContext;
146
+ /**
147
+ * Create copy of this guitar context with new pitch notation.
148
+ * @param pitchNotation - New pitch notation.
149
+ * @returns - Guitar context.
150
+ */
59
151
  alterPitchNotation(pitchNotation: PitchNotation): GuitarContext;
152
+ /**
153
+ * Create copy of this guitar context with new guitar note label type.
154
+ * @param guitarNoteLabel - New guitar note label type.
155
+ * @returns - Guitar context.
156
+ */
60
157
  alterGuitarNoteLabel(guitarNoteLabel: GuitarNoteLabel): GuitarContext;
61
158
  }
62
159
 
160
+ /** Data for fret position. */
63
161
  declare class FretPositionData {
64
162
  readonly fretPosition: Readonly<FretPosition>;
65
163
  readonly cellRect: DivRect;
66
164
  readonly noteRect: DivRect;
165
+ /**
166
+ * Create new fret position data instance.
167
+ * @param fretPosition - Fret position.
168
+ * @param cellRect - Rect of fret position cell (space around string and between fret and next fret).
169
+ * @param noteRect - Rect to display note name in circle.
170
+ */
67
171
  constructor(fretPosition: Readonly<FretPosition>, cellRect: DivRect, noteRect: DivRect);
68
172
  }
173
+ /** Update fret position function type. */
69
174
  type UpdateFretPositionFunc = (fretPosition: FretPosition) => void;
175
+ /** Click fret position function type. */
70
176
  type ClickFretPositionFunc = (fretPosition: FretPosition) => void;
71
177
  interface GuitarViewProps {
72
178
  style?: React.CSSProperties;
@@ -79,6 +185,35 @@ interface GuitarViewState {
79
185
  height: number;
80
186
  table: FretPositionData[][];
81
187
  }
188
+ /**
189
+ * Guitar (neck) view react component.
190
+ * <pre>
191
+ * // Using with React TSX/JSX
192
+ * import * as ScoreUI from "@tspro/web-music-score/react-ui";
193
+ * import * as Theory from "@tspro/web-music-score/theory";
194
+ *
195
+ * // Render function of react component.
196
+ * render() {
197
+ * const guitarCtx = new ScoreUI.GuitarContext(
198
+ * "Standard", // Tuning name.
199
+ * Theory.getScale("C Major"), // Scale.
200
+ * Theory.DefaultHandedness, // Guitar handedness.
201
+ * Theory.DefaultPitchNotation, // Pitch notation.
202
+ * Theory.DefaultGuitarNoteLabel); // Guitar note label type.
203
+ *
204
+ * const onUpdateFretPosition: ScoreUI.UpdateFretPositionFunc = (fretPos) => { }
205
+ * const onClickFretPosition: ScoreUI.ClickFretPositionFunc = (fretPos) => { }
206
+ *
207
+ * return &lt;&gt;
208
+ * &lt;ScoreUI.GuitarView
209
+ * style={{ position: "relative", width: 640 }}
210
+ * guitarContext={guitarCtx}
211
+ * onUpdateFretPosition={onUpdateFretPosition}
212
+ * onClickFretPosition={onClickFretPosition} /&gt;
213
+ * &lt;/&gt;;
214
+ * }
215
+ * </pre>
216
+ */
82
217
  declare class GuitarView extends React.Component<GuitarViewProps, GuitarViewState> {
83
218
  state: GuitarViewState;
84
219
  constructor(props: GuitarViewProps);
@@ -98,11 +233,21 @@ interface MusicScoreViewProps {
98
233
  onScoreEvent?: ScoreEventListener;
99
234
  }
100
235
  /**
101
- * Usage:
236
+ * Music score view react component.
237
+ * <pre>
238
+ * // Using with React TSX/JSX
239
+ * import * as Score from "@tspro/web-music-score/react";
240
+ * import * as Pieces from "@tspro/web-music-score/pieces";
102
241
  *
103
- * import * as Score from "\@tspro/web-music-score";
242
+ * // Render function of react component.
243
+ * render() {
244
+ * const doc = Pieces.createFrereJacques();
104
245
  *
105
- * \<Score.MusicScoreView doc=\{doc\} /\>
246
+ * return &lt;&gt;
247
+ * &lt;Score.MusicScoreView doc=\{doc\} /&gt;
248
+ * &lt;/&gt;;
249
+ * }
250
+ * </pre>
106
251
  */
107
252
  declare class MusicScoreView extends React.Component<MusicScoreViewProps, {}> {
108
253
  renderer: MRenderer;
@@ -128,19 +273,23 @@ interface PlaybackButtonsState {
128
273
  }
129
274
  /**
130
275
  * Usage:
276
+ * <pre>
277
+ * // Using with React TSX/JSX
278
+ * import * as Score from "\@tspro/web-music-score/score";
279
+ * import * as Pieces from "@tspro/web-music-score/pieces";
131
280
  *
132
- * import * as Score from "\@tspro/web-music-score";
133
- *
134
- * \<Score.PlaybackButtons doc=\{doc\} /\>
135
- *
136
- * To set custom play, pause and stop labels:
137
- *
138
- * \<Score.PlaybackButtons doc=\{doc\} playLabel="⏵" pauseLabel="⏸" stopLabel="⏹" /\>
281
+ * // Create sample musicdocument.
282
+ * const doc = Pieces.createFrereJacques();
139
283
  *
140
- * To use different button layout.
284
+ * // Create default playback buttons
285
+ * &lt;Score.PlaybackButtons doc={doc} /&gt;
141
286
  *
142
- * \<Score.PlaybackButtons doc=\{doc\} buttonLayout=\{Score.PlaybackButtonsLayout.PlayStopSingle\} /\>
287
+ * // Create playback buttons with custom play, pause and stop labels:
288
+ * &lt;Score.PlaybackButtons doc={doc} playLabel="⏵" pauseLabel="⏸" stopLabel="⏹" /&gt;
143
289
  *
290
+ * // Create playback buttons with different button layout.
291
+ * &lt;Score.PlaybackButtons doc={doc} buttonLayout={Score.PlaybackButtonsLayout.PlayStopSingle} /&gt;
292
+ * </pre>
144
293
  */
145
294
  declare class PlaybackButtons extends React.Component<PlaybackButtonsProps, PlaybackButtonsState> {
146
295
  state: PlaybackButtonsState;