@tspro/web-music-score 3.1.1 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +35 -7
- package/README.md +189 -331
- package/dist/audio/index.d.ts +1 -1
- 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-PU4J7K4Z.mjs → chunk-D643HZHM.mjs} +2 -2
- package/dist/core/index.js +2 -2
- package/dist/core/index.mjs +3 -3
- package/dist/{guitar-C2Cp71NZ.d.ts → guitar-cNmE-EvH.d.ts} +1 -1
- package/dist/iife/index.global.js +11 -11
- package/dist/{interface-Fn8ufBQx.d.ts → interface-7k8qGG44.d.ts} +131 -83
- package/dist/{interface-Bz_525zj.d.mts → interface-XoKiryoV.d.mts} +130 -82
- package/dist/{note-BFa43I86.d.ts → note-CcVdUFqS.d.ts} +1 -1
- package/dist/pieces/index.d.mts +2 -2
- package/dist/pieces/index.d.ts +3 -3
- package/dist/pieces/index.js +4 -7
- package/dist/pieces/index.mjs +8 -11
- package/dist/react-ui/index.d.mts +3 -3
- package/dist/react-ui/index.d.ts +5 -5
- package/dist/react-ui/index.js +1 -1
- package/dist/react-ui/index.mjs +2 -2
- package/dist/{scale-DRR-t4Kr.d.mts → scale-C2pCNxdE.d.mts} +4 -3
- package/dist/{scale-ebJm37q1.d.ts → scale-CvPbJvfN.d.ts} +5 -4
- package/dist/score/index.d.mts +98 -31
- package/dist/score/index.d.ts +99 -32
- package/dist/score/index.js +922 -599
- package/dist/score/index.mjs +929 -606
- package/dist/tempo-BAYoZ_Li.d.mts +187 -0
- package/dist/tempo-r2sb6Ku2.d.ts +187 -0
- package/dist/theory/index.d.mts +3 -3
- package/dist/theory/index.d.ts +6 -6
- package/dist/theory/index.js +221 -78
- package/dist/theory/index.mjs +218 -76
- package/package.json +2 -2
- package/dist/tempo-B4h5Ktob.d.mts +0 -104
- package/dist/tempo-DgqDEsn0.d.ts +0 -104
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { N as Note, A as Accidental } from './note-
|
|
2
|
-
import { R as RhythmProps, N as NoteLength, c as Tempo, K as KeySignature, a as TimeSignature, T as TimeSignatureString } from './tempo-
|
|
1
|
+
import { N as Note, A as Accidental } from './note-CcVdUFqS.js';
|
|
2
|
+
import { R as RhythmProps, N as NoteLength, h as NoteLengthStr, j as TupletRatio, c as Tempo, K as KeySignature, a as TimeSignature, T as TimeSignatureString } from './tempo-r2sb6Ku2.js';
|
|
3
3
|
import { Vec2 } from '@tspro/ts-utils-lib';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -199,15 +199,17 @@ declare class DivRect {
|
|
|
199
199
|
|
|
200
200
|
declare enum StaffPreset {
|
|
201
201
|
/** Treble staff has treble (G-) clef. */
|
|
202
|
-
Treble =
|
|
202
|
+
Treble = "treble",
|
|
203
203
|
/** Bass staff has bass (F-) clef. */
|
|
204
|
-
Bass =
|
|
204
|
+
Bass = "bass",
|
|
205
205
|
/** Grand staff has both treble and bass clefs. */
|
|
206
|
-
Grand =
|
|
206
|
+
Grand = "grand",
|
|
207
207
|
/** GuitarTreble has treble clef but is one octave lower. */
|
|
208
|
-
GuitarTreble =
|
|
209
|
-
GuitarTab
|
|
210
|
-
|
|
208
|
+
GuitarTreble = "guitarTreble",
|
|
209
|
+
/** GuitarTab has tab for guitar. */
|
|
210
|
+
GuitarTab = "guitarTab",
|
|
211
|
+
/** GuitarCombined has treble clef and tab for guitar. */
|
|
212
|
+
GuitarCombined = "guitarCombined"
|
|
211
213
|
}
|
|
212
214
|
declare enum Clef {
|
|
213
215
|
G = "G",
|
|
@@ -215,7 +217,7 @@ declare enum Clef {
|
|
|
215
217
|
}
|
|
216
218
|
type StaffConfig = {
|
|
217
219
|
type: "staff";
|
|
218
|
-
clef: Clef
|
|
220
|
+
clef: Clef | `${Clef}`;
|
|
219
221
|
name?: string;
|
|
220
222
|
isOctaveDown?: boolean;
|
|
221
223
|
minNote?: string;
|
|
@@ -235,102 +237,108 @@ declare function getVoiceIds(): ReadonlyArray<VoiceId>;
|
|
|
235
237
|
type StringNumber = 1 | 2 | 3 | 4 | 5 | 6;
|
|
236
238
|
declare function getStringNumbers(): ReadonlyArray<StringNumber>;
|
|
237
239
|
declare enum Stem {
|
|
238
|
-
Auto =
|
|
239
|
-
Up =
|
|
240
|
-
Down =
|
|
240
|
+
Auto = "auto",
|
|
241
|
+
Up = "up",
|
|
242
|
+
Down = "down"
|
|
241
243
|
}
|
|
242
244
|
declare enum Arpeggio {
|
|
243
|
-
Up =
|
|
244
|
-
Down =
|
|
245
|
+
Up = "up",
|
|
246
|
+
Down = "down"
|
|
245
247
|
}
|
|
246
248
|
declare enum TieType {
|
|
247
|
-
Stub =
|
|
248
|
-
ToMeasureEnd =
|
|
249
|
+
Stub = "stub",
|
|
250
|
+
ToMeasureEnd = "toMeasureEnd"
|
|
249
251
|
}
|
|
250
252
|
declare enum NoteAnchor {
|
|
251
|
-
Auto =
|
|
252
|
-
Above =
|
|
253
|
-
Center =
|
|
254
|
-
Below =
|
|
255
|
-
StemTip =
|
|
253
|
+
Auto = "auto",
|
|
254
|
+
Above = "above",
|
|
255
|
+
Center = "center",
|
|
256
|
+
Below = "below",
|
|
257
|
+
StemTip = "stemTip"
|
|
256
258
|
}
|
|
257
259
|
declare enum Connective {
|
|
258
|
-
Tie =
|
|
259
|
-
Slur =
|
|
260
|
-
Slide =
|
|
260
|
+
Tie = "tie",
|
|
261
|
+
Slur = "slur",
|
|
262
|
+
Slide = "slide"
|
|
261
263
|
}
|
|
262
|
-
type ConnectiveSpan = number | TieType;
|
|
263
264
|
declare enum VerticalPosition {
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
265
|
+
Auto = "auto",
|
|
266
|
+
Above = "above",
|
|
267
|
+
Below = "below",
|
|
268
|
+
Both = "both"
|
|
268
269
|
}
|
|
269
270
|
type StaffTabOrGroup = number | string;
|
|
270
271
|
type StaffTabOrGroups = StaffTabOrGroup | StaffTabOrGroup[];
|
|
271
272
|
type NoteOptions = {
|
|
272
|
-
|
|
273
|
-
stem?: Stem;
|
|
273
|
+
stem?: Stem | `${Stem}`;
|
|
274
274
|
color?: string;
|
|
275
|
-
arpeggio?: Arpeggio |
|
|
275
|
+
arpeggio?: boolean | Arpeggio | `${Arpeggio}`;
|
|
276
276
|
staccato?: boolean;
|
|
277
277
|
diamond?: boolean;
|
|
278
|
-
triplet?: boolean;
|
|
279
278
|
string?: StringNumber | StringNumber[];
|
|
279
|
+
/** @deprecated - Use triplet NoteLength values instead, e.g. NoteLength.QuarterTriplet or "4t", etc. */
|
|
280
|
+
triplet?: boolean;
|
|
281
|
+
/** @deprecated - Use dotted NoteLength values instead, e.g. NoteLength.Quarter2Dots or "4..", etc. */
|
|
282
|
+
dotted?: boolean | number;
|
|
280
283
|
};
|
|
281
284
|
type RestOptions = {
|
|
282
|
-
dotted?: boolean;
|
|
283
285
|
staffPos?: Note | string | number;
|
|
284
286
|
color?: string;
|
|
285
287
|
hide?: boolean;
|
|
288
|
+
/** @deprecated - Use triplet NoteLength values instead, e.g. NoteLength.QuarterTriplet or "4t", etc. */
|
|
286
289
|
triplet?: boolean;
|
|
290
|
+
/** @deprecated - Use dotted NoteLength values instead, e.g. NoteLength.Quarter2Dots or "4..", etc. */
|
|
291
|
+
dotted?: boolean | number;
|
|
292
|
+
};
|
|
293
|
+
type TupletOptions = {
|
|
294
|
+
showRatio?: boolean;
|
|
287
295
|
};
|
|
288
|
-
declare enum PlayState {
|
|
289
|
-
Playing = 0,
|
|
290
|
-
Paused = 1,
|
|
291
|
-
Stopped = 2
|
|
292
|
-
}
|
|
293
|
-
type PlayStateChangeListener = (playState: PlayState) => void;
|
|
294
296
|
declare enum Fermata {
|
|
295
|
-
AtNote =
|
|
296
|
-
AtMeasureEnd =
|
|
297
|
+
AtNote = "atNote",
|
|
298
|
+
AtMeasureEnd = "atMeasureEnd"
|
|
297
299
|
}
|
|
298
300
|
declare enum Navigation {
|
|
299
301
|
/** Repeat back to beginning and play to the "Fine" marking. */
|
|
300
|
-
DC_al_Fine =
|
|
302
|
+
DC_al_Fine = "D.C. al Fine",
|
|
301
303
|
/** Repeat back to beginning and play to the "to Coda 𝄌", then jump to the "𝄌 Coda". */
|
|
302
|
-
DC_al_Coda =
|
|
304
|
+
DC_al_Coda = "D.C. al Coda",
|
|
303
305
|
/** Repeat back to Segno sign (𝄋) and play to the "Fine" marking. */
|
|
304
|
-
DS_al_Fine =
|
|
306
|
+
DS_al_Fine = "D.S. al Fine",
|
|
305
307
|
/** Repeat back to Segno sign (𝄋) and play to the "to Coda 𝄌", then jump to the "𝄌 Coda". */
|
|
306
|
-
DS_al_Coda =
|
|
308
|
+
DS_al_Coda = "D.S. al Coda",
|
|
307
309
|
/** "𝄌 Coda" section. */
|
|
308
|
-
Coda =
|
|
310
|
+
Coda = "Coda",
|
|
309
311
|
/** From "toCoda 𝄌" jump to the "𝄌 Coda" section. */
|
|
310
|
-
toCoda =
|
|
312
|
+
toCoda = "toCoda",
|
|
311
313
|
/** Jump here from D.S. al Fine or D.S. al Coda. */
|
|
312
|
-
Segno =
|
|
314
|
+
Segno = "Segno",
|
|
313
315
|
/** Stop playing after D.C. al Fine or D.S. al Fine. */
|
|
314
|
-
Fine =
|
|
316
|
+
Fine = "Fine",
|
|
315
317
|
/** Start of repeat section. */
|
|
316
|
-
StartRepeat =
|
|
318
|
+
StartRepeat = "startRepeat",
|
|
317
319
|
/** End of repeat section. Jump to start of repeat section. */
|
|
318
|
-
EndRepeat =
|
|
320
|
+
EndRepeat = "endRepeat",
|
|
319
321
|
/** Jump to ending with correct passage number. */
|
|
320
|
-
Ending =
|
|
322
|
+
Ending = "ending"
|
|
321
323
|
}
|
|
322
324
|
declare enum Annotation {
|
|
323
325
|
/** "ppp", "pp", "p", "mp", "m", "mf", "f", "ff", "fff", "cresc.", "decresc.", "dim." */
|
|
324
|
-
Dynamics =
|
|
326
|
+
Dynamics = "dynamics",
|
|
325
327
|
/** "accel.", "rit.", "a tempo" */
|
|
326
|
-
Tempo =
|
|
328
|
+
Tempo = "tempo"
|
|
327
329
|
}
|
|
328
330
|
declare enum Label {
|
|
329
331
|
/** "C", "C#", "Db", "D", etc. */
|
|
330
|
-
Note =
|
|
332
|
+
Note = "note",
|
|
331
333
|
/** "C", "Am", "G7", etc. */
|
|
332
|
-
Chord =
|
|
334
|
+
Chord = "chord"
|
|
333
335
|
}
|
|
336
|
+
declare enum PlayState {
|
|
337
|
+
Playing = 0,
|
|
338
|
+
Paused = 1,
|
|
339
|
+
Stopped = 2
|
|
340
|
+
}
|
|
341
|
+
type PlayStateChangeListener = (playState: PlayState) => void;
|
|
334
342
|
|
|
335
343
|
declare class AccidentalState {
|
|
336
344
|
readonly measure: ObjMeasure;
|
|
@@ -343,11 +351,11 @@ declare class AccidentalState {
|
|
|
343
351
|
|
|
344
352
|
declare class ConnectiveProps {
|
|
345
353
|
readonly connective: Connective;
|
|
346
|
-
readonly span:
|
|
354
|
+
readonly span: number | TieType | `${TieType}`;
|
|
347
355
|
noteAnchor: NoteAnchor;
|
|
348
356
|
noteGroups: ObjNoteGroup[];
|
|
349
357
|
arcDir: "up" | "down";
|
|
350
|
-
constructor(connective: Connective, span:
|
|
358
|
+
constructor(connective: Connective, span: number | TieType | `${TieType}`, noteAnchor: NoteAnchor, startNoteGroup: ObjNoteGroup);
|
|
351
359
|
getStartNoteGroup(): ObjNoteGroup;
|
|
352
360
|
startsWith(noteGroup: ObjNoteGroup): boolean;
|
|
353
361
|
/**
|
|
@@ -561,6 +569,7 @@ declare class ObjNoteGroup extends MusicObject {
|
|
|
561
569
|
readonly staccato: boolean;
|
|
562
570
|
readonly diamond: boolean;
|
|
563
571
|
readonly arpeggio: Arpeggio | undefined;
|
|
572
|
+
readonly oldStyleTriplet: boolean;
|
|
564
573
|
readonly rhythmProps: RhythmProps;
|
|
565
574
|
private startConnnectives;
|
|
566
575
|
private runningConnectives;
|
|
@@ -570,13 +579,12 @@ declare class ObjNoteGroup extends MusicObject {
|
|
|
570
579
|
private readonly staffObjects;
|
|
571
580
|
private readonly tabObjects;
|
|
572
581
|
readonly mi: MNoteGroup;
|
|
573
|
-
constructor(col: ObjRhythmColumn, voiceId: number, notes: ReadonlyArray<Note>, noteLength: NoteLength, options?: NoteOptions);
|
|
582
|
+
constructor(col: ObjRhythmColumn, voiceId: number, notes: ReadonlyArray<Note>, noteLength: NoteLength | NoteLengthStr, options?: NoteOptions, tupletRatio?: TupletRatio);
|
|
574
583
|
getMusicInterface(): MNoteGroup;
|
|
575
584
|
get doc(): ObjDocument;
|
|
576
585
|
get measure(): ObjMeasure;
|
|
577
586
|
get row(): ObjScoreRow;
|
|
578
587
|
get stemDir(): Stem.Up | Stem.Down;
|
|
579
|
-
get triplet(): boolean;
|
|
580
588
|
enableConnective(line: ObjNotationLine): boolean;
|
|
581
589
|
startConnective(connectiveProps: ConnectiveProps): void;
|
|
582
590
|
getStaticObjects(line: ObjNotationLine): ReadonlyArray<MusicObject>;
|
|
@@ -594,7 +602,7 @@ declare class ObjNoteGroup extends MusicObject {
|
|
|
594
602
|
removeConnectiveProps(): void;
|
|
595
603
|
getPlaySlur(): "first" | "slurred" | undefined;
|
|
596
604
|
getBeamGroup(): ObjBeamGroup | undefined;
|
|
597
|
-
setBeamGroup(
|
|
605
|
+
setBeamGroup(beamGroup: ObjBeamGroup): void;
|
|
598
606
|
resetBeamGroup(): void;
|
|
599
607
|
getBeamCoords(): ({
|
|
600
608
|
staff: ObjStaff;
|
|
@@ -616,15 +624,15 @@ declare class ObjNoteGroup extends MusicObject {
|
|
|
616
624
|
offset(dx: number, dy: number): void;
|
|
617
625
|
draw(renderer: Renderer): void;
|
|
618
626
|
static setBeamCounts(groupNotes: (ObjNoteGroup | undefined)[]): void;
|
|
619
|
-
static
|
|
627
|
+
static setTupletBeamCounts(tuplet: ObjBeamGroup): void;
|
|
620
628
|
getDotVerticalDisplacement(staff: ObjStaff, diatonicId: number, stemDir: Stem): 1 | 0 | -1;
|
|
621
629
|
static hasSameNotes(ng1: ObjNoteGroup, ng2: ObjNoteGroup): boolean;
|
|
622
630
|
}
|
|
623
631
|
|
|
624
632
|
declare enum BeamGroupType {
|
|
625
633
|
RegularBeam = 0,
|
|
626
|
-
|
|
627
|
-
|
|
634
|
+
TupletBeam = 1,
|
|
635
|
+
TupletGroup = 2
|
|
628
636
|
}
|
|
629
637
|
declare class BeamPoint {
|
|
630
638
|
staff: ObjStaff;
|
|
@@ -641,8 +649,8 @@ declare class BeamPoint {
|
|
|
641
649
|
declare class ObjStaffBeamGroup extends MusicObject {
|
|
642
650
|
readonly staff: ObjStaff;
|
|
643
651
|
readonly beamGroup: ObjBeamGroup;
|
|
644
|
-
|
|
645
|
-
|
|
652
|
+
tupletNumber?: ObjText;
|
|
653
|
+
tupletNumberOffsetY: number;
|
|
646
654
|
points: BeamPoint[];
|
|
647
655
|
readonly mi: MStaffBeamGroup;
|
|
648
656
|
constructor(staff: ObjStaff, beamGroup: ObjBeamGroup);
|
|
@@ -653,18 +661,21 @@ declare class ObjStaffBeamGroup extends MusicObject {
|
|
|
653
661
|
}
|
|
654
662
|
declare class ObjBeamGroup extends MusicObject {
|
|
655
663
|
private readonly symbols;
|
|
664
|
+
readonly tupletRatio: TupletRatio & TupletOptions | undefined;
|
|
656
665
|
readonly mi: MBeamGroup;
|
|
657
666
|
private readonly type;
|
|
658
667
|
private readonly staffObjects;
|
|
659
668
|
private constructor();
|
|
669
|
+
private get showTupletRatio();
|
|
660
670
|
static createBeam(noteGroups: ObjNoteGroup[]): void;
|
|
661
|
-
static
|
|
671
|
+
static createOldStyleTriplet(symbols: RhythmSymbol[]): number;
|
|
672
|
+
static createTuplet(symbols: RhythmSymbol[], tupletRatio: TupletRatio & TupletOptions): void;
|
|
662
673
|
getMusicInterface(): MBeamGroup;
|
|
663
674
|
detach(): void;
|
|
664
675
|
isEmpty(): boolean;
|
|
665
676
|
pick(x: number, y: number): MusicObject[];
|
|
666
677
|
getType(): BeamGroupType;
|
|
667
|
-
|
|
678
|
+
isTuplet(): boolean;
|
|
668
679
|
getSymbols(): ReadonlyArray<RhythmSymbol>;
|
|
669
680
|
getFirstSymbol(): RhythmSymbol | undefined;
|
|
670
681
|
getLastSymbol(): RhythmSymbol | undefined;
|
|
@@ -680,7 +691,7 @@ declare class ObjStaffRest extends MusicObject {
|
|
|
680
691
|
readonly staff: ObjStaff;
|
|
681
692
|
readonly rest: ObjRest;
|
|
682
693
|
restRect: DivRect;
|
|
683
|
-
|
|
694
|
+
dotRects: DivRect[];
|
|
684
695
|
readonly mi: MStaffRest;
|
|
685
696
|
constructor(staff: ObjStaff, rest: ObjRest);
|
|
686
697
|
getMusicInterface(): MusicInterface;
|
|
@@ -695,23 +706,22 @@ declare class ObjRest extends MusicObject {
|
|
|
695
706
|
readonly ownDiatonicId: number;
|
|
696
707
|
readonly color: string;
|
|
697
708
|
readonly hide: boolean;
|
|
709
|
+
readonly oldStyleTriplet: boolean;
|
|
698
710
|
readonly rhythmProps: RhythmProps;
|
|
699
711
|
private beamGroup?;
|
|
700
712
|
readonly staffObjects: ObjStaffRest[];
|
|
701
713
|
readonly mi: MRest;
|
|
702
|
-
constructor(col: ObjRhythmColumn, voiceId: number, noteLength: NoteLength, options?: RestOptions);
|
|
714
|
+
constructor(col: ObjRhythmColumn, voiceId: number, noteLength: NoteLength | NoteLengthStr, options?: RestOptions, tupletRatio?: TupletRatio);
|
|
703
715
|
getMusicInterface(): MRest;
|
|
704
716
|
get doc(): ObjDocument;
|
|
705
717
|
get measure(): ObjMeasure;
|
|
706
718
|
get row(): ObjScoreRow;
|
|
707
719
|
get noteLength(): NoteLength;
|
|
708
|
-
get dotted(): boolean;
|
|
709
720
|
get stemDir(): Stem.Up | Stem.Down;
|
|
710
|
-
get triplet(): boolean;
|
|
711
721
|
getStaticObjects(line: ObjNotationLine): ReadonlyArray<MusicObject>;
|
|
712
722
|
pick(x: number, y: number): MusicObject[];
|
|
713
723
|
getBeamGroup(): ObjBeamGroup | undefined;
|
|
714
|
-
setBeamGroup(
|
|
724
|
+
setBeamGroup(beamGroup: ObjBeamGroup): void;
|
|
715
725
|
resetBeamGroup(): void;
|
|
716
726
|
getBeamCoords(): ({
|
|
717
727
|
staff: ObjStaff;
|
|
@@ -815,11 +825,12 @@ declare enum BarLineType {
|
|
|
815
825
|
EndStartRepeat = 6
|
|
816
826
|
}
|
|
817
827
|
declare class ObjStaffTabBarLine extends MusicObject {
|
|
828
|
+
readonly barLine: ObjBarLine;
|
|
818
829
|
readonly line: ObjNotationLine;
|
|
819
830
|
lineRects: DivRect[];
|
|
820
831
|
dotRects: DivRect[];
|
|
821
832
|
readonly mi: MStaffTabBarLine;
|
|
822
|
-
constructor(line: ObjNotationLine);
|
|
833
|
+
constructor(barLine: ObjBarLine, line: ObjNotationLine);
|
|
823
834
|
getMusicInterface(): MusicInterface;
|
|
824
835
|
pick(x: number, y: number): MusicObject[];
|
|
825
836
|
setRect(r: DivRect): void;
|
|
@@ -950,7 +961,7 @@ declare class ObjMeasure extends MusicObject {
|
|
|
950
961
|
setTimeSignature(timeSignature: TimeSignature | TimeSignatureString): void;
|
|
951
962
|
updateTimeSignature(): void;
|
|
952
963
|
getTempo(): Tempo;
|
|
953
|
-
setTempo(beatsPerMinute: number, beatLength?: NoteLength, dotted?: boolean): void;
|
|
964
|
+
setTempo(beatsPerMinute: number, beatLength?: NoteLength | NoteLengthStr, dotted?: boolean | number): void;
|
|
954
965
|
updateTempo(): void;
|
|
955
966
|
hasPostMeasureBreak(): boolean;
|
|
956
967
|
getPostMeasureBreakWidth(): number;
|
|
@@ -965,7 +976,7 @@ declare class ObjMeasure extends MusicObject {
|
|
|
965
976
|
addConnective(connective: Connective.Tie, tieSpan?: number | TieType, notAnchor?: NoteAnchor): void;
|
|
966
977
|
addConnective(connective: Connective.Slur, slurSpan?: number, notAnchor?: NoteAnchor): void;
|
|
967
978
|
addConnective(connective: Connective.Slide, notAnchor?: NoteAnchor): void;
|
|
968
|
-
addExtension(extensionLength: number, extensionVisible: boolean): void;
|
|
979
|
+
addExtension(extensionLength: number | NoteLengthStr | (NoteLengthStr | number)[], extensionVisible: boolean): void;
|
|
969
980
|
private enableExtension;
|
|
970
981
|
private disableExtension;
|
|
971
982
|
getEnding(): ObjEnding | undefined;
|
|
@@ -976,8 +987,8 @@ declare class ObjMeasure extends MusicObject {
|
|
|
976
987
|
hasEndSection(): boolean;
|
|
977
988
|
endRow(): void;
|
|
978
989
|
private addRhythmSymbol;
|
|
979
|
-
addNoteGroup(voiceId: number, notes: (Note | string)[], noteLength: NoteLength, options?: NoteOptions):
|
|
980
|
-
addRest(voiceId: number, restLength: NoteLength, options?: RestOptions):
|
|
990
|
+
addNoteGroup(voiceId: number, notes: (Note | string)[], noteLength: NoteLength | NoteLengthStr, options?: NoteOptions, tupletRatio?: TupletRatio): ObjNoteGroup;
|
|
991
|
+
addRest(voiceId: number, restLength: NoteLength | NoteLengthStr, options?: RestOptions, tupletRatio?: TupletRatio): ObjRest;
|
|
981
992
|
/**
|
|
982
993
|
*
|
|
983
994
|
* @param positionTicks - get ObjRhythmColumn with positionTicks. Insert new if necessary.
|
|
@@ -985,7 +996,7 @@ declare class ObjMeasure extends MusicObject {
|
|
|
985
996
|
*/
|
|
986
997
|
private getRhythmColumn;
|
|
987
998
|
getMeasureTicks(): number;
|
|
988
|
-
getConsumedTicks(voiceId?:
|
|
999
|
+
getConsumedTicks(voiceId?: VoiceId): number;
|
|
989
1000
|
getColumnsContentRect(): DivRect;
|
|
990
1001
|
getLeftSolidAreaWidth(): number;
|
|
991
1002
|
getMinColumnsAreaWidth(): number;
|
|
@@ -1001,12 +1012,13 @@ declare class ObjMeasure extends MusicObject {
|
|
|
1001
1012
|
createExtensions(): void;
|
|
1002
1013
|
addBeamGroup(beam: ObjBeamGroup): void;
|
|
1003
1014
|
requestBeamsUpdate(): void;
|
|
1015
|
+
private createOldStyleTriplets;
|
|
1004
1016
|
createBeams(): void;
|
|
1005
1017
|
private static setupBeamGroup;
|
|
1006
1018
|
getBarLineLeft(): ObjBarLineLeft;
|
|
1007
1019
|
getBarLineRight(): ObjBarLineRight;
|
|
1008
1020
|
getVoiceSymbols(voiceId: number): ReadonlyArray<RhythmSymbol>;
|
|
1009
|
-
completeRests(voiceId?:
|
|
1021
|
+
completeRests(voiceId?: VoiceId | VoiceId[]): void;
|
|
1010
1022
|
requestLayout(): void;
|
|
1011
1023
|
layout(renderer: Renderer): void;
|
|
1012
1024
|
layoutWidth(renderer: Renderer, width: number): void;
|
|
@@ -1096,6 +1108,8 @@ declare class ObjDocument extends MusicObject {
|
|
|
1096
1108
|
private addNewRow;
|
|
1097
1109
|
getFirstRow(): ObjScoreRow;
|
|
1098
1110
|
getLastRow(): ObjScoreRow;
|
|
1111
|
+
getRows(): ReadonlyArray<ObjScoreRow>;
|
|
1112
|
+
getMeasures(): ReadonlyArray<ObjMeasure>;
|
|
1099
1113
|
requestNewRow(): void;
|
|
1100
1114
|
addMeasure(): ObjMeasure;
|
|
1101
1115
|
addStaffGroup(groupName: string, layoutElements: number | string | (number | string)[], verticalPosition: VerticalPosition): void;
|
|
@@ -1257,11 +1271,12 @@ type ExtensionLineLeftObj = ObjBarLineLeft | MusicObject;
|
|
|
1257
1271
|
type ExtensionLineRightObj = ObjRhythmColumn | ObjBarLineRight;
|
|
1258
1272
|
declare class ObjExtensionLine extends MusicObject {
|
|
1259
1273
|
readonly measure: ObjMeasure;
|
|
1274
|
+
readonly line: ObjNotationLine;
|
|
1260
1275
|
readonly extension: Extension;
|
|
1261
1276
|
readonly leftObj: ExtensionLineLeftObj;
|
|
1262
1277
|
readonly rightObj: ExtensionLineRightObj;
|
|
1263
1278
|
readonly mi: MExtensionLine;
|
|
1264
|
-
constructor(measure: ObjMeasure, extension: Extension, leftObj: ExtensionLineLeftObj, rightObj: ExtensionLineRightObj);
|
|
1279
|
+
constructor(measure: ObjMeasure, line: ObjNotationLine, extension: Extension, leftObj: ExtensionLineLeftObj, rightObj: ExtensionLineRightObj);
|
|
1265
1280
|
get row(): ObjScoreRow;
|
|
1266
1281
|
getMusicInterface(): MExtensionLine;
|
|
1267
1282
|
private getLineLeft;
|
|
@@ -1494,6 +1509,8 @@ declare class MArpeggio extends MusicInterface {
|
|
|
1494
1509
|
constructor(obj: ObjArpeggio);
|
|
1495
1510
|
/** @internal */
|
|
1496
1511
|
getMusicObject(): ObjArpeggio;
|
|
1512
|
+
getRhythmColumn(): MRhythmColumn;
|
|
1513
|
+
getNotationLine(): MStaff | MTab;
|
|
1497
1514
|
}
|
|
1498
1515
|
declare class MBeamGroup extends MusicInterface {
|
|
1499
1516
|
private readonly obj;
|
|
@@ -1510,6 +1527,7 @@ declare class MStaffBeamGroup extends MusicInterface {
|
|
|
1510
1527
|
constructor(obj: ObjStaffBeamGroup);
|
|
1511
1528
|
/** @internal */
|
|
1512
1529
|
getMusicObject(): ObjStaffBeamGroup;
|
|
1530
|
+
getStaff(): MStaff;
|
|
1513
1531
|
}
|
|
1514
1532
|
declare class MDocument extends MusicInterface {
|
|
1515
1533
|
private readonly obj;
|
|
@@ -1521,6 +1539,8 @@ declare class MDocument extends MusicInterface {
|
|
|
1521
1539
|
getTitle(): string | undefined;
|
|
1522
1540
|
getComposer(): string | undefined;
|
|
1523
1541
|
getArranger(): string | undefined;
|
|
1542
|
+
getRows(): ReadonlyArray<MScoreRow>;
|
|
1543
|
+
getMeasures(): ReadonlyArray<MMeasure>;
|
|
1524
1544
|
play(fn?: PlayStateChangeListener): MPlayer;
|
|
1525
1545
|
}
|
|
1526
1546
|
declare class MEnding extends MusicInterface {
|
|
@@ -1569,6 +1589,7 @@ declare class MMeasure extends MusicInterface {
|
|
|
1569
1589
|
getMusicObject(): ObjMeasure;
|
|
1570
1590
|
getMeasureNumber(): number;
|
|
1571
1591
|
getRhythmColumns(): ReadonlyArray<MRhythmColumn>;
|
|
1592
|
+
getRow(): MScoreRow;
|
|
1572
1593
|
}
|
|
1573
1594
|
declare class MBarLineRight extends MusicInterface {
|
|
1574
1595
|
private readonly obj;
|
|
@@ -1593,6 +1614,8 @@ declare class MStaffTabBarLine extends MusicInterface {
|
|
|
1593
1614
|
constructor(obj: ObjStaffTabBarLine);
|
|
1594
1615
|
/** @internal */
|
|
1595
1616
|
getMusicObject(): ObjStaffTabBarLine;
|
|
1617
|
+
getBarLine(): MBarLineLeft | MBarLineRight;
|
|
1618
|
+
getNotationLine(): MStaff | MTab;
|
|
1596
1619
|
}
|
|
1597
1620
|
declare class MNoteGroup extends MusicInterface {
|
|
1598
1621
|
private readonly obj;
|
|
@@ -1603,6 +1626,8 @@ declare class MNoteGroup extends MusicInterface {
|
|
|
1603
1626
|
getMusicObject(): ObjNoteGroup;
|
|
1604
1627
|
getNotes(): ReadonlyArray<Note>;
|
|
1605
1628
|
getRhythmProps(): RhythmProps;
|
|
1629
|
+
getRhythmColumn(): MRhythmColumn;
|
|
1630
|
+
getMeasure(): MMeasure;
|
|
1606
1631
|
}
|
|
1607
1632
|
declare class MStaffNoteGroup extends MusicInterface {
|
|
1608
1633
|
private readonly obj;
|
|
@@ -1612,6 +1637,9 @@ declare class MStaffNoteGroup extends MusicInterface {
|
|
|
1612
1637
|
/** @internal */
|
|
1613
1638
|
getMusicObject(): ObjStaffNoteGroup;
|
|
1614
1639
|
getNoteGroup(): MNoteGroup;
|
|
1640
|
+
getRhythmColumn(): MRhythmColumn;
|
|
1641
|
+
getMeasure(): MMeasure;
|
|
1642
|
+
getStaff(): MStaff;
|
|
1615
1643
|
}
|
|
1616
1644
|
declare class MTabNoteGroup extends MusicInterface {
|
|
1617
1645
|
private readonly obj;
|
|
@@ -1621,6 +1649,9 @@ declare class MTabNoteGroup extends MusicInterface {
|
|
|
1621
1649
|
/** @internal */
|
|
1622
1650
|
getMusicObject(): ObjTabNoteGroup;
|
|
1623
1651
|
getNoteGroup(): MNoteGroup;
|
|
1652
|
+
getRhythmColumn(): MRhythmColumn;
|
|
1653
|
+
getMeasure(): MMeasure;
|
|
1654
|
+
getTab(): MTab;
|
|
1624
1655
|
}
|
|
1625
1656
|
declare class MRest extends MusicInterface {
|
|
1626
1657
|
private readonly obj;
|
|
@@ -1630,6 +1661,8 @@ declare class MRest extends MusicInterface {
|
|
|
1630
1661
|
/** @internal */
|
|
1631
1662
|
getMusicObject(): ObjRest;
|
|
1632
1663
|
getRhythmProps(): RhythmProps;
|
|
1664
|
+
getRhythmColumn(): MRhythmColumn;
|
|
1665
|
+
getMeasure(): MMeasure;
|
|
1633
1666
|
}
|
|
1634
1667
|
declare class MStaffRest extends MusicInterface {
|
|
1635
1668
|
private readonly obj;
|
|
@@ -1639,6 +1672,9 @@ declare class MStaffRest extends MusicInterface {
|
|
|
1639
1672
|
/** @internal */
|
|
1640
1673
|
getMusicObject(): ObjStaffRest;
|
|
1641
1674
|
getRest(): MRest;
|
|
1675
|
+
getRhythmColumn(): MRhythmColumn;
|
|
1676
|
+
getMeasure(): MMeasure;
|
|
1677
|
+
getStaff(): MStaff;
|
|
1642
1678
|
}
|
|
1643
1679
|
declare class MRhythmColumn extends MusicInterface {
|
|
1644
1680
|
private readonly obj;
|
|
@@ -1648,6 +1684,8 @@ declare class MRhythmColumn extends MusicInterface {
|
|
|
1648
1684
|
/** @internal */
|
|
1649
1685
|
getMusicObject(): ObjRhythmColumn;
|
|
1650
1686
|
getRhythmSymbol(voiceId: number): MNoteGroup | MRest | undefined;
|
|
1687
|
+
getMeasure(): MMeasure;
|
|
1688
|
+
getVoiceSymbol(voiceId: VoiceId): MNoteGroup | MRest | undefined;
|
|
1651
1689
|
}
|
|
1652
1690
|
declare class MScoreRow extends MusicInterface {
|
|
1653
1691
|
private readonly obj;
|
|
@@ -1656,7 +1694,9 @@ declare class MScoreRow extends MusicInterface {
|
|
|
1656
1694
|
constructor(obj: ObjScoreRow);
|
|
1657
1695
|
/** @internal */
|
|
1658
1696
|
getMusicObject(): ObjScoreRow;
|
|
1697
|
+
getDocument(): MDocument;
|
|
1659
1698
|
getMeasures(): ReadonlyArray<MMeasure>;
|
|
1699
|
+
getNotationLines(): ReadonlyArray<MStaff | MTab>;
|
|
1660
1700
|
}
|
|
1661
1701
|
declare class MStaff extends MusicInterface {
|
|
1662
1702
|
private readonly obj;
|
|
@@ -1665,6 +1705,9 @@ declare class MStaff extends MusicInterface {
|
|
|
1665
1705
|
constructor(obj: ObjStaff);
|
|
1666
1706
|
/** @internal */
|
|
1667
1707
|
getMusicObject(): ObjStaff;
|
|
1708
|
+
getId(): number;
|
|
1709
|
+
getName(): string | undefined;
|
|
1710
|
+
getRow(): MScoreRow;
|
|
1668
1711
|
}
|
|
1669
1712
|
declare class MTab extends MusicInterface {
|
|
1670
1713
|
private readonly obj;
|
|
@@ -1673,6 +1716,9 @@ declare class MTab extends MusicInterface {
|
|
|
1673
1716
|
constructor(obj: ObjTab);
|
|
1674
1717
|
/** @internal */
|
|
1675
1718
|
getMusicObject(): ObjTab;
|
|
1719
|
+
getId(): number;
|
|
1720
|
+
getName(): string | undefined;
|
|
1721
|
+
getRow(): MScoreRow;
|
|
1676
1722
|
}
|
|
1677
1723
|
declare class MSignature extends MusicInterface {
|
|
1678
1724
|
private readonly obj;
|
|
@@ -1681,6 +1727,7 @@ declare class MSignature extends MusicInterface {
|
|
|
1681
1727
|
constructor(obj: ObjSignature);
|
|
1682
1728
|
/** @internal */
|
|
1683
1729
|
getMusicObject(): ObjSignature;
|
|
1730
|
+
getStaff(): MStaff;
|
|
1684
1731
|
}
|
|
1685
1732
|
declare class MSpecialText extends MusicInterface {
|
|
1686
1733
|
private readonly obj;
|
|
@@ -1689,6 +1736,7 @@ declare class MSpecialText extends MusicInterface {
|
|
|
1689
1736
|
constructor(obj: ObjSpecialText);
|
|
1690
1737
|
/** @internal */
|
|
1691
1738
|
getMusicObject(): ObjSpecialText;
|
|
1739
|
+
getText(): string;
|
|
1692
1740
|
}
|
|
1693
1741
|
declare class MText extends MusicInterface {
|
|
1694
1742
|
private readonly obj;
|
|
@@ -1756,4 +1804,4 @@ declare class MPlaybackButtons {
|
|
|
1756
1804
|
private static addOnClickListener;
|
|
1757
1805
|
}
|
|
1758
1806
|
|
|
1759
|
-
export { type
|
|
1807
|
+
export { type StaffConfig as $, Annotation as A, MStaffNoteGroup as B, Connective as C, DivRect as D, MTabNoteGroup as E, Fermata as F, MRest as G, MStaffRest as H, MRhythmColumn as I, MScoreRow as J, MStaff as K, Label as L, MDocument as M, type NoteOptions as N, MTab as O, MSignature as P, MSpecialText as Q, type RestOptions as R, StaffPreset as S, type TupletOptions as T, MText as U, type VoiceId as V, MExtensionLine as W, MPlayer as X, MRenderer as Y, MPlaybackButtons as Z, Clef as _, type ScoreConfiguration as a, type TabConfig as a0, getVoiceIds as a1, type StringNumber as a2, getStringNumbers as a3, Stem as a4, Arpeggio as a5, type StaffTabOrGroup as a6, PlayState as a7, type PlayStateChangeListener as a8, type StaffTabOrGroups as b, Navigation as c, TieType as d, NoteAnchor as e, VerticalPosition as f, type ScoreEventType as g, ScoreEvent as h, ScoreStaffPosEvent as i, ScoreObjectEvent as j, type ScoreEventListener as k, MusicInterface as l, MAccidental as m, MConnective as n, MArpeggio as o, MBeamGroup as p, MStaffBeamGroup as q, MEnding as r, MFermata as s, MHeader as t, MImage as u, MMeasure as v, MBarLineRight as w, MBarLineLeft as x, MStaffTabBarLine as y, MNoteGroup as z };
|