@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.
- package/CHANGELOG.md +38 -10
- package/README.md +189 -331
- package/dist/audio/index.d.mts +40 -1
- package/dist/audio/index.d.ts +40 -1
- package/dist/audio/index.js +1 -1
- package/dist/audio/index.mjs +2 -2
- package/dist/audio-cg/index.d.mts +3 -0
- package/dist/audio-cg/index.d.ts +3 -0
- package/dist/audio-cg/index.js +1 -1
- package/dist/audio-cg/index.mjs +2 -2
- package/dist/{chunk-LCTM7BID.mjs → chunk-YFPLOHP2.mjs} +2 -2
- package/dist/core/index.d.mts +12 -0
- package/dist/core/index.d.ts +12 -0
- package/dist/core/index.js +3 -2
- package/dist/core/index.mjs +4 -3
- package/dist/guitar-CaZJDA05.d.ts +35 -0
- package/dist/guitar-DdexKdN6.d.mts +35 -0
- package/dist/iife/index.global.js +11 -11
- package/dist/{interface-Bn5HFt_U.d.mts → music-objects-DJQ4d2OA.d.mts} +640 -136
- package/dist/{interface-BlNl69uT.d.ts → music-objects-Dc3kR-XF.d.ts} +640 -136
- package/dist/note-eA2xPPiG.d.mts +294 -0
- package/dist/note-eA2xPPiG.d.ts +294 -0
- package/dist/pieces/index.d.mts +22 -3
- package/dist/pieces/index.d.ts +22 -3
- package/dist/pieces/index.js +7 -7
- package/dist/pieces/index.mjs +11 -11
- package/dist/react-ui/index.d.mts +166 -17
- package/dist/react-ui/index.d.ts +166 -17
- package/dist/react-ui/index.js +78 -1
- package/dist/react-ui/index.mjs +79 -2
- package/dist/scale-B2Icbetz.d.ts +230 -0
- package/dist/scale-BbDJTbrG.d.mts +230 -0
- package/dist/score/index.d.mts +359 -39
- package/dist/score/index.d.ts +359 -39
- package/dist/score/index.js +1252 -594
- package/dist/score/index.mjs +1255 -599
- package/dist/tempo-CtUhvJbr.d.mts +369 -0
- package/dist/tempo-Dt8aHpol.d.ts +369 -0
- package/dist/theory/index.d.mts +29 -13
- package/dist/theory/index.d.ts +29 -13
- package/dist/theory/index.js +583 -96
- package/dist/theory/index.mjs +580 -94
- package/package.json +2 -2
- package/dist/guitar-C2Cp71NZ.d.ts +0 -17
- package/dist/guitar-DggbM2UL.d.mts +0 -17
- package/dist/note-BFa43I86.d.mts +0 -85
- package/dist/note-BFa43I86.d.ts +0 -85
- package/dist/scale-DRR-t4Kr.d.mts +0 -74
- package/dist/scale-ebJm37q1.d.ts +0 -74
- package/dist/tempo-B4h5Ktob.d.mts +0 -104
- package/dist/tempo-DgqDEsn0.d.ts +0 -104
package/dist/pieces/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* WebMusicScore
|
|
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().
|
|
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(
|
|
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 = {
|
package/dist/pieces/index.mjs
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
/* WebMusicScore
|
|
2
|
-
import "../chunk-
|
|
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 {
|
|
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().
|
|
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 {
|
|
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(
|
|
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 {
|
|
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(
|
|
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-
|
|
4
|
-
import { b as PitchNotation, G as GuitarNoteLabel, N as Note } from '../note-
|
|
5
|
-
import { H as Handedness } from '../guitar-
|
|
6
|
-
import { D as DivRect, M as MDocument,
|
|
7
|
-
import '../tempo-
|
|
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 <>
|
|
31
|
+
* <ScoreUI.CircleOfFifths
|
|
32
|
+
* style={{ position: "relative", padding: "0.5em" }}
|
|
33
|
+
* scale={curScale}
|
|
34
|
+
* onScaleChange={onChangeScale} />
|
|
35
|
+
* </>;
|
|
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 <>
|
|
208
|
+
* <ScoreUI.GuitarView
|
|
209
|
+
* style={{ position: "relative", width: 640 }}
|
|
210
|
+
* guitarContext={guitarCtx}
|
|
211
|
+
* onUpdateFretPosition={onUpdateFretPosition}
|
|
212
|
+
* onClickFretPosition={onClickFretPosition} />
|
|
213
|
+
* </>;
|
|
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
|
-
*
|
|
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
|
-
*
|
|
242
|
+
* // Render function of react component.
|
|
243
|
+
* render() {
|
|
244
|
+
* const doc = Pieces.createFrereJacques();
|
|
104
245
|
*
|
|
105
|
-
*
|
|
246
|
+
* return <>
|
|
247
|
+
* <Score.MusicScoreView doc=\{doc\} />
|
|
248
|
+
* </>;
|
|
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
|
-
*
|
|
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
|
-
*
|
|
284
|
+
* // Create default playback buttons
|
|
285
|
+
* <Score.PlaybackButtons doc={doc} />
|
|
141
286
|
*
|
|
142
|
-
*
|
|
287
|
+
* // Create playback buttons with custom play, pause and stop labels:
|
|
288
|
+
* <Score.PlaybackButtons doc={doc} playLabel="⏵" pauseLabel="⏸" stopLabel="⏹" />
|
|
143
289
|
*
|
|
290
|
+
* // Create playback buttons with different button layout.
|
|
291
|
+
* <Score.PlaybackButtons doc={doc} buttonLayout={Score.PlaybackButtonsLayout.PlayStopSingle} />
|
|
292
|
+
* </pre>
|
|
144
293
|
*/
|
|
145
294
|
declare class PlaybackButtons extends React.Component<PlaybackButtonsProps, PlaybackButtonsState> {
|
|
146
295
|
state: PlaybackButtonsState;
|