@tspro/web-music-score 1.0.0 → 1.1.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 +9 -0
- package/README.md +149 -154
- package/dist/index.cjs.js +942 -597
- package/dist/index.d.ts +33 -10
- package/dist/index.esm.mjs +942 -597
- package/dist/index.umd.min.js +3 -3
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -172,8 +172,10 @@ declare namespace DefaultExport {
|
|
|
172
172
|
Arpeggio,
|
|
173
173
|
TieLength,
|
|
174
174
|
ArcPos,
|
|
175
|
+
StringNumber,
|
|
175
176
|
NoteOptions,
|
|
176
177
|
RestOptions,
|
|
178
|
+
DocumentOptions,
|
|
177
179
|
PickedPitch,
|
|
178
180
|
ClickPitchListener,
|
|
179
181
|
ClickObjectSelector,
|
|
@@ -220,6 +222,10 @@ declare namespace DefaultExport {
|
|
|
220
222
|
MaxNoteLength,
|
|
221
223
|
MinNoteLength,
|
|
222
224
|
RhythmProps,
|
|
225
|
+
validateTuningName,
|
|
226
|
+
getTuningStrings,
|
|
227
|
+
TuningNameList,
|
|
228
|
+
DefaultTuningName,
|
|
223
229
|
validatePitchNotation,
|
|
224
230
|
validateGuitarNoteLabel,
|
|
225
231
|
SymbolSet,
|
|
@@ -236,10 +242,7 @@ declare namespace DefaultExport {
|
|
|
236
242
|
GuitarComponentProps,
|
|
237
243
|
GuitarComponentState,
|
|
238
244
|
GuitarComponent,
|
|
239
|
-
validateTuningName,
|
|
240
245
|
validateHandedness,
|
|
241
|
-
TuningNameList,
|
|
242
|
-
DefaultTuningName,
|
|
243
246
|
Handedness,
|
|
244
247
|
DefaultHandedness,
|
|
245
248
|
GuitarNote,
|
|
@@ -466,6 +469,12 @@ export declare class DivRect {
|
|
|
466
469
|
scaleCopy(scaleX: number, scaleY?: number): DivRect;
|
|
467
470
|
}
|
|
468
471
|
|
|
472
|
+
/** @public */
|
|
473
|
+
export declare type DocumentOptions = {
|
|
474
|
+
measuresPerRow?: number;
|
|
475
|
+
tuning?: string;
|
|
476
|
+
};
|
|
477
|
+
|
|
469
478
|
/** @public */
|
|
470
479
|
export declare enum Fermata {
|
|
471
480
|
AtNote = 0,
|
|
@@ -496,6 +505,12 @@ export declare function getScaleFactoryList(filter?: (scaleType: ScaleType) => b
|
|
|
496
505
|
/** @public */
|
|
497
506
|
export declare function getTempoString(tempo: Tempo): string;
|
|
498
507
|
|
|
508
|
+
/**
|
|
509
|
+
* @public
|
|
510
|
+
* @returns Array of open string notes, note for each string.
|
|
511
|
+
*/
|
|
512
|
+
export declare function getTuningStrings(tuningName: string): ReadonlyArray<Note>;
|
|
513
|
+
|
|
499
514
|
/** @public */
|
|
500
515
|
export declare class GuitarComponent extends React_2.Component<GuitarComponentProps, GuitarComponentState> {
|
|
501
516
|
state: GuitarComponentState;
|
|
@@ -535,7 +550,7 @@ export declare class GuitarContext {
|
|
|
535
550
|
readonly guitarNoteLabel: GuitarNoteLabel;
|
|
536
551
|
readonly maxFretId: number;
|
|
537
552
|
private readonly guitarNoteTable;
|
|
538
|
-
private readonly
|
|
553
|
+
private readonly tuningStrings;
|
|
539
554
|
constructor(tuningName: string, scale: Scale, handedness: Handedness, pitchNotation: PitchNotation, guitarNoteLabel: GuitarNoteLabel);
|
|
540
555
|
getGuitarNote(stringId: number, fretId: number): Readonly<GuitarNote>;
|
|
541
556
|
getStringTuning(stringId: number): Note;
|
|
@@ -685,7 +700,7 @@ export declare class MBeamGroup extends MusicInterface {
|
|
|
685
700
|
/** @public */
|
|
686
701
|
export declare class MDocument extends MusicInterface {
|
|
687
702
|
static readonly Name = "Document";
|
|
688
|
-
constructor(staffKind: StaffKind,
|
|
703
|
+
constructor(staffKind: StaffKind, options?: DocumentOptions | number);
|
|
689
704
|
setHeader(title?: string, composer?: string, arranger?: string): void;
|
|
690
705
|
getTitle(): string | undefined;
|
|
691
706
|
addMeasure(): MMeasure;
|
|
@@ -984,7 +999,7 @@ export declare type NoteOptions = {
|
|
|
984
999
|
dotted?: boolean;
|
|
985
1000
|
stem?: Stem;
|
|
986
1001
|
color?: string;
|
|
987
|
-
arpeggio?: Arpeggio;
|
|
1002
|
+
arpeggio?: Arpeggio | boolean;
|
|
988
1003
|
staccato?: boolean;
|
|
989
1004
|
diamond?: boolean;
|
|
990
1005
|
tieSpan?: number | TieLength;
|
|
@@ -992,6 +1007,7 @@ export declare type NoteOptions = {
|
|
|
992
1007
|
slurSpan?: number;
|
|
993
1008
|
slurPos?: ArcPos;
|
|
994
1009
|
triplet?: boolean;
|
|
1010
|
+
string?: StringNumber | StringNumber[];
|
|
995
1011
|
};
|
|
996
1012
|
|
|
997
1013
|
/** @public */
|
|
@@ -1166,13 +1182,17 @@ export declare enum ScaleType {
|
|
|
1166
1182
|
/** @public */
|
|
1167
1183
|
export declare enum StaffKind {
|
|
1168
1184
|
/** Treble staff has treble (G-) clef. */
|
|
1169
|
-
Treble =
|
|
1170
|
-
/** TrebleForGuitar has treble clef but is one octave lower. */
|
|
1171
|
-
TrebleForGuitar = 1,
|
|
1185
|
+
Treble = 1,
|
|
1172
1186
|
/** Bass staff has bass (F-) clef. */
|
|
1173
1187
|
Bass = 2,
|
|
1174
1188
|
/** Grand staff has both treble and bass clefs. */
|
|
1175
|
-
Grand = 3
|
|
1189
|
+
Grand = 3,
|
|
1190
|
+
/** GuitarTreble has treble clef but is one octave lower. */
|
|
1191
|
+
GuitarTreble = 4,
|
|
1192
|
+
GuitarTab = 8,
|
|
1193
|
+
GuitarTrebleAndTab = 12,
|
|
1194
|
+
/** @deprecated TrebleForGuitar was replaced by GuitarTreble. */
|
|
1195
|
+
TrebleForGuitar = 4
|
|
1176
1196
|
}
|
|
1177
1197
|
|
|
1178
1198
|
/** @public */
|
|
@@ -1182,6 +1202,9 @@ export declare enum Stem {
|
|
|
1182
1202
|
Down = 2
|
|
1183
1203
|
}
|
|
1184
1204
|
|
|
1205
|
+
/** @public */
|
|
1206
|
+
export declare type StringNumber = 1 | 2 | 3 | 4 | 5 | 6;
|
|
1207
|
+
|
|
1185
1208
|
/** @public */
|
|
1186
1209
|
export declare enum SymbolSet {
|
|
1187
1210
|
Ascii = 0,
|