@tspro/web-music-score 4.0.1 → 4.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -0
- package/README.md +70 -28
- package/dist/audio/index.js +1 -1
- package/dist/audio/index.mjs +2 -2
- package/dist/audio-cg/index.js +1 -1
- package/dist/audio-cg/index.mjs +2 -2
- package/dist/{chunk-YFPLOHP2.mjs → chunk-5NWLGWHS.mjs} +2 -2
- package/dist/chunk-7MNV5JN6.mjs +264 -0
- package/dist/core/index.js +2 -2
- package/dist/core/index.mjs +3 -3
- package/dist/iife/index.global.js +11 -11
- package/dist/{music-objects-DJQ4d2OA.d.mts → music-objects-3Hxlkxy6.d.mts} +172 -80
- package/dist/{music-objects-Dc3kR-XF.d.ts → music-objects-CI7IjsjE.d.ts} +172 -80
- package/dist/pieces/index.d.mts +2 -2
- package/dist/pieces/index.d.ts +2 -2
- package/dist/pieces/index.js +3 -3
- package/dist/pieces/index.mjs +4 -4
- package/dist/react-ui/index.d.mts +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-B2Icbetz.d.ts → scale-DGx3tJH4.d.ts} +1 -1
- package/dist/{scale-BbDJTbrG.d.mts → scale-DQP3b9Zx.d.mts} +1 -1
- package/dist/score/index.d.mts +60 -23
- package/dist/score/index.d.ts +60 -23
- package/dist/score/index.js +910 -349
- package/dist/score/index.mjs +630 -320
- package/dist/{tempo-Dt8aHpol.d.ts → tempo-GrstpD9G.d.ts} +42 -10
- package/dist/{tempo-CtUhvJbr.d.mts → tempo-dkctPkCS.d.mts} +42 -10
- package/dist/theory/index.d.mts +3 -3
- package/dist/theory/index.d.ts +3 -3
- package/dist/theory/index.js +70 -20
- package/dist/theory/index.mjs +84 -280
- package/package.json +8 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { N as Note, A as Accidental } from './note-eA2xPPiG.js';
|
|
2
|
-
import { R as RhythmProps, N as NoteLength,
|
|
2
|
+
import { R as RhythmProps, N as NoteLength, i as NoteLengthStr, k as TupletRatio, d as Tempo, K as KeySignature, b as TimeSignature } from './tempo-GrstpD9G.js';
|
|
3
3
|
import { Vec2 } from '@tspro/ts-utils-lib';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -20,31 +20,31 @@ declare class DivRect {
|
|
|
20
20
|
* Create rectangle with left, right, top, bottom.
|
|
21
21
|
* Properties centerX and centerY will be centered in the middle.
|
|
22
22
|
*
|
|
23
|
-
* @param left -
|
|
24
|
-
* @param right -
|
|
25
|
-
* @param top -
|
|
26
|
-
* @param bottom -
|
|
23
|
+
* @param left - Left coordinate.
|
|
24
|
+
* @param right - Right coordinate.
|
|
25
|
+
* @param top - Top coordinate.
|
|
26
|
+
* @param bottom - Bottom coordinate.
|
|
27
27
|
*/
|
|
28
28
|
constructor(left: number, right: number, top: number, bottom: number);
|
|
29
29
|
/**
|
|
30
30
|
* Create rectangle with full arguments.
|
|
31
31
|
*
|
|
32
|
-
* @param left -
|
|
33
|
-
* @param centerX -
|
|
34
|
-
* @param right -
|
|
35
|
-
* @param top -
|
|
36
|
-
* @param centerY -
|
|
37
|
-
* @param bottom -
|
|
32
|
+
* @param left - Left coordinate.
|
|
33
|
+
* @param centerX - Center x-coordinate.
|
|
34
|
+
* @param right - Right coordinate.
|
|
35
|
+
* @param top - Top coordinate.
|
|
36
|
+
* @param centerY - Center y-coordinate.
|
|
37
|
+
* @param bottom - Bottom coordinate.
|
|
38
38
|
*/
|
|
39
39
|
constructor(left: number, centerX: number, right: number, top: number, centerY: number, bottom: number);
|
|
40
40
|
/**
|
|
41
41
|
* Create rect from basic left, top, width and height arguments.
|
|
42
42
|
*
|
|
43
|
-
* @param left -
|
|
44
|
-
* @param top -
|
|
45
|
-
* @param width -
|
|
46
|
-
* @param height -
|
|
47
|
-
* @returns
|
|
43
|
+
* @param left - Left coordinate.
|
|
44
|
+
* @param top - Top coordinate.
|
|
45
|
+
* @param width - With.
|
|
46
|
+
* @param height - Height.
|
|
47
|
+
* @returns - DivRect.
|
|
48
48
|
*/
|
|
49
49
|
static create(left: number, top: number, width: number, height: number): DivRect;
|
|
50
50
|
/**
|
|
@@ -52,9 +52,9 @@ declare class DivRect {
|
|
|
52
52
|
*
|
|
53
53
|
* @param centerX - Center x-coordinate.
|
|
54
54
|
* @param centerY - Center y-coordinate.
|
|
55
|
-
* @param width -
|
|
56
|
-
* @param height -
|
|
57
|
-
* @returns
|
|
55
|
+
* @param width - Width.
|
|
56
|
+
* @param height - Height.
|
|
57
|
+
* @returns - DivRect.
|
|
58
58
|
*/
|
|
59
59
|
static createCentered(centerX: number, centerY: number, width: number, height: number): DivRect;
|
|
60
60
|
/**
|
|
@@ -64,136 +64,142 @@ declare class DivRect {
|
|
|
64
64
|
* @param rightw - Right section width.
|
|
65
65
|
* @param toph - Top section height.
|
|
66
66
|
* @param bottomh - Bottomsection height.
|
|
67
|
-
* @returns
|
|
67
|
+
* @returns - DivRect.
|
|
68
68
|
*/
|
|
69
69
|
static createSections(leftw: number, rightw: number, toph: number, bottomh: number): DivRect;
|
|
70
70
|
/**
|
|
71
|
-
* Width.
|
|
71
|
+
* Width getter.
|
|
72
72
|
*/
|
|
73
73
|
get width(): number;
|
|
74
74
|
/**
|
|
75
|
-
* Height.
|
|
75
|
+
* Height getter.
|
|
76
76
|
*/
|
|
77
77
|
get height(): number;
|
|
78
78
|
/**
|
|
79
|
-
* Left section width.
|
|
79
|
+
* Left section width getter.
|
|
80
80
|
*/
|
|
81
81
|
get leftw(): number;
|
|
82
82
|
/**
|
|
83
|
-
* Right section width.
|
|
83
|
+
* Right section width getter.
|
|
84
84
|
*/
|
|
85
85
|
get rightw(): number;
|
|
86
86
|
/**
|
|
87
|
-
* Top section height.
|
|
87
|
+
* Top section height getter.
|
|
88
88
|
*/
|
|
89
89
|
get toph(): number;
|
|
90
90
|
/**
|
|
91
|
-
* Bottom section height.
|
|
91
|
+
* Bottom section height getter.
|
|
92
92
|
*/
|
|
93
93
|
get bottomh(): number;
|
|
94
94
|
/**
|
|
95
95
|
* Does this Rect contain given (x, y)-point?
|
|
96
96
|
*
|
|
97
|
-
* @param x -
|
|
98
|
-
* @param y -
|
|
99
|
-
* @returns
|
|
97
|
+
* @param x - X-coordinate.
|
|
98
|
+
* @param y - Y-coordinate.
|
|
99
|
+
* @returns - True/false.
|
|
100
100
|
*/
|
|
101
101
|
contains(x: number, y: number): boolean;
|
|
102
102
|
/**
|
|
103
103
|
* Do a and b rects overlap?
|
|
104
104
|
*
|
|
105
|
-
* @param a -
|
|
106
|
-
* @param b -
|
|
107
|
-
* @returns
|
|
105
|
+
* @param a - DivRect a.
|
|
106
|
+
* @param b - DivRect b.
|
|
107
|
+
* @returns - True/false.
|
|
108
108
|
*/
|
|
109
109
|
static overlap(a: DivRect, b: DivRect): boolean;
|
|
110
110
|
/**
|
|
111
111
|
* Do horizontal measures of a and b rects overlap?
|
|
112
112
|
*
|
|
113
|
-
* @param a -
|
|
114
|
-
* @param b -
|
|
115
|
-
* @returns
|
|
113
|
+
* @param a - DivRect a.
|
|
114
|
+
* @param b - DivRect b.
|
|
115
|
+
* @returns - True/false.
|
|
116
116
|
*/
|
|
117
117
|
static overlapX(a: DivRect, b: DivRect): boolean;
|
|
118
118
|
/**
|
|
119
119
|
* Check if this Rect equals with given Rect.
|
|
120
|
-
* @param
|
|
121
|
-
* @
|
|
120
|
+
* @param a - DivRect a.
|
|
121
|
+
* @param b - DivRect b.
|
|
122
|
+
* @returns - True/false.
|
|
122
123
|
*/
|
|
123
124
|
static equals(a: DivRect | null | undefined, b: DivRect | null | undefined): boolean;
|
|
124
125
|
/**
|
|
125
|
-
* Check if frame
|
|
126
|
+
* Check if frame of this Rect equals with given Rect, ignoring center x- and center y-coordinates.
|
|
126
127
|
*
|
|
127
|
-
* @param
|
|
128
|
-
* @
|
|
128
|
+
* @param a - DivRect a.
|
|
129
|
+
* @param b - DivRect b.
|
|
130
|
+
* @returns - True/false.
|
|
129
131
|
*/
|
|
130
132
|
static equalsFrame(a: DivRect | null | undefined, b: DivRect | null | undefined): boolean;
|
|
131
133
|
/**
|
|
132
134
|
* Created duplicate of this Rect.
|
|
133
135
|
*
|
|
134
|
-
* @returns
|
|
136
|
+
* @returns - Duplicate.
|
|
135
137
|
*/
|
|
136
138
|
copy(): DivRect;
|
|
137
139
|
/**
|
|
138
140
|
* Move this rect by (dx, dy). Modifies this Rect.
|
|
139
141
|
*
|
|
140
|
-
* @param dx -
|
|
141
|
-
* @param dy -
|
|
142
|
-
* @returns
|
|
142
|
+
* @param dx - Offset amount in x-direction.
|
|
143
|
+
* @param dy - Offset amount in y-direction.
|
|
144
|
+
* @returns - This DivRect instance.
|
|
143
145
|
*/
|
|
144
146
|
offsetInPlace(dx: number, dy: number): DivRect;
|
|
145
147
|
/**
|
|
146
148
|
* Move this rect by (dx, dy). Immutable, returns modified copy.
|
|
147
149
|
*
|
|
148
|
-
* @param dx -
|
|
149
|
-
* @param dy -
|
|
150
|
-
* @returns
|
|
150
|
+
* @param dx - Offset amount in x-direction.
|
|
151
|
+
* @param dy - Offset amount in y-direction.
|
|
152
|
+
* @returns - DivRect copy with applied offset.
|
|
151
153
|
*/
|
|
152
154
|
offsetCopy(dx: number, dy: number): DivRect;
|
|
153
155
|
/**
|
|
154
156
|
* Expand this Rect by given Rect. Modifies this Rect.
|
|
155
157
|
*
|
|
156
|
-
* @param rect -
|
|
157
|
-
* @returns
|
|
158
|
+
* @param rect - DivRect to expand this instance with.
|
|
159
|
+
* @returns - This DivRect instance.
|
|
158
160
|
*/
|
|
159
161
|
expandInPlace(rect: DivRect): DivRect;
|
|
160
162
|
/**
|
|
161
163
|
* Expand this Rect by given Rect. Immutable, returns modified copy.
|
|
162
164
|
*
|
|
163
|
-
* @param rect -
|
|
164
|
-
* @returns
|
|
165
|
+
* @param rect - DivRect to expand this instance with.
|
|
166
|
+
* @returns - Expanded copy of this DivRect.
|
|
165
167
|
*/
|
|
166
168
|
expandCopy(rect: DivRect): DivRect;
|
|
167
169
|
/**
|
|
168
170
|
* Clip this Rect by given Rect. Mmodifies this Rect.
|
|
169
171
|
*
|
|
170
|
-
* @param clipRect -
|
|
171
|
-
* @returns
|
|
172
|
+
* @param clipRect - DivRect to clip this instance with.
|
|
173
|
+
* @returns - This DivRect instance.
|
|
172
174
|
*/
|
|
173
175
|
clipInPlace(clipRect: DivRect): DivRect;
|
|
174
176
|
/**
|
|
175
177
|
* Clip this Rect by given Rect. Immutable, return modified copy.
|
|
176
178
|
*
|
|
177
|
-
* @param clipRect -
|
|
178
|
-
* @returns
|
|
179
|
+
* @param clipRect - DivRecto to clip this instance with.
|
|
180
|
+
* @returns - Clipped DivRect copy.
|
|
179
181
|
*/
|
|
180
182
|
clipCopy(clipRect: DivRect): DivRect;
|
|
181
183
|
/**
|
|
182
184
|
* Scale Rect. Anchor pos is (centerX, centerY). Modifies this Rect.
|
|
183
185
|
*
|
|
184
|
-
* @param scaleX -
|
|
185
|
-
* @param scaleY -
|
|
186
|
-
* @returns
|
|
186
|
+
* @param scaleX - Scale x-amount.
|
|
187
|
+
* @param scaleY - Scale y-amount. If undefined then scale x-amount is used.
|
|
188
|
+
* @returns This DivRect instance.
|
|
187
189
|
*/
|
|
188
190
|
scaleInPlace(scaleX: number, scaleY?: number): DivRect;
|
|
189
191
|
/**
|
|
190
192
|
* Scale Rect. Anchor pos is (centerX, centerY). Immutable, returns modified copy.
|
|
191
193
|
*
|
|
192
|
-
* @param scaleX -
|
|
193
|
-
* @param scaleY -
|
|
194
|
-
* @returns
|
|
194
|
+
* @param scaleX - Scale x-amount.
|
|
195
|
+
* @param scaleY - Scale y-amount. If undefined then scale x-amount is used.
|
|
196
|
+
* @returns Scaled copy of this DivRect.
|
|
195
197
|
*/
|
|
196
198
|
scaleCopy(scaleX: number, scaleY?: number): DivRect;
|
|
199
|
+
/**
|
|
200
|
+
* Get this DivRect instance.
|
|
201
|
+
* @returns - This DivRect instance.
|
|
202
|
+
*/
|
|
197
203
|
getRect(): DivRect;
|
|
198
204
|
}
|
|
199
205
|
|
|
@@ -250,14 +256,18 @@ type TabConfig = {
|
|
|
250
256
|
};
|
|
251
257
|
/** Score configuration. */
|
|
252
258
|
type ScoreConfiguration = StaffConfig | TabConfig | (StaffConfig | TabConfig)[];
|
|
253
|
-
/**
|
|
259
|
+
/** Voice id. */
|
|
254
260
|
type VoiceId = 0 | 1 | 2 | 3;
|
|
255
|
-
/** Get supported
|
|
261
|
+
/** Get supported voice ids. Returns [0, 1, 2, 3]. */
|
|
256
262
|
declare function getVoiceIds(): ReadonlyArray<VoiceId>;
|
|
257
|
-
/** Strng number
|
|
263
|
+
/** Strng number. */
|
|
258
264
|
type StringNumber = 1 | 2 | 3 | 4 | 5 | 6;
|
|
259
|
-
/** Get
|
|
265
|
+
/** Get string numbers. Returns [0, 1, 2, 3, 4, 5]. */
|
|
260
266
|
declare function getStringNumbers(): ReadonlyArray<StringNumber>;
|
|
267
|
+
/** Verse number. */
|
|
268
|
+
type VerseNumber = 1 | 2 | 3;
|
|
269
|
+
/** Get supported verse numbers. Returns [1, 2, 3]. */
|
|
270
|
+
declare function getVerseNumbers(): ReadonlyArray<VerseNumber>;
|
|
261
271
|
/** Stem direction enum. */
|
|
262
272
|
declare enum Stem {
|
|
263
273
|
/** Auto stem direction. */
|
|
@@ -355,6 +365,29 @@ type TupletOptions = {
|
|
|
355
365
|
/** Show tuplet ratio (e.g. "3:2") instead of number of parts (e.g. "3"). */
|
|
356
366
|
showRatio?: boolean;
|
|
357
367
|
};
|
|
368
|
+
/** Lyrics text/syllable alignment.*/
|
|
369
|
+
declare enum LyricsAlign {
|
|
370
|
+
/** Left align lyrics text/syllable. */
|
|
371
|
+
Left = "left",
|
|
372
|
+
/** Center align lyrics text/syllable. */
|
|
373
|
+
Center = "center",
|
|
374
|
+
/** Right align lyrics text/syllable. */
|
|
375
|
+
Right = "right"
|
|
376
|
+
}
|
|
377
|
+
/** Lyrics hyphen.*/
|
|
378
|
+
declare enum LyricsHyphen {
|
|
379
|
+
/** Hyphen. */
|
|
380
|
+
Hyphen = "-",
|
|
381
|
+
/** Extender. */
|
|
382
|
+
Extender = "---"
|
|
383
|
+
}
|
|
384
|
+
/** Lyrics options. */
|
|
385
|
+
type LyricsOptions = {
|
|
386
|
+
/** Alignment of lyrics text/syllable. */
|
|
387
|
+
align?: LyricsAlign | `${LyricsAlign}`;
|
|
388
|
+
/** Hyphen or extender after lyrics text/syllable. */
|
|
389
|
+
hyphen?: LyricsHyphen | `${LyricsHyphen}`;
|
|
390
|
+
};
|
|
358
391
|
/** Fermata enum. */
|
|
359
392
|
declare enum Fermata {
|
|
360
393
|
/** Anchor fermata to note/rest. */
|
|
@@ -654,7 +687,7 @@ declare class ObjTabNoteGroup extends MusicObject {
|
|
|
654
687
|
}
|
|
655
688
|
declare class ObjNoteGroup extends MusicObject {
|
|
656
689
|
readonly col: ObjRhythmColumn;
|
|
657
|
-
readonly voiceId:
|
|
690
|
+
readonly voiceId: VoiceId;
|
|
658
691
|
readonly notes: ReadonlyArray<Note>;
|
|
659
692
|
readonly minDiatonicId: number;
|
|
660
693
|
readonly maxDiatonicId: number;
|
|
@@ -675,7 +708,7 @@ declare class ObjNoteGroup extends MusicObject {
|
|
|
675
708
|
private readonly staffObjects;
|
|
676
709
|
private readonly tabObjects;
|
|
677
710
|
readonly mi: MNoteGroup;
|
|
678
|
-
constructor(col: ObjRhythmColumn, voiceId:
|
|
711
|
+
constructor(col: ObjRhythmColumn, voiceId: VoiceId, notes: ReadonlyArray<Note>, noteLength: NoteLength | NoteLengthStr, options?: NoteOptions, tupletRatio?: TupletRatio);
|
|
679
712
|
getMusicInterface(): MNoteGroup;
|
|
680
713
|
get doc(): ObjDocument;
|
|
681
714
|
get measure(): ObjMeasure;
|
|
@@ -797,7 +830,7 @@ declare class ObjStaffRest extends MusicObject {
|
|
|
797
830
|
}
|
|
798
831
|
declare class ObjRest extends MusicObject {
|
|
799
832
|
readonly col: ObjRhythmColumn;
|
|
800
|
-
readonly voiceId:
|
|
833
|
+
readonly voiceId: VoiceId;
|
|
801
834
|
readonly ownStemDir: Stem.Up | Stem.Down;
|
|
802
835
|
readonly ownDiatonicId: number;
|
|
803
836
|
readonly color: string;
|
|
@@ -807,7 +840,7 @@ declare class ObjRest extends MusicObject {
|
|
|
807
840
|
private beamGroup?;
|
|
808
841
|
readonly staffObjects: ObjStaffRest[];
|
|
809
842
|
readonly mi: MRest;
|
|
810
|
-
constructor(col: ObjRhythmColumn, voiceId:
|
|
843
|
+
constructor(col: ObjRhythmColumn, voiceId: VoiceId, noteLength: NoteLength | NoteLengthStr, options?: RestOptions, tupletRatio?: TupletRatio);
|
|
811
844
|
getMusicInterface(): MRest;
|
|
812
845
|
get doc(): ObjDocument;
|
|
813
846
|
get measure(): ObjMeasure;
|
|
@@ -835,6 +868,34 @@ declare class ObjRest extends MusicObject {
|
|
|
835
868
|
draw(renderer: Renderer): void;
|
|
836
869
|
}
|
|
837
870
|
|
|
871
|
+
declare class LyricsContainer {
|
|
872
|
+
readonly col: ObjRhythmColumn;
|
|
873
|
+
readonly lyricsObjects: ObjLyrics[];
|
|
874
|
+
readonly rhythmProps: RhythmProps;
|
|
875
|
+
constructor(col: ObjRhythmColumn, lyricsLength: NoteLength);
|
|
876
|
+
addLyricsObject(lyricsObj: ObjLyrics): void;
|
|
877
|
+
}
|
|
878
|
+
declare class ObjLyrics extends MusicObject {
|
|
879
|
+
readonly col: ObjRhythmColumn;
|
|
880
|
+
readonly verse: VerseNumber;
|
|
881
|
+
readonly line: ObjNotationLine;
|
|
882
|
+
readonly vpos: VerticalPos;
|
|
883
|
+
private nextLyricsObject?;
|
|
884
|
+
private readonly color;
|
|
885
|
+
private readonly hyphen?;
|
|
886
|
+
private readonly text;
|
|
887
|
+
readonly mi: MLyrics;
|
|
888
|
+
constructor(col: ObjRhythmColumn, verse: VerseNumber, line: ObjNotationLine, vpos: VerticalPos, lyricsText: string, lyricsOptions?: LyricsOptions);
|
|
889
|
+
getMusicInterface(): MLyrics;
|
|
890
|
+
get measure(): ObjMeasure;
|
|
891
|
+
getText(): string;
|
|
892
|
+
setNextLyricsObject(lyricsObj: ObjLyrics): void;
|
|
893
|
+
pick(x: number, y: number): MusicObject[];
|
|
894
|
+
layout(renderer: Renderer): void;
|
|
895
|
+
offset(dx: number, dy: number): void;
|
|
896
|
+
draw(renderer: Renderer): void;
|
|
897
|
+
}
|
|
898
|
+
|
|
838
899
|
type ScorePlayerNote = {
|
|
839
900
|
note: Note;
|
|
840
901
|
ticks: number;
|
|
@@ -842,10 +903,17 @@ type ScorePlayerNote = {
|
|
|
842
903
|
slur: undefined | "first" | "slurred";
|
|
843
904
|
};
|
|
844
905
|
type RhythmSymbol = ObjNoteGroup | ObjRest;
|
|
906
|
+
type LyricsContainerData = {
|
|
907
|
+
lyricsContainer: LyricsContainer;
|
|
908
|
+
verse: VerseNumber;
|
|
909
|
+
line: ObjNotationLine;
|
|
910
|
+
vpos: VerticalPos;
|
|
911
|
+
};
|
|
845
912
|
declare class ObjRhythmColumn extends MusicObject {
|
|
846
913
|
readonly measure: ObjMeasure;
|
|
847
914
|
readonly positionTicks: number;
|
|
848
915
|
private readonly voiceSymbol;
|
|
916
|
+
private readonly lyricsContainers;
|
|
849
917
|
private minDiatonicId?;
|
|
850
918
|
private maxDiatonicId?;
|
|
851
919
|
private staffMinDiatonicId;
|
|
@@ -879,8 +947,10 @@ declare class ObjRhythmColumn extends MusicObject {
|
|
|
879
947
|
pick(x: number, y: number): MusicObject[];
|
|
880
948
|
hasArpeggio(): boolean;
|
|
881
949
|
getArpeggioDir(): Arpeggio;
|
|
882
|
-
setVoiceSymbol(voiceId:
|
|
883
|
-
getVoiceSymbol(voiceId:
|
|
950
|
+
setVoiceSymbol(voiceId: VoiceId, symbol: RhythmSymbol): void;
|
|
951
|
+
getVoiceSymbol(voiceId: VoiceId): RhythmSymbol | undefined;
|
|
952
|
+
getLyricsContainerDatas(): ReadonlyArray<LyricsContainerData>;
|
|
953
|
+
getLyricsContainer(verse: VerseNumber, line: ObjNotationLine, vpos: VerticalPos, lyricsLength?: NoteLength): LyricsContainer | undefined;
|
|
884
954
|
getMinWidth(): number;
|
|
885
955
|
setupNoteHeadDisplacements(): void;
|
|
886
956
|
getNoteHeadDisplacement(noteGroup: ObjNoteGroup, note: Note): -1 | 0 | 1;
|
|
@@ -1029,6 +1099,7 @@ declare class ObjMeasure extends MusicObject {
|
|
|
1029
1099
|
private endRepeatPlayCount;
|
|
1030
1100
|
private endRepeatPlayCountText?;
|
|
1031
1101
|
private staticObjectsCache;
|
|
1102
|
+
private lyricsObjectsCache;
|
|
1032
1103
|
readonly mi: MMeasure;
|
|
1033
1104
|
constructor(row: ObjScoreRow);
|
|
1034
1105
|
getMusicInterface(): MMeasure;
|
|
@@ -1054,7 +1125,7 @@ declare class ObjMeasure extends MusicObject {
|
|
|
1054
1125
|
setKeySignature(...args: unknown[]): void;
|
|
1055
1126
|
updateKeySignature(): void;
|
|
1056
1127
|
getTimeSignature(): TimeSignature;
|
|
1057
|
-
setTimeSignature(timeSignature: TimeSignature
|
|
1128
|
+
setTimeSignature(timeSignature: TimeSignature): void;
|
|
1058
1129
|
updateTimeSignature(): void;
|
|
1059
1130
|
getTempo(): Tempo;
|
|
1060
1131
|
setTempo(beatsPerMinute: number, beatLength?: NoteLength | NoteLengthStr, dotted?: boolean | number): void;
|
|
@@ -1083,8 +1154,9 @@ declare class ObjMeasure extends MusicObject {
|
|
|
1083
1154
|
hasEndSection(): boolean;
|
|
1084
1155
|
endRow(): void;
|
|
1085
1156
|
private addRhythmSymbol;
|
|
1086
|
-
addNoteGroup(voiceId:
|
|
1087
|
-
addRest(voiceId:
|
|
1157
|
+
addNoteGroup(voiceId: VoiceId, notes: (Note | string)[], noteLength: NoteLength | NoteLengthStr, options?: NoteOptions, tupletRatio?: TupletRatio): ObjNoteGroup;
|
|
1158
|
+
addRest(voiceId: VoiceId, restLength: NoteLength | NoteLengthStr, options?: RestOptions, tupletRatio?: TupletRatio): ObjRest;
|
|
1159
|
+
addLyrics(staffTabOrGroups: StaffTabOrGroups | undefined, verse: VerseNumber, lyricsLength: NoteLength | NoteLengthStr, lyricsText: string, lyricsOptions: LyricsOptions): void;
|
|
1088
1160
|
/**
|
|
1089
1161
|
*
|
|
1090
1162
|
* @param positionTicks - get ObjRhythmColumn with positionTicks. Insert new if necessary.
|
|
@@ -1101,6 +1173,8 @@ declare class ObjMeasure extends MusicObject {
|
|
|
1101
1173
|
getMinWidth(): number;
|
|
1102
1174
|
getStaffLineLeft(): number;
|
|
1103
1175
|
getStaffLineRight(): number;
|
|
1176
|
+
private getLyricsObjects;
|
|
1177
|
+
getPrevLyricsObject(lyricsObj: ObjLyrics): ObjLyrics | undefined;
|
|
1104
1178
|
getStaticObjects(line: ObjNotationLine): ReadonlyArray<MusicObject>;
|
|
1105
1179
|
removeLayoutObjects(musicObj: MusicObject): void;
|
|
1106
1180
|
addConnectiveObject(connective: ObjConnective): void;
|
|
@@ -1113,7 +1187,7 @@ declare class ObjMeasure extends MusicObject {
|
|
|
1113
1187
|
private static setupBeamGroup;
|
|
1114
1188
|
getBarLineLeft(): ObjBarLineLeft;
|
|
1115
1189
|
getBarLineRight(): ObjBarLineRight;
|
|
1116
|
-
getVoiceSymbols(voiceId:
|
|
1190
|
+
getVoiceSymbols(voiceId: VoiceId): ReadonlyArray<RhythmSymbol>;
|
|
1117
1191
|
completeRests(voiceId?: VoiceId | VoiceId[]): void;
|
|
1118
1192
|
requestLayout(): void;
|
|
1119
1193
|
layout(renderer: Renderer): void;
|
|
@@ -1210,7 +1284,7 @@ declare class ObjDocument extends MusicObject {
|
|
|
1210
1284
|
addMeasure(): ObjMeasure;
|
|
1211
1285
|
addStaffGroup(groupName: string, layoutElements: number | string | (number | string)[], verticalPosition: VerticalPosition): void;
|
|
1212
1286
|
getStaffGroup(groupName: string): StaffGroup | undefined;
|
|
1213
|
-
getVoiceSymbols(voiceId:
|
|
1287
|
+
getVoiceSymbols(voiceId: VoiceId): ReadonlyArray<RhythmSymbol>;
|
|
1214
1288
|
removeLayoutObjects(musicObj: MusicObject): void;
|
|
1215
1289
|
private forEachMeasure;
|
|
1216
1290
|
resetMeasures(): void;
|
|
@@ -1391,13 +1465,16 @@ declare enum LayoutGroupId {
|
|
|
1391
1465
|
Ending = 3,
|
|
1392
1466
|
TempoAnnotation = 4,
|
|
1393
1467
|
DynamicsAnnotation = 5,
|
|
1394
|
-
ChordLabel = 6
|
|
1468
|
+
ChordLabel = 6,
|
|
1469
|
+
LyricsVerse1 = 7,
|
|
1470
|
+
LyricsVerse2 = 8,
|
|
1471
|
+
LyricsVerse3 = 9
|
|
1395
1472
|
}
|
|
1396
1473
|
declare enum VerticalPos {
|
|
1397
1474
|
Above = 0,
|
|
1398
1475
|
Below = 1
|
|
1399
1476
|
}
|
|
1400
|
-
type LayoutableMusicObject = ObjText | ObjSpecialText | ObjExtensionLine | ObjFermata | ObjEnding;
|
|
1477
|
+
type LayoutableMusicObject = ObjText | ObjSpecialText | ObjExtensionLine | ObjFermata | ObjEnding | ObjLyrics;
|
|
1401
1478
|
declare class StaffGroup {
|
|
1402
1479
|
readonly groupName: string;
|
|
1403
1480
|
readonly staffsTabsAndGroups: number | string | (number | string)[];
|
|
@@ -2155,7 +2232,7 @@ declare class MRhythmColumn extends MusicInterface {
|
|
|
2155
2232
|
* @param voiceId - Voice id.
|
|
2156
2233
|
* @returns - Note group, rest or undefined.
|
|
2157
2234
|
*/
|
|
2158
|
-
getRhythmSymbol(voiceId:
|
|
2235
|
+
getRhythmSymbol(voiceId: VoiceId): MNoteGroup | MRest | undefined;
|
|
2159
2236
|
/**
|
|
2160
2237
|
* Get symbol (note group or rest) of this column for given voice id.
|
|
2161
2238
|
* @deprecated - Use getRhythmSymbol(voiceId) instead.
|
|
@@ -2289,6 +2366,21 @@ declare class MText extends MusicInterface {
|
|
|
2289
2366
|
*/
|
|
2290
2367
|
getText(): string;
|
|
2291
2368
|
}
|
|
2369
|
+
/** Lyrics object. */
|
|
2370
|
+
declare class MLyrics extends MusicInterface {
|
|
2371
|
+
private readonly obj;
|
|
2372
|
+
/** Object name. */
|
|
2373
|
+
static readonly Name = "Lyrics";
|
|
2374
|
+
/** @internal */
|
|
2375
|
+
constructor(obj: ObjLyrics);
|
|
2376
|
+
/** @internal */
|
|
2377
|
+
getMusicObject(): ObjLyrics;
|
|
2378
|
+
/**
|
|
2379
|
+
* Get lyrics text.
|
|
2380
|
+
* @returns - Lyrics text.
|
|
2381
|
+
*/
|
|
2382
|
+
getText(): string;
|
|
2383
|
+
}
|
|
2292
2384
|
/** Extension line object. */
|
|
2293
2385
|
declare class MExtensionLine extends MusicInterface {
|
|
2294
2386
|
private readonly obj;
|
|
@@ -2300,4 +2392,4 @@ declare class MExtensionLine extends MusicInterface {
|
|
|
2300
2392
|
getMusicObject(): ObjExtensionLine;
|
|
2301
2393
|
}
|
|
2302
2394
|
|
|
2303
|
-
export {
|
|
2395
|
+
export { MText as $, type AnnotationText as A, MImage as B, Connective as C, DivRect as D, MMeasure as E, Fermata as F, MBarLineRight as G, MBarLineLeft as H, MStaffTabBarLine as I, MNoteGroup as J, MStaffNoteGroup as K, type LyricsOptions as L, MDocument as M, type NoteOptions as N, MTabNoteGroup as O, MRest as P, MStaffRest as Q, type RestOptions as R, StaffPreset as S, type TupletOptions as T, MRhythmColumn as U, type VoiceId as V, MScoreRow as W, MStaff as X, MTab as Y, MSignature as Z, MSpecialText as _, type ScoreConfiguration as a, MLyrics as a0, MExtensionLine as a1, Clef as a2, type StaffConfig as a3, type TabConfig as a4, getVoiceIds as a5, type StringNumber as a6, getStringNumbers as a7, getVerseNumbers as a8, Stem as a9, Arpeggio as aa, type StaffTabOrGroup as ab, LyricsAlign as ac, LyricsHyphen as ad, DynamicsAnnotation as ae, TempoAnnotation as af, PlayState as ag, type PlayStateChangeListener as ah, type VerseNumber as b, type StaffTabOrGroups as c, Navigation as d, Annotation as e, Label as f, TieType as g, NoteAnchor as h, VerticalPosition as i, type ScoreEventType as j, ScoreEvent as k, ScoreStaffPosEvent as l, ScoreObjectEvent as m, type ScoreEventListener as n, MPlayer as o, MRenderer as p, MPlaybackButtons as q, MusicInterface as r, MAccidental as s, MConnective as t, MArpeggio as u, MBeamGroup as v, MStaffBeamGroup as w, MEnding as x, MFermata as y, MHeader as z };
|
package/dist/pieces/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { M as MDocument } from '../music-objects-
|
|
1
|
+
import { M as MDocument } from '../music-objects-3Hxlkxy6.mjs';
|
|
2
2
|
import '../note-eA2xPPiG.mjs';
|
|
3
|
-
import '../tempo-
|
|
3
|
+
import '../tempo-dkctPkCS.mjs';
|
|
4
4
|
import '@tspro/ts-utils-lib';
|
|
5
5
|
|
|
6
6
|
/**
|
package/dist/pieces/index.d.ts
CHANGED
package/dist/pieces/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* WebMusicScore v4.0
|
|
1
|
+
/* WebMusicScore v4.2.0 | (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;
|
|
@@ -30,10 +30,10 @@ module.exports = __toCommonJS(pieces_exports);
|
|
|
30
30
|
// src/pieces/frere-jacques.ts
|
|
31
31
|
var import_score = require("@tspro/web-music-score/score");
|
|
32
32
|
function createFrereJacques() {
|
|
33
|
-
return new import_score.DocumentBuilder().setHeader("
|
|
33
|
+
return new import_score.DocumentBuilder().setHeader("Fr\xE8re Jacques", "Traditional").setScoreConfiguration([
|
|
34
34
|
{ type: "staff", clef: "G", voiceIds: [0] },
|
|
35
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).
|
|
36
|
+
]).setMeasuresPerRow(2).addMeasure().setKeySignature("D Major").setTimeSignature("4/4").addNote(0, "D4", "4n", { stem: "up" }).addLyrics(1, "4n", "Are").addNote(0, "E4", "4n").addLyrics(1, "4n", "you").addNote(0, "F#4", "4n").addLyrics(1, "4n", "sleep", { hyphen: "-" }).addNote(0, "D4", "4n").addLyrics(1, "4n", "ing?").addRest(1, "1n", { staffPos: "F3" }).addMeasure().addNote(0, "D4", "4n").addLyrics(1, "4n", "Are").addNote(0, "E4", "4n").addLyrics(1, "4n", "you").addNote(0, "F#4", "4n").addLyrics(1, "4n", "sleep", { hyphen: "-" }).addNote(0, "D4", "4n").addLyrics(1, "4n", "ing?").addRest(1, "1n", { staffPos: "F3" }).addMeasure().addNavigation("startRepeat").addNote(0, "F#4", "4n").addLyrics(1, "4n", "Bro", { hyphen: "-" }).addNote(0, "G4", "4n").addLyrics(1, "4n", "ther").addNote(0, "A4", "2n").addLyrics(1, "4n", "John?").addNote(1, "D3", "4n", { stem: "down" }).addLyricsTo(1, 1, "4n", "Are").addNote(1, "E3", "4n").addLyricsTo(1, 1, "4n", "you").addNote(1, "F#3", "4n").addLyricsTo(1, 1, "4n", "sleep", { hyphen: "-" }).addNote(1, "D3", "4n").addLyricsTo(1, 1, "4n", "ing?").addMeasure().addNote(0, "F#4", "4n").addLyrics(1, "4n", "Bro", { hyphen: "-" }).addNote(0, "G4", "4n").addLyrics(1, "4n", "ther").addNote(0, "A4", "2n").addLyrics(1, "4n", "John?").addNote(1, "D3", "4n").addLyricsTo(1, 1, "4n", "Are").addNote(1, "E3", "4n").addLyricsTo(1, 1, "4n", "you").addNote(1, "F#3", "4n").addLyricsTo(1, 1, "4n", "sleep", { hyphen: "-" }).addNote(1, "D3", "4n").addLyricsTo(1, 1, "4n", "ing?").addMeasure().addNote(0, "A4", "8n").addLyrics(1, "8n", "Morn", { hyphen: "-" }).addNote(0, "B4", "8n").addLyrics(1, "8n", "ing").addNote(0, "A4", "8n").addLyrics(1, "8n", "bells").addNote(0, "G4", "8n").addLyrics(1, "8n", "are").addNote(0, "F#4", "4n").addLyrics(1, "4n", "ring", { hyphen: "-" }).addNote(0, "D4", "4n").addLyrics(1, "4n", "ing!").addNote(1, "F#3", "4n").addLyricsTo(1, 1, "4n", "Bro", { hyphen: "-" }).addNote(1, "G3", "4n").addLyricsTo(1, 1, "4n", "ther").addNote(1, "A3", "2n").addLyricsTo(1, 1, "2n", "John?").addMeasure().addNote(0, "A4", "8n").addLyrics(1, "8n", "Morn", { hyphen: "-" }).addNote(0, "B4", "8n").addLyrics(1, "8n", "ing").addNote(0, "A4", "8n").addLyrics(1, "8n", "bells").addNote(0, "G4", "8n").addLyrics(1, "8n", "are").addNote(0, "F#4", "4n").addLyrics(1, "4n", "ring", { hyphen: "-" }).addNote(0, "D4", "4n").addLyrics(1, "4n", "ing!").addNote(1, "F#3", "4n").addLyricsTo(1, 1, "4n", "Bro", { hyphen: "-" }).addNote(1, "G3", "4n").addLyricsTo(1, 1, "4n", "ther").addNote(1, "A3", "2n").addLyricsTo(1, 1, "2n", "John?").addMeasure().addNote(0, "D4", "4n").addLyrics(1, "4n", "Ding").addChord(0, ["C#4", "A4"], "4n").addLyrics(1, "4n", "ding").addNote(0, "D4", "4n").addLyrics(1, "4n", "dong!").addRest(0, "4n").addNote(1, "A3", "8n").addLyricsTo(1, 1, "8n", "Morn", { hyphen: "-" }).addNote(1, "B3", "8n").addLyricsTo(1, 1, "8n", "ing").addNote(1, "A3", "8n").addLyricsTo(1, 1, "8n", "bells").addNote(1, "G3", "8n").addLyricsTo(1, 1, "8n", "are").addNote(1, "F#3", "4n").addLyricsTo(1, 1, "4n", "ring", { hyphen: "-" }).addNote(1, "D3", "4n").addLyricsTo(1, 1, "4n", "ing!").addMeasure().addNote(0, "D4", "4n").addLyrics(1, "4n", "Ding").addChord(0, ["C#4", "A4"], "4n").addLyrics(1, "4n", "ding").addNote(0, "D4", "4n").addLyrics(1, "4n", "dong!").addRest(0, "4n").addNote(1, "A3", "8n").addLyricsTo(1, 1, "8n", "Morn", { hyphen: "-" }).addNote(1, "B3", "8n").addLyricsTo(1, 1, "8n", "ing").addNote(1, "A3", "8n").addLyricsTo(1, 1, "8n", "bells").addNote(1, "G3", "8n").addLyricsTo(1, 1, "8n", "are").addNote(1, "F#3", "4n").addLyricsTo(1, 1, "4n", "ring", { hyphen: "-" }).addNote(1, "D3", "4n").addLyricsTo(1, 1, "4n", "ing!").addMeasure().setMeasuresPerRow(4).addNote(0, "D4", "4n").addLyrics(1, "4n", "Are").addNote(0, "E4", "4n").addLyrics(1, "4n", "you").addNote(0, "F#4", "4n").addLyrics(1, "4n", "sleep", { hyphen: "-" }).addNote(0, "D4", "4n").addLyrics(1, "4n", "ing?").addNote(1, "D3", "4n").addLyricsTo(1, 1, "4n", "Ding").addChord(1, ["C#3", "A3"], "4n").addLyricsTo(1, 1, "4n", "ding").addNote(1, "D3", "4n").addLyricsTo(1, 1, "4n", "dong!").addRest(1, "4n").addMeasure().addNavigation("endRepeat").addNote(0, "D4", "4n").addLyrics(1, "4n", "Are").addNote(0, "E4", "4n").addLyrics(1, "4n", "you").addNote(0, "F#4", "4n").addLyrics(1, "4n", "sleep", { hyphen: "-" }).addNote(0, "D4", "4n").addLyrics(1, "4n", "ing?").addNote(1, "D3", "4n").addLyricsTo(1, 1, "4n", "Ding").addChord(1, ["C#3", "A3"], "4n").addLyricsTo(1, 1, "4n", "ding").addNote(1, "D3", "4n").addLyricsTo(1, 1, "4n", "dong!").addRest(1, "4n").addMeasure().addNote(0, "F#4", "4n").addLyrics(1, "4n", "YES").addNote(0, "D4", "4n").addLyrics(1, "4n", "I'm").addNote(0, "F#4", "4n").addLyrics(1, "4n", "SLEEP", { hyphen: "-" }).addNote(0, "D4", "4n").addLyrics(1, "4n", "ING").addNote(1, "A3", "4n").addNote(1, "F#3", "4n").addNote(1, "A3", "4n").addNote(1, "F#3", "4n").addMeasure().addNote(0, "A3", "4n").addLyrics(1, "4n", "Please").addNote(0, "C#4", "8n").addLyrics(1, "8n", "GO").addNote(0, "C#4", "8n").addLyrics(1, "8n", "A", { hyphen: "-" }).addNote(0, "D4", "2n").addLyrics(1, "4n", "WAY!").addNote(1, "D3", "4n").addNote(1, "E3", "4n").addNote(1, "F#3", "2n").getDocument();
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
// src/pieces/greensleeves.ts
|
package/dist/pieces/index.mjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
/* WebMusicScore v4.0
|
|
2
|
-
import "../chunk-
|
|
1
|
+
/* WebMusicScore v4.2.0 | (c) 2023 PahkaSoft | MIT License | Includes: Tone.js (MIT License) */
|
|
2
|
+
import "../chunk-5NWLGWHS.mjs";
|
|
3
3
|
|
|
4
4
|
// src/pieces/frere-jacques.ts
|
|
5
5
|
import { DocumentBuilder } from "@tspro/web-music-score/score";
|
|
6
6
|
function createFrereJacques() {
|
|
7
|
-
return new DocumentBuilder().setHeader("
|
|
7
|
+
return new DocumentBuilder().setHeader("Fr\xE8re Jacques", "Traditional").setScoreConfiguration([
|
|
8
8
|
{ type: "staff", clef: "G", voiceIds: [0] },
|
|
9
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).
|
|
10
|
+
]).setMeasuresPerRow(2).addMeasure().setKeySignature("D Major").setTimeSignature("4/4").addNote(0, "D4", "4n", { stem: "up" }).addLyrics(1, "4n", "Are").addNote(0, "E4", "4n").addLyrics(1, "4n", "you").addNote(0, "F#4", "4n").addLyrics(1, "4n", "sleep", { hyphen: "-" }).addNote(0, "D4", "4n").addLyrics(1, "4n", "ing?").addRest(1, "1n", { staffPos: "F3" }).addMeasure().addNote(0, "D4", "4n").addLyrics(1, "4n", "Are").addNote(0, "E4", "4n").addLyrics(1, "4n", "you").addNote(0, "F#4", "4n").addLyrics(1, "4n", "sleep", { hyphen: "-" }).addNote(0, "D4", "4n").addLyrics(1, "4n", "ing?").addRest(1, "1n", { staffPos: "F3" }).addMeasure().addNavigation("startRepeat").addNote(0, "F#4", "4n").addLyrics(1, "4n", "Bro", { hyphen: "-" }).addNote(0, "G4", "4n").addLyrics(1, "4n", "ther").addNote(0, "A4", "2n").addLyrics(1, "4n", "John?").addNote(1, "D3", "4n", { stem: "down" }).addLyricsTo(1, 1, "4n", "Are").addNote(1, "E3", "4n").addLyricsTo(1, 1, "4n", "you").addNote(1, "F#3", "4n").addLyricsTo(1, 1, "4n", "sleep", { hyphen: "-" }).addNote(1, "D3", "4n").addLyricsTo(1, 1, "4n", "ing?").addMeasure().addNote(0, "F#4", "4n").addLyrics(1, "4n", "Bro", { hyphen: "-" }).addNote(0, "G4", "4n").addLyrics(1, "4n", "ther").addNote(0, "A4", "2n").addLyrics(1, "4n", "John?").addNote(1, "D3", "4n").addLyricsTo(1, 1, "4n", "Are").addNote(1, "E3", "4n").addLyricsTo(1, 1, "4n", "you").addNote(1, "F#3", "4n").addLyricsTo(1, 1, "4n", "sleep", { hyphen: "-" }).addNote(1, "D3", "4n").addLyricsTo(1, 1, "4n", "ing?").addMeasure().addNote(0, "A4", "8n").addLyrics(1, "8n", "Morn", { hyphen: "-" }).addNote(0, "B4", "8n").addLyrics(1, "8n", "ing").addNote(0, "A4", "8n").addLyrics(1, "8n", "bells").addNote(0, "G4", "8n").addLyrics(1, "8n", "are").addNote(0, "F#4", "4n").addLyrics(1, "4n", "ring", { hyphen: "-" }).addNote(0, "D4", "4n").addLyrics(1, "4n", "ing!").addNote(1, "F#3", "4n").addLyricsTo(1, 1, "4n", "Bro", { hyphen: "-" }).addNote(1, "G3", "4n").addLyricsTo(1, 1, "4n", "ther").addNote(1, "A3", "2n").addLyricsTo(1, 1, "2n", "John?").addMeasure().addNote(0, "A4", "8n").addLyrics(1, "8n", "Morn", { hyphen: "-" }).addNote(0, "B4", "8n").addLyrics(1, "8n", "ing").addNote(0, "A4", "8n").addLyrics(1, "8n", "bells").addNote(0, "G4", "8n").addLyrics(1, "8n", "are").addNote(0, "F#4", "4n").addLyrics(1, "4n", "ring", { hyphen: "-" }).addNote(0, "D4", "4n").addLyrics(1, "4n", "ing!").addNote(1, "F#3", "4n").addLyricsTo(1, 1, "4n", "Bro", { hyphen: "-" }).addNote(1, "G3", "4n").addLyricsTo(1, 1, "4n", "ther").addNote(1, "A3", "2n").addLyricsTo(1, 1, "2n", "John?").addMeasure().addNote(0, "D4", "4n").addLyrics(1, "4n", "Ding").addChord(0, ["C#4", "A4"], "4n").addLyrics(1, "4n", "ding").addNote(0, "D4", "4n").addLyrics(1, "4n", "dong!").addRest(0, "4n").addNote(1, "A3", "8n").addLyricsTo(1, 1, "8n", "Morn", { hyphen: "-" }).addNote(1, "B3", "8n").addLyricsTo(1, 1, "8n", "ing").addNote(1, "A3", "8n").addLyricsTo(1, 1, "8n", "bells").addNote(1, "G3", "8n").addLyricsTo(1, 1, "8n", "are").addNote(1, "F#3", "4n").addLyricsTo(1, 1, "4n", "ring", { hyphen: "-" }).addNote(1, "D3", "4n").addLyricsTo(1, 1, "4n", "ing!").addMeasure().addNote(0, "D4", "4n").addLyrics(1, "4n", "Ding").addChord(0, ["C#4", "A4"], "4n").addLyrics(1, "4n", "ding").addNote(0, "D4", "4n").addLyrics(1, "4n", "dong!").addRest(0, "4n").addNote(1, "A3", "8n").addLyricsTo(1, 1, "8n", "Morn", { hyphen: "-" }).addNote(1, "B3", "8n").addLyricsTo(1, 1, "8n", "ing").addNote(1, "A3", "8n").addLyricsTo(1, 1, "8n", "bells").addNote(1, "G3", "8n").addLyricsTo(1, 1, "8n", "are").addNote(1, "F#3", "4n").addLyricsTo(1, 1, "4n", "ring", { hyphen: "-" }).addNote(1, "D3", "4n").addLyricsTo(1, 1, "4n", "ing!").addMeasure().setMeasuresPerRow(4).addNote(0, "D4", "4n").addLyrics(1, "4n", "Are").addNote(0, "E4", "4n").addLyrics(1, "4n", "you").addNote(0, "F#4", "4n").addLyrics(1, "4n", "sleep", { hyphen: "-" }).addNote(0, "D4", "4n").addLyrics(1, "4n", "ing?").addNote(1, "D3", "4n").addLyricsTo(1, 1, "4n", "Ding").addChord(1, ["C#3", "A3"], "4n").addLyricsTo(1, 1, "4n", "ding").addNote(1, "D3", "4n").addLyricsTo(1, 1, "4n", "dong!").addRest(1, "4n").addMeasure().addNavigation("endRepeat").addNote(0, "D4", "4n").addLyrics(1, "4n", "Are").addNote(0, "E4", "4n").addLyrics(1, "4n", "you").addNote(0, "F#4", "4n").addLyrics(1, "4n", "sleep", { hyphen: "-" }).addNote(0, "D4", "4n").addLyrics(1, "4n", "ing?").addNote(1, "D3", "4n").addLyricsTo(1, 1, "4n", "Ding").addChord(1, ["C#3", "A3"], "4n").addLyricsTo(1, 1, "4n", "ding").addNote(1, "D3", "4n").addLyricsTo(1, 1, "4n", "dong!").addRest(1, "4n").addMeasure().addNote(0, "F#4", "4n").addLyrics(1, "4n", "YES").addNote(0, "D4", "4n").addLyrics(1, "4n", "I'm").addNote(0, "F#4", "4n").addLyrics(1, "4n", "SLEEP", { hyphen: "-" }).addNote(0, "D4", "4n").addLyrics(1, "4n", "ING").addNote(1, "A3", "4n").addNote(1, "F#3", "4n").addNote(1, "A3", "4n").addNote(1, "F#3", "4n").addMeasure().addNote(0, "A3", "4n").addLyrics(1, "4n", "Please").addNote(0, "C#4", "8n").addLyrics(1, "8n", "GO").addNote(0, "C#4", "8n").addLyrics(1, "8n", "A", { hyphen: "-" }).addNote(0, "D4", "2n").addLyrics(1, "4n", "WAY!").addNote(1, "D3", "4n").addNote(1, "E3", "4n").addNote(1, "F#3", "2n").getDocument();
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
// src/pieces/greensleeves.ts
|
|
@@ -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-
|
|
3
|
+
import { c as Scale, S as ScaleType } from '../scale-DQP3b9Zx.mjs';
|
|
4
4
|
import { b as PitchNotation, G as GuitarNoteLabel, N as Note } from '../note-eA2xPPiG.mjs';
|
|
5
5
|
import { H as Handedness } from '../guitar-DdexKdN6.mjs';
|
|
6
|
-
import { D as DivRect, M as MDocument,
|
|
7
|
-
import '../tempo-
|
|
6
|
+
import { D as DivRect, M as MDocument, n as ScoreEventListener, p as MRenderer, q as MPlaybackButtons } from '../music-objects-3Hxlkxy6.mjs';
|
|
7
|
+
import '../tempo-dkctPkCS.mjs';
|
|
8
8
|
import '@tspro/ts-utils-lib';
|
|
9
9
|
|
|
10
10
|
interface CircleOfFifthsProps {
|