web-music-score 6.0.0-pre.4 → 6.0.0-pre.5
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 +7 -0
- package/dist/audio/index.d.ts +1 -1
- package/dist/audio/index.js +1 -1
- package/dist/audio/index.mjs +4 -4
- package/dist/audio-cg/index.js +1 -1
- package/dist/audio-cg/index.mjs +4 -4
- package/dist/audio-synth/index.js +1 -1
- package/dist/audio-synth/index.mjs +4 -4
- package/dist/{chunk-6BEFVAAS.mjs → chunk-6R3N7WJC.mjs} +3 -3
- package/dist/{chunk-UAVXEHYM.mjs → chunk-DQFQEO6F.mjs} +4 -4
- package/dist/{chunk-GNFDJFUO.mjs → chunk-G3HIPFVF.mjs} +2 -2
- package/dist/{chunk-DVKR62RS.mjs → chunk-JP3PJICN.mjs} +3 -3
- package/dist/{chunk-KFBULED3.mjs → chunk-U2D4H5TI.mjs} +3 -3
- package/dist/{chunk-GNCSH24V.mjs → chunk-Y67RBHW2.mjs} +2 -2
- package/dist/core/index.js +2 -2
- package/dist/core/index.mjs +5 -5
- package/dist/iife/audio-cg.js +1 -1
- package/dist/iife/index.js +9 -9
- package/dist/{music-objects-ChAdqdR8.d.ts → music-objects-D-xO1oti.d.ts} +3 -3
- package/dist/{note-RVXvpfyV.d.ts → note-CJuq5aBy.d.ts} +1 -1
- package/dist/pieces/index.d.ts +3 -3
- package/dist/pieces/index.js +2 -2
- package/dist/pieces/index.mjs +3 -3
- package/dist/react-ui/index.d.ts +3 -3
- package/dist/react-ui/index.js +1 -1
- package/dist/react-ui/index.mjs +2 -2
- package/dist/{scale-B1M10_fu.d.ts → scale-DxGqFxlv.d.ts} +2 -2
- package/dist/score/index.d.ts +14 -7
- package/dist/score/index.js +32 -15
- package/dist/score/index.mjs +36 -19
- package/dist/{tempo-D-JF-8b_.d.ts → tempo-pCAa6qgo.d.ts} +1 -1
- package/dist/theory/index.d.ts +5 -5
- package/dist/theory/index.js +1 -1
- package/dist/theory/index.mjs +4 -4
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { N as Note, A as Accidental } from './note-
|
|
2
|
-
import { R as RhythmProps, N as NoteLength, h as NoteLengthStr, k as TupletRatio, c as Tempo, K as KeySignature, a as TimeSignature } from './tempo-
|
|
1
|
+
import { N as Note, A as Accidental } from './note-CJuq5aBy.js';
|
|
2
|
+
import { R as RhythmProps, N as NoteLength, h as NoteLengthStr, k as TupletRatio, c as Tempo, K as KeySignature, a as TimeSignature } from './tempo-pCAa6qgo.js';
|
|
3
3
|
import { AnchoredRect, UniMap, Rect, Vec } from '@tspro/ts-utils-lib';
|
|
4
4
|
|
|
5
5
|
/** Staff preset values for score configuration. */
|
|
@@ -1104,7 +1104,7 @@ declare class ObjMeasure extends MusicObject {
|
|
|
1104
1104
|
getBarLineLeft(): ObjBarLineLeft;
|
|
1105
1105
|
getBarLineRight(): ObjBarLineRight;
|
|
1106
1106
|
getVoiceSymbols(voiceId: VoiceId): ReadonlyArray<RhythmSymbol>;
|
|
1107
|
-
|
|
1107
|
+
fillWithRests(...voiceId: VoiceId[]): void;
|
|
1108
1108
|
requestLayout(): void;
|
|
1109
1109
|
layout(ctx: RenderContext): void;
|
|
1110
1110
|
layoutWidth(ctx: RenderContext, width: number): void;
|
|
@@ -300,7 +300,7 @@ declare class Note {
|
|
|
300
300
|
* @param b - Note b.
|
|
301
301
|
* @returns - -1, 0 or 1.
|
|
302
302
|
*/
|
|
303
|
-
static compareFunc(a: Note, b: Note): 1 |
|
|
303
|
+
static compareFunc(a: Note, b: Note): 1 | -1 | 0;
|
|
304
304
|
}
|
|
305
305
|
|
|
306
306
|
export { type Accidental as A, DefaultPitchNotation as D, GuitarNoteLabel as G, Note as N, type ParsedNote as P, SymbolSet as S, type NoteLetter as a, PitchNotation as b, PitchNotationList as c, DefaultGuitarNoteLabel as d, GuitarNoteLabelList as e, validateGuitarNoteLabel as f, getPitchNotationName as g, validatePitchNotation as v };
|
package/dist/pieces/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { M as MDocument } from '../music-objects-
|
|
2
|
-
import '../note-
|
|
3
|
-
import '../tempo-
|
|
1
|
+
import { M as MDocument } from '../music-objects-D-xO1oti.js';
|
|
2
|
+
import '../note-CJuq5aBy.js';
|
|
3
|
+
import '../tempo-pCAa6qgo.js';
|
|
4
4
|
import '@tspro/ts-utils-lib';
|
|
5
5
|
|
|
6
6
|
/**
|
package/dist/pieces/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* WebMusicScore v6.0.0-pre.
|
|
1
|
+
/* WebMusicScore v6.0.0-pre.5 | (c) 2023-2025 Stefan Brockmann | MIT License | Includes: Tone.js (MIT License), Color Name to Code (MIT License) */
|
|
2
2
|
"use strict";
|
|
3
3
|
var __defProp = Object.defineProperty;
|
|
4
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -41,7 +41,7 @@ function createCanonInD() {
|
|
|
41
41
|
return new import_score2.DocumentBuilder().setHeader("Canon in D", "Pachelbel").setScoreConfiguration([
|
|
42
42
|
{ type: "staff", clef: "G", voiceId: 0, instrument: "Piano" },
|
|
43
43
|
{ type: "staff", clef: "F", voiceId: 1, instrument: "Piano" }
|
|
44
|
-
]).addMeasure().setKeySignature("D Major").setTimeSignature("4/4").setTempo(50, "2n").
|
|
44
|
+
]).addMeasure().setKeySignature("D Major").setTimeSignature("4/4").setTempo(50, "2n").fillWithRests(0).addNote(1, ["D3", "F#3", "A3", "D4"], "8n").addNote(1, ["A2", "C#3", "E3", "A3"], "8n").addMeasure({ showNumber: true }).fillWithRests(0).addNote(1, ["B2", "D3", "F#3", "B3"], "8n").addNote(1, ["F#2", "A2", "C#3", "F#3"], "8n").addMeasure().fillWithRests(0).addNote(1, ["G2", "B2", "D3", "G3"], "8n").addNote(1, ["D2", "F#2", "A2", "D3"], "8n").addMeasure({ showNumber: true }).fillWithRests(0).addNote(1, ["G2", "B2", "D3", "G3"], "8n").addNote(1, ["A2", "C#3", "E3", "A3"], "8n").addMeasure().addNote(0, ["F#5", "E5"], "2n").addNote(1, ["D3", "F#3", "A3", "D4"], "8n").addNote(1, ["A2", "C#3", "E3", "A3"], "8n").endRow().addMeasure({ showNumber: true }).addNote(0, ["D5", "C#5"], "2n").addNote(1, ["B2", "D3", "F#3", "B3"], "8n").addNote(1, ["F#2", "A2", "C#3", "F#3"], "8n").addMeasure().addNote(0, ["B4", "A4"], "2n").addNote(1, ["G2", "B2", "D3", "G3"], "8n").addNote(1, ["D2", "F#2", "A2", "D3"], "8n").addMeasure({ showNumber: true }).addNote(0, ["B4", "C#5"], "2n").addNote(1, ["G2", "B2", "D3", "G3"], "8n").addNote(1, ["A2", "C#3", "E3", "A3"], "8n").addMeasure().addChord(0, ["F#5", "D5"], "2n").addChord(0, ["E5", "C#5"], "2n").addNote(1, ["D3", "F#3", "A3", "D4"], "8n").addNote(1, ["A2", "C#3", "E3", "A3"], "8n").addMeasure({ showNumber: true }).addChord(0, ["D5", "B4"], "2n").addChord(0, ["C#5", "A4"], "2n").addNote(1, ["B2", "D3", "F#3", "B3"], "8n").addNote(1, ["F#2", "A2", "C#3", "F#3"], "8n").endRow().addMeasure({ showNumber: false }).addChord(0, ["B4", "G4"], "2n").addChord(0, ["A4", "F#4"], "2n").addNote(1, ["G2", "B2", "D3", "G3"], "8n").addNote(1, ["D2", "F#2", "A2", "D3"], "8n").addMeasure({ showNumber: true }).addChord(0, ["B4", "G4"], "2n").addChord(0, ["C#5", "A4"], "2n").addNote(1, ["G2", "B2", "D3", "G3"], "8n").addNote(1, ["A2", "C#3", "E3", "A3"], "8n").addMeasure().addNote(0, ["D4", "F#4", "A4", "G4"], "4n").addNote(1, ["D3", "A2"], "2n").addMeasure({ showNumber: true }).addNote(0, ["F#4", "D4", "F#4", "E4"], "4n").addNote(1, ["B2", "F#2"], "2n").addMeasure().addNote(0, ["D4", "B3", "D4", "A4"], "4n").addNote(1, ["G2", "D2"], "2n").addMeasure({ showNumber: true }).addNote(0, ["G4", "B4", "A4", "G4"], "4n").addNote(1, ["G2", "A2"], "2n").addMeasure().addNote(0, ["F#4", "D4", "E4", "C#5"], "4n").addNote(1, ["D3", "A2"], "2n").endRow().addMeasure({ showNumber: true }).addNote(0, ["D5", "F#5", "A5", "A4"], "4n").addNote(1, ["B2", "F#2"], "2n").addMeasure().addNote(0, ["B4", "G4", "A4", "F#4"], "4n").addNote(1, ["G2", "D2"], "2n").addMeasure({ showNumber: true }).addNote(0, ["D4", "D5", "C#5"], "4n").addRest(0, "4n").addNote(1, ["G2", "A2"], "2n").addMeasure().addNote(0, ["D5", "C#5", "D5", "D4"], "8n").addNote(0, ["C#4", "A4", "E4", "F#4"], "8n").addNote(1, ["D3", "A2"], "2n").addMeasure({ showNumber: true }).addNote(0, ["D4", "D5", "C#5", "B4"], "8n").addNote(0, ["C#5", "F#5", "A5", "B5"], "8n").addNote(1, ["B2", "F#2"], "2n").addMeasure().addNote(0, ["G5", "F#5", "E5", "G5"], "8n").addNote(0, ["F#5", "E5", "D5", "C#5"], "8n").addNote(1, ["G2", "D2"], "2n").endRow().addMeasure({ showNumber: true }).addNote(0, ["B4", "A4", "G4", "F#4"], "8n").addNote(0, ["E4", "G4", "F#4", "E4"], "8n").addNote(1, ["G2", "A2"], "2n").addMeasure().addNote(0, ["D4", "E4", "F#4", "G4"], "8n").addNote(0, ["A4", "E4", "A4", "G4"], "8n").addNote(1, ["D3", "A2"], "2n").addMeasure({ showNumber: true }).addNote(0, ["F#4", "B4", "A4", "G4"], "8n").addNote(0, ["A4", "G4", "F#4", "E4"], "8n").addNote(1, ["B2", "F#2"], "2n").addMeasure().addNote(0, ["D4", "B3", "B4", "C#5"], "8n").addNote(0, ["D5", "C#5", "B4", "A4"], "8n").addNote(1, ["G2", "D2"], "2n").addMeasure({ showNumber: true }).addNote(0, ["G4", "F#4", "E4", "B4"], "8n").addNote(0, ["A4", "B4", "A4", "G4"], "8n").addNote(1, ["G2", "A2"], "2n").endRow().addMeasure({ showNumber: false }).addNote(0, "F#4", "4n").addNote(0, "F#5", "4n").addNote(0, "E5", "2n").addNote(1, ["D3", "A2"], "2n").addMeasure({ showNumber: true }).addRest(0, "4n", { staffPos: "B4" }).addNote(0, "D5", "4n").addNote(0, "F#5", "2n").addNote(1, ["B2", "F#2"], "2n").addMeasure().addNote(0, ["B5", "A5"], "2n").addNote(1, ["G2", "D2"], "2n").addMeasure({ showNumber: true }).addNote(0, ["B5", "C#6"], "2n").addNote(1, ["G2", "A2"], "2n").addMeasure().addNote(0, ["D6", "D5"], "4n").addNote(0, "C#5", "2n").addNote(1, ["D3", "A2"], "2n").addMeasure({ showNumber: true }).addRest(0, "4n", { staffPos: "B4" }).addNote(0, "B4", "4n").addNote(0, "D5", "2n").addNote(1, ["B2", "F#2"], "2n").addMeasure().addNote(0, "D5", "2n").addRest(0, "4n", { staffPos: "B4" }).addNote(0, "D5", "4n").addNote(1, ["G2", "D2"], "2n").addMeasure({ showNumber: true }).addNote(0, ["D5", "F#5", "E5", "A5"], "4n").addNote(1, ["G2", "A2"], "2n").endRow().addMeasure({ showNumber: false }).addNote(0, "A5", "8n").addNote(0, ["F#5", "G5"], "16n").addNote(0, "A5", "8n").addNote(0, ["F#5", "G5"], "16n").addNote(0, ["A5", "A4", "B4", "C#5"], "16n").addNote(0, ["D5", "E5", "F#5", "G5"], "16n").addNote(1, ["D3", "A2"], "2n").addMeasure({ showNumber: true }).addNote(0, "F#5", "8n").addNote(0, ["D5", "E5"], "16n").addNote(0, "F#5", "8n").addNote(0, ["F#4", "G4"], "16n").addNote(0, ["A4", "B4", "A4", "G4"], "16n").addNote(0, ["A4", "F#4", "G4", "A4"], "16n").addNote(1, ["B2", "F#2"], "2n").addMeasure().addNote(0, "G4", "8n").addNote(0, ["B4", "A4"], "16n").addNote(0, "G4", "8n").addNote(0, ["F#4", "E4"], "16n").addNote(0, ["F#4", "E4", "D4", "E4"], "16n").addNote(0, ["F#4", "G4", "A4", "B4"], "16n").addNote(1, ["G2", "D2"], "2n").endRow().addMeasure({ showNumber: true }).addNote(0, "G4", "8n").addNote(0, ["B4", "A4"], "16n").addNote(0, "B4", "8n").addNote(0, ["C#5", "D5"], "16n").addNote(0, ["A4", "B4", "C#5", "D5"], "16n").addNote(0, ["E5", "F#5", "G5", "A5"], "16n").addNote(1, ["G2", "A2"], "2n").addMeasure().addNote(0, "F#5", "8n").addNote(0, ["D5", "E5"], "16n").addNote(0, "F#5", "8n").addNote(0, ["E5", "D5"], "16n").addNote(0, ["E5", "C#5", "D5", "E5"], "16n").addNote(0, ["F#5", "E5", "D5", "C#5"], "16n").addNote(1, ["D3", "A2"], "2n").addMeasure({ showNumber: true }).addNote(0, "D5", "8n").addNote(0, ["B4", "C#5"], "16n").addNote(0, "D5", "8n").addNote(0, ["D4", "E4"], "16n").addNote(0, ["F#4", "G4", "F#4", "E4"], "16n").addNote(0, ["F#4", "D5", "C#5", "D5"], "16n").addNote(1, ["B2", "F#2"], "2n").endRow().addMeasure({ showNumber: false }).addNote(0, "B4", "8n").addNote(0, ["D5", "C#5"], "16n").addNote(0, "B4", "8n").addNote(0, ["A4", "G4"], "16n").addNote(0, ["A4", "G4", "F#4", "G4"], "16n").addNote(0, ["A4", "B4", "C#5", "D5"], "16n").addNote(1, ["G2", "D2"], "2n").addMeasure({ showNumber: true }).addNote(0, "B4", "8n").addNote(0, ["D5", "C#5"], "16n").addNote(0, "D5", "8n").addNote(0, ["C#5", "B4"], "16n").addNote(0, ["C#5", "D5", "E5", "D5"], "16n").addNote(0, ["C#5", "D5", "B4", "C#5"], "16n").addNote(1, ["G2", "A2"], "2n").addMeasure().addNavigation("startRepeat").addNote(0, "D5", "4.").addNote(0, "A5", "8n").addNote(0, ["A5", "B5", "A5", "G5"], "8n").addNote(1, ["D3", "A2"], "2n").addMeasure({ showNumber: true }).addNote(0, "F#5", "4.").addNote(0, "F#5", "8n").addNote(0, ["F#5", "G5", "F#5", "E5"], "8n").addNote(1, ["B2", "F#2"], "2n").endRow().addMeasure({ showNumber: false }).addNote(0, "D5", "4.").addNote(0, "D5", "8n").addNote(0, ["D5", "A5"], "4n").addNote(1, ["G2", "D2"], "2n").addMeasure({ showNumber: true }).addNote(0, ["D5", "C5", "B5", "C5"], "8n").addNote(0, "C#5", "2n").addNote(1, ["G2", "A2"], "2n").addNavigation("endRepeat").addMeasure().addNote(0, "D5", "1n").addNote(1, "D3", "1n").getDocument();
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
// src/pieces/frere-jacques.ts
|
package/dist/pieces/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/* WebMusicScore v6.0.0-pre.
|
|
2
|
-
import "../chunk-
|
|
1
|
+
/* WebMusicScore v6.0.0-pre.5 | (c) 2023-2025 Stefan Brockmann | MIT License | Includes: Tone.js (MIT License), Color Name to Code (MIT License) */
|
|
2
|
+
import "../chunk-G3HIPFVF.mjs";
|
|
3
3
|
|
|
4
4
|
// src/pieces/andante-diabelli.ts
|
|
5
5
|
import { DocumentBuilder } from "web-music-score/score";
|
|
@@ -13,7 +13,7 @@ function createCanonInD() {
|
|
|
13
13
|
return new DocumentBuilder2().setHeader("Canon in D", "Pachelbel").setScoreConfiguration([
|
|
14
14
|
{ type: "staff", clef: "G", voiceId: 0, instrument: "Piano" },
|
|
15
15
|
{ type: "staff", clef: "F", voiceId: 1, instrument: "Piano" }
|
|
16
|
-
]).addMeasure().setKeySignature("D Major").setTimeSignature("4/4").setTempo(50, "2n").
|
|
16
|
+
]).addMeasure().setKeySignature("D Major").setTimeSignature("4/4").setTempo(50, "2n").fillWithRests(0).addNote(1, ["D3", "F#3", "A3", "D4"], "8n").addNote(1, ["A2", "C#3", "E3", "A3"], "8n").addMeasure({ showNumber: true }).fillWithRests(0).addNote(1, ["B2", "D3", "F#3", "B3"], "8n").addNote(1, ["F#2", "A2", "C#3", "F#3"], "8n").addMeasure().fillWithRests(0).addNote(1, ["G2", "B2", "D3", "G3"], "8n").addNote(1, ["D2", "F#2", "A2", "D3"], "8n").addMeasure({ showNumber: true }).fillWithRests(0).addNote(1, ["G2", "B2", "D3", "G3"], "8n").addNote(1, ["A2", "C#3", "E3", "A3"], "8n").addMeasure().addNote(0, ["F#5", "E5"], "2n").addNote(1, ["D3", "F#3", "A3", "D4"], "8n").addNote(1, ["A2", "C#3", "E3", "A3"], "8n").endRow().addMeasure({ showNumber: true }).addNote(0, ["D5", "C#5"], "2n").addNote(1, ["B2", "D3", "F#3", "B3"], "8n").addNote(1, ["F#2", "A2", "C#3", "F#3"], "8n").addMeasure().addNote(0, ["B4", "A4"], "2n").addNote(1, ["G2", "B2", "D3", "G3"], "8n").addNote(1, ["D2", "F#2", "A2", "D3"], "8n").addMeasure({ showNumber: true }).addNote(0, ["B4", "C#5"], "2n").addNote(1, ["G2", "B2", "D3", "G3"], "8n").addNote(1, ["A2", "C#3", "E3", "A3"], "8n").addMeasure().addChord(0, ["F#5", "D5"], "2n").addChord(0, ["E5", "C#5"], "2n").addNote(1, ["D3", "F#3", "A3", "D4"], "8n").addNote(1, ["A2", "C#3", "E3", "A3"], "8n").addMeasure({ showNumber: true }).addChord(0, ["D5", "B4"], "2n").addChord(0, ["C#5", "A4"], "2n").addNote(1, ["B2", "D3", "F#3", "B3"], "8n").addNote(1, ["F#2", "A2", "C#3", "F#3"], "8n").endRow().addMeasure({ showNumber: false }).addChord(0, ["B4", "G4"], "2n").addChord(0, ["A4", "F#4"], "2n").addNote(1, ["G2", "B2", "D3", "G3"], "8n").addNote(1, ["D2", "F#2", "A2", "D3"], "8n").addMeasure({ showNumber: true }).addChord(0, ["B4", "G4"], "2n").addChord(0, ["C#5", "A4"], "2n").addNote(1, ["G2", "B2", "D3", "G3"], "8n").addNote(1, ["A2", "C#3", "E3", "A3"], "8n").addMeasure().addNote(0, ["D4", "F#4", "A4", "G4"], "4n").addNote(1, ["D3", "A2"], "2n").addMeasure({ showNumber: true }).addNote(0, ["F#4", "D4", "F#4", "E4"], "4n").addNote(1, ["B2", "F#2"], "2n").addMeasure().addNote(0, ["D4", "B3", "D4", "A4"], "4n").addNote(1, ["G2", "D2"], "2n").addMeasure({ showNumber: true }).addNote(0, ["G4", "B4", "A4", "G4"], "4n").addNote(1, ["G2", "A2"], "2n").addMeasure().addNote(0, ["F#4", "D4", "E4", "C#5"], "4n").addNote(1, ["D3", "A2"], "2n").endRow().addMeasure({ showNumber: true }).addNote(0, ["D5", "F#5", "A5", "A4"], "4n").addNote(1, ["B2", "F#2"], "2n").addMeasure().addNote(0, ["B4", "G4", "A4", "F#4"], "4n").addNote(1, ["G2", "D2"], "2n").addMeasure({ showNumber: true }).addNote(0, ["D4", "D5", "C#5"], "4n").addRest(0, "4n").addNote(1, ["G2", "A2"], "2n").addMeasure().addNote(0, ["D5", "C#5", "D5", "D4"], "8n").addNote(0, ["C#4", "A4", "E4", "F#4"], "8n").addNote(1, ["D3", "A2"], "2n").addMeasure({ showNumber: true }).addNote(0, ["D4", "D5", "C#5", "B4"], "8n").addNote(0, ["C#5", "F#5", "A5", "B5"], "8n").addNote(1, ["B2", "F#2"], "2n").addMeasure().addNote(0, ["G5", "F#5", "E5", "G5"], "8n").addNote(0, ["F#5", "E5", "D5", "C#5"], "8n").addNote(1, ["G2", "D2"], "2n").endRow().addMeasure({ showNumber: true }).addNote(0, ["B4", "A4", "G4", "F#4"], "8n").addNote(0, ["E4", "G4", "F#4", "E4"], "8n").addNote(1, ["G2", "A2"], "2n").addMeasure().addNote(0, ["D4", "E4", "F#4", "G4"], "8n").addNote(0, ["A4", "E4", "A4", "G4"], "8n").addNote(1, ["D3", "A2"], "2n").addMeasure({ showNumber: true }).addNote(0, ["F#4", "B4", "A4", "G4"], "8n").addNote(0, ["A4", "G4", "F#4", "E4"], "8n").addNote(1, ["B2", "F#2"], "2n").addMeasure().addNote(0, ["D4", "B3", "B4", "C#5"], "8n").addNote(0, ["D5", "C#5", "B4", "A4"], "8n").addNote(1, ["G2", "D2"], "2n").addMeasure({ showNumber: true }).addNote(0, ["G4", "F#4", "E4", "B4"], "8n").addNote(0, ["A4", "B4", "A4", "G4"], "8n").addNote(1, ["G2", "A2"], "2n").endRow().addMeasure({ showNumber: false }).addNote(0, "F#4", "4n").addNote(0, "F#5", "4n").addNote(0, "E5", "2n").addNote(1, ["D3", "A2"], "2n").addMeasure({ showNumber: true }).addRest(0, "4n", { staffPos: "B4" }).addNote(0, "D5", "4n").addNote(0, "F#5", "2n").addNote(1, ["B2", "F#2"], "2n").addMeasure().addNote(0, ["B5", "A5"], "2n").addNote(1, ["G2", "D2"], "2n").addMeasure({ showNumber: true }).addNote(0, ["B5", "C#6"], "2n").addNote(1, ["G2", "A2"], "2n").addMeasure().addNote(0, ["D6", "D5"], "4n").addNote(0, "C#5", "2n").addNote(1, ["D3", "A2"], "2n").addMeasure({ showNumber: true }).addRest(0, "4n", { staffPos: "B4" }).addNote(0, "B4", "4n").addNote(0, "D5", "2n").addNote(1, ["B2", "F#2"], "2n").addMeasure().addNote(0, "D5", "2n").addRest(0, "4n", { staffPos: "B4" }).addNote(0, "D5", "4n").addNote(1, ["G2", "D2"], "2n").addMeasure({ showNumber: true }).addNote(0, ["D5", "F#5", "E5", "A5"], "4n").addNote(1, ["G2", "A2"], "2n").endRow().addMeasure({ showNumber: false }).addNote(0, "A5", "8n").addNote(0, ["F#5", "G5"], "16n").addNote(0, "A5", "8n").addNote(0, ["F#5", "G5"], "16n").addNote(0, ["A5", "A4", "B4", "C#5"], "16n").addNote(0, ["D5", "E5", "F#5", "G5"], "16n").addNote(1, ["D3", "A2"], "2n").addMeasure({ showNumber: true }).addNote(0, "F#5", "8n").addNote(0, ["D5", "E5"], "16n").addNote(0, "F#5", "8n").addNote(0, ["F#4", "G4"], "16n").addNote(0, ["A4", "B4", "A4", "G4"], "16n").addNote(0, ["A4", "F#4", "G4", "A4"], "16n").addNote(1, ["B2", "F#2"], "2n").addMeasure().addNote(0, "G4", "8n").addNote(0, ["B4", "A4"], "16n").addNote(0, "G4", "8n").addNote(0, ["F#4", "E4"], "16n").addNote(0, ["F#4", "E4", "D4", "E4"], "16n").addNote(0, ["F#4", "G4", "A4", "B4"], "16n").addNote(1, ["G2", "D2"], "2n").endRow().addMeasure({ showNumber: true }).addNote(0, "G4", "8n").addNote(0, ["B4", "A4"], "16n").addNote(0, "B4", "8n").addNote(0, ["C#5", "D5"], "16n").addNote(0, ["A4", "B4", "C#5", "D5"], "16n").addNote(0, ["E5", "F#5", "G5", "A5"], "16n").addNote(1, ["G2", "A2"], "2n").addMeasure().addNote(0, "F#5", "8n").addNote(0, ["D5", "E5"], "16n").addNote(0, "F#5", "8n").addNote(0, ["E5", "D5"], "16n").addNote(0, ["E5", "C#5", "D5", "E5"], "16n").addNote(0, ["F#5", "E5", "D5", "C#5"], "16n").addNote(1, ["D3", "A2"], "2n").addMeasure({ showNumber: true }).addNote(0, "D5", "8n").addNote(0, ["B4", "C#5"], "16n").addNote(0, "D5", "8n").addNote(0, ["D4", "E4"], "16n").addNote(0, ["F#4", "G4", "F#4", "E4"], "16n").addNote(0, ["F#4", "D5", "C#5", "D5"], "16n").addNote(1, ["B2", "F#2"], "2n").endRow().addMeasure({ showNumber: false }).addNote(0, "B4", "8n").addNote(0, ["D5", "C#5"], "16n").addNote(0, "B4", "8n").addNote(0, ["A4", "G4"], "16n").addNote(0, ["A4", "G4", "F#4", "G4"], "16n").addNote(0, ["A4", "B4", "C#5", "D5"], "16n").addNote(1, ["G2", "D2"], "2n").addMeasure({ showNumber: true }).addNote(0, "B4", "8n").addNote(0, ["D5", "C#5"], "16n").addNote(0, "D5", "8n").addNote(0, ["C#5", "B4"], "16n").addNote(0, ["C#5", "D5", "E5", "D5"], "16n").addNote(0, ["C#5", "D5", "B4", "C#5"], "16n").addNote(1, ["G2", "A2"], "2n").addMeasure().addNavigation("startRepeat").addNote(0, "D5", "4.").addNote(0, "A5", "8n").addNote(0, ["A5", "B5", "A5", "G5"], "8n").addNote(1, ["D3", "A2"], "2n").addMeasure({ showNumber: true }).addNote(0, "F#5", "4.").addNote(0, "F#5", "8n").addNote(0, ["F#5", "G5", "F#5", "E5"], "8n").addNote(1, ["B2", "F#2"], "2n").endRow().addMeasure({ showNumber: false }).addNote(0, "D5", "4.").addNote(0, "D5", "8n").addNote(0, ["D5", "A5"], "4n").addNote(1, ["G2", "D2"], "2n").addMeasure({ showNumber: true }).addNote(0, ["D5", "C5", "B5", "C5"], "8n").addNote(0, "C#5", "2n").addNote(1, ["G2", "A2"], "2n").addNavigation("endRepeat").addMeasure().addNote(0, "D5", "1n").addNote(1, "D3", "1n").getDocument();
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
// src/pieces/frere-jacques.ts
|
package/dist/react-ui/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import { M as MDocument, a8 as Paint, o as ScoreEventListener, r as MPlaybackButtons } from '../music-objects-
|
|
4
|
-
import '../note-
|
|
5
|
-
import '../tempo-
|
|
3
|
+
import { M as MDocument, a8 as Paint, o as ScoreEventListener, r as MPlaybackButtons } from '../music-objects-D-xO1oti.js';
|
|
4
|
+
import '../note-CJuq5aBy.js';
|
|
5
|
+
import '../tempo-pCAa6qgo.js';
|
|
6
6
|
import '@tspro/ts-utils-lib';
|
|
7
7
|
|
|
8
8
|
interface MusicScoreViewProps {
|
package/dist/react-ui/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* WebMusicScore v6.0.0-pre.
|
|
1
|
+
/* WebMusicScore v6.0.0-pre.5 | (c) 2023-2025 Stefan Brockmann | MIT License | Includes: Tone.js (MIT License), Color Name to Code (MIT License) */
|
|
2
2
|
"use strict";
|
|
3
3
|
var __create = Object.create;
|
|
4
4
|
var __defProp = Object.defineProperty;
|
package/dist/react-ui/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/* WebMusicScore v6.0.0-pre.
|
|
1
|
+
/* WebMusicScore v6.0.0-pre.5 | (c) 2023-2025 Stefan Brockmann | MIT License | Includes: Tone.js (MIT License), Color Name to Code (MIT License) */
|
|
2
2
|
import {
|
|
3
3
|
__publicField
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-G3HIPFVF.mjs";
|
|
5
5
|
|
|
6
6
|
// src/react-ui/music-score-view.tsx
|
|
7
7
|
import * as React from "react";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { N as Note, S as SymbolSet } from './note-
|
|
2
|
-
import { K as KeySignature } from './tempo-
|
|
1
|
+
import { N as Note, S as SymbolSet } from './note-CJuq5aBy.js';
|
|
2
|
+
import { K as KeySignature } from './tempo-pCAa6qgo.js';
|
|
3
3
|
|
|
4
4
|
/** Interval direction type. */
|
|
5
5
|
type IntervalDirection = "Unison" | "Ascending" | "Descending";
|
package/dist/score/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { N as NoteOptions, R as RestOptions, S as StaffPreset, a as ScoreConfiguration, M as MDocument, b as MeasureOptions, V as VoiceId, T as TupletOptions, c as VerseNumber, L as LyricsOptions, d as StaffTabOrGroups, F as Fermata, e as Navigation, A as AnnotationText, f as Annotation, g as Label, C as Connective, h as TieType, i as NoteAnchor, j as VerticalPosition } from '../music-objects-
|
|
2
|
-
export { ao as Arpeggio, aa as BaseConfig, a9 as Clef, a5 as ColorKey, a7 as ColorKeyPart, as as DynamicsAnnotation, aq as LyricsAlign, ar as LyricsHyphen, t as MAccidental, v as MArpeggio, H as MBarLineLeft, G as MBarLineRight, w as MBeamGroup, u as MConnective, y as MEnding, a4 as MExtensionLine, z as MFermata, B as MHeader, D as MImage, a3 as MLyrics, E as MMeasure, J as MNoteGroup, r as MPlaybackButtons, p as MPlayer, q as MRenderContext, P as MRest, U as MRhythmColumn, W as MScoreRow, X as MScoreRowGroup, a1 as MSpecialText, Y as MStaff, I as MStaffBarLine, x as MStaffBeamGroup, K as MStaffNoteGroup, Q as MStaffRest, _ as MStaffSignature, Z as MTab, O as MTabNoteGroup, a0 as MTabRhythm, $ as MTabSignature, a2 as MText, s as MusicInterface, a8 as Paint, au as PlayState, av as PlayStateChangeListener, l as ScoreEvent, o as ScoreEventListener, k as ScoreEventType, n as ScoreObjectEvent, m as ScoreStaffPosEvent, ab as StaffConfig, ap as StaffTabOrGroup, an as Stem, ag as StringNumber, ac as TabConfig, at as TempoAnnotation, a6 as colorKey, ah as getStringNumbers, ak as getVerseNumbers, ad as getVoiceIds, ai as isStringNumber, al as isVerseNumber, ae as isVoiceId, aj as validateStringNumber, am as validateVerseNumber, af as validateVoiceId } from '../music-objects-
|
|
3
|
-
import { N as Note } from '../note-
|
|
4
|
-
import { S as ScaleType, c as Scale } from '../scale-
|
|
5
|
-
import { N as NoteLength, h as NoteLengthStr, K as KeySignature, a as TimeSignature, T as TimeSignatures, B as BeamGrouping, k as TupletRatio } from '../tempo-
|
|
1
|
+
import { N as NoteOptions, R as RestOptions, S as StaffPreset, a as ScoreConfiguration, M as MDocument, b as MeasureOptions, V as VoiceId, T as TupletOptions, c as VerseNumber, L as LyricsOptions, d as StaffTabOrGroups, F as Fermata, e as Navigation, A as AnnotationText, f as Annotation, g as Label, C as Connective, h as TieType, i as NoteAnchor, j as VerticalPosition } from '../music-objects-D-xO1oti.js';
|
|
2
|
+
export { ao as Arpeggio, aa as BaseConfig, a9 as Clef, a5 as ColorKey, a7 as ColorKeyPart, as as DynamicsAnnotation, aq as LyricsAlign, ar as LyricsHyphen, t as MAccidental, v as MArpeggio, H as MBarLineLeft, G as MBarLineRight, w as MBeamGroup, u as MConnective, y as MEnding, a4 as MExtensionLine, z as MFermata, B as MHeader, D as MImage, a3 as MLyrics, E as MMeasure, J as MNoteGroup, r as MPlaybackButtons, p as MPlayer, q as MRenderContext, P as MRest, U as MRhythmColumn, W as MScoreRow, X as MScoreRowGroup, a1 as MSpecialText, Y as MStaff, I as MStaffBarLine, x as MStaffBeamGroup, K as MStaffNoteGroup, Q as MStaffRest, _ as MStaffSignature, Z as MTab, O as MTabNoteGroup, a0 as MTabRhythm, $ as MTabSignature, a2 as MText, s as MusicInterface, a8 as Paint, au as PlayState, av as PlayStateChangeListener, l as ScoreEvent, o as ScoreEventListener, k as ScoreEventType, n as ScoreObjectEvent, m as ScoreStaffPosEvent, ab as StaffConfig, ap as StaffTabOrGroup, an as Stem, ag as StringNumber, ac as TabConfig, at as TempoAnnotation, a6 as colorKey, ah as getStringNumbers, ak as getVerseNumbers, ad as getVoiceIds, ai as isStringNumber, al as isVerseNumber, ae as isVoiceId, aj as validateStringNumber, am as validateVerseNumber, af as validateVoiceId } from '../music-objects-D-xO1oti.js';
|
|
3
|
+
import { N as Note } from '../note-CJuq5aBy.js';
|
|
4
|
+
import { S as ScaleType, c as Scale } from '../scale-DxGqFxlv.js';
|
|
5
|
+
import { N as NoteLength, h as NoteLengthStr, K as KeySignature, a as TimeSignature, T as TimeSignatures, B as BeamGrouping, k as TupletRatio } from '../tempo-pCAa6qgo.js';
|
|
6
6
|
import '@tspro/ts-utils-lib';
|
|
7
7
|
|
|
8
8
|
/** Tuplet builder type. */
|
|
@@ -400,11 +400,11 @@ declare class DocumentBuilder {
|
|
|
400
400
|
*/
|
|
401
401
|
endRow(): DocumentBuilder;
|
|
402
402
|
/**
|
|
403
|
-
*
|
|
403
|
+
* Fill current measure with rests.
|
|
404
404
|
* @param voiceId - Voice id to add rests to. Single value, array or all if omitted.
|
|
405
405
|
* @returns - This document builder instance.
|
|
406
406
|
*/
|
|
407
|
-
|
|
407
|
+
fillWithRests(...voiceId: VoiceId[]): DocumentBuilder;
|
|
408
408
|
/**
|
|
409
409
|
* Add notes of given scale in ascending order.
|
|
410
410
|
* @param scale - Scale.
|
|
@@ -413,6 +413,13 @@ declare class DocumentBuilder {
|
|
|
413
413
|
* @returns - This document builder instance.
|
|
414
414
|
*/
|
|
415
415
|
addScaleArpeggio(scale: Scale, bottomNote: string, numOctaves: number): DocumentBuilder;
|
|
416
|
+
/**
|
|
417
|
+
* Add and repeat builder section.
|
|
418
|
+
* @param times - Repeat count.
|
|
419
|
+
* @param repeatCreator - Repeat creator function.
|
|
420
|
+
* @returns - This document builder instance.
|
|
421
|
+
*/
|
|
422
|
+
repeat(times: number, repeatCreator: (builder: DocumentBuilder) => void): DocumentBuilder;
|
|
416
423
|
}
|
|
417
424
|
|
|
418
425
|
export { Annotation, AnnotationText, Connective, DocumentBuilder, type ExtensionBuilder, Fermata, Label, LyricsOptions, MDocument, MeasureOptions, Navigation, NoteAnchor, NoteOptions, RestOptions, ScoreConfiguration, StaffPreset, StaffTabOrGroups, TieType, type TupletBuilder, TupletOptions, VerseNumber, VerticalPosition, VoiceId };
|
package/dist/score/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* WebMusicScore v6.0.0-pre.
|
|
1
|
+
/* WebMusicScore v6.0.0-pre.5 | (c) 2023-2025 Stefan Brockmann | MIT License | Includes: Tone.js (MIT License), Color Name to Code (MIT License) */
|
|
2
2
|
"use strict";
|
|
3
3
|
var __create = Object.create;
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
@@ -9968,21 +9968,22 @@ var ObjMeasure = class extends MusicObject {
|
|
|
9968
9968
|
getVoiceSymbols(voiceId) {
|
|
9969
9969
|
return this.voiceSymbols.getAll(voiceId);
|
|
9970
9970
|
}
|
|
9971
|
-
|
|
9972
|
-
if (voiceId ===
|
|
9971
|
+
fillWithRests(...voiceId) {
|
|
9972
|
+
if (voiceId.length === 0) {
|
|
9973
9973
|
if (this.getConsumedTicks() === 0) {
|
|
9974
|
-
this.
|
|
9974
|
+
this.fillWithRests(0);
|
|
9975
9975
|
} else {
|
|
9976
|
-
this.
|
|
9976
|
+
this.fillWithRests(...getVoiceIds().filter((id) => this.getConsumedTicks(id) > 0));
|
|
9977
9977
|
}
|
|
9978
9978
|
return;
|
|
9979
|
-
} else if (
|
|
9980
|
-
voiceId.forEach((id) => this.
|
|
9979
|
+
} else if (voiceId.length > 1) {
|
|
9980
|
+
voiceId.forEach((id) => this.fillWithRests(id));
|
|
9981
9981
|
return;
|
|
9982
9982
|
} else {
|
|
9983
|
-
|
|
9983
|
+
const id = voiceId[0];
|
|
9984
|
+
validateVoiceId(id);
|
|
9984
9985
|
let measureTicks = this.getMeasureTicks();
|
|
9985
|
-
let consumedTicks = this.getConsumedTicks(
|
|
9986
|
+
let consumedTicks = this.getConsumedTicks(id);
|
|
9986
9987
|
let remainingTicks = measureTicks - consumedTicks;
|
|
9987
9988
|
let rests = [];
|
|
9988
9989
|
while (remainingTicks > 0) {
|
|
@@ -9997,7 +9998,7 @@ var ObjMeasure = class extends MusicObject {
|
|
|
9997
9998
|
}
|
|
9998
9999
|
}
|
|
9999
10000
|
}
|
|
10000
|
-
rests.reverse().forEach((rest) => this.addRest(
|
|
10001
|
+
rests.reverse().forEach((rest) => this.addRest(id, import_theory9.NoteLengthProps.create(rest.noteLength, rest.dotCount).noteLength));
|
|
10001
10002
|
}
|
|
10002
10003
|
}
|
|
10003
10004
|
requestLayout() {
|
|
@@ -12157,14 +12158,14 @@ var _DocumentBuilder = class _DocumentBuilder {
|
|
|
12157
12158
|
return this;
|
|
12158
12159
|
}
|
|
12159
12160
|
/**
|
|
12160
|
-
*
|
|
12161
|
+
* Fill current measure with rests.
|
|
12161
12162
|
* @param voiceId - Voice id to add rests to. Single value, array or all if omitted.
|
|
12162
12163
|
* @returns - This document builder instance.
|
|
12163
12164
|
*/
|
|
12164
|
-
|
|
12165
|
-
setAssertFunction("
|
|
12166
|
-
assertArg(guard_exports.
|
|
12167
|
-
this.getMeasure().
|
|
12165
|
+
fillWithRests(...voiceId) {
|
|
12166
|
+
setAssertFunction("fillWithRests", ...voiceId);
|
|
12167
|
+
assertArg(guard_exports.isArray(voiceId) && (voiceId.length === 0 || voiceId.every((id) => isVoiceId(id))));
|
|
12168
|
+
this.getMeasure().fillWithRests(...voiceId);
|
|
12168
12169
|
return this;
|
|
12169
12170
|
}
|
|
12170
12171
|
/**
|
|
@@ -12192,6 +12193,22 @@ var _DocumentBuilder = class _DocumentBuilder {
|
|
|
12192
12193
|
}
|
|
12193
12194
|
return this;
|
|
12194
12195
|
}
|
|
12196
|
+
/**
|
|
12197
|
+
* Add and repeat builder section.
|
|
12198
|
+
* @param times - Repeat count.
|
|
12199
|
+
* @param repeatCreator - Repeat creator function.
|
|
12200
|
+
* @returns - This document builder instance.
|
|
12201
|
+
*/
|
|
12202
|
+
repeat(times, repeatCreator) {
|
|
12203
|
+
setAssertFunction("repeat", repeatCreator);
|
|
12204
|
+
assertArg(
|
|
12205
|
+
guard_exports.isIntegerGte(times, 0),
|
|
12206
|
+
guard_exports.isFunction(repeatCreator)
|
|
12207
|
+
);
|
|
12208
|
+
for (let i = 0; i < times; i++)
|
|
12209
|
+
repeatCreator(this);
|
|
12210
|
+
return this;
|
|
12211
|
+
}
|
|
12195
12212
|
};
|
|
12196
12213
|
__publicField(_DocumentBuilder, "DefaultMeasureOptions", {});
|
|
12197
12214
|
var DocumentBuilder = _DocumentBuilder;
|
package/dist/score/index.mjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
/* WebMusicScore v6.0.0-pre.
|
|
1
|
+
/* WebMusicScore v6.0.0-pre.5 | (c) 2023-2025 Stefan Brockmann | MIT License | Includes: Tone.js (MIT License), Color Name to Code (MIT License) */
|
|
2
2
|
import {
|
|
3
3
|
MusicError
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-U2D4H5TI.mjs";
|
|
5
5
|
import {
|
|
6
6
|
NoteLengthProps,
|
|
7
7
|
RhythmProps,
|
|
8
8
|
validateNoteLength
|
|
9
|
-
} from "../chunk-
|
|
9
|
+
} from "../chunk-DQFQEO6F.mjs";
|
|
10
10
|
import {
|
|
11
11
|
AnchoredRect,
|
|
12
12
|
BiMap,
|
|
@@ -20,12 +20,12 @@ import {
|
|
|
20
20
|
device_exports,
|
|
21
21
|
guard_exports,
|
|
22
22
|
utils_exports
|
|
23
|
-
} from "../chunk-
|
|
23
|
+
} from "../chunk-JP3PJICN.mjs";
|
|
24
24
|
import {
|
|
25
25
|
__publicField,
|
|
26
26
|
__spreadProps,
|
|
27
27
|
__spreadValues
|
|
28
|
-
} from "../chunk-
|
|
28
|
+
} from "../chunk-G3HIPFVF.mjs";
|
|
29
29
|
|
|
30
30
|
// src/score/pub/types.ts
|
|
31
31
|
var StaffPreset = /* @__PURE__ */ ((StaffPreset2) => {
|
|
@@ -6095,21 +6095,22 @@ var ObjMeasure = class extends MusicObject {
|
|
|
6095
6095
|
getVoiceSymbols(voiceId) {
|
|
6096
6096
|
return this.voiceSymbols.getAll(voiceId);
|
|
6097
6097
|
}
|
|
6098
|
-
|
|
6099
|
-
if (voiceId ===
|
|
6098
|
+
fillWithRests(...voiceId) {
|
|
6099
|
+
if (voiceId.length === 0) {
|
|
6100
6100
|
if (this.getConsumedTicks() === 0) {
|
|
6101
|
-
this.
|
|
6101
|
+
this.fillWithRests(0);
|
|
6102
6102
|
} else {
|
|
6103
|
-
this.
|
|
6103
|
+
this.fillWithRests(...getVoiceIds().filter((id) => this.getConsumedTicks(id) > 0));
|
|
6104
6104
|
}
|
|
6105
6105
|
return;
|
|
6106
|
-
} else if (
|
|
6107
|
-
voiceId.forEach((id) => this.
|
|
6106
|
+
} else if (voiceId.length > 1) {
|
|
6107
|
+
voiceId.forEach((id) => this.fillWithRests(id));
|
|
6108
6108
|
return;
|
|
6109
6109
|
} else {
|
|
6110
|
-
|
|
6110
|
+
const id = voiceId[0];
|
|
6111
|
+
validateVoiceId(id);
|
|
6111
6112
|
let measureTicks = this.getMeasureTicks();
|
|
6112
|
-
let consumedTicks = this.getConsumedTicks(
|
|
6113
|
+
let consumedTicks = this.getConsumedTicks(id);
|
|
6113
6114
|
let remainingTicks = measureTicks - consumedTicks;
|
|
6114
6115
|
let rests = [];
|
|
6115
6116
|
while (remainingTicks > 0) {
|
|
@@ -6124,7 +6125,7 @@ var ObjMeasure = class extends MusicObject {
|
|
|
6124
6125
|
}
|
|
6125
6126
|
}
|
|
6126
6127
|
}
|
|
6127
|
-
rests.reverse().forEach((rest) => this.addRest(
|
|
6128
|
+
rests.reverse().forEach((rest) => this.addRest(id, NoteLengthProps5.create(rest.noteLength, rest.dotCount).noteLength));
|
|
6128
6129
|
}
|
|
6129
6130
|
}
|
|
6130
6131
|
requestLayout() {
|
|
@@ -8284,14 +8285,14 @@ var _DocumentBuilder = class _DocumentBuilder {
|
|
|
8284
8285
|
return this;
|
|
8285
8286
|
}
|
|
8286
8287
|
/**
|
|
8287
|
-
*
|
|
8288
|
+
* Fill current measure with rests.
|
|
8288
8289
|
* @param voiceId - Voice id to add rests to. Single value, array or all if omitted.
|
|
8289
8290
|
* @returns - This document builder instance.
|
|
8290
8291
|
*/
|
|
8291
|
-
|
|
8292
|
-
setAssertFunction("
|
|
8293
|
-
assertArg(guard_exports.
|
|
8294
|
-
this.getMeasure().
|
|
8292
|
+
fillWithRests(...voiceId) {
|
|
8293
|
+
setAssertFunction("fillWithRests", ...voiceId);
|
|
8294
|
+
assertArg(guard_exports.isArray(voiceId) && (voiceId.length === 0 || voiceId.every((id) => isVoiceId(id))));
|
|
8295
|
+
this.getMeasure().fillWithRests(...voiceId);
|
|
8295
8296
|
return this;
|
|
8296
8297
|
}
|
|
8297
8298
|
/**
|
|
@@ -8319,6 +8320,22 @@ var _DocumentBuilder = class _DocumentBuilder {
|
|
|
8319
8320
|
}
|
|
8320
8321
|
return this;
|
|
8321
8322
|
}
|
|
8323
|
+
/**
|
|
8324
|
+
* Add and repeat builder section.
|
|
8325
|
+
* @param times - Repeat count.
|
|
8326
|
+
* @param repeatCreator - Repeat creator function.
|
|
8327
|
+
* @returns - This document builder instance.
|
|
8328
|
+
*/
|
|
8329
|
+
repeat(times, repeatCreator) {
|
|
8330
|
+
setAssertFunction("repeat", repeatCreator);
|
|
8331
|
+
assertArg(
|
|
8332
|
+
guard_exports.isIntegerGte(times, 0),
|
|
8333
|
+
guard_exports.isFunction(repeatCreator)
|
|
8334
|
+
);
|
|
8335
|
+
for (let i = 0; i < times; i++)
|
|
8336
|
+
repeatCreator(this);
|
|
8337
|
+
return this;
|
|
8338
|
+
}
|
|
8322
8339
|
};
|
|
8323
8340
|
__publicField(_DocumentBuilder, "DefaultMeasureOptions", {});
|
|
8324
8341
|
var DocumentBuilder = _DocumentBuilder;
|
package/dist/theory/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { N as Note } from '../note-
|
|
2
|
-
export { A as Accidental, d as DefaultGuitarNoteLabel, D as DefaultPitchNotation, G as GuitarNoteLabel, e as GuitarNoteLabelList, a as NoteLetter, P as ParsedNote, b as PitchNotation, c as PitchNotationList, S as SymbolSet, g as getPitchNotationName, f as validateGuitarNoteLabel, v as validatePitchNotation } from '../note-
|
|
3
|
-
import { D as Degree } from '../scale-
|
|
4
|
-
export { b as Interval, I as IntervalDirection, a as IntervalQuality, c as Scale, d as ScaleFactory, S as ScaleType, i as getDefaultScale, h as getScale, e as getScaleFactory, g as getScaleFactoryList, v as validateIntervalQuality, f as validateScaleType } from '../scale-
|
|
5
|
-
export { A as AccidentalType, B as BeamGrouping, K as KeySignature, M as Mode, N as NoteLength, j as NoteLengthProps, h as NoteLengthStr, R as RhythmProps, c as Tempo, a as TimeSignature, T as TimeSignatures, n as Tuplet, k as TupletRatio, f as alterTempoSpeed, g as getDefaultKeySignature, d as getDefaultTempo, b as getDefaultTimeSignature, e as getTempoString, i as isNoteLength, l as isTupletRatio, v as validateNoteLength, m as validateTupletRatio } from '../tempo-
|
|
1
|
+
import { N as Note } from '../note-CJuq5aBy.js';
|
|
2
|
+
export { A as Accidental, d as DefaultGuitarNoteLabel, D as DefaultPitchNotation, G as GuitarNoteLabel, e as GuitarNoteLabelList, a as NoteLetter, P as ParsedNote, b as PitchNotation, c as PitchNotationList, S as SymbolSet, g as getPitchNotationName, f as validateGuitarNoteLabel, v as validatePitchNotation } from '../note-CJuq5aBy.js';
|
|
3
|
+
import { D as Degree } from '../scale-DxGqFxlv.js';
|
|
4
|
+
export { b as Interval, I as IntervalDirection, a as IntervalQuality, c as Scale, d as ScaleFactory, S as ScaleType, i as getDefaultScale, h as getScale, e as getScaleFactory, g as getScaleFactoryList, v as validateIntervalQuality, f as validateScaleType } from '../scale-DxGqFxlv.js';
|
|
5
|
+
export { A as AccidentalType, B as BeamGrouping, K as KeySignature, M as Mode, N as NoteLength, j as NoteLengthProps, h as NoteLengthStr, R as RhythmProps, c as Tempo, a as TimeSignature, T as TimeSignatures, n as Tuplet, k as TupletRatio, f as alterTempoSpeed, g as getDefaultKeySignature, d as getDefaultTempo, b as getDefaultTimeSignature, e as getTempoString, i as isNoteLength, l as isTupletRatio, v as validateNoteLength, m as validateTupletRatio } from '../tempo-pCAa6qgo.js';
|
|
6
6
|
|
|
7
7
|
/** Chord info type. */
|
|
8
8
|
type ChordInfo = {
|
package/dist/theory/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* WebMusicScore v6.0.0-pre.
|
|
1
|
+
/* WebMusicScore v6.0.0-pre.5 | (c) 2023-2025 Stefan Brockmann | MIT License | Includes: Tone.js (MIT License), Color Name to Code (MIT License) */
|
|
2
2
|
"use strict";
|
|
3
3
|
var __defProp = Object.defineProperty;
|
|
4
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
package/dist/theory/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* WebMusicScore v6.0.0-pre.
|
|
1
|
+
/* WebMusicScore v6.0.0-pre.5 | (c) 2023-2025 Stefan Brockmann | MIT License | Includes: Tone.js (MIT License), Color Name to Code (MIT License) */
|
|
2
2
|
import {
|
|
3
3
|
NoteLength,
|
|
4
4
|
NoteLengthProps,
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
isTupletRatio,
|
|
9
9
|
validateNoteLength,
|
|
10
10
|
validateTupletRatio
|
|
11
|
-
} from "../chunk-
|
|
11
|
+
} from "../chunk-DQFQEO6F.mjs";
|
|
12
12
|
import {
|
|
13
13
|
IndexArray,
|
|
14
14
|
LRUCache,
|
|
@@ -16,10 +16,10 @@ import {
|
|
|
16
16
|
UniMap,
|
|
17
17
|
guard_exports,
|
|
18
18
|
utils_exports
|
|
19
|
-
} from "../chunk-
|
|
19
|
+
} from "../chunk-JP3PJICN.mjs";
|
|
20
20
|
import {
|
|
21
21
|
__publicField
|
|
22
|
-
} from "../chunk-
|
|
22
|
+
} from "../chunk-G3HIPFVF.mjs";
|
|
23
23
|
|
|
24
24
|
// src/theory/types.ts
|
|
25
25
|
import { MusicError, MusicErrorType } from "web-music-score/core";
|