@tspro/web-music-score 3.2.0 → 4.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +38 -10
- package/README.md +189 -331
- package/dist/audio/index.d.mts +40 -1
- package/dist/audio/index.d.ts +40 -1
- package/dist/audio/index.js +1 -1
- package/dist/audio/index.mjs +2 -2
- package/dist/audio-cg/index.d.mts +3 -0
- package/dist/audio-cg/index.d.ts +3 -0
- package/dist/audio-cg/index.js +1 -1
- package/dist/audio-cg/index.mjs +2 -2
- package/dist/{chunk-LCTM7BID.mjs → chunk-YFPLOHP2.mjs} +2 -2
- package/dist/core/index.d.mts +12 -0
- package/dist/core/index.d.ts +12 -0
- package/dist/core/index.js +3 -2
- package/dist/core/index.mjs +4 -3
- package/dist/guitar-CaZJDA05.d.ts +35 -0
- package/dist/guitar-DdexKdN6.d.mts +35 -0
- package/dist/iife/index.global.js +11 -11
- package/dist/{interface-Bn5HFt_U.d.mts → music-objects-DJQ4d2OA.d.mts} +640 -136
- package/dist/{interface-BlNl69uT.d.ts → music-objects-Dc3kR-XF.d.ts} +640 -136
- package/dist/note-eA2xPPiG.d.mts +294 -0
- package/dist/note-eA2xPPiG.d.ts +294 -0
- package/dist/pieces/index.d.mts +22 -3
- package/dist/pieces/index.d.ts +22 -3
- package/dist/pieces/index.js +7 -7
- package/dist/pieces/index.mjs +11 -11
- package/dist/react-ui/index.d.mts +166 -17
- package/dist/react-ui/index.d.ts +166 -17
- package/dist/react-ui/index.js +78 -1
- package/dist/react-ui/index.mjs +79 -2
- package/dist/scale-B2Icbetz.d.ts +230 -0
- package/dist/scale-BbDJTbrG.d.mts +230 -0
- package/dist/score/index.d.mts +359 -39
- package/dist/score/index.d.ts +359 -39
- package/dist/score/index.js +1252 -594
- package/dist/score/index.mjs +1255 -599
- package/dist/tempo-CtUhvJbr.d.mts +369 -0
- package/dist/tempo-Dt8aHpol.d.ts +369 -0
- package/dist/theory/index.d.mts +29 -13
- package/dist/theory/index.d.ts +29 -13
- package/dist/theory/index.js +583 -96
- package/dist/theory/index.mjs +580 -94
- package/package.json +2 -2
- package/dist/guitar-C2Cp71NZ.d.ts +0 -17
- package/dist/guitar-DggbM2UL.d.mts +0 -17
- package/dist/note-BFa43I86.d.mts +0 -85
- package/dist/note-BFa43I86.d.ts +0 -85
- package/dist/scale-DRR-t4Kr.d.mts +0 -74
- package/dist/scale-ebJm37q1.d.ts +0 -74
- package/dist/tempo-B4h5Ktob.d.mts +0 -104
- package/dist/tempo-DgqDEsn0.d.ts +0 -104
|
@@ -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-eA2xPPiG.mjs';
|
|
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-CtUhvJbr.mjs';
|
|
3
3
|
import { Vec2 } from '@tspro/ts-utils-lib';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -197,142 +197,244 @@ declare class DivRect {
|
|
|
197
197
|
getRect(): DivRect;
|
|
198
198
|
}
|
|
199
199
|
|
|
200
|
+
/** Staff preset values for score configuration. */
|
|
200
201
|
declare enum StaffPreset {
|
|
201
202
|
/** Treble staff has treble (G-) clef. */
|
|
202
|
-
Treble =
|
|
203
|
+
Treble = "treble",
|
|
203
204
|
/** Bass staff has bass (F-) clef. */
|
|
204
|
-
Bass =
|
|
205
|
+
Bass = "bass",
|
|
205
206
|
/** Grand staff has both treble and bass clefs. */
|
|
206
|
-
Grand =
|
|
207
|
+
Grand = "grand",
|
|
207
208
|
/** GuitarTreble has treble clef but is one octave lower. */
|
|
208
|
-
GuitarTreble =
|
|
209
|
+
GuitarTreble = "guitarTreble",
|
|
209
210
|
/** GuitarTab has tab for guitar. */
|
|
210
|
-
GuitarTab =
|
|
211
|
+
GuitarTab = "guitarTab",
|
|
211
212
|
/** GuitarCombined has treble clef and tab for guitar. */
|
|
212
|
-
GuitarCombined =
|
|
213
|
+
GuitarCombined = "guitarCombined"
|
|
213
214
|
}
|
|
215
|
+
/** Clef for staff notation lines. */
|
|
214
216
|
declare enum Clef {
|
|
217
|
+
/** G-clef (treble cleff) */
|
|
215
218
|
G = "G",
|
|
219
|
+
/** F-clef (bass cleff) */
|
|
216
220
|
F = "F"
|
|
217
221
|
}
|
|
222
|
+
/** Staff config to add staff notation line in score configuration. */
|
|
218
223
|
type StaffConfig = {
|
|
224
|
+
/** Config type, must be "staff" for staff config. */
|
|
219
225
|
type: "staff";
|
|
220
|
-
clef
|
|
226
|
+
/** G-clef or F-clef for this staff config? */
|
|
227
|
+
clef: Clef | `${Clef}`;
|
|
228
|
+
/** Set name for this staff config. */
|
|
221
229
|
name?: string;
|
|
230
|
+
/** Set octave down with G-clef for guitar treble staff notation line. */
|
|
222
231
|
isOctaveDown?: boolean;
|
|
232
|
+
/** Lowest note (e.g. "C2")that can be presented in this staff notation line. */
|
|
223
233
|
minNote?: string;
|
|
234
|
+
/** Highest note (e.g. "C6") that can be presented in this staff notation line. */
|
|
224
235
|
maxNote?: string;
|
|
236
|
+
/** Voice ids that are presented in this staff notation line. */
|
|
225
237
|
voiceIds?: number[];
|
|
238
|
+
/** Set true for two staff configs with G-clef and F-clef to create grand staff. */
|
|
226
239
|
isGrand?: boolean;
|
|
227
240
|
};
|
|
241
|
+
/** Tab config to add guitar tab in score configuration. */
|
|
228
242
|
type TabConfig = {
|
|
243
|
+
/** Config type, must be "tab" for tab config. */
|
|
229
244
|
type: "tab";
|
|
245
|
+
/** Set name for this tab config. */
|
|
230
246
|
name?: string;
|
|
231
247
|
tuning?: string | string[];
|
|
248
|
+
/** Voice ids that are presented in this guitar tab notation line. */
|
|
232
249
|
voiceIds?: number[];
|
|
233
250
|
};
|
|
251
|
+
/** Score configuration. */
|
|
234
252
|
type ScoreConfiguration = StaffConfig | TabConfig | (StaffConfig | TabConfig)[];
|
|
253
|
+
/** VoiceId type. */
|
|
235
254
|
type VoiceId = 0 | 1 | 2 | 3;
|
|
255
|
+
/** Get supported VoiceIds. Returns [0, 1, 2, 3]. */
|
|
236
256
|
declare function getVoiceIds(): ReadonlyArray<VoiceId>;
|
|
257
|
+
/** Strng number type. */
|
|
237
258
|
type StringNumber = 1 | 2 | 3 | 4 | 5 | 6;
|
|
259
|
+
/** Get strin numbers. Returns [0, 1, 2, 3, 4, 5]. */
|
|
238
260
|
declare function getStringNumbers(): ReadonlyArray<StringNumber>;
|
|
261
|
+
/** Stem direction enum. */
|
|
239
262
|
declare enum Stem {
|
|
240
|
-
Auto
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
263
|
+
/** Auto stem direction. */
|
|
264
|
+
Auto = "auto",
|
|
265
|
+
/** Stem is upwards. */
|
|
266
|
+
Up = "up",
|
|
267
|
+
/** Stm is downwards. */
|
|
268
|
+
Down = "down"
|
|
269
|
+
}
|
|
270
|
+
/** Arpeggio direction enum. */
|
|
244
271
|
declare enum Arpeggio {
|
|
245
|
-
|
|
246
|
-
|
|
272
|
+
/** Upwards, chord played from lowes to highest. */
|
|
273
|
+
Up = "up",
|
|
274
|
+
/** Downwards, chord played from highest to loest. */
|
|
275
|
+
Down = "down"
|
|
247
276
|
}
|
|
277
|
+
/** Special tie length enum. */
|
|
248
278
|
declare enum TieType {
|
|
249
|
-
Stub
|
|
250
|
-
|
|
279
|
+
/** Stub tie is short tie that left anchors to note and has not right anchor point. */
|
|
280
|
+
Stub = "stub",
|
|
281
|
+
/** To measure end tie is tie that left anchors to note and right anchors to measure end. */
|
|
282
|
+
ToMeasureEnd = "toMeasureEnd"
|
|
251
283
|
}
|
|
284
|
+
/** Anchor point enum for connectives (ties, slurs, slides). */
|
|
252
285
|
declare enum NoteAnchor {
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
286
|
+
/** Automatically choose anchor point using simple logic. */
|
|
287
|
+
Auto = "auto",
|
|
288
|
+
/** Anchor connective above note head. */
|
|
289
|
+
Above = "above",
|
|
290
|
+
/** Anchor connective center/next to note head.*/
|
|
291
|
+
Center = "center",
|
|
292
|
+
/** Anchor connective below note head. */
|
|
293
|
+
Below = "below",
|
|
294
|
+
/** Anchor connective to stem tip. */
|
|
295
|
+
StemTip = "stemTip"
|
|
296
|
+
}
|
|
297
|
+
/** Connective enum. */
|
|
259
298
|
declare enum Connective {
|
|
260
|
-
Tie
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
299
|
+
/** Tie, connects two or more adjacent notes of same pitch with arc. */
|
|
300
|
+
Tie = "tie",
|
|
301
|
+
/** Slur, connects two or more adjacent notes of different pitch with arc. */
|
|
302
|
+
Slur = "slur",
|
|
303
|
+
/** Slide, connects two adjacent notes of different pitch with straight line. */
|
|
304
|
+
Slide = "slide"
|
|
305
|
+
}
|
|
306
|
+
/** Vertical position enum used to layout notation elements. */
|
|
265
307
|
declare enum VerticalPosition {
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
308
|
+
/** Automatic/default layout position depending on element. */
|
|
309
|
+
Auto = "auto",
|
|
310
|
+
/** Add element above staff/tab. */
|
|
311
|
+
Above = "above",
|
|
312
|
+
/** Add element below staff/tab. */
|
|
313
|
+
Below = "below",
|
|
314
|
+
/** Add element both above and below staff/tab. */
|
|
315
|
+
Both = "both"
|
|
316
|
+
}
|
|
317
|
+
/** Staff/tab/group type can be staff/tab index or staff/tab/group name. */
|
|
271
318
|
type StaffTabOrGroup = number | string;
|
|
319
|
+
/** Staff/tab/group snglevalue or array of values. */
|
|
272
320
|
type StaffTabOrGroups = StaffTabOrGroup | StaffTabOrGroup[];
|
|
321
|
+
/** Options for notes/chords. */
|
|
273
322
|
type NoteOptions = {
|
|
274
|
-
|
|
275
|
-
stem?: Stem
|
|
323
|
+
/** Stem direction. */
|
|
324
|
+
stem?: Stem | `${Stem}`;
|
|
325
|
+
/** Set color. */
|
|
276
326
|
color?: string;
|
|
277
|
-
|
|
327
|
+
/** Arepggio direction for chords. true = "up". */
|
|
328
|
+
arpeggio?: boolean | Arpeggio | `${Arpeggio}`;
|
|
329
|
+
/** Add staccato dot. */
|
|
278
330
|
staccato?: boolean;
|
|
331
|
+
/** Use diamond shaped note head. */
|
|
279
332
|
diamond?: boolean;
|
|
280
|
-
|
|
333
|
+
/** Set string number (array of numbers for chord) to use in guitar tab. */
|
|
281
334
|
string?: StringNumber | StringNumber[];
|
|
335
|
+
/** @deprecated - Use triplet NoteLength values instead, e.g. NoteLength.QuarterTriplet or "4t", etc. */
|
|
336
|
+
triplet?: boolean;
|
|
337
|
+
/** @deprecated - Use dotted NoteLength values instead, e.g. NoteLength.Quarter2Dots or "4..", etc. */
|
|
338
|
+
dotted?: boolean | number;
|
|
282
339
|
};
|
|
340
|
+
/** Options for rests. */
|
|
283
341
|
type RestOptions = {
|
|
284
|
-
|
|
342
|
+
/** Set staff position for this rest. Can be instance of Note, string (e.g. "C3"), or midiNumber. */
|
|
285
343
|
staffPos?: Note | string | number;
|
|
344
|
+
/** Set color. */
|
|
286
345
|
color?: string;
|
|
346
|
+
/** Hide this rest, still affects playing. */
|
|
287
347
|
hide?: boolean;
|
|
348
|
+
/** @deprecated - Use triplet NoteLength values instead, e.g. NoteLength.QuarterTriplet or "4t", etc. */
|
|
288
349
|
triplet?: boolean;
|
|
350
|
+
/** @deprecated - Use dotted NoteLength values instead, e.g. NoteLength.Quarter2Dots or "4..", etc. */
|
|
351
|
+
dotted?: boolean | number;
|
|
289
352
|
};
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
}
|
|
295
|
-
|
|
353
|
+
/** Tuplet options. */
|
|
354
|
+
type TupletOptions = {
|
|
355
|
+
/** Show tuplet ratio (e.g. "3:2") instead of number of parts (e.g. "3"). */
|
|
356
|
+
showRatio?: boolean;
|
|
357
|
+
};
|
|
358
|
+
/** Fermata enum. */
|
|
296
359
|
declare enum Fermata {
|
|
297
|
-
|
|
298
|
-
|
|
360
|
+
/** Anchor fermata to note/rest. */
|
|
361
|
+
AtNote = "atNote",
|
|
362
|
+
/** Anchor fermata to measure end. */
|
|
363
|
+
AtMeasureEnd = "atMeasureEnd"
|
|
299
364
|
}
|
|
365
|
+
/** Navigation element enum. */
|
|
300
366
|
declare enum Navigation {
|
|
301
367
|
/** Repeat back to beginning and play to the "Fine" marking. */
|
|
302
|
-
DC_al_Fine =
|
|
368
|
+
DC_al_Fine = "D.C. al Fine",
|
|
303
369
|
/** Repeat back to beginning and play to the "to Coda 𝄌", then jump to the "𝄌 Coda". */
|
|
304
|
-
DC_al_Coda =
|
|
370
|
+
DC_al_Coda = "D.C. al Coda",
|
|
305
371
|
/** Repeat back to Segno sign (𝄋) and play to the "Fine" marking. */
|
|
306
|
-
DS_al_Fine =
|
|
372
|
+
DS_al_Fine = "D.S. al Fine",
|
|
307
373
|
/** Repeat back to Segno sign (𝄋) and play to the "to Coda 𝄌", then jump to the "𝄌 Coda". */
|
|
308
|
-
DS_al_Coda =
|
|
374
|
+
DS_al_Coda = "D.S. al Coda",
|
|
309
375
|
/** "𝄌 Coda" section. */
|
|
310
|
-
Coda =
|
|
376
|
+
Coda = "Coda",
|
|
311
377
|
/** From "toCoda 𝄌" jump to the "𝄌 Coda" section. */
|
|
312
|
-
toCoda =
|
|
378
|
+
toCoda = "toCoda",
|
|
313
379
|
/** Jump here from D.S. al Fine or D.S. al Coda. */
|
|
314
|
-
Segno =
|
|
380
|
+
Segno = "Segno",
|
|
315
381
|
/** Stop playing after D.C. al Fine or D.S. al Fine. */
|
|
316
|
-
Fine =
|
|
382
|
+
Fine = "Fine",
|
|
317
383
|
/** Start of repeat section. */
|
|
318
|
-
StartRepeat =
|
|
384
|
+
StartRepeat = "startRepeat",
|
|
319
385
|
/** End of repeat section. Jump to start of repeat section. */
|
|
320
|
-
EndRepeat =
|
|
386
|
+
EndRepeat = "endRepeat",
|
|
321
387
|
/** Jump to ending with correct passage number. */
|
|
322
|
-
Ending =
|
|
388
|
+
Ending = "ending"
|
|
323
389
|
}
|
|
390
|
+
/** Annotation element enum. */
|
|
324
391
|
declare enum Annotation {
|
|
325
392
|
/** "ppp", "pp", "p", "mp", "m", "mf", "f", "ff", "fff", "cresc.", "decresc.", "dim." */
|
|
326
|
-
Dynamics =
|
|
393
|
+
Dynamics = "dynamics",
|
|
327
394
|
/** "accel.", "rit.", "a tempo" */
|
|
328
|
-
Tempo =
|
|
329
|
-
}
|
|
395
|
+
Tempo = "tempo"
|
|
396
|
+
}
|
|
397
|
+
/** Some known dynamics annotations. */
|
|
398
|
+
declare enum DynamicsAnnotation {
|
|
399
|
+
cresc = "cresc.",
|
|
400
|
+
decresc = "decresc.",
|
|
401
|
+
dim = "dim.",
|
|
402
|
+
ppp = "ppp",
|
|
403
|
+
pp = "pp",
|
|
404
|
+
p = "p",
|
|
405
|
+
mp = "mp",
|
|
406
|
+
m = "m",
|
|
407
|
+
mf = "mf",
|
|
408
|
+
f = "f",
|
|
409
|
+
ff = "ff",
|
|
410
|
+
fff = "fff"
|
|
411
|
+
}
|
|
412
|
+
/** Some known tempo annotations. */
|
|
413
|
+
declare enum TempoAnnotation {
|
|
414
|
+
accel = "accel.",
|
|
415
|
+
rit = "rit.",
|
|
416
|
+
a_tempo = "a tempo"
|
|
417
|
+
}
|
|
418
|
+
/** Known annotation test type. */
|
|
419
|
+
type AnnotationText = `${DynamicsAnnotation}` | `${TempoAnnotation}`;
|
|
420
|
+
/** Label element enum. */
|
|
330
421
|
declare enum Label {
|
|
331
422
|
/** "C", "C#", "Db", "D", etc. */
|
|
332
|
-
Note =
|
|
423
|
+
Note = "note",
|
|
333
424
|
/** "C", "Am", "G7", etc. */
|
|
334
|
-
Chord =
|
|
425
|
+
Chord = "chord"
|
|
335
426
|
}
|
|
427
|
+
/** Play state enum. */
|
|
428
|
+
declare enum PlayState {
|
|
429
|
+
/** Playing. */
|
|
430
|
+
Playing = 0,
|
|
431
|
+
/** Paused. */
|
|
432
|
+
Paused = 1,
|
|
433
|
+
/** Stopped. */
|
|
434
|
+
Stopped = 2
|
|
435
|
+
}
|
|
436
|
+
/** Play state change listener type. */
|
|
437
|
+
type PlayStateChangeListener = (playState: PlayState) => void;
|
|
336
438
|
|
|
337
439
|
declare class AccidentalState {
|
|
338
440
|
readonly measure: ObjMeasure;
|
|
@@ -345,11 +447,11 @@ declare class AccidentalState {
|
|
|
345
447
|
|
|
346
448
|
declare class ConnectiveProps {
|
|
347
449
|
readonly connective: Connective;
|
|
348
|
-
readonly span:
|
|
450
|
+
readonly span: number | TieType | `${TieType}`;
|
|
349
451
|
noteAnchor: NoteAnchor;
|
|
350
452
|
noteGroups: ObjNoteGroup[];
|
|
351
453
|
arcDir: "up" | "down";
|
|
352
|
-
constructor(connective: Connective, span:
|
|
454
|
+
constructor(connective: Connective, span: number | TieType | `${TieType}`, noteAnchor: NoteAnchor, startNoteGroup: ObjNoteGroup);
|
|
353
455
|
getStartNoteGroup(): ObjNoteGroup;
|
|
354
456
|
startsWith(noteGroup: ObjNoteGroup): boolean;
|
|
355
457
|
/**
|
|
@@ -563,6 +665,7 @@ declare class ObjNoteGroup extends MusicObject {
|
|
|
563
665
|
readonly staccato: boolean;
|
|
564
666
|
readonly diamond: boolean;
|
|
565
667
|
readonly arpeggio: Arpeggio | undefined;
|
|
668
|
+
readonly oldStyleTriplet: boolean;
|
|
566
669
|
readonly rhythmProps: RhythmProps;
|
|
567
670
|
private startConnnectives;
|
|
568
671
|
private runningConnectives;
|
|
@@ -572,13 +675,12 @@ declare class ObjNoteGroup extends MusicObject {
|
|
|
572
675
|
private readonly staffObjects;
|
|
573
676
|
private readonly tabObjects;
|
|
574
677
|
readonly mi: MNoteGroup;
|
|
575
|
-
constructor(col: ObjRhythmColumn, voiceId: number, notes: ReadonlyArray<Note>, noteLength: NoteLength, options?: NoteOptions);
|
|
678
|
+
constructor(col: ObjRhythmColumn, voiceId: number, notes: ReadonlyArray<Note>, noteLength: NoteLength | NoteLengthStr, options?: NoteOptions, tupletRatio?: TupletRatio);
|
|
576
679
|
getMusicInterface(): MNoteGroup;
|
|
577
680
|
get doc(): ObjDocument;
|
|
578
681
|
get measure(): ObjMeasure;
|
|
579
682
|
get row(): ObjScoreRow;
|
|
580
683
|
get stemDir(): Stem.Up | Stem.Down;
|
|
581
|
-
get triplet(): boolean;
|
|
582
684
|
enableConnective(line: ObjNotationLine): boolean;
|
|
583
685
|
startConnective(connectiveProps: ConnectiveProps): void;
|
|
584
686
|
getStaticObjects(line: ObjNotationLine): ReadonlyArray<MusicObject>;
|
|
@@ -596,7 +698,7 @@ declare class ObjNoteGroup extends MusicObject {
|
|
|
596
698
|
removeConnectiveProps(): void;
|
|
597
699
|
getPlaySlur(): "first" | "slurred" | undefined;
|
|
598
700
|
getBeamGroup(): ObjBeamGroup | undefined;
|
|
599
|
-
setBeamGroup(
|
|
701
|
+
setBeamGroup(beamGroup: ObjBeamGroup): void;
|
|
600
702
|
resetBeamGroup(): void;
|
|
601
703
|
getBeamCoords(): ({
|
|
602
704
|
staff: ObjStaff;
|
|
@@ -618,15 +720,15 @@ declare class ObjNoteGroup extends MusicObject {
|
|
|
618
720
|
offset(dx: number, dy: number): void;
|
|
619
721
|
draw(renderer: Renderer): void;
|
|
620
722
|
static setBeamCounts(groupNotes: (ObjNoteGroup | undefined)[]): void;
|
|
621
|
-
static
|
|
723
|
+
static setTupletBeamCounts(tuplet: ObjBeamGroup): void;
|
|
622
724
|
getDotVerticalDisplacement(staff: ObjStaff, diatonicId: number, stemDir: Stem): 1 | 0 | -1;
|
|
623
725
|
static hasSameNotes(ng1: ObjNoteGroup, ng2: ObjNoteGroup): boolean;
|
|
624
726
|
}
|
|
625
727
|
|
|
626
728
|
declare enum BeamGroupType {
|
|
627
729
|
RegularBeam = 0,
|
|
628
|
-
|
|
629
|
-
|
|
730
|
+
TupletBeam = 1,
|
|
731
|
+
TupletGroup = 2
|
|
630
732
|
}
|
|
631
733
|
declare class BeamPoint {
|
|
632
734
|
staff: ObjStaff;
|
|
@@ -643,8 +745,8 @@ declare class BeamPoint {
|
|
|
643
745
|
declare class ObjStaffBeamGroup extends MusicObject {
|
|
644
746
|
readonly staff: ObjStaff;
|
|
645
747
|
readonly beamGroup: ObjBeamGroup;
|
|
646
|
-
|
|
647
|
-
|
|
748
|
+
tupletNumber?: ObjText;
|
|
749
|
+
tupletNumberOffsetY: number;
|
|
648
750
|
points: BeamPoint[];
|
|
649
751
|
readonly mi: MStaffBeamGroup;
|
|
650
752
|
constructor(staff: ObjStaff, beamGroup: ObjBeamGroup);
|
|
@@ -655,18 +757,21 @@ declare class ObjStaffBeamGroup extends MusicObject {
|
|
|
655
757
|
}
|
|
656
758
|
declare class ObjBeamGroup extends MusicObject {
|
|
657
759
|
private readonly symbols;
|
|
760
|
+
readonly tupletRatio: TupletRatio & TupletOptions | undefined;
|
|
658
761
|
readonly mi: MBeamGroup;
|
|
659
762
|
private readonly type;
|
|
660
763
|
private readonly staffObjects;
|
|
661
764
|
private constructor();
|
|
765
|
+
private get showTupletRatio();
|
|
662
766
|
static createBeam(noteGroups: ObjNoteGroup[]): void;
|
|
663
|
-
static
|
|
767
|
+
static createOldStyleTriplet(symbols: RhythmSymbol[]): number;
|
|
768
|
+
static createTuplet(symbols: RhythmSymbol[], tupletRatio: TupletRatio & TupletOptions): void;
|
|
664
769
|
getMusicInterface(): MBeamGroup;
|
|
665
770
|
detach(): void;
|
|
666
771
|
isEmpty(): boolean;
|
|
667
772
|
pick(x: number, y: number): MusicObject[];
|
|
668
773
|
getType(): BeamGroupType;
|
|
669
|
-
|
|
774
|
+
isTuplet(): boolean;
|
|
670
775
|
getSymbols(): ReadonlyArray<RhythmSymbol>;
|
|
671
776
|
getFirstSymbol(): RhythmSymbol | undefined;
|
|
672
777
|
getLastSymbol(): RhythmSymbol | undefined;
|
|
@@ -682,7 +787,7 @@ declare class ObjStaffRest extends MusicObject {
|
|
|
682
787
|
readonly staff: ObjStaff;
|
|
683
788
|
readonly rest: ObjRest;
|
|
684
789
|
restRect: DivRect;
|
|
685
|
-
|
|
790
|
+
dotRects: DivRect[];
|
|
686
791
|
readonly mi: MStaffRest;
|
|
687
792
|
constructor(staff: ObjStaff, rest: ObjRest);
|
|
688
793
|
getMusicInterface(): MusicInterface;
|
|
@@ -697,23 +802,22 @@ declare class ObjRest extends MusicObject {
|
|
|
697
802
|
readonly ownDiatonicId: number;
|
|
698
803
|
readonly color: string;
|
|
699
804
|
readonly hide: boolean;
|
|
805
|
+
readonly oldStyleTriplet: boolean;
|
|
700
806
|
readonly rhythmProps: RhythmProps;
|
|
701
807
|
private beamGroup?;
|
|
702
808
|
readonly staffObjects: ObjStaffRest[];
|
|
703
809
|
readonly mi: MRest;
|
|
704
|
-
constructor(col: ObjRhythmColumn, voiceId: number, noteLength: NoteLength, options?: RestOptions);
|
|
810
|
+
constructor(col: ObjRhythmColumn, voiceId: number, noteLength: NoteLength | NoteLengthStr, options?: RestOptions, tupletRatio?: TupletRatio);
|
|
705
811
|
getMusicInterface(): MRest;
|
|
706
812
|
get doc(): ObjDocument;
|
|
707
813
|
get measure(): ObjMeasure;
|
|
708
814
|
get row(): ObjScoreRow;
|
|
709
815
|
get noteLength(): NoteLength;
|
|
710
|
-
get dotted(): boolean;
|
|
711
816
|
get stemDir(): Stem.Up | Stem.Down;
|
|
712
|
-
get triplet(): boolean;
|
|
713
817
|
getStaticObjects(line: ObjNotationLine): ReadonlyArray<MusicObject>;
|
|
714
818
|
pick(x: number, y: number): MusicObject[];
|
|
715
819
|
getBeamGroup(): ObjBeamGroup | undefined;
|
|
716
|
-
setBeamGroup(
|
|
820
|
+
setBeamGroup(beamGroup: ObjBeamGroup): void;
|
|
717
821
|
resetBeamGroup(): void;
|
|
718
822
|
getBeamCoords(): ({
|
|
719
823
|
staff: ObjStaff;
|
|
@@ -953,7 +1057,7 @@ declare class ObjMeasure extends MusicObject {
|
|
|
953
1057
|
setTimeSignature(timeSignature: TimeSignature | TimeSignatureString): void;
|
|
954
1058
|
updateTimeSignature(): void;
|
|
955
1059
|
getTempo(): Tempo;
|
|
956
|
-
setTempo(beatsPerMinute: number, beatLength?: NoteLength, dotted?: boolean): void;
|
|
1060
|
+
setTempo(beatsPerMinute: number, beatLength?: NoteLength | NoteLengthStr, dotted?: boolean | number): void;
|
|
957
1061
|
updateTempo(): void;
|
|
958
1062
|
hasPostMeasureBreak(): boolean;
|
|
959
1063
|
getPostMeasureBreakWidth(): number;
|
|
@@ -968,7 +1072,7 @@ declare class ObjMeasure extends MusicObject {
|
|
|
968
1072
|
addConnective(connective: Connective.Tie, tieSpan?: number | TieType, notAnchor?: NoteAnchor): void;
|
|
969
1073
|
addConnective(connective: Connective.Slur, slurSpan?: number, notAnchor?: NoteAnchor): void;
|
|
970
1074
|
addConnective(connective: Connective.Slide, notAnchor?: NoteAnchor): void;
|
|
971
|
-
addExtension(extensionLength: number, extensionVisible: boolean): void;
|
|
1075
|
+
addExtension(extensionLength: number | NoteLengthStr | (NoteLengthStr | number)[], extensionVisible: boolean): void;
|
|
972
1076
|
private enableExtension;
|
|
973
1077
|
private disableExtension;
|
|
974
1078
|
getEnding(): ObjEnding | undefined;
|
|
@@ -979,8 +1083,8 @@ declare class ObjMeasure extends MusicObject {
|
|
|
979
1083
|
hasEndSection(): boolean;
|
|
980
1084
|
endRow(): void;
|
|
981
1085
|
private addRhythmSymbol;
|
|
982
|
-
addNoteGroup(voiceId: number, notes: (Note | string)[], noteLength: NoteLength, options?: NoteOptions):
|
|
983
|
-
addRest(voiceId: number, restLength: NoteLength, options?: RestOptions):
|
|
1086
|
+
addNoteGroup(voiceId: number, notes: (Note | string)[], noteLength: NoteLength | NoteLengthStr, options?: NoteOptions, tupletRatio?: TupletRatio): ObjNoteGroup;
|
|
1087
|
+
addRest(voiceId: number, restLength: NoteLength | NoteLengthStr, options?: RestOptions, tupletRatio?: TupletRatio): ObjRest;
|
|
984
1088
|
/**
|
|
985
1089
|
*
|
|
986
1090
|
* @param positionTicks - get ObjRhythmColumn with positionTicks. Insert new if necessary.
|
|
@@ -988,7 +1092,7 @@ declare class ObjMeasure extends MusicObject {
|
|
|
988
1092
|
*/
|
|
989
1093
|
private getRhythmColumn;
|
|
990
1094
|
getMeasureTicks(): number;
|
|
991
|
-
getConsumedTicks(voiceId?:
|
|
1095
|
+
getConsumedTicks(voiceId?: VoiceId): number;
|
|
992
1096
|
getColumnsContentRect(): DivRect;
|
|
993
1097
|
getLeftSolidAreaWidth(): number;
|
|
994
1098
|
getMinColumnsAreaWidth(): number;
|
|
@@ -1010,7 +1114,7 @@ declare class ObjMeasure extends MusicObject {
|
|
|
1010
1114
|
getBarLineLeft(): ObjBarLineLeft;
|
|
1011
1115
|
getBarLineRight(): ObjBarLineRight;
|
|
1012
1116
|
getVoiceSymbols(voiceId: number): ReadonlyArray<RhythmSymbol>;
|
|
1013
|
-
completeRests(voiceId?:
|
|
1117
|
+
completeRests(voiceId?: VoiceId | VoiceId[]): void;
|
|
1014
1118
|
requestLayout(): void;
|
|
1015
1119
|
layout(renderer: Renderer): void;
|
|
1016
1120
|
layoutWidth(renderer: Renderer, width: number): void;
|
|
@@ -1450,350 +1554,750 @@ declare class ObjSignature extends MusicObject {
|
|
|
1450
1554
|
draw(renderer: Renderer): void;
|
|
1451
1555
|
}
|
|
1452
1556
|
|
|
1557
|
+
/** Score event type. */
|
|
1453
1558
|
type ScoreEventType = "enter" | "leave" | "click";
|
|
1559
|
+
/** Abstract score event class. */
|
|
1454
1560
|
declare abstract class ScoreEvent {
|
|
1455
1561
|
readonly type: ScoreEventType;
|
|
1562
|
+
/**
|
|
1563
|
+
* Create new score event instance.
|
|
1564
|
+
* @param type - Score event type.
|
|
1565
|
+
*/
|
|
1456
1566
|
constructor(type: ScoreEventType);
|
|
1457
1567
|
}
|
|
1568
|
+
/** Score staff position event for clicking/entering/leaving staff position (diatonic id) in staff notation line. */
|
|
1458
1569
|
declare class ScoreStaffPosEvent extends ScoreEvent {
|
|
1459
1570
|
readonly renderer: MRenderer;
|
|
1460
1571
|
readonly scoreRow: MScoreRow;
|
|
1461
1572
|
readonly diatonicId: number;
|
|
1573
|
+
/**
|
|
1574
|
+
* Create new score staff position event.
|
|
1575
|
+
* @param type - Score event type.
|
|
1576
|
+
* @param renderer - Renderer.
|
|
1577
|
+
* @param scoreRow - Score row.
|
|
1578
|
+
* @param diatonicId - Diatonic id that was clicked/entered/left.
|
|
1579
|
+
*/
|
|
1462
1580
|
constructor(type: ScoreEventType, renderer: MRenderer, scoreRow: MScoreRow, diatonicId: number);
|
|
1463
1581
|
}
|
|
1582
|
+
/** Score object event for clicking/entering/leaving score object. */
|
|
1464
1583
|
declare class ScoreObjectEvent extends ScoreEvent {
|
|
1465
1584
|
readonly renderer: MRenderer;
|
|
1466
1585
|
readonly objects: MusicInterface[];
|
|
1586
|
+
/**
|
|
1587
|
+
* Create new score object event.
|
|
1588
|
+
* @param type - Score event type.
|
|
1589
|
+
* @param renderer - Renderer.
|
|
1590
|
+
* @param objects - Array of objects, last object in this array is the top object that was clicked/entered/left, previous objects are it's parent objects.
|
|
1591
|
+
*/
|
|
1467
1592
|
constructor(type: ScoreEventType, renderer: MRenderer, objects: MusicInterface[]);
|
|
1593
|
+
/** Top object getter. */
|
|
1468
1594
|
get topObject(): MusicInterface;
|
|
1595
|
+
/**
|
|
1596
|
+
* Find object.
|
|
1597
|
+
* @param fn - Compare function.
|
|
1598
|
+
* @returns - First object that matched compare function, or undefined if no match.
|
|
1599
|
+
*/
|
|
1469
1600
|
findObject(fn: (obj: MusicInterface) => boolean): MusicInterface | undefined;
|
|
1470
1601
|
}
|
|
1602
|
+
/** Score event listener type. */
|
|
1471
1603
|
type ScoreEventListener = (event: ScoreEvent) => void;
|
|
1472
1604
|
|
|
1605
|
+
/** Music player class. */
|
|
1606
|
+
declare class MPlayer {
|
|
1607
|
+
private static currentlyPlaying;
|
|
1608
|
+
private readonly player;
|
|
1609
|
+
/**
|
|
1610
|
+
* Create new music player.
|
|
1611
|
+
* @param doc - Music document to play.
|
|
1612
|
+
* @param playStateChangeListener - Play state change listener.
|
|
1613
|
+
*/
|
|
1614
|
+
constructor(doc: MDocument, playStateChangeListener?: PlayStateChangeListener);
|
|
1615
|
+
/**
|
|
1616
|
+
* Stop all playing.
|
|
1617
|
+
*/
|
|
1618
|
+
static stopAll(): void;
|
|
1619
|
+
/**
|
|
1620
|
+
* Playe attached document.
|
|
1621
|
+
* @returns - This player instance.
|
|
1622
|
+
*/
|
|
1623
|
+
play(): this;
|
|
1624
|
+
/**
|
|
1625
|
+
* Pause playback of attached document.
|
|
1626
|
+
* @returns - This player instance.
|
|
1627
|
+
*/
|
|
1628
|
+
pause(): this;
|
|
1629
|
+
/**
|
|
1630
|
+
* Stop playback of attached document.
|
|
1631
|
+
* @returns - This player instance.
|
|
1632
|
+
*/
|
|
1633
|
+
stop(): this;
|
|
1634
|
+
}
|
|
1635
|
+
/** Renderer class. */
|
|
1636
|
+
declare class MRenderer {
|
|
1637
|
+
private readonly renderer;
|
|
1638
|
+
/**
|
|
1639
|
+
* Create new renderer instance.
|
|
1640
|
+
*/
|
|
1641
|
+
constructor();
|
|
1642
|
+
/**
|
|
1643
|
+
* Attach music document to this renderer.
|
|
1644
|
+
* @param doc - Music document.
|
|
1645
|
+
* @returns - This renderer instance.
|
|
1646
|
+
*/
|
|
1647
|
+
setDocument(doc?: MDocument): MRenderer;
|
|
1648
|
+
/**
|
|
1649
|
+
* Set target canvas html element for this renderer.
|
|
1650
|
+
* @param canvas - HTML canvas element or element id.
|
|
1651
|
+
* @returns - This renderer instance.
|
|
1652
|
+
*/
|
|
1653
|
+
setCanvas(canvas: HTMLCanvasElement | string): MRenderer;
|
|
1654
|
+
/**
|
|
1655
|
+
* Set score event listener.
|
|
1656
|
+
* @param scoreEventListener - Score event listener.
|
|
1657
|
+
*/
|
|
1658
|
+
setScoreEventListener(scoreEventListener: ScoreEventListener): void;
|
|
1659
|
+
/**
|
|
1660
|
+
* Draw given music object hilighted.
|
|
1661
|
+
* @param obj - Music object or undefined to remove hilighting.
|
|
1662
|
+
*/
|
|
1663
|
+
hilightObject(obj?: MusicInterface): void;
|
|
1664
|
+
/**
|
|
1665
|
+
* Draw given staff position hilighted.
|
|
1666
|
+
* @param staffPos - Staff position (score row and diatonic id) or undefined to remove hilighting.
|
|
1667
|
+
*/
|
|
1668
|
+
hilightStaffPos(staffPos?: {
|
|
1669
|
+
scoreRow: MScoreRow;
|
|
1670
|
+
diatonicId: number;
|
|
1671
|
+
}): void;
|
|
1672
|
+
/**
|
|
1673
|
+
* Draw contents of attached music document to attached canvas.
|
|
1674
|
+
*/
|
|
1675
|
+
draw(): void;
|
|
1676
|
+
}
|
|
1677
|
+
/** Playback buttons helper class. */
|
|
1678
|
+
declare class MPlaybackButtons {
|
|
1679
|
+
private playButton?;
|
|
1680
|
+
private stopButton?;
|
|
1681
|
+
private playStopButton?;
|
|
1682
|
+
private pauseButton?;
|
|
1683
|
+
private onPlay;
|
|
1684
|
+
private onStop;
|
|
1685
|
+
private onPlayStop;
|
|
1686
|
+
private onPause;
|
|
1687
|
+
private playLabel;
|
|
1688
|
+
private stopLabel;
|
|
1689
|
+
private pauseLabel;
|
|
1690
|
+
private playState;
|
|
1691
|
+
private player?;
|
|
1692
|
+
/**
|
|
1693
|
+
* Create new playback buttons helper class instance.
|
|
1694
|
+
*/
|
|
1695
|
+
constructor();
|
|
1696
|
+
/**
|
|
1697
|
+
* Attach music document whose playcak will be controlled by this playback buttons helper class instance.
|
|
1698
|
+
* @param doc - Music document.
|
|
1699
|
+
* @returns
|
|
1700
|
+
*/
|
|
1701
|
+
setDocument(doc?: MDocument): MPlaybackButtons;
|
|
1702
|
+
/**
|
|
1703
|
+
* Detach attached music document.
|
|
1704
|
+
*/
|
|
1705
|
+
detachDocument(): void;
|
|
1706
|
+
private updateButtons;
|
|
1707
|
+
/**
|
|
1708
|
+
* Set play button.
|
|
1709
|
+
* @param btn - HTML button element or element id.
|
|
1710
|
+
* @param btnLabel - Custom button label (e.g. "Play").
|
|
1711
|
+
* @returns - This playback buttons class instance.
|
|
1712
|
+
*/
|
|
1713
|
+
setPlayButton(btn: HTMLButtonElement | string, btnLabel?: string): MPlaybackButtons;
|
|
1714
|
+
/**
|
|
1715
|
+
* Set stop button.
|
|
1716
|
+
* @param btn - HTML button element or element id.
|
|
1717
|
+
* @param btnLabel - Custom button label (e.g. "Stop").
|
|
1718
|
+
* @returns - This playback buttons class instance.
|
|
1719
|
+
*/
|
|
1720
|
+
setStopButton(btn: HTMLButtonElement | string, btnLabel?: string): MPlaybackButtons;
|
|
1721
|
+
/**
|
|
1722
|
+
* Set play/stop button.
|
|
1723
|
+
* @param btn - HTML button element or element id.
|
|
1724
|
+
* @param playLabel - Custom button label for play action (e.g. "Play").
|
|
1725
|
+
* @param stopLabel - Custom button label for stop action (e.g. "Stop").
|
|
1726
|
+
* @returns - This playback buttons class instance.
|
|
1727
|
+
*/
|
|
1728
|
+
setPlayStopButton(btn: HTMLButtonElement | string, playLabel?: string, stopLabel?: string): MPlaybackButtons;
|
|
1729
|
+
/**
|
|
1730
|
+
* Set pause button.
|
|
1731
|
+
* @param btn - HTML button element or element id.
|
|
1732
|
+
* @param btnLabel - Custom button label (e.g. "Pause").
|
|
1733
|
+
* @returns - This playback buttons class instance.
|
|
1734
|
+
*/
|
|
1735
|
+
setPauseButton(btn: HTMLButtonElement | string, btnLabel?: string): MPlaybackButtons;
|
|
1736
|
+
private static savedOnClickListeners;
|
|
1737
|
+
private static removeOnClickListeners;
|
|
1738
|
+
private static addOnClickListener;
|
|
1739
|
+
}
|
|
1740
|
+
|
|
1741
|
+
/** Abstract music interface object class. */
|
|
1473
1742
|
declare abstract class MusicInterface {
|
|
1474
1743
|
readonly name: string;
|
|
1744
|
+
/**
|
|
1745
|
+
* Create new music interface object.
|
|
1746
|
+
* @param name - OBject name.
|
|
1747
|
+
*/
|
|
1475
1748
|
constructor(name: string);
|
|
1476
1749
|
/** @internal */
|
|
1477
1750
|
abstract getMusicObject(): MusicObject;
|
|
1751
|
+
/**
|
|
1752
|
+
* Get parent object.
|
|
1753
|
+
* @returns - Parent object or undefined.
|
|
1754
|
+
*/
|
|
1478
1755
|
getParent(): MusicInterface | undefined;
|
|
1479
1756
|
}
|
|
1757
|
+
/** Accidental object. */
|
|
1480
1758
|
declare class MAccidental extends MusicInterface {
|
|
1481
1759
|
private readonly obj;
|
|
1760
|
+
/** Object name. */
|
|
1482
1761
|
static readonly Name = "Accidental";
|
|
1483
1762
|
/** @internal */
|
|
1484
1763
|
constructor(obj: ObjAccidental);
|
|
1485
1764
|
/** @internal */
|
|
1486
1765
|
getMusicObject(): ObjAccidental;
|
|
1766
|
+
/**
|
|
1767
|
+
* Get accidental.
|
|
1768
|
+
* @returns - Accidental (e.g. 1 = #).
|
|
1769
|
+
*/
|
|
1487
1770
|
getAccidental(): Accidental;
|
|
1488
1771
|
}
|
|
1772
|
+
/** Connective object. */
|
|
1489
1773
|
declare class MConnective extends MusicInterface {
|
|
1490
1774
|
private readonly obj;
|
|
1775
|
+
/** Object name. */
|
|
1491
1776
|
static readonly Name = "Connective";
|
|
1492
1777
|
/** @internal */
|
|
1493
1778
|
constructor(obj: ObjConnective);
|
|
1494
1779
|
/** @internal */
|
|
1495
1780
|
getMusicObject(): ObjConnective;
|
|
1496
1781
|
}
|
|
1782
|
+
/** Arpeggio object. */
|
|
1497
1783
|
declare class MArpeggio extends MusicInterface {
|
|
1498
1784
|
private readonly obj;
|
|
1785
|
+
/** Object name. */
|
|
1499
1786
|
static readonly Name = "Arpeggio";
|
|
1500
1787
|
/** @internal */
|
|
1501
1788
|
constructor(obj: ObjArpeggio);
|
|
1502
1789
|
/** @internal */
|
|
1503
1790
|
getMusicObject(): ObjArpeggio;
|
|
1791
|
+
/**
|
|
1792
|
+
* Get rhythm column this arpeggio is in.
|
|
1793
|
+
* @returns - Rhythm column.
|
|
1794
|
+
*/
|
|
1504
1795
|
getRhythmColumn(): MRhythmColumn;
|
|
1796
|
+
/**
|
|
1797
|
+
* Get notation line this arpeggio is in.
|
|
1798
|
+
* @returns - Staff or tab object.
|
|
1799
|
+
*/
|
|
1505
1800
|
getNotationLine(): MStaff | MTab;
|
|
1506
1801
|
}
|
|
1802
|
+
/** Beam group object. */
|
|
1507
1803
|
declare class MBeamGroup extends MusicInterface {
|
|
1508
1804
|
private readonly obj;
|
|
1805
|
+
/** OBject name. */
|
|
1509
1806
|
static readonly Name = "BeamGroup";
|
|
1510
1807
|
/** @internal */
|
|
1511
1808
|
constructor(obj: ObjBeamGroup);
|
|
1512
1809
|
/** @internal */
|
|
1513
1810
|
getMusicObject(): ObjBeamGroup;
|
|
1514
1811
|
}
|
|
1812
|
+
/** Beam group object of certain staff. */
|
|
1515
1813
|
declare class MStaffBeamGroup extends MusicInterface {
|
|
1516
1814
|
private readonly obj;
|
|
1815
|
+
/** Object name. */
|
|
1517
1816
|
static readonly Name = "StaffBeamGroup";
|
|
1518
1817
|
/** @internal */
|
|
1519
1818
|
constructor(obj: ObjStaffBeamGroup);
|
|
1520
1819
|
/** @internal */
|
|
1521
1820
|
getMusicObject(): ObjStaffBeamGroup;
|
|
1821
|
+
/**
|
|
1822
|
+
* Get staff this beam group is in.
|
|
1823
|
+
* @returns - Staff object.
|
|
1824
|
+
*/
|
|
1522
1825
|
getStaff(): MStaff;
|
|
1523
1826
|
}
|
|
1827
|
+
/** Document object. */
|
|
1524
1828
|
declare class MDocument extends MusicInterface {
|
|
1525
1829
|
private readonly obj;
|
|
1830
|
+
/** Object name. */
|
|
1526
1831
|
static readonly Name = "Document";
|
|
1527
1832
|
/** @internal */
|
|
1528
1833
|
constructor(obj: ObjDocument);
|
|
1529
1834
|
/** @internal */
|
|
1530
1835
|
getMusicObject(): ObjDocument;
|
|
1836
|
+
/**
|
|
1837
|
+
* Get title.
|
|
1838
|
+
* @returns - Title string or undefined.
|
|
1839
|
+
*/
|
|
1531
1840
|
getTitle(): string | undefined;
|
|
1841
|
+
/**
|
|
1842
|
+
* Get composer.
|
|
1843
|
+
* @returns - Composer string or undefined.
|
|
1844
|
+
*/
|
|
1532
1845
|
getComposer(): string | undefined;
|
|
1846
|
+
/**
|
|
1847
|
+
* Get arranger.
|
|
1848
|
+
* @returns - Arranger string or undefined.
|
|
1849
|
+
*/
|
|
1533
1850
|
getArranger(): string | undefined;
|
|
1851
|
+
/**
|
|
1852
|
+
* Get score rows.
|
|
1853
|
+
* @returns - Array or score rows.
|
|
1854
|
+
*/
|
|
1534
1855
|
getRows(): ReadonlyArray<MScoreRow>;
|
|
1856
|
+
/**
|
|
1857
|
+
* Get measures.
|
|
1858
|
+
* @returns - Array of measures.
|
|
1859
|
+
*/
|
|
1535
1860
|
getMeasures(): ReadonlyArray<MMeasure>;
|
|
1536
|
-
|
|
1861
|
+
/**
|
|
1862
|
+
* Play this document.
|
|
1863
|
+
* @param playStateChangeListener - Play state change listener function or undefined.
|
|
1864
|
+
* @returns - Player instance.
|
|
1865
|
+
*/
|
|
1866
|
+
play(playStateChangeListener?: PlayStateChangeListener): MPlayer;
|
|
1537
1867
|
}
|
|
1868
|
+
/** Ending object. */
|
|
1538
1869
|
declare class MEnding extends MusicInterface {
|
|
1539
1870
|
private readonly obj;
|
|
1871
|
+
/** Object name. */
|
|
1540
1872
|
static readonly Name = "Ending";
|
|
1541
1873
|
/** @internal */
|
|
1542
1874
|
constructor(obj: ObjEnding);
|
|
1543
1875
|
/** @internal */
|
|
1544
1876
|
getMusicObject(): ObjEnding;
|
|
1877
|
+
/**
|
|
1878
|
+
* Get passages.
|
|
1879
|
+
* @returns - Array of passage numbers, e.g. passage number 1 means that this ending is played on first pass.
|
|
1880
|
+
*/
|
|
1545
1881
|
getPassages(): ReadonlyArray<number>;
|
|
1882
|
+
/**
|
|
1883
|
+
* Has passage number?
|
|
1884
|
+
* @param passage - Passage number to find out.
|
|
1885
|
+
* @returns - Boolean whether this ending has asked passage number.
|
|
1886
|
+
*/
|
|
1546
1887
|
hasPassage(passage: number): boolean;
|
|
1547
1888
|
}
|
|
1889
|
+
/** Fermata object. */
|
|
1548
1890
|
declare class MFermata extends MusicInterface {
|
|
1549
1891
|
private readonly obj;
|
|
1892
|
+
/** OBject name. */
|
|
1550
1893
|
static readonly Name = "Fermata";
|
|
1551
1894
|
/** @internal */
|
|
1552
1895
|
constructor(obj: ObjFermata);
|
|
1553
1896
|
/** @internal */
|
|
1554
1897
|
getMusicObject(): ObjFermata;
|
|
1555
1898
|
}
|
|
1899
|
+
/** Header object. */
|
|
1556
1900
|
declare class MHeader extends MusicInterface {
|
|
1557
1901
|
private readonly obj;
|
|
1902
|
+
/** OBject name. */
|
|
1558
1903
|
static readonly Name = "Header";
|
|
1559
1904
|
/** @internal */
|
|
1560
1905
|
constructor(obj: ObjHeader);
|
|
1561
1906
|
/** @internal */
|
|
1562
1907
|
getMusicObject(): ObjHeader;
|
|
1908
|
+
/**
|
|
1909
|
+
* Get title.
|
|
1910
|
+
* @returns - Title string or undefined.
|
|
1911
|
+
*/
|
|
1563
1912
|
getTitle(): string | undefined;
|
|
1913
|
+
/**
|
|
1914
|
+
* Get composer.
|
|
1915
|
+
* @returns - Composer string or undefined.
|
|
1916
|
+
*/
|
|
1564
1917
|
getComposer(): string | undefined;
|
|
1918
|
+
/**
|
|
1919
|
+
* Get arranger.
|
|
1920
|
+
* @returns - Arranger string or undefined.
|
|
1921
|
+
*/
|
|
1565
1922
|
getArranger(): string | undefined;
|
|
1566
1923
|
}
|
|
1924
|
+
/** Image object. */
|
|
1567
1925
|
declare class MImage extends MusicInterface {
|
|
1568
1926
|
private readonly obj;
|
|
1927
|
+
/** Object name. */
|
|
1569
1928
|
static readonly Name = "Image";
|
|
1570
1929
|
/** @internal */
|
|
1571
1930
|
constructor(obj: ObjImage);
|
|
1572
1931
|
/** @internal */
|
|
1573
1932
|
getMusicObject(): ObjImage;
|
|
1574
1933
|
}
|
|
1934
|
+
/** Measure object. */
|
|
1575
1935
|
declare class MMeasure extends MusicInterface {
|
|
1576
1936
|
private readonly obj;
|
|
1937
|
+
/** OBject name. */
|
|
1577
1938
|
static readonly Name = "Measure";
|
|
1578
1939
|
/** @internal */
|
|
1579
1940
|
constructor(obj: ObjMeasure);
|
|
1580
1941
|
/** @internal */
|
|
1581
1942
|
getMusicObject(): ObjMeasure;
|
|
1943
|
+
/**
|
|
1944
|
+
* Get measure number.
|
|
1945
|
+
* @returns - Measure number starting from 1, or 0 if upbeat.
|
|
1946
|
+
*/
|
|
1582
1947
|
getMeasureNumber(): number;
|
|
1948
|
+
/**
|
|
1949
|
+
* Get rhythm columns.
|
|
1950
|
+
* @returns - Array of rhythm columns.
|
|
1951
|
+
*/
|
|
1583
1952
|
getRhythmColumns(): ReadonlyArray<MRhythmColumn>;
|
|
1953
|
+
/**
|
|
1954
|
+
* Get score row that this measure is in.
|
|
1955
|
+
* @returns - Score row.
|
|
1956
|
+
*/
|
|
1584
1957
|
getRow(): MScoreRow;
|
|
1585
1958
|
}
|
|
1959
|
+
/** Right bar line object. */
|
|
1586
1960
|
declare class MBarLineRight extends MusicInterface {
|
|
1587
1961
|
private readonly obj;
|
|
1962
|
+
/** OBject name. */
|
|
1588
1963
|
static readonly Name = "BarLineRight";
|
|
1589
1964
|
/** @internal */
|
|
1590
1965
|
constructor(obj: ObjBarLineRight);
|
|
1591
1966
|
/** @internal */
|
|
1592
1967
|
getMusicObject(): ObjBarLineRight;
|
|
1593
1968
|
}
|
|
1969
|
+
/** Left bar line object. */
|
|
1594
1970
|
declare class MBarLineLeft extends MusicInterface {
|
|
1595
1971
|
private readonly obj;
|
|
1972
|
+
/** Object name. */
|
|
1596
1973
|
static readonly Name = "BarLineLeft";
|
|
1597
1974
|
/** @internal */
|
|
1598
1975
|
constructor(obj: ObjBarLineLeft);
|
|
1599
1976
|
/** @internal */
|
|
1600
1977
|
getMusicObject(): ObjBarLineLeft;
|
|
1601
1978
|
}
|
|
1979
|
+
/** Bar line object for certain staff or tab. */
|
|
1602
1980
|
declare class MStaffTabBarLine extends MusicInterface {
|
|
1603
1981
|
private readonly obj;
|
|
1982
|
+
/** Object name. */
|
|
1604
1983
|
static readonly Name = "StaffTabBarLine";
|
|
1605
1984
|
/** @internal */
|
|
1606
1985
|
constructor(obj: ObjStaffTabBarLine);
|
|
1607
1986
|
/** @internal */
|
|
1608
1987
|
getMusicObject(): ObjStaffTabBarLine;
|
|
1988
|
+
/**
|
|
1989
|
+
* Get parent bar line object.
|
|
1990
|
+
* @returns - Parent bar line object.
|
|
1991
|
+
*/
|
|
1609
1992
|
getBarLine(): MBarLineLeft | MBarLineRight;
|
|
1993
|
+
/**
|
|
1994
|
+
* Get staff or tab this bar lien object is in.
|
|
1995
|
+
* @returns - Staff or tab.
|
|
1996
|
+
*/
|
|
1610
1997
|
getNotationLine(): MStaff | MTab;
|
|
1611
1998
|
}
|
|
1999
|
+
/** Note group object. */
|
|
1612
2000
|
declare class MNoteGroup extends MusicInterface {
|
|
1613
2001
|
private readonly obj;
|
|
2002
|
+
/** Object name. */
|
|
1614
2003
|
static readonly Name = "NoteGroup";
|
|
1615
2004
|
/** @internal */
|
|
1616
2005
|
constructor(obj: ObjNoteGroup);
|
|
1617
2006
|
/** @internal */
|
|
1618
2007
|
getMusicObject(): ObjNoteGroup;
|
|
2008
|
+
/**
|
|
2009
|
+
* Get notes of this note group.
|
|
2010
|
+
* @returns - Array of Note instances.
|
|
2011
|
+
*/
|
|
1619
2012
|
getNotes(): ReadonlyArray<Note>;
|
|
2013
|
+
/**
|
|
2014
|
+
* Get rhythm props of this note group.
|
|
2015
|
+
* @returns - Rhythm props.
|
|
2016
|
+
*/
|
|
1620
2017
|
getRhythmProps(): RhythmProps;
|
|
2018
|
+
/**
|
|
2019
|
+
* Get rhythm column this note group is in.
|
|
2020
|
+
* @returns - Rhythm column.
|
|
2021
|
+
*/
|
|
1621
2022
|
getRhythmColumn(): MRhythmColumn;
|
|
2023
|
+
/**
|
|
2024
|
+
* Get the measure this note group is in.
|
|
2025
|
+
* @returns - Measure.
|
|
2026
|
+
*/
|
|
1622
2027
|
getMeasure(): MMeasure;
|
|
1623
2028
|
}
|
|
2029
|
+
/** Note group object of certain staff. */
|
|
1624
2030
|
declare class MStaffNoteGroup extends MusicInterface {
|
|
1625
2031
|
private readonly obj;
|
|
2032
|
+
/** Object name. */
|
|
1626
2033
|
static readonly Name = "StaffNoteGroup";
|
|
1627
2034
|
/** @internal */
|
|
1628
2035
|
constructor(obj: ObjStaffNoteGroup);
|
|
1629
2036
|
/** @internal */
|
|
1630
2037
|
getMusicObject(): ObjStaffNoteGroup;
|
|
2038
|
+
/**
|
|
2039
|
+
* Get parent note group.
|
|
2040
|
+
* @returns - Parent note group.
|
|
2041
|
+
*/
|
|
1631
2042
|
getNoteGroup(): MNoteGroup;
|
|
2043
|
+
/**
|
|
2044
|
+
* Get rhythm column this note group is in.
|
|
2045
|
+
* @returns - Rhythm column.
|
|
2046
|
+
*/
|
|
1632
2047
|
getRhythmColumn(): MRhythmColumn;
|
|
2048
|
+
/**
|
|
2049
|
+
* Get the measure this note group is in.
|
|
2050
|
+
* @returns - Measure.
|
|
2051
|
+
*/
|
|
1633
2052
|
getMeasure(): MMeasure;
|
|
2053
|
+
/**
|
|
2054
|
+
* Get staff notation line this note group is in.
|
|
2055
|
+
* @returns - Staff object.
|
|
2056
|
+
*/
|
|
1634
2057
|
getStaff(): MStaff;
|
|
1635
2058
|
}
|
|
2059
|
+
/** Note group object of certain tab. Contains fret numbers for tab. */
|
|
1636
2060
|
declare class MTabNoteGroup extends MusicInterface {
|
|
1637
2061
|
private readonly obj;
|
|
2062
|
+
/** OBject name. */
|
|
1638
2063
|
static readonly Name = "TabNoteGroup";
|
|
1639
2064
|
/** @internal */
|
|
1640
2065
|
constructor(obj: ObjTabNoteGroup);
|
|
1641
2066
|
/** @internal */
|
|
1642
2067
|
getMusicObject(): ObjTabNoteGroup;
|
|
2068
|
+
/**
|
|
2069
|
+
* Get parent note group.
|
|
2070
|
+
* @returns - Parent note group.
|
|
2071
|
+
*/
|
|
1643
2072
|
getNoteGroup(): MNoteGroup;
|
|
2073
|
+
/**
|
|
2074
|
+
* Get rhythm column this note group is in.
|
|
2075
|
+
* @returns - Rhythm column.
|
|
2076
|
+
*/
|
|
1644
2077
|
getRhythmColumn(): MRhythmColumn;
|
|
2078
|
+
/**
|
|
2079
|
+
* Get the measure this note group is in.
|
|
2080
|
+
* @returns - Measure.
|
|
2081
|
+
*/
|
|
1645
2082
|
getMeasure(): MMeasure;
|
|
2083
|
+
/**
|
|
2084
|
+
* Get guitar tab this note group is in.
|
|
2085
|
+
* @returns - Tab object.
|
|
2086
|
+
*/
|
|
1646
2087
|
getTab(): MTab;
|
|
1647
2088
|
}
|
|
2089
|
+
/** Rest object. */
|
|
1648
2090
|
declare class MRest extends MusicInterface {
|
|
1649
2091
|
private readonly obj;
|
|
2092
|
+
/** OBject name. */
|
|
1650
2093
|
static readonly Name = "Rest";
|
|
1651
2094
|
/** @internal */
|
|
1652
2095
|
constructor(obj: ObjRest);
|
|
1653
2096
|
/** @internal */
|
|
1654
2097
|
getMusicObject(): ObjRest;
|
|
2098
|
+
/**
|
|
2099
|
+
* Get rhythm props of this rest.
|
|
2100
|
+
* @returns - Rhythm props.
|
|
2101
|
+
*/
|
|
1655
2102
|
getRhythmProps(): RhythmProps;
|
|
2103
|
+
/**
|
|
2104
|
+
* Get rhythm column this rest is in.
|
|
2105
|
+
* @returns - Rhythm column.
|
|
2106
|
+
*/
|
|
1656
2107
|
getRhythmColumn(): MRhythmColumn;
|
|
2108
|
+
/**
|
|
2109
|
+
* Get the measure this rest is in.
|
|
2110
|
+
* @returns - Measure.
|
|
2111
|
+
*/
|
|
1657
2112
|
getMeasure(): MMeasure;
|
|
1658
2113
|
}
|
|
2114
|
+
/** Rest object for certain tab. */
|
|
1659
2115
|
declare class MStaffRest extends MusicInterface {
|
|
1660
2116
|
private readonly obj;
|
|
2117
|
+
/** Object name. */
|
|
1661
2118
|
static readonly Name = "StaffRest";
|
|
1662
2119
|
/** @internal */
|
|
1663
2120
|
constructor(obj: ObjStaffRest);
|
|
1664
2121
|
/** @internal */
|
|
1665
2122
|
getMusicObject(): ObjStaffRest;
|
|
2123
|
+
/**
|
|
2124
|
+
* Get parent rest object.
|
|
2125
|
+
* @returns - Parent rest object.
|
|
2126
|
+
*/
|
|
1666
2127
|
getRest(): MRest;
|
|
2128
|
+
/**
|
|
2129
|
+
* Get rhythm column this rest is in.
|
|
2130
|
+
* @returns - Rhythm column.
|
|
2131
|
+
*/
|
|
1667
2132
|
getRhythmColumn(): MRhythmColumn;
|
|
2133
|
+
/**
|
|
2134
|
+
* Get the measure this rest is in.
|
|
2135
|
+
* @returns - Measure.
|
|
2136
|
+
*/
|
|
1668
2137
|
getMeasure(): MMeasure;
|
|
2138
|
+
/**
|
|
2139
|
+
* Get staff notation line this rest is in.
|
|
2140
|
+
* @returns - Staff object.
|
|
2141
|
+
*/
|
|
1669
2142
|
getStaff(): MStaff;
|
|
1670
2143
|
}
|
|
2144
|
+
/** Rhythm column object. */
|
|
1671
2145
|
declare class MRhythmColumn extends MusicInterface {
|
|
1672
2146
|
private readonly obj;
|
|
2147
|
+
/** OBject name. */
|
|
1673
2148
|
static readonly Name = "RhythmColumn";
|
|
1674
2149
|
/** @internal */
|
|
1675
2150
|
constructor(obj: ObjRhythmColumn);
|
|
1676
2151
|
/** @internal */
|
|
1677
2152
|
getMusicObject(): ObjRhythmColumn;
|
|
2153
|
+
/**
|
|
2154
|
+
* Get symbol (note group or rest) of this column for given voice id.
|
|
2155
|
+
* @param voiceId - Voice id.
|
|
2156
|
+
* @returns - Note group, rest or undefined.
|
|
2157
|
+
*/
|
|
1678
2158
|
getRhythmSymbol(voiceId: number): MNoteGroup | MRest | undefined;
|
|
1679
|
-
|
|
2159
|
+
/**
|
|
2160
|
+
* Get symbol (note group or rest) of this column for given voice id.
|
|
2161
|
+
* @deprecated - Use getRhythmSymbol(voiceId) instead.
|
|
2162
|
+
* @param voiceId - Voice id.
|
|
2163
|
+
* @returns - Note group, rest or undefined.
|
|
2164
|
+
*/
|
|
1680
2165
|
getVoiceSymbol(voiceId: VoiceId): MNoteGroup | MRest | undefined;
|
|
2166
|
+
/**
|
|
2167
|
+
* Get the measure this rhythm column is in.
|
|
2168
|
+
* @returns - Measure.
|
|
2169
|
+
*/
|
|
2170
|
+
getMeasure(): MMeasure;
|
|
1681
2171
|
}
|
|
2172
|
+
/** Score row object. */
|
|
1682
2173
|
declare class MScoreRow extends MusicInterface {
|
|
1683
2174
|
private readonly obj;
|
|
2175
|
+
/** Object name. */
|
|
1684
2176
|
static readonly Name = "ScoreRow";
|
|
1685
2177
|
/** @internal */
|
|
1686
2178
|
constructor(obj: ObjScoreRow);
|
|
1687
2179
|
/** @internal */
|
|
1688
2180
|
getMusicObject(): ObjScoreRow;
|
|
2181
|
+
/**
|
|
2182
|
+
* Parent music document.
|
|
2183
|
+
* @returns - Parent music document.
|
|
2184
|
+
*/
|
|
1689
2185
|
getDocument(): MDocument;
|
|
2186
|
+
/**
|
|
2187
|
+
* Get measures of this score row.
|
|
2188
|
+
* @returns - Array of measures.
|
|
2189
|
+
*/
|
|
1690
2190
|
getMeasures(): ReadonlyArray<MMeasure>;
|
|
2191
|
+
/**
|
|
2192
|
+
* Get notation lines (staves and tabs) of this score row.
|
|
2193
|
+
* @returns - Array of staves and tabs.
|
|
2194
|
+
*/
|
|
1691
2195
|
getNotationLines(): ReadonlyArray<MStaff | MTab>;
|
|
1692
2196
|
}
|
|
2197
|
+
/** Staff notatio line object. */
|
|
1693
2198
|
declare class MStaff extends MusicInterface {
|
|
1694
2199
|
private readonly obj;
|
|
2200
|
+
/** Object name. */
|
|
1695
2201
|
static readonly Name = "Staff";
|
|
1696
2202
|
/** @internal */
|
|
1697
2203
|
constructor(obj: ObjStaff);
|
|
1698
2204
|
/** @internal */
|
|
1699
2205
|
getMusicObject(): ObjStaff;
|
|
2206
|
+
/**
|
|
2207
|
+
* Get index of this staff in score row.
|
|
2208
|
+
* @returns - Index (0=top notation line).
|
|
2209
|
+
*/
|
|
1700
2210
|
getId(): number;
|
|
2211
|
+
/**
|
|
2212
|
+
* Get name of this staff.
|
|
2213
|
+
* @returns - Staff name.
|
|
2214
|
+
*/
|
|
1701
2215
|
getName(): string | undefined;
|
|
2216
|
+
/**
|
|
2217
|
+
* Get the score row this staff is in.
|
|
2218
|
+
* @returns - Score row.
|
|
2219
|
+
*/
|
|
1702
2220
|
getRow(): MScoreRow;
|
|
1703
2221
|
}
|
|
2222
|
+
/** Guitar tab notation line object. */
|
|
1704
2223
|
declare class MTab extends MusicInterface {
|
|
1705
2224
|
private readonly obj;
|
|
2225
|
+
/** Object name. */
|
|
1706
2226
|
static readonly Name = "Tab";
|
|
1707
2227
|
/** @internal */
|
|
1708
2228
|
constructor(obj: ObjTab);
|
|
1709
2229
|
/** @internal */
|
|
1710
2230
|
getMusicObject(): ObjTab;
|
|
2231
|
+
/**
|
|
2232
|
+
* Get index of this guitar tab in score row.
|
|
2233
|
+
* @returns - Index (0=top notation line).
|
|
2234
|
+
*/
|
|
1711
2235
|
getId(): number;
|
|
2236
|
+
/**
|
|
2237
|
+
* Get name of this guitar tab.
|
|
2238
|
+
* @returns - Staff name.
|
|
2239
|
+
*/
|
|
1712
2240
|
getName(): string | undefined;
|
|
2241
|
+
/**
|
|
2242
|
+
* Get the score row this guitar tab is in.
|
|
2243
|
+
* @returns - Score row.
|
|
2244
|
+
*/
|
|
1713
2245
|
getRow(): MScoreRow;
|
|
1714
2246
|
}
|
|
2247
|
+
/** Signature object contains clef, key signature, time signature and tempo, all optional depending on measure. */
|
|
1715
2248
|
declare class MSignature extends MusicInterface {
|
|
1716
2249
|
private readonly obj;
|
|
2250
|
+
/** Object name. */
|
|
1717
2251
|
static readonly Name = "Signature";
|
|
1718
2252
|
/** @internal */
|
|
1719
2253
|
constructor(obj: ObjSignature);
|
|
1720
2254
|
/** @internal */
|
|
1721
2255
|
getMusicObject(): ObjSignature;
|
|
2256
|
+
/**
|
|
2257
|
+
* Get staff notation line this signature is in.
|
|
2258
|
+
* @returns - Staff object.
|
|
2259
|
+
*/
|
|
1722
2260
|
getStaff(): MStaff;
|
|
1723
2261
|
}
|
|
2262
|
+
/** Spacial text object contains text and possibly special symbols (e.g. Segno or Coda). */
|
|
1724
2263
|
declare class MSpecialText extends MusicInterface {
|
|
1725
2264
|
private readonly obj;
|
|
2265
|
+
/** Object name. */
|
|
1726
2266
|
static readonly Name = "SpecialText";
|
|
1727
2267
|
/** @internal */
|
|
1728
2268
|
constructor(obj: ObjSpecialText);
|
|
1729
2269
|
/** @internal */
|
|
1730
2270
|
getMusicObject(): ObjSpecialText;
|
|
2271
|
+
/**
|
|
2272
|
+
* Get text content.
|
|
2273
|
+
* @returns - Text content.
|
|
2274
|
+
*/
|
|
1731
2275
|
getText(): string;
|
|
1732
2276
|
}
|
|
2277
|
+
/** Text object. */
|
|
1733
2278
|
declare class MText extends MusicInterface {
|
|
1734
2279
|
private readonly obj;
|
|
2280
|
+
/** Object name. */
|
|
1735
2281
|
static readonly Name = "Text";
|
|
1736
2282
|
/** @internal */
|
|
1737
2283
|
constructor(obj: ObjText);
|
|
1738
2284
|
/** @internal */
|
|
1739
2285
|
getMusicObject(): ObjText;
|
|
2286
|
+
/**
|
|
2287
|
+
* Get text content.
|
|
2288
|
+
* @returns - Text content.
|
|
2289
|
+
*/
|
|
1740
2290
|
getText(): string;
|
|
1741
2291
|
}
|
|
2292
|
+
/** Extension line object. */
|
|
1742
2293
|
declare class MExtensionLine extends MusicInterface {
|
|
1743
2294
|
private readonly obj;
|
|
2295
|
+
/** OBject name. */
|
|
1744
2296
|
static readonly Name = "ExtensionLine";
|
|
1745
2297
|
/** @internal */
|
|
1746
2298
|
constructor(obj: ObjExtensionLine);
|
|
1747
2299
|
/** @internal */
|
|
1748
2300
|
getMusicObject(): ObjExtensionLine;
|
|
1749
2301
|
}
|
|
1750
|
-
declare class MPlayer {
|
|
1751
|
-
private static currentlyPlaying;
|
|
1752
|
-
private readonly player;
|
|
1753
|
-
constructor(doc: MDocument, fn?: PlayStateChangeListener);
|
|
1754
|
-
static stopAll(): void;
|
|
1755
|
-
play(): this;
|
|
1756
|
-
pause(): this;
|
|
1757
|
-
stop(): this;
|
|
1758
|
-
}
|
|
1759
|
-
declare class MRenderer {
|
|
1760
|
-
private readonly renderer;
|
|
1761
|
-
constructor();
|
|
1762
|
-
setDocument(doc?: MDocument): this;
|
|
1763
|
-
setCanvas(canvas: HTMLCanvasElement | string): this;
|
|
1764
|
-
setScoreEventListener(fn: ScoreEventListener): void;
|
|
1765
|
-
hilightObject(obj?: MusicInterface): void;
|
|
1766
|
-
hilightStaffPos(staffPos?: {
|
|
1767
|
-
scoreRow: MScoreRow;
|
|
1768
|
-
diatonicId: number;
|
|
1769
|
-
}): void;
|
|
1770
|
-
draw(): void;
|
|
1771
|
-
}
|
|
1772
|
-
declare class MPlaybackButtons {
|
|
1773
|
-
private playButton?;
|
|
1774
|
-
private stopButton?;
|
|
1775
|
-
private playStopButton?;
|
|
1776
|
-
private pauseButton?;
|
|
1777
|
-
private onPlay;
|
|
1778
|
-
private onStop;
|
|
1779
|
-
private onPlayStop;
|
|
1780
|
-
private onPause;
|
|
1781
|
-
private playLabel;
|
|
1782
|
-
private stopLabel;
|
|
1783
|
-
private pauseLabel;
|
|
1784
|
-
private playState;
|
|
1785
|
-
private player?;
|
|
1786
|
-
constructor();
|
|
1787
|
-
setDocument(doc?: MDocument): this;
|
|
1788
|
-
detachDocument(): void;
|
|
1789
|
-
private updateButtons;
|
|
1790
|
-
setPlayButton(btn: HTMLButtonElement | string, btnLabel?: string): this;
|
|
1791
|
-
setStopButton(btn: HTMLButtonElement | string, btnLabel?: string): this;
|
|
1792
|
-
setPlayStopButton(btn: HTMLButtonElement | string, playLabel?: string, stopLabel?: string): this;
|
|
1793
|
-
setPauseButton(btn: HTMLButtonElement | string, btnLabel?: string): this;
|
|
1794
|
-
private static savedOnClickListeners;
|
|
1795
|
-
private static removeOnClickListeners;
|
|
1796
|
-
private static addOnClickListener;
|
|
1797
|
-
}
|
|
1798
2302
|
|
|
1799
|
-
export {
|
|
2303
|
+
export { Clef as $, type AnnotationText as A, MBarLineRight as B, Connective as C, DivRect as D, MBarLineLeft as E, Fermata as F, MStaffTabBarLine as G, MNoteGroup as H, MStaffNoteGroup as I, MTabNoteGroup as J, MRest as K, Label as L, MDocument as M, type NoteOptions as N, MStaffRest as O, MRhythmColumn as P, MScoreRow as Q, type RestOptions as R, StaffPreset as S, type TupletOptions as T, MStaff as U, type VoiceId as V, MTab as W, MSignature as X, MSpecialText as Y, MText as Z, MExtensionLine as _, type ScoreConfiguration as a, type StaffConfig as a0, type TabConfig as a1, getVoiceIds as a2, type StringNumber as a3, getStringNumbers as a4, Stem as a5, Arpeggio as a6, type StaffTabOrGroup as a7, DynamicsAnnotation as a8, TempoAnnotation as a9, PlayState as aa, type PlayStateChangeListener as ab, type StaffTabOrGroups as b, Navigation as c, Annotation as d, TieType as e, NoteAnchor as f, VerticalPosition as g, type ScoreEventType as h, ScoreEvent as i, ScoreStaffPosEvent as j, ScoreObjectEvent as k, type ScoreEventListener as l, MPlayer as m, MRenderer as n, MPlaybackButtons as o, MusicInterface as p, MAccidental as q, MConnective as r, MArpeggio as s, MBeamGroup as t, MStaffBeamGroup as u, MEnding as v, MFermata as w, MHeader as x, MImage as y, MMeasure as z };
|