web-music-score 0.0.1 → 6.0.0-pre.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 +200 -0
- package/LICENSE +62 -1
- package/README.md +46 -2
- package/dist/audio/index.d.ts +50 -0
- package/dist/audio/index.js +1858 -0
- package/dist/audio/index.mjs +92 -0
- package/dist/audio-cg/index.d.ts +21 -0
- package/dist/audio-cg/index.js +17568 -0
- package/dist/audio-cg/index.mjs +90 -0
- package/dist/audio-synth/index.d.ts +15 -0
- package/dist/audio-synth/index.js +18497 -0
- package/dist/audio-synth/index.mjs +63 -0
- package/dist/chunk-A7C2G7OG.mjs +101 -0
- package/dist/chunk-GNT3ECDB.mjs +267 -0
- package/dist/chunk-LO4NI4AU.mjs +18381 -0
- package/dist/chunk-PW2SO6EZ.mjs +37 -0
- package/dist/chunk-VHB57TXT.mjs +11 -0
- package/dist/chunk-X7BMJX7E.mjs +3867 -0
- package/dist/core/index.d.ts +31 -0
- package/dist/core/index.js +74 -0
- package/dist/core/index.mjs +22 -0
- package/dist/iife/audio-cg.global.js +220 -0
- package/dist/iife/index.global.js +228 -0
- package/dist/instrument-DS-9C6_8.d.ts +44 -0
- package/dist/music-objects-DLmp5uL6.d.ts +2398 -0
- package/dist/note-RVXvpfyV.d.ts +306 -0
- package/dist/pieces/index.d.ts +46 -0
- package/dist/pieces/index.js +79 -0
- package/dist/pieces/index.mjs +50 -0
- package/dist/react-ui/index.d.ts +86 -0
- package/dist/react-ui/index.js +132 -0
- package/dist/react-ui/index.mjs +96 -0
- package/dist/scale-B1M10_fu.d.ts +230 -0
- package/dist/score/index.d.ts +466 -0
- package/dist/score/index.js +13964 -0
- package/dist/score/index.mjs +10092 -0
- package/dist/tempo-D-JF-8b_.d.ts +409 -0
- package/dist/theory/index.d.ts +78 -0
- package/dist/theory/index.js +4842 -0
- package/dist/theory/index.mjs +1986 -0
- package/package.json +131 -3
- package/workspace.code-workspace +0 -9
|
@@ -0,0 +1,409 @@
|
|
|
1
|
+
import { N as Note, A as Accidental } from './note-RVXvpfyV.js';
|
|
2
|
+
|
|
3
|
+
/** Mode enum. */
|
|
4
|
+
declare enum Mode {
|
|
5
|
+
/** Mode 1: Ionian (Major). */
|
|
6
|
+
Ionian = 1,
|
|
7
|
+
/** Mode 2: Dorian. */
|
|
8
|
+
Dorian = 2,
|
|
9
|
+
/** Mode 3: Phrygian. */
|
|
10
|
+
Phrygian = 3,
|
|
11
|
+
/** Mode 4: Lydian. */
|
|
12
|
+
Lydian = 4,
|
|
13
|
+
/** Mode 5: Mixolydian. */
|
|
14
|
+
Mixolydian = 5,
|
|
15
|
+
/** Mode 6: Aeolian (minor). */
|
|
16
|
+
Aeolian = 6,
|
|
17
|
+
/** Mode 7: Locrian. */
|
|
18
|
+
Locrian = 7
|
|
19
|
+
}
|
|
20
|
+
/** Accidental type enum. */
|
|
21
|
+
declare enum AccidentalType {
|
|
22
|
+
/** Natural type has no accidentals. */
|
|
23
|
+
Natural = 0,
|
|
24
|
+
/** Flats type has one or more flats. */
|
|
25
|
+
Flats = 1,
|
|
26
|
+
/** Sharps type has one or more sharps. */
|
|
27
|
+
Sharps = 2
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Get default key signature (key signature of "C Major" scale).
|
|
31
|
+
* @returns - Default key signature.
|
|
32
|
+
*/
|
|
33
|
+
declare function getDefaultKeySignature(): KeySignature;
|
|
34
|
+
declare class KeySignature {
|
|
35
|
+
readonly tonic: string;
|
|
36
|
+
readonly mode: Mode;
|
|
37
|
+
private static readonly OrderOfSharps;
|
|
38
|
+
private static readonly OrderOfFlats;
|
|
39
|
+
private readonly naturalScaleNotes;
|
|
40
|
+
private readonly accidentalByDiatonicClass;
|
|
41
|
+
private readonly orderedAccidentedNotes;
|
|
42
|
+
/**
|
|
43
|
+
* @param tonic - Tonic/root note.
|
|
44
|
+
* @param mode - Mode: Ionian/Major = 1, Dorian = 2, ..., Locrian = 7
|
|
45
|
+
*/
|
|
46
|
+
protected constructor(tonic: string, mode: Mode);
|
|
47
|
+
/**
|
|
48
|
+
* Get accidental type sharps, flats, or natural (without accidentals).
|
|
49
|
+
* @returns - Accidental type.
|
|
50
|
+
*/
|
|
51
|
+
getAccidentalType(): AccidentalType;
|
|
52
|
+
/**
|
|
53
|
+
* Get natural scale notes of this key signature, natural scale has 7 steps (e.g. Major scale: W, W, H, W, W, W, H).
|
|
54
|
+
* @returns - Array of notes.
|
|
55
|
+
*/
|
|
56
|
+
getNaturalScaleNotes(): ReadonlyArray<Note>;
|
|
57
|
+
/**
|
|
58
|
+
* Get accidental for given diatonic id.
|
|
59
|
+
* @param diatonicId - Diatonic id.
|
|
60
|
+
* @returns - Accidental -2, -1, 0, 1 or 2.
|
|
61
|
+
*/
|
|
62
|
+
getAccidental(diatonicId: number): Accidental;
|
|
63
|
+
/**
|
|
64
|
+
* Get number of accidentals this key signature has.
|
|
65
|
+
* @returns - Number of accidentals.
|
|
66
|
+
*/
|
|
67
|
+
getNumAccidentals(): number;
|
|
68
|
+
/**
|
|
69
|
+
* Get accidental notes in correct order.
|
|
70
|
+
* @returns - Array of accidental notes.
|
|
71
|
+
*/
|
|
72
|
+
getOrderedAccidentalNotes(): ReadonlyArray<Note>;
|
|
73
|
+
/**
|
|
74
|
+
* Get note of key signature by degree value.
|
|
75
|
+
* @param degree - Degree number in range [1, 7] or string e.g "b5" or "#4".
|
|
76
|
+
* @returns - Note.
|
|
77
|
+
*/
|
|
78
|
+
getNoteByDegree(degree: number | string): Note;
|
|
79
|
+
/**
|
|
80
|
+
* Test equality of given key signatures.
|
|
81
|
+
* @param a - Key signature a.
|
|
82
|
+
* @param b - Key signature b.
|
|
83
|
+
* @returns - True/false.
|
|
84
|
+
*/
|
|
85
|
+
static equals(a: KeySignature | null | undefined, b: KeySignature | null | undefined): boolean;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/** Note length enum. */
|
|
89
|
+
declare enum NoteLength {
|
|
90
|
+
/** Whole note. */
|
|
91
|
+
Whole = "1n",
|
|
92
|
+
/** Whole note creating a triplet. */
|
|
93
|
+
WholeTriplet = "1t",
|
|
94
|
+
/** Dotted whole note. */
|
|
95
|
+
WholeDot = "1.",
|
|
96
|
+
/** Double dotted whole note. */
|
|
97
|
+
Whole2Dots = "1..",
|
|
98
|
+
/** Triple dotted whole note. */
|
|
99
|
+
Whole3Dots = "1...",
|
|
100
|
+
/** Quadruple-dotted whole note. */
|
|
101
|
+
Whole4Dots = "1....",
|
|
102
|
+
/** Quintuple-dotted whole note. */
|
|
103
|
+
Whole5Dots = "1.....",
|
|
104
|
+
/** Sextuple-dotted whole note. */
|
|
105
|
+
Whole6Dots = "1......",
|
|
106
|
+
/** Half note. */
|
|
107
|
+
Half = "2n",
|
|
108
|
+
/** Half note creating a triplet. */
|
|
109
|
+
HalfTriplet = "2t",
|
|
110
|
+
/** Dotted half note. */
|
|
111
|
+
HalfDot = "2.",
|
|
112
|
+
/** Double dotted half note. */
|
|
113
|
+
Half2Dots = "2..",
|
|
114
|
+
/** Triple dotted half note. */
|
|
115
|
+
Half3Dots = "2...",
|
|
116
|
+
/** Quadruple-dotted half note. */
|
|
117
|
+
Half4Dots = "2....",
|
|
118
|
+
/** Quintuple-dotted half notre. */
|
|
119
|
+
Half5Dots = "2.....",
|
|
120
|
+
/** Quarter note. */
|
|
121
|
+
Quarter = "4n",
|
|
122
|
+
/** Quarter note creating a triplet. */
|
|
123
|
+
QuarterTriplet = "4t",
|
|
124
|
+
/** Dotted quarter note. */
|
|
125
|
+
QuarterDot = "4.",
|
|
126
|
+
/** Double dotted quarter note. */
|
|
127
|
+
Quarter2Dots = "4..",
|
|
128
|
+
/** Triple dotted quarter note. */
|
|
129
|
+
Quarter3Dots = "4...",
|
|
130
|
+
/** Quadruple-dotted quarter note. */
|
|
131
|
+
Quarter4Dots = "4....",
|
|
132
|
+
/** Eighth note. */
|
|
133
|
+
Eighth = "8n",
|
|
134
|
+
/** Eighth note creating a triplet. */
|
|
135
|
+
EighthTriplet = "8t",
|
|
136
|
+
/** Dotted eighth note. */
|
|
137
|
+
EighthDot = "8.",
|
|
138
|
+
/** Double dotted eighth note. */
|
|
139
|
+
Eighth2Dots = "8..",
|
|
140
|
+
/** Triple dotted eighth note. */
|
|
141
|
+
Eighth3Dots = "8...",
|
|
142
|
+
/** Sixteenth note. */
|
|
143
|
+
Sixteenth = "16n",
|
|
144
|
+
/** Sixteenth note creating a triplet. */
|
|
145
|
+
SixteenthTriplet = "16t",
|
|
146
|
+
/** Dotted sixteenth note. */
|
|
147
|
+
SixteenthDot = "16.",
|
|
148
|
+
/** Double dotted sixteenth note. */
|
|
149
|
+
Sixteenth2Dots = "16..",
|
|
150
|
+
/** Thirtysecond note. */
|
|
151
|
+
ThirtySecond = "32n",
|
|
152
|
+
/** Thirtysecond note creating a triplet. */
|
|
153
|
+
ThirtySecondTriplet = "32t",
|
|
154
|
+
/** Dotted thritysecond note. */
|
|
155
|
+
ThirtySecondDot = "32.",
|
|
156
|
+
/** Sixtyfourth note. */
|
|
157
|
+
SixtyFourth = "64n",
|
|
158
|
+
/** Sixtyfourth note creating a triplet. */
|
|
159
|
+
SixtyFourthTriplet = "64t"
|
|
160
|
+
}
|
|
161
|
+
/** String values type of note length enum. */
|
|
162
|
+
type NoteLengthStr = `${NoteLength}`;
|
|
163
|
+
/**
|
|
164
|
+
* Test if given argument is note length.
|
|
165
|
+
* @param noteLength - Note length to validate.
|
|
166
|
+
* @returns - True/false.
|
|
167
|
+
*/
|
|
168
|
+
declare function isNoteLength(noteLength: unknown): noteLength is NoteLength;
|
|
169
|
+
/**
|
|
170
|
+
* Validate if given argument is note length.
|
|
171
|
+
* @param noteLength - Note length to validate.
|
|
172
|
+
* @returns - Valid note length or throws.
|
|
173
|
+
*/
|
|
174
|
+
declare function validateNoteLength(noteLength: unknown): NoteLength;
|
|
175
|
+
/** Note length props class. */
|
|
176
|
+
declare class NoteLengthProps {
|
|
177
|
+
/** Longest note size (e.g. 1 = whole note). */
|
|
178
|
+
static LongestNoteSize: number;
|
|
179
|
+
/** Shortest note size (e.g. 64 = sixtyfourth note). */
|
|
180
|
+
static ShortestNoteSize: number;
|
|
181
|
+
/** Note length. */
|
|
182
|
+
readonly noteLength: NoteLength;
|
|
183
|
+
/** Note size (whole=1, half=2, quarter=4, ...). */
|
|
184
|
+
readonly noteSize: number;
|
|
185
|
+
/** Number of ticks (not altered by isTriplet). */
|
|
186
|
+
readonly ticks: number;
|
|
187
|
+
/** Flag count. */
|
|
188
|
+
readonly flagCount: number;
|
|
189
|
+
/** Dot count. */
|
|
190
|
+
readonly dotCount: number;
|
|
191
|
+
/** Max dot count. */
|
|
192
|
+
readonly maxDotCount: number;
|
|
193
|
+
/** Is triplet? */
|
|
194
|
+
readonly isTriplet: boolean;
|
|
195
|
+
/** Has note stem. */
|
|
196
|
+
readonly hasStem: boolean;
|
|
197
|
+
/** Is note head solid (black)? */
|
|
198
|
+
readonly isSolid: boolean;
|
|
199
|
+
private constructor();
|
|
200
|
+
private static cache;
|
|
201
|
+
/**
|
|
202
|
+
* Get note length props.
|
|
203
|
+
* @param noteLength - Note length.
|
|
204
|
+
* @returns - Note length props.
|
|
205
|
+
*/
|
|
206
|
+
static get(noteLength: NoteLength | NoteLengthStr | string): NoteLengthProps;
|
|
207
|
+
/**
|
|
208
|
+
* Create note length props.
|
|
209
|
+
* @param noteLength - Note length or note size.
|
|
210
|
+
* @param dotCount - Dot count.
|
|
211
|
+
* @returns - Note length props.
|
|
212
|
+
*/
|
|
213
|
+
static create(noteLength: NoteLength | NoteLengthStr | string | number, dotCount?: number): NoteLengthProps;
|
|
214
|
+
/**
|
|
215
|
+
* Compare note lengths/sizes. Whole (1) > half (2) > quarter (4), etc.
|
|
216
|
+
* Ignores possible triplet property of note length.
|
|
217
|
+
* @param a - NoteLengthProps, NoteLength/Str or noteSize
|
|
218
|
+
* @param b - NoteLengthProps, NoteLength/Str or noteSize
|
|
219
|
+
* @returns - -1: a < b, 0: a === b, +1: a > b (note length/size comparisons)
|
|
220
|
+
*/
|
|
221
|
+
static cmp(a: NoteLengthProps | NoteLength | NoteLengthStr | number, b: NoteLengthProps | NoteLength | NoteLengthStr | number): -1 | 0 | 1;
|
|
222
|
+
/**
|
|
223
|
+
* Compare note lengths/sizes for equality.
|
|
224
|
+
* Ignores possible triplet property of note length.
|
|
225
|
+
* @param a - NoteLengthProps, NoteLength/Str or noteSize
|
|
226
|
+
* @param b - NoteLengthProps, NoteLength/Str or noteSize
|
|
227
|
+
* @returns - true: a === b, false: a !== b (note length/size comparisons)
|
|
228
|
+
*/
|
|
229
|
+
static equals(a: NoteLengthProps | NoteLength | NoteLengthStr | number, b: NoteLengthProps | NoteLength | NoteLengthStr | number): boolean;
|
|
230
|
+
}
|
|
231
|
+
/** Tuplet ratio interface. */
|
|
232
|
+
interface TupletRatio {
|
|
233
|
+
/** Number of parts (notes). */
|
|
234
|
+
parts: number;
|
|
235
|
+
/** Played int time of (notes). */
|
|
236
|
+
inTimeOf: number;
|
|
237
|
+
}
|
|
238
|
+
/**
|
|
239
|
+
* Test if given argument is tuplet ratio.
|
|
240
|
+
* @param tupletRatio - Tuplet ratio to validate.
|
|
241
|
+
* @returns - True/false.
|
|
242
|
+
*/
|
|
243
|
+
declare function isTupletRatio(tupletRatio: unknown): tupletRatio is TupletRatio;
|
|
244
|
+
/**
|
|
245
|
+
* Validate if given argument is tuplet ratio.
|
|
246
|
+
* @param tupletRatio - Tuplet ratio to validate.
|
|
247
|
+
* @returns - Valid tuplet ratio or throws.
|
|
248
|
+
*/
|
|
249
|
+
declare function validateTupletRatio(tupletRatio: unknown): TupletRatio;
|
|
250
|
+
/** Some preset tuplet ratio values. */
|
|
251
|
+
declare const Tuplet: Record<"Duplet" | "Triplet" | "Quadruplet", TupletRatio>;
|
|
252
|
+
/** Rhythm props class. */
|
|
253
|
+
declare class RhythmProps {
|
|
254
|
+
/** Note length. */
|
|
255
|
+
readonly noteLength: NoteLength;
|
|
256
|
+
/** Note size (whole=1, half=2, quarter=4, ...). */
|
|
257
|
+
readonly noteSize: number;
|
|
258
|
+
/** Dot count. */
|
|
259
|
+
readonly dotCount: number;
|
|
260
|
+
/** Tuplet ratio. */
|
|
261
|
+
readonly tupletRatio?: TupletRatio;
|
|
262
|
+
/** Number of ticks. */
|
|
263
|
+
readonly ticks: number;
|
|
264
|
+
/** Flag count. */
|
|
265
|
+
readonly flagCount: number;
|
|
266
|
+
/** Has note stem. */
|
|
267
|
+
readonly hasStem: boolean;
|
|
268
|
+
/** Is note head solid (black)? */
|
|
269
|
+
readonly isSolidNoteHead: boolean;
|
|
270
|
+
private constructor();
|
|
271
|
+
private static NoteSymbolMap;
|
|
272
|
+
/**
|
|
273
|
+
* Get string presentation of rhythm props.
|
|
274
|
+
* @returns - String presentation.
|
|
275
|
+
*/
|
|
276
|
+
toString(): string;
|
|
277
|
+
private static cache;
|
|
278
|
+
/**
|
|
279
|
+
* Get rhythm props with given arguments.
|
|
280
|
+
* @param noteLength - Note length.
|
|
281
|
+
* @param dotCount - Dot count.
|
|
282
|
+
* @param tupletRatio - Tuplet ratio.
|
|
283
|
+
* @returns - Rhythm props.
|
|
284
|
+
*/
|
|
285
|
+
static get(noteLength: NoteLength | NoteLengthStr, dotCount?: number, tupletRatio?: TupletRatio): RhythmProps;
|
|
286
|
+
/**
|
|
287
|
+
* Compare duration of rhythm props.
|
|
288
|
+
* @param a - RhythmProps
|
|
289
|
+
* @param b - RhythmProps
|
|
290
|
+
* @returns - -1: a < b, 0: a === b, +1: a > b (duration comparisons)
|
|
291
|
+
*/
|
|
292
|
+
static cmp(a: RhythmProps, b: RhythmProps): -1 | 0 | 1;
|
|
293
|
+
/**
|
|
294
|
+
* Compare duration equality of rhythm props.
|
|
295
|
+
* @param a - RhythmProps
|
|
296
|
+
* @param b - RhythmProps
|
|
297
|
+
* @returns - true: a === b, false: a !== b (duration comparisons)
|
|
298
|
+
*/
|
|
299
|
+
static equals(a: RhythmProps, b: RhythmProps): boolean;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
/** Time signature enum. */
|
|
303
|
+
declare enum TimeSignatures {
|
|
304
|
+
/** 2/4 time signature. */
|
|
305
|
+
_2_4 = "2/4",
|
|
306
|
+
/** 3/4 time signature. */
|
|
307
|
+
_3_4 = "3/4",
|
|
308
|
+
/** 4/4 time signature. */
|
|
309
|
+
_4_4 = "4/4",
|
|
310
|
+
/** 3/8 time signature. */
|
|
311
|
+
_3_8 = "3/8",
|
|
312
|
+
/** 5/8 time signature. */
|
|
313
|
+
_5_8 = "5/8",
|
|
314
|
+
/** 6/8 time signature. */
|
|
315
|
+
_6_8 = "6/8",
|
|
316
|
+
/** 7/8 time signature. */
|
|
317
|
+
_7_8 = "7/8",
|
|
318
|
+
/** 9/8 time signature. */
|
|
319
|
+
_9_8 = "9/8",
|
|
320
|
+
/** 12/8 time signature. */
|
|
321
|
+
_12_8 = "12/8"
|
|
322
|
+
}
|
|
323
|
+
/** Beam grouping enum. */
|
|
324
|
+
declare enum BeamGrouping {
|
|
325
|
+
/** 2-3 beam grouping for 5/8 time signature. */
|
|
326
|
+
_2_3 = "2-3",
|
|
327
|
+
/** 3-2 beam grouping for 5/8 time signature. */
|
|
328
|
+
_3_2 = "3-2",
|
|
329
|
+
/** 2-2-3 beam grouping for 7/8 time signature. */
|
|
330
|
+
_2_2_3 = "2-2-3",
|
|
331
|
+
/** 3-2-2 beam grouping for 7/8 time signature. */
|
|
332
|
+
_3_2_2 = "3-2-2"
|
|
333
|
+
}
|
|
334
|
+
/** Time signature class. */
|
|
335
|
+
declare class TimeSignature {
|
|
336
|
+
/** Number of beats in measure, upper value (e.g. "3" in "3/4"). */
|
|
337
|
+
readonly beatCount: number;
|
|
338
|
+
/** Beat size of time signature, lower value (e.g. "4" in "3/4"). */
|
|
339
|
+
readonly beatSize: number;
|
|
340
|
+
/** Beat length. */
|
|
341
|
+
readonly beatLength: NoteLength;
|
|
342
|
+
/** Number of ticks in measure. */
|
|
343
|
+
readonly measureTicks: number;
|
|
344
|
+
/** Beam groups (e.g. [[2], [2]] or [[2, 2], [2, 2]] (first try as [[4], [4]])). */
|
|
345
|
+
readonly beamGroupSizes: number[][];
|
|
346
|
+
/**
|
|
347
|
+
* Create new time signature instance.
|
|
348
|
+
* @param timeSignature - For example "4/4".
|
|
349
|
+
* @param beamGrouping - Beam grouping (e.g. "3-2" for time signature "5/8").
|
|
350
|
+
*/
|
|
351
|
+
constructor(timeSignature: TimeSignatures | `${TimeSignatures}`, beamGrouping?: BeamGrouping | `${BeamGrouping}`);
|
|
352
|
+
/**
|
|
353
|
+
* Create new time signature instance.
|
|
354
|
+
* @param beatCount - Measure beat count.
|
|
355
|
+
* @param beatSize - Size value: whole-note=1, half-note=2, quarter-note=4, etc.
|
|
356
|
+
* @param beamGrouping - Beam grouping (e.g. "3-2" for time signature "5/8").
|
|
357
|
+
*/
|
|
358
|
+
constructor(beatCount: number, beatSize: number, beamGrouping?: BeamGrouping | `${BeamGrouping}`);
|
|
359
|
+
/**
|
|
360
|
+
* Test whether this time signature has given beat count and size.
|
|
361
|
+
* @param beatCount - Beat count.
|
|
362
|
+
* @param beatSize - Beat size.
|
|
363
|
+
* @returns - Boolean whether this time signature match given beat count and size.
|
|
364
|
+
*/
|
|
365
|
+
is(beatCount: number, beatSize: number): boolean;
|
|
366
|
+
/**
|
|
367
|
+
* Get string representation of this time signature (e.g. "3/4").
|
|
368
|
+
* @returns - String representation.
|
|
369
|
+
*/
|
|
370
|
+
toString(): string;
|
|
371
|
+
}
|
|
372
|
+
/**
|
|
373
|
+
* Get default time signature ("4/4").
|
|
374
|
+
* @returns - Default time signature.
|
|
375
|
+
*/
|
|
376
|
+
declare function getDefaultTimeSignature(): TimeSignature;
|
|
377
|
+
|
|
378
|
+
/** Tempo type. */
|
|
379
|
+
type Tempo = {
|
|
380
|
+
/** Beats per minute value. */
|
|
381
|
+
beatsPerMinute: number;
|
|
382
|
+
/** Optional tempo props. */
|
|
383
|
+
options: {
|
|
384
|
+
/** Length of ane beat. */
|
|
385
|
+
beatLength: NoteLength;
|
|
386
|
+
/** Dot count for length of one beat. */
|
|
387
|
+
dotCount: number;
|
|
388
|
+
};
|
|
389
|
+
};
|
|
390
|
+
/**
|
|
391
|
+
* Get default tempo, which is 120 bpm with quarter note beat length.
|
|
392
|
+
* @returns - Default tempo.
|
|
393
|
+
*/
|
|
394
|
+
declare function getDefaultTempo(): Readonly<Tempo>;
|
|
395
|
+
/**
|
|
396
|
+
* Get formatted tempo string (e.g. "♩=120").
|
|
397
|
+
* @param tempo - Tempo.
|
|
398
|
+
* @returns - Formatted tempo string.
|
|
399
|
+
*/
|
|
400
|
+
declare function getTempoString(tempo: Tempo): string;
|
|
401
|
+
/**
|
|
402
|
+
* Get copy of tempo with altered speed.
|
|
403
|
+
* @param tempo - Tempo.
|
|
404
|
+
* @param speed - Speed factor, used to multiply beats per minute to.
|
|
405
|
+
* @returns - Altered tempo.
|
|
406
|
+
*/
|
|
407
|
+
declare function alterTempoSpeed(tempo: Tempo, speed: number): Tempo;
|
|
408
|
+
|
|
409
|
+
export { AccidentalType as A, BeamGrouping as B, KeySignature as K, Mode as M, NoteLength as N, RhythmProps as R, TimeSignatures as T, TimeSignature as a, getDefaultTimeSignature as b, type Tempo as c, getDefaultTempo as d, getTempoString as e, alterTempoSpeed as f, getDefaultKeySignature as g, type NoteLengthStr as h, isNoteLength as i, NoteLengthProps as j, type TupletRatio as k, isTupletRatio as l, validateTupletRatio as m, Tuplet as n, validateNoteLength as v };
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { N as Note } from '../note-RVXvpfyV.js';
|
|
2
|
+
export { A as Accidental, d as DefaultGuitarNoteLabel, D as DefaultPitchNotation, G as GuitarNoteLabel, e as GuitarNoteLabelList, a as NoteLetter, P as ParsedNote, b as PitchNotation, c as PitchNotationList, S as SymbolSet, g as getPitchNotationName, f as validateGuitarNoteLabel, v as validatePitchNotation } from '../note-RVXvpfyV.js';
|
|
3
|
+
import { D as Degree } from '../scale-B1M10_fu.js';
|
|
4
|
+
export { b as Interval, I as IntervalDirection, a as IntervalQuality, c as Scale, d as ScaleFactory, S as ScaleType, i as getDefaultScale, h as getScale, e as getScaleFactory, g as getScaleFactoryList, v as validateIntervalQuality, f as validateScaleType } from '../scale-B1M10_fu.js';
|
|
5
|
+
export { A as AccidentalType, B as BeamGrouping, K as KeySignature, M as Mode, N as NoteLength, j as NoteLengthProps, h as NoteLengthStr, R as RhythmProps, c as Tempo, a as TimeSignature, T as TimeSignatures, n as Tuplet, k as TupletRatio, f as alterTempoSpeed, g as getDefaultKeySignature, d as getDefaultTempo, b as getDefaultTimeSignature, e as getTempoString, i as isNoteLength, l as isTupletRatio, v as validateNoteLength, m as validateTupletRatio } from '../tempo-D-JF-8b_.js';
|
|
6
|
+
|
|
7
|
+
/** Chord info type. */
|
|
8
|
+
type ChordInfo = {
|
|
9
|
+
name: string;
|
|
10
|
+
degrees: Degree[];
|
|
11
|
+
};
|
|
12
|
+
/** Chord class. */
|
|
13
|
+
declare class Chord {
|
|
14
|
+
readonly chordInfo: ChordInfo;
|
|
15
|
+
readonly rootNote: Note;
|
|
16
|
+
/** Chord name. */
|
|
17
|
+
readonly name: string;
|
|
18
|
+
/** Notes of this chord. */
|
|
19
|
+
readonly notes: Note[];
|
|
20
|
+
/** Notes that are omitted in this chord (partial chord). */
|
|
21
|
+
readonly omitNotes: boolean[];
|
|
22
|
+
/** Bass note if not chord root note (e.g. "B" in "C/B"). */
|
|
23
|
+
readonly slashBassNote?: Note;
|
|
24
|
+
private constructor();
|
|
25
|
+
/**
|
|
26
|
+
* Get all chords that can be made up with given notes.
|
|
27
|
+
* @param notes - Array of notes.
|
|
28
|
+
* @returns - Array of chords.
|
|
29
|
+
*/
|
|
30
|
+
static getChords(notes: ReadonlyArray<Note>): ReadonlyArray<Chord>;
|
|
31
|
+
private replaceWith;
|
|
32
|
+
/**
|
|
33
|
+
* Get chord string presentation.
|
|
34
|
+
* @returns Chord string presentation (e.g. "C/B").
|
|
35
|
+
*/
|
|
36
|
+
toString(): string;
|
|
37
|
+
/**
|
|
38
|
+
* Get degree notation string (e.g. "E - 1(C) - 3(E) - 5(G)").
|
|
39
|
+
* @returns Degree notation string.
|
|
40
|
+
*/
|
|
41
|
+
getDegreeNotationString(): string;
|
|
42
|
+
/**
|
|
43
|
+
* Get string presentation of omitted degrees (e.g. "Omits 5(G), 9(D)").
|
|
44
|
+
* @returns - String presentation of omitted degrees.
|
|
45
|
+
*/
|
|
46
|
+
getOmittedDegreesString(): string;
|
|
47
|
+
/**
|
|
48
|
+
* Degree index for given degree index (e.g. "3").
|
|
49
|
+
* @param i - Chord degree index (e.g. 0 is first note degree of chord).
|
|
50
|
+
* @returns Degree string.
|
|
51
|
+
*/
|
|
52
|
+
private getDegreeStr;
|
|
53
|
+
/**
|
|
54
|
+
* Get note name for given degree index (e.g. "E").
|
|
55
|
+
* @param i - Chord degree index (e.g. 0 is first note degree of chord).
|
|
56
|
+
* @returns - Note name string.
|
|
57
|
+
*/
|
|
58
|
+
private getNoteStr;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/** Guitar tuning name list. */
|
|
62
|
+
declare const TuningNameList: ReadonlyArray<string>;
|
|
63
|
+
/** DEfault tuning name (Standard). */
|
|
64
|
+
declare const DefaultTuningName: string;
|
|
65
|
+
/**
|
|
66
|
+
* Validate if given argument is available tuning name.
|
|
67
|
+
* @param tuningName - Tuning name to validate.
|
|
68
|
+
* @returns - Tuning name if valid, or throws.
|
|
69
|
+
*/
|
|
70
|
+
declare function validateTuningName(tuningName: string): string;
|
|
71
|
+
/**
|
|
72
|
+
* Get guitar tuning, note for each open string.
|
|
73
|
+
* @param tuningName - Tuning name.
|
|
74
|
+
* @returns Array of open string notes.
|
|
75
|
+
*/
|
|
76
|
+
declare function getTuningStrings(tuningName: string): ReadonlyArray<Note>;
|
|
77
|
+
|
|
78
|
+
export { Chord, type ChordInfo, DefaultTuningName, Degree, Note, TuningNameList, getTuningStrings, validateTuningName };
|