musicxml-io 0.12.0 → 0.12.2
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/README.md +96 -8
- package/dist/abc-HXITSXCS.js +9 -0
- package/dist/abc-IAD53SFI.mjs +11 -0
- package/dist/abc-MTGVOYKS.js +11 -0
- package/dist/abc-R7DIJSHG.mjs +9 -0
- package/dist/abc.d.mts +67 -0
- package/dist/abc.d.ts +67 -0
- package/dist/abc.js +17 -0
- package/dist/abc.mjs +17 -0
- package/dist/accessors/index.d.mts +1 -1
- package/dist/accessors/index.d.ts +1 -1
- package/dist/browser.d.mts +11 -187
- package/dist/browser.d.ts +11 -187
- package/dist/browser.js +30 -6
- package/dist/browser.mjs +96 -72
- package/dist/chunk-2EH2MGBY.js +1799 -0
- package/dist/chunk-33IQXDOH.js +1 -0
- package/dist/chunk-5EK7K5X3.js +29 -0
- package/dist/chunk-5VF442RA.mjs +29 -0
- package/dist/chunk-626TXMVP.js +706 -0
- package/dist/chunk-63UT3IEY.mjs +2788 -0
- package/dist/chunk-6EKVRPFF.js +407 -0
- package/dist/chunk-776XPK66.js +45 -0
- package/dist/chunk-7D4MLQKO.js +69 -0
- package/dist/chunk-A2CGW2UF.js +25 -0
- package/dist/chunk-AOSK4RGV.mjs +45 -0
- package/dist/{chunk-FQ3NEYIV.js → chunk-ASPCIBWD.js} +127 -1249
- package/dist/chunk-BDHPMB7Q.mjs +61 -0
- package/dist/chunk-BHHOS2E6.mjs +407 -0
- package/dist/chunk-F2UCOAO6.mjs +155 -0
- package/dist/chunk-HP4DAUGT.js +2788 -0
- package/dist/chunk-JF5TM534.js +1065 -0
- package/dist/chunk-K6DSQPVF.mjs +706 -0
- package/dist/chunk-KJK2IGNN.mjs +0 -0
- package/dist/chunk-KYGLANYG.mjs +2354 -0
- package/dist/chunk-LFQXT7PV.mjs +69 -0
- package/dist/chunk-LS5SHP75.js +155 -0
- package/dist/chunk-MMIZQMIO.mjs +25 -0
- package/dist/chunk-NIUEAHPN.js +2354 -0
- package/dist/{chunk-EWLB5X64.js → chunk-PMPROVJW.js} +66 -770
- package/dist/chunk-QFYOH4DY.mjs +0 -0
- package/dist/chunk-QKUNJEVW.mjs +1401 -0
- package/dist/chunk-SBT2RMUW.mjs +1065 -0
- package/dist/chunk-TCXDBRRT.mjs +1799 -0
- package/dist/chunk-WNQIUYWY.js +61 -0
- package/dist/{chunk-I4X4GRMP.mjs → chunk-WS5LSW3S.mjs} +13 -1135
- package/dist/chunk-YKMNCYOD.js +1 -0
- package/dist/{chunk-UMEH3ENQ.mjs → chunk-ZRKJKEP7.mjs} +0 -704
- package/dist/chunk-ZSEJQPBO.js +1401 -0
- package/dist/core.d.mts +33 -0
- package/dist/core.d.ts +33 -0
- package/dist/core.js +524 -0
- package/dist/core.mjs +524 -0
- package/dist/file.d.mts +37 -0
- package/dist/file.d.ts +37 -0
- package/dist/file.js +14 -0
- package/dist/file.mjs +14 -0
- package/dist/index-C9lLZwol.d.mts +185 -0
- package/dist/index-DNA970t1.d.ts +185 -0
- package/dist/index.d.mts +12 -38
- package/dist/index.d.ts +12 -38
- package/dist/index.js +34 -49
- package/dist/index.mjs +101 -116
- package/dist/midi.d.mts +54 -0
- package/dist/midi.d.ts +54 -0
- package/dist/midi.js +10 -0
- package/dist/midi.mjs +10 -0
- package/dist/musicxml-DWPClEqa.d.ts +25 -0
- package/dist/musicxml-DzuFr2c3.d.mts +25 -0
- package/dist/musicxml-compressed-7NUEGLSF.mjs +8 -0
- package/dist/musicxml-compressed-7RL6QRF7.js +12 -0
- package/dist/musicxml-compressed-WPEIBOZ3.js +8 -0
- package/dist/musicxml-compressed-ZHZYFJ7H.mjs +12 -0
- package/dist/musicxml-compressed.d.mts +33 -0
- package/dist/musicxml-compressed.d.ts +33 -0
- package/dist/musicxml-compressed.js +18 -0
- package/dist/musicxml-compressed.mjs +18 -0
- package/dist/musicxml.d.mts +8 -0
- package/dist/musicxml.d.ts +8 -0
- package/dist/musicxml.js +14 -0
- package/dist/musicxml.mjs +14 -0
- package/dist/operations/index.d.mts +1234 -2
- package/dist/operations/index.d.ts +1234 -2
- package/dist/operations/index.js +7 -3
- package/dist/operations/index.mjs +6 -2
- package/dist/playback-timeline-CVRHsikj.d.mts +129 -0
- package/dist/playback-timeline-CmWA8YDy.d.ts +129 -0
- package/dist/query/index.d.mts +3 -128
- package/dist/query/index.d.ts +3 -128
- package/dist/query/index.js +4 -2
- package/dist/query/index.mjs +7 -5
- package/dist/{types-Cy0veafI.d.mts → types-B-RGHY0c.d.mts} +1 -1
- package/dist/{types-Cy0veafI.d.ts → types-B-RGHY0c.d.ts} +1 -1
- package/package.json +36 -2
- package/dist/chunk-T2USSS5E.mjs +0 -8939
- package/dist/chunk-UT7LQW6V.js +0 -8939
- package/dist/index-CbUtBHLD.d.ts +0 -1415
- package/dist/index-CuMPBK7U.d.mts +0 -1415
|
@@ -1,2 +1,1234 @@
|
|
|
1
|
-
import '../types-
|
|
2
|
-
|
|
1
|
+
import { S as Score, g as Pitch, N as NoteEntry, v as TimeSignature, K as KeySignature, w as Clef, ao as ArticulationType, p as DynamicsValue, ap as OrnamentType, h as NoteType, C as Color } from '../types-B-RGHY0c.js';
|
|
2
|
+
import { t as ValidationError } from '../index-DNA970t1.js';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Operation result type - success with data or failure with errors
|
|
6
|
+
*/
|
|
7
|
+
type OperationResult<T> = {
|
|
8
|
+
success: true;
|
|
9
|
+
data: T;
|
|
10
|
+
warnings?: ValidationError[];
|
|
11
|
+
} | {
|
|
12
|
+
success: false;
|
|
13
|
+
errors: ValidationError[];
|
|
14
|
+
};
|
|
15
|
+
type OperationErrorCode = 'NOTE_CONFLICT' | 'EXCEEDS_MEASURE' | 'INVALID_POSITION' | 'NOTE_NOT_FOUND' | 'PART_NOT_FOUND' | 'MEASURE_NOT_FOUND' | 'INVALID_DURATION' | 'INVALID_STAFF' | 'DUPLICATE_PART_ID' | 'TIE_ALREADY_EXISTS' | 'TIE_NOT_FOUND' | 'TIE_PITCH_MISMATCH' | 'TIE_INVALID_TARGET' | 'SLUR_ALREADY_EXISTS' | 'SLUR_NOT_FOUND' | 'ARTICULATION_ALREADY_EXISTS' | 'ARTICULATION_NOT_FOUND' | 'DYNAMICS_ALREADY_EXISTS' | 'DYNAMICS_NOT_FOUND' | 'INVALID_CLEF' | 'ACCIDENTAL_OUT_OF_BOUNDS' | 'BARLINE_NOT_FOUND' | 'BARLINE_ALREADY_EXISTS' | 'ENDING_NOT_FOUND' | 'ENDING_ALREADY_EXISTS' | 'REPEAT_NOT_FOUND' | 'REPEAT_ALREADY_EXISTS' | 'GRACE_NOTE_NOT_FOUND' | 'INVALID_GRACE_NOTE' | 'LYRIC_NOT_FOUND' | 'LYRIC_ALREADY_EXISTS' | 'HARMONY_NOT_FOUND' | 'HARMONY_ALREADY_EXISTS' | 'INVALID_HARMONY' | 'TEMPO_NOT_FOUND' | 'INVALID_RANGE' | 'WEDGE_NOT_FOUND' | 'FERMATA_ALREADY_EXISTS' | 'FERMATA_NOT_FOUND' | 'ORNAMENT_ALREADY_EXISTS' | 'ORNAMENT_NOT_FOUND' | 'PEDAL_NOT_FOUND' | 'INVALID_TEXT';
|
|
16
|
+
interface InsertNoteOptions {
|
|
17
|
+
partIndex: number;
|
|
18
|
+
measureIndex: number;
|
|
19
|
+
voice: string;
|
|
20
|
+
staff?: number;
|
|
21
|
+
position: number;
|
|
22
|
+
pitch: Pitch;
|
|
23
|
+
duration: number;
|
|
24
|
+
noteType?: NoteEntry['noteType'];
|
|
25
|
+
dots?: number;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Insert a note at the specified position in a voice.
|
|
29
|
+
* - If the position has a rest, replaces it with the note
|
|
30
|
+
* - If there's a conflicting note, returns NOTE_CONFLICT error
|
|
31
|
+
* - If the note exceeds measure duration, returns EXCEEDS_MEASURE error
|
|
32
|
+
*/
|
|
33
|
+
declare function insertNote(score: Score, options: InsertNoteOptions): OperationResult<Score>;
|
|
34
|
+
interface RemoveNoteOptions {
|
|
35
|
+
partIndex: number;
|
|
36
|
+
measureIndex: number;
|
|
37
|
+
noteIndex: number;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Remove a note and replace with rest
|
|
41
|
+
*/
|
|
42
|
+
declare function removeNote(score: Score, options: RemoveNoteOptions): OperationResult<Score>;
|
|
43
|
+
interface AddChordOptions {
|
|
44
|
+
partIndex: number;
|
|
45
|
+
measureIndex: number;
|
|
46
|
+
noteIndex: number;
|
|
47
|
+
pitch: Pitch;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Add a chord note to an existing note
|
|
51
|
+
*/
|
|
52
|
+
declare function addChord(score: Score, options: AddChordOptions): OperationResult<Score>;
|
|
53
|
+
interface ChangeNoteDurationOptions {
|
|
54
|
+
partIndex: number;
|
|
55
|
+
measureIndex: number;
|
|
56
|
+
noteIndex: number;
|
|
57
|
+
newDuration: number;
|
|
58
|
+
noteType?: NoteEntry['noteType'];
|
|
59
|
+
dots?: number;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Change note duration with proper handling of following notes
|
|
63
|
+
* - If longer: consumes following rests/notes, returns error if would overwrite notes
|
|
64
|
+
* - If shorter: fills remainder with rest
|
|
65
|
+
*/
|
|
66
|
+
declare function changeNoteDuration(score: Score, options: ChangeNoteDurationOptions): OperationResult<Score>;
|
|
67
|
+
interface SetNotePitchOptions {
|
|
68
|
+
partIndex: number;
|
|
69
|
+
measureIndex: number;
|
|
70
|
+
noteIndex: number;
|
|
71
|
+
pitch: Pitch;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Set note pitch (simple pitch change, no validation needed)
|
|
75
|
+
*/
|
|
76
|
+
declare function setNotePitch(score: Score, options: SetNotePitchOptions): OperationResult<Score>;
|
|
77
|
+
interface SetNotePitchBySemitoneOptions {
|
|
78
|
+
partIndex: number;
|
|
79
|
+
measureIndex: number;
|
|
80
|
+
noteIndex: number;
|
|
81
|
+
/** MIDI-like semitone value (C4 = 48, C#4 = 49, etc.) */
|
|
82
|
+
semitone: number;
|
|
83
|
+
/** Prefer sharp spelling over flat (defaults to key signature preference) */
|
|
84
|
+
preferSharp?: boolean;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Set note pitch by semitone value, considering key signature and accidentals.
|
|
88
|
+
* Automatically determines the appropriate enharmonic spelling and sets the accidental if needed.
|
|
89
|
+
*/
|
|
90
|
+
declare function setNotePitchBySemitone(score: Score, options: SetNotePitchBySemitoneOptions): OperationResult<Score>;
|
|
91
|
+
interface ShiftNotePitchOptions {
|
|
92
|
+
partIndex: number;
|
|
93
|
+
measureIndex: number;
|
|
94
|
+
noteIndex: number;
|
|
95
|
+
/** Number of semitones to shift (positive = up, negative = down) */
|
|
96
|
+
semitones: number;
|
|
97
|
+
/** Prefer sharp spelling over flat (defaults to key signature preference) */
|
|
98
|
+
preferSharp?: boolean;
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Shift note pitch by a number of semitones, considering key signature and accidentals.
|
|
102
|
+
* Automatically determines the appropriate enharmonic spelling and sets the accidental if needed.
|
|
103
|
+
*/
|
|
104
|
+
declare function shiftNotePitch(score: Score, options: ShiftNotePitchOptions): OperationResult<Score>;
|
|
105
|
+
interface RaiseAccidentalOptions {
|
|
106
|
+
partIndex: number;
|
|
107
|
+
measureIndex: number;
|
|
108
|
+
noteIndex: number;
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Raise the accidental of a note by one step.
|
|
112
|
+
* C → C#, C# → C##, Db → D, etc.
|
|
113
|
+
* Keeps the note's step (letter name) and increments alter by 1.
|
|
114
|
+
* Returns error if alter would exceed +2.
|
|
115
|
+
*/
|
|
116
|
+
declare function raiseAccidental(score: Score, options: RaiseAccidentalOptions): OperationResult<Score>;
|
|
117
|
+
interface LowerAccidentalOptions {
|
|
118
|
+
partIndex: number;
|
|
119
|
+
measureIndex: number;
|
|
120
|
+
noteIndex: number;
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Lower the accidental of a note by one step.
|
|
124
|
+
* C# → C, C## → C#, D → Db, Db → Dbb, etc.
|
|
125
|
+
* Keeps the note's step (letter name) and decrements alter by 1.
|
|
126
|
+
* Returns error if alter would go below -2.
|
|
127
|
+
*/
|
|
128
|
+
declare function lowerAccidental(score: Score, options: LowerAccidentalOptions): OperationResult<Score>;
|
|
129
|
+
interface AddVoiceOptions {
|
|
130
|
+
partIndex: number;
|
|
131
|
+
measureIndex: number;
|
|
132
|
+
voice: string;
|
|
133
|
+
staff?: number;
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* Add a new voice to a measure, filled with a whole-measure rest
|
|
137
|
+
*/
|
|
138
|
+
declare function addVoice(score: Score, options: AddVoiceOptions): OperationResult<Score>;
|
|
139
|
+
/**
|
|
140
|
+
* Transpose all notes in the score
|
|
141
|
+
*/
|
|
142
|
+
declare function transpose(score: Score, semitones: number): OperationResult<Score>;
|
|
143
|
+
interface AddPartOptions {
|
|
144
|
+
id: string;
|
|
145
|
+
name?: string;
|
|
146
|
+
abbreviation?: string;
|
|
147
|
+
insertIndex?: number;
|
|
148
|
+
time?: TimeSignature;
|
|
149
|
+
key?: KeySignature;
|
|
150
|
+
clef?: Clef;
|
|
151
|
+
divisions?: number;
|
|
152
|
+
}
|
|
153
|
+
declare function addPart(score: Score, options: AddPartOptions): OperationResult<Score>;
|
|
154
|
+
declare function removePart(score: Score, partId: string): OperationResult<Score>;
|
|
155
|
+
interface DuplicatePartOptions {
|
|
156
|
+
sourcePartId: string;
|
|
157
|
+
newPartId: string;
|
|
158
|
+
newPartName?: string;
|
|
159
|
+
}
|
|
160
|
+
declare function duplicatePart(score: Score, options: DuplicatePartOptions): OperationResult<Score>;
|
|
161
|
+
interface SetStavesOptions {
|
|
162
|
+
partIndex: number;
|
|
163
|
+
staves: number;
|
|
164
|
+
clefs?: Clef[];
|
|
165
|
+
fromMeasure?: number;
|
|
166
|
+
}
|
|
167
|
+
declare function setStaves(score: Score, options: SetStavesOptions): OperationResult<Score>;
|
|
168
|
+
interface MoveNoteToStaffOptions {
|
|
169
|
+
partIndex: number;
|
|
170
|
+
measureIndex: number;
|
|
171
|
+
noteIndex: number;
|
|
172
|
+
targetStaff: number;
|
|
173
|
+
}
|
|
174
|
+
declare function moveNoteToStaff(score: Score, options: MoveNoteToStaffOptions): OperationResult<Score>;
|
|
175
|
+
declare function changeKey(score: Score, key: KeySignature, options: {
|
|
176
|
+
fromMeasure: string | number;
|
|
177
|
+
}): Score;
|
|
178
|
+
declare function changeTime(score: Score, time: TimeSignature, options: {
|
|
179
|
+
fromMeasure: string | number;
|
|
180
|
+
}): Score;
|
|
181
|
+
declare function insertMeasure(score: Score, options: {
|
|
182
|
+
afterMeasure: string | number;
|
|
183
|
+
copyAttributes?: boolean;
|
|
184
|
+
}): Score;
|
|
185
|
+
declare function deleteMeasure(score: Score, measureNumber: string | number): Score;
|
|
186
|
+
interface AddTieOptions {
|
|
187
|
+
partIndex: number;
|
|
188
|
+
startMeasureIndex: number;
|
|
189
|
+
startNoteIndex: number;
|
|
190
|
+
endMeasureIndex: number;
|
|
191
|
+
endNoteIndex: number;
|
|
192
|
+
}
|
|
193
|
+
/**
|
|
194
|
+
* Add a tie between two notes.
|
|
195
|
+
* The notes must have the same pitch.
|
|
196
|
+
* Adds tie start to the first note and tie stop to the second note.
|
|
197
|
+
*/
|
|
198
|
+
declare function addTie(score: Score, options: AddTieOptions): OperationResult<Score>;
|
|
199
|
+
interface RemoveTieOptions {
|
|
200
|
+
partIndex: number;
|
|
201
|
+
measureIndex: number;
|
|
202
|
+
noteIndex: number;
|
|
203
|
+
}
|
|
204
|
+
/**
|
|
205
|
+
* Remove a tie from a note (removes both start and stop if the note is part of a tie)
|
|
206
|
+
*/
|
|
207
|
+
declare function removeTie(score: Score, options: RemoveTieOptions): OperationResult<Score>;
|
|
208
|
+
interface AddSlurOptions {
|
|
209
|
+
partIndex: number;
|
|
210
|
+
startMeasureIndex: number;
|
|
211
|
+
startNoteIndex: number;
|
|
212
|
+
endMeasureIndex: number;
|
|
213
|
+
endNoteIndex: number;
|
|
214
|
+
number?: number;
|
|
215
|
+
placement?: 'above' | 'below';
|
|
216
|
+
}
|
|
217
|
+
/**
|
|
218
|
+
* Add a slur between two notes
|
|
219
|
+
*/
|
|
220
|
+
declare function addSlur(score: Score, options: AddSlurOptions): OperationResult<Score>;
|
|
221
|
+
interface RemoveSlurOptions {
|
|
222
|
+
partIndex: number;
|
|
223
|
+
measureIndex: number;
|
|
224
|
+
noteIndex: number;
|
|
225
|
+
number?: number;
|
|
226
|
+
}
|
|
227
|
+
/**
|
|
228
|
+
* Remove a slur from a note
|
|
229
|
+
*/
|
|
230
|
+
declare function removeSlur(score: Score, options: RemoveSlurOptions): OperationResult<Score>;
|
|
231
|
+
interface AddArticulationOptions {
|
|
232
|
+
partIndex: number;
|
|
233
|
+
measureIndex: number;
|
|
234
|
+
noteIndex: number;
|
|
235
|
+
articulation: ArticulationType;
|
|
236
|
+
placement?: 'above' | 'below';
|
|
237
|
+
}
|
|
238
|
+
/**
|
|
239
|
+
* Add an articulation to a note
|
|
240
|
+
*/
|
|
241
|
+
declare function addArticulation(score: Score, options: AddArticulationOptions): OperationResult<Score>;
|
|
242
|
+
interface RemoveArticulationOptions {
|
|
243
|
+
partIndex: number;
|
|
244
|
+
measureIndex: number;
|
|
245
|
+
noteIndex: number;
|
|
246
|
+
articulation: ArticulationType;
|
|
247
|
+
}
|
|
248
|
+
/**
|
|
249
|
+
* Remove an articulation from a note
|
|
250
|
+
*/
|
|
251
|
+
declare function removeArticulation(score: Score, options: RemoveArticulationOptions): OperationResult<Score>;
|
|
252
|
+
interface AddDynamicsOptions {
|
|
253
|
+
partIndex: number;
|
|
254
|
+
measureIndex: number;
|
|
255
|
+
position: number;
|
|
256
|
+
dynamics: DynamicsValue;
|
|
257
|
+
staff?: number;
|
|
258
|
+
placement?: 'above' | 'below';
|
|
259
|
+
}
|
|
260
|
+
/**
|
|
261
|
+
* Add a dynamics marking at a specific position in a measure
|
|
262
|
+
*/
|
|
263
|
+
declare function addDynamics(score: Score, options: AddDynamicsOptions): OperationResult<Score>;
|
|
264
|
+
interface RemoveDynamicsOptions {
|
|
265
|
+
partIndex: number;
|
|
266
|
+
measureIndex: number;
|
|
267
|
+
directionIndex: number;
|
|
268
|
+
}
|
|
269
|
+
/**
|
|
270
|
+
* Remove a dynamics direction from a measure
|
|
271
|
+
*/
|
|
272
|
+
declare function removeDynamics(score: Score, options: RemoveDynamicsOptions): OperationResult<Score>;
|
|
273
|
+
interface ModifyDynamicsOptions {
|
|
274
|
+
partIndex: number;
|
|
275
|
+
measureIndex: number;
|
|
276
|
+
/** Index of the dynamics direction to modify (among dynamics directions in the measure) */
|
|
277
|
+
directionIndex: number;
|
|
278
|
+
/** New dynamics value */
|
|
279
|
+
dynamics: DynamicsValue;
|
|
280
|
+
/** New placement (optional) */
|
|
281
|
+
placement?: 'above' | 'below';
|
|
282
|
+
}
|
|
283
|
+
/**
|
|
284
|
+
* Modify an existing dynamics marking in a measure
|
|
285
|
+
*/
|
|
286
|
+
declare function modifyDynamics(score: Score, options: ModifyDynamicsOptions): OperationResult<Score>;
|
|
287
|
+
interface InsertClefChangeOptions {
|
|
288
|
+
partIndex: number;
|
|
289
|
+
measureIndex: number;
|
|
290
|
+
position: number;
|
|
291
|
+
clef: Clef;
|
|
292
|
+
}
|
|
293
|
+
/**
|
|
294
|
+
* Insert a clef change at a specific position within a measure
|
|
295
|
+
*/
|
|
296
|
+
declare function insertClefChange(score: Score, options: InsertClefChangeOptions): OperationResult<Score>;
|
|
297
|
+
/** @deprecated Use insertNote instead */
|
|
298
|
+
declare const addNote: (score: Score, options: {
|
|
299
|
+
partIndex: number;
|
|
300
|
+
measureIndex: number;
|
|
301
|
+
staff?: number;
|
|
302
|
+
voice: string;
|
|
303
|
+
position: number;
|
|
304
|
+
note: Omit<NoteEntry, "type" | "voice" | "staff">;
|
|
305
|
+
}) => Score;
|
|
306
|
+
/** @deprecated Use removeNote instead */
|
|
307
|
+
declare const deleteNote: (score: Score, options: {
|
|
308
|
+
partIndex: number;
|
|
309
|
+
measureIndex: number;
|
|
310
|
+
noteIndex: number;
|
|
311
|
+
}) => Score;
|
|
312
|
+
/** @deprecated Use addChord instead */
|
|
313
|
+
declare const addChordNote: (score: Score, options: {
|
|
314
|
+
partIndex: number;
|
|
315
|
+
measureIndex: number;
|
|
316
|
+
afterNoteIndex: number;
|
|
317
|
+
pitch: Pitch;
|
|
318
|
+
}) => Score;
|
|
319
|
+
/** @deprecated Use setNotePitch instead */
|
|
320
|
+
declare const modifyNotePitch: (score: Score, options: {
|
|
321
|
+
partIndex: number;
|
|
322
|
+
measureIndex: number;
|
|
323
|
+
noteIndex: number;
|
|
324
|
+
pitch: Pitch;
|
|
325
|
+
}) => Score;
|
|
326
|
+
/** @deprecated Use changeNoteDuration instead */
|
|
327
|
+
declare const modifyNoteDuration: (score: Score, options: {
|
|
328
|
+
partIndex: number;
|
|
329
|
+
measureIndex: number;
|
|
330
|
+
noteIndex: number;
|
|
331
|
+
duration: number;
|
|
332
|
+
noteType?: NoteEntry["noteType"];
|
|
333
|
+
dots?: number;
|
|
334
|
+
}) => Score;
|
|
335
|
+
/** @deprecated Use insertNote instead */
|
|
336
|
+
declare const addNoteChecked: (score: Score, options: {
|
|
337
|
+
partIndex: number;
|
|
338
|
+
measureIndex: number;
|
|
339
|
+
staff?: number;
|
|
340
|
+
voice: string;
|
|
341
|
+
position: number;
|
|
342
|
+
note: Omit<NoteEntry, "type" | "voice" | "staff">;
|
|
343
|
+
}) => OperationResult<Score>;
|
|
344
|
+
/** @deprecated Use removeNote instead */
|
|
345
|
+
declare const deleteNoteChecked: typeof removeNote;
|
|
346
|
+
/** @deprecated Use addChord instead */
|
|
347
|
+
declare const addChordNoteChecked: (score: Score, options: {
|
|
348
|
+
partIndex: number;
|
|
349
|
+
measureIndex: number;
|
|
350
|
+
afterNoteIndex: number;
|
|
351
|
+
pitch: Pitch;
|
|
352
|
+
}) => OperationResult<Score>;
|
|
353
|
+
/** @deprecated Use setNotePitch instead */
|
|
354
|
+
declare const modifyNotePitchChecked: typeof setNotePitch;
|
|
355
|
+
/** @deprecated Use changeNoteDuration instead */
|
|
356
|
+
declare const modifyNoteDurationChecked: (score: Score, options: {
|
|
357
|
+
partIndex: number;
|
|
358
|
+
measureIndex: number;
|
|
359
|
+
noteIndex: number;
|
|
360
|
+
duration: number;
|
|
361
|
+
noteType?: NoteEntry["noteType"];
|
|
362
|
+
dots?: number;
|
|
363
|
+
}) => OperationResult<Score>;
|
|
364
|
+
/** @deprecated Use transpose instead */
|
|
365
|
+
declare const transposeChecked: typeof transpose;
|
|
366
|
+
interface CreateTupletOptions {
|
|
367
|
+
partIndex: number;
|
|
368
|
+
measureIndex: number;
|
|
369
|
+
/** Starting note index (0-based, counting pitched notes only) */
|
|
370
|
+
startNoteIndex: number;
|
|
371
|
+
/** Number of notes to include in the tuplet */
|
|
372
|
+
noteCount: number;
|
|
373
|
+
/** Actual notes in the time of normal notes (e.g., 3 for triplet) */
|
|
374
|
+
actualNotes: number;
|
|
375
|
+
/** Normal notes (e.g., 2 for triplet) */
|
|
376
|
+
normalNotes: number;
|
|
377
|
+
/** Show bracket (default: true) */
|
|
378
|
+
bracket?: boolean;
|
|
379
|
+
/** Show number display (default: 'actual') */
|
|
380
|
+
showNumber?: 'actual' | 'both' | 'none';
|
|
381
|
+
}
|
|
382
|
+
/**
|
|
383
|
+
* Create a tuplet from consecutive notes.
|
|
384
|
+
* A tuplet fits `actualNotes` notes in the time of `normalNotes` (e.g., 3 in the time of 2 for triplets).
|
|
385
|
+
*
|
|
386
|
+
* @example
|
|
387
|
+
* // Create a triplet from 3 eighth notes (3 in the time of 2)
|
|
388
|
+
* createTuplet(score, {
|
|
389
|
+
* partIndex: 0,
|
|
390
|
+
* measureIndex: 0,
|
|
391
|
+
* startNoteIndex: 0,
|
|
392
|
+
* noteCount: 3,
|
|
393
|
+
* actualNotes: 3,
|
|
394
|
+
* normalNotes: 2,
|
|
395
|
+
* })
|
|
396
|
+
*/
|
|
397
|
+
declare function createTuplet(score: Score, options: CreateTupletOptions): OperationResult<Score>;
|
|
398
|
+
interface RemoveTupletOptions {
|
|
399
|
+
partIndex: number;
|
|
400
|
+
measureIndex: number;
|
|
401
|
+
/** Note index of any note within the tuplet */
|
|
402
|
+
noteIndex: number;
|
|
403
|
+
}
|
|
404
|
+
/**
|
|
405
|
+
* Remove tuplet from notes.
|
|
406
|
+
* Finds the tuplet containing the specified note and removes all tuplet information.
|
|
407
|
+
*/
|
|
408
|
+
declare function removeTuplet(score: Score, options: RemoveTupletOptions): OperationResult<Score>;
|
|
409
|
+
interface AddBeamOptions {
|
|
410
|
+
partIndex: number;
|
|
411
|
+
measureIndex: number;
|
|
412
|
+
/** Starting note index */
|
|
413
|
+
startNoteIndex: number;
|
|
414
|
+
/** Number of notes to beam together */
|
|
415
|
+
noteCount: number;
|
|
416
|
+
/** Beam level (1 = eighth notes, 2 = sixteenth notes, etc.) */
|
|
417
|
+
beamLevel?: number;
|
|
418
|
+
}
|
|
419
|
+
/**
|
|
420
|
+
* Add beaming to consecutive notes.
|
|
421
|
+
* Notes must be in the same voice and should be eighth notes or shorter.
|
|
422
|
+
*/
|
|
423
|
+
declare function addBeam(score: Score, options: AddBeamOptions): OperationResult<Score>;
|
|
424
|
+
interface RemoveBeamOptions {
|
|
425
|
+
partIndex: number;
|
|
426
|
+
measureIndex: number;
|
|
427
|
+
/** Note index of any note within the beam group */
|
|
428
|
+
noteIndex: number;
|
|
429
|
+
/** Beam level to remove (default: all levels) */
|
|
430
|
+
beamLevel?: number;
|
|
431
|
+
}
|
|
432
|
+
/**
|
|
433
|
+
* Remove beaming from notes.
|
|
434
|
+
*/
|
|
435
|
+
declare function removeBeam(score: Score, options: RemoveBeamOptions): OperationResult<Score>;
|
|
436
|
+
interface AutoBeamOptions {
|
|
437
|
+
partIndex: number;
|
|
438
|
+
measureIndex: number;
|
|
439
|
+
/** Optional voice filter */
|
|
440
|
+
voice?: string;
|
|
441
|
+
/** Group by beat (default: true) */
|
|
442
|
+
groupByBeat?: boolean;
|
|
443
|
+
}
|
|
444
|
+
/**
|
|
445
|
+
* Automatically beam notes based on time signature and beat groupings.
|
|
446
|
+
* Groups eighth notes and shorter notes by beat.
|
|
447
|
+
*/
|
|
448
|
+
declare function autoBeam(score: Score, options: AutoBeamOptions): OperationResult<Score>;
|
|
449
|
+
/**
|
|
450
|
+
* Selection represents copied content that can be pasted
|
|
451
|
+
*/
|
|
452
|
+
interface NoteSelection {
|
|
453
|
+
/** Source information */
|
|
454
|
+
source: {
|
|
455
|
+
partIndex: number;
|
|
456
|
+
measureIndex: number;
|
|
457
|
+
startPosition: number;
|
|
458
|
+
endPosition: number;
|
|
459
|
+
voice: string;
|
|
460
|
+
staff?: number;
|
|
461
|
+
};
|
|
462
|
+
/** Copied notes with their relative positions */
|
|
463
|
+
notes: Array<{
|
|
464
|
+
/** Relative position from selection start */
|
|
465
|
+
relativePosition: number;
|
|
466
|
+
/** Note data (deep cloned) */
|
|
467
|
+
note: NoteEntry;
|
|
468
|
+
}>;
|
|
469
|
+
/** Total duration of the selection */
|
|
470
|
+
duration: number;
|
|
471
|
+
}
|
|
472
|
+
interface CopyNotesOptions {
|
|
473
|
+
partIndex: number;
|
|
474
|
+
measureIndex: number;
|
|
475
|
+
/** Start position in the measure (in divisions) */
|
|
476
|
+
startPosition: number;
|
|
477
|
+
/** End position in the measure (in divisions) */
|
|
478
|
+
endPosition: number;
|
|
479
|
+
/** Voice to copy from */
|
|
480
|
+
voice: string;
|
|
481
|
+
/** Staff to copy from (optional) */
|
|
482
|
+
staff?: number;
|
|
483
|
+
}
|
|
484
|
+
/**
|
|
485
|
+
* Copy notes from a range in a measure.
|
|
486
|
+
* Returns a NoteSelection that can be used with pasteNotes.
|
|
487
|
+
*/
|
|
488
|
+
declare function copyNotes(score: Score, options: CopyNotesOptions): OperationResult<NoteSelection>;
|
|
489
|
+
interface PasteNotesOptions {
|
|
490
|
+
/** Selection to paste */
|
|
491
|
+
selection: NoteSelection;
|
|
492
|
+
/** Target part index */
|
|
493
|
+
partIndex: number;
|
|
494
|
+
/** Target measure index */
|
|
495
|
+
measureIndex: number;
|
|
496
|
+
/** Target position in the measure */
|
|
497
|
+
position: number;
|
|
498
|
+
/** Target voice (defaults to original voice) */
|
|
499
|
+
voice?: string;
|
|
500
|
+
/** Target staff (defaults to original staff) */
|
|
501
|
+
staff?: number;
|
|
502
|
+
/** Clear existing notes in the paste range (default: true) */
|
|
503
|
+
overwrite?: boolean;
|
|
504
|
+
}
|
|
505
|
+
/**
|
|
506
|
+
* Paste notes from a NoteSelection to a target position.
|
|
507
|
+
*/
|
|
508
|
+
declare function pasteNotes(score: Score, options: PasteNotesOptions): OperationResult<Score>;
|
|
509
|
+
type CutNotesOptions = CopyNotesOptions;
|
|
510
|
+
/**
|
|
511
|
+
* Cut notes from a range (copy and delete).
|
|
512
|
+
* Returns both the selection and the modified score.
|
|
513
|
+
*/
|
|
514
|
+
declare function cutNotes(score: Score, options: CutNotesOptions): OperationResult<{
|
|
515
|
+
score: Score;
|
|
516
|
+
selection: NoteSelection;
|
|
517
|
+
}>;
|
|
518
|
+
interface CopyNotesMultiMeasureOptions {
|
|
519
|
+
partIndex: number;
|
|
520
|
+
/** Starting measure index */
|
|
521
|
+
startMeasureIndex: number;
|
|
522
|
+
/** Ending measure index (inclusive) */
|
|
523
|
+
endMeasureIndex: number;
|
|
524
|
+
/** Voice to copy from */
|
|
525
|
+
voice: string;
|
|
526
|
+
/** Staff to copy from (optional) */
|
|
527
|
+
staff?: number;
|
|
528
|
+
}
|
|
529
|
+
/**
|
|
530
|
+
* Selection for multiple measures
|
|
531
|
+
*/
|
|
532
|
+
interface MultiMeasureSelection {
|
|
533
|
+
source: {
|
|
534
|
+
partIndex: number;
|
|
535
|
+
startMeasureIndex: number;
|
|
536
|
+
endMeasureIndex: number;
|
|
537
|
+
voice: string;
|
|
538
|
+
staff?: number;
|
|
539
|
+
};
|
|
540
|
+
/** Notes grouped by measure offset */
|
|
541
|
+
measures: Array<{
|
|
542
|
+
measureOffset: number;
|
|
543
|
+
notes: Array<{
|
|
544
|
+
relativePosition: number;
|
|
545
|
+
note: NoteEntry;
|
|
546
|
+
}>;
|
|
547
|
+
}>;
|
|
548
|
+
}
|
|
549
|
+
/**
|
|
550
|
+
* Copy notes across multiple measures.
|
|
551
|
+
*/
|
|
552
|
+
declare function copyNotesMultiMeasure(score: Score, options: CopyNotesMultiMeasureOptions): OperationResult<MultiMeasureSelection>;
|
|
553
|
+
interface PasteNotesMultiMeasureOptions {
|
|
554
|
+
selection: MultiMeasureSelection;
|
|
555
|
+
partIndex: number;
|
|
556
|
+
/** Target starting measure index */
|
|
557
|
+
startMeasureIndex: number;
|
|
558
|
+
/** Target voice (defaults to original voice) */
|
|
559
|
+
voice?: string;
|
|
560
|
+
/** Target staff (defaults to original staff) */
|
|
561
|
+
staff?: number;
|
|
562
|
+
/** Clear existing notes in paste measures (default: true) */
|
|
563
|
+
overwrite?: boolean;
|
|
564
|
+
}
|
|
565
|
+
/**
|
|
566
|
+
* Paste notes across multiple measures.
|
|
567
|
+
*/
|
|
568
|
+
declare function pasteNotesMultiMeasure(score: Score, options: PasteNotesMultiMeasureOptions): OperationResult<Score>;
|
|
569
|
+
interface AddTempoOptions {
|
|
570
|
+
partIndex: number;
|
|
571
|
+
measureIndex: number;
|
|
572
|
+
/** Position in divisions within the measure */
|
|
573
|
+
position: number;
|
|
574
|
+
/** Tempo in BPM */
|
|
575
|
+
bpm: number;
|
|
576
|
+
/** Beat unit (e.g., 'quarter', 'half', 'eighth') */
|
|
577
|
+
beatUnit?: 'whole' | 'half' | 'quarter' | 'eighth' | '16th';
|
|
578
|
+
/** Whether beat unit has a dot */
|
|
579
|
+
beatUnitDot?: boolean;
|
|
580
|
+
/** Text description (e.g., 'Allegro', 'Andante') */
|
|
581
|
+
text?: string;
|
|
582
|
+
/** Placement (above/below staff) */
|
|
583
|
+
placement?: 'above' | 'below';
|
|
584
|
+
}
|
|
585
|
+
/**
|
|
586
|
+
* Add a tempo marking to a measure.
|
|
587
|
+
*/
|
|
588
|
+
declare function addTempo(score: Score, options: AddTempoOptions): OperationResult<Score>;
|
|
589
|
+
interface RemoveTempoOptions {
|
|
590
|
+
partIndex: number;
|
|
591
|
+
measureIndex: number;
|
|
592
|
+
/** Index of the direction to remove (among tempo directions) */
|
|
593
|
+
directionIndex?: number;
|
|
594
|
+
}
|
|
595
|
+
/**
|
|
596
|
+
* Remove a tempo marking from a measure.
|
|
597
|
+
*/
|
|
598
|
+
declare function removeTempo(score: Score, options: RemoveTempoOptions): OperationResult<Score>;
|
|
599
|
+
interface ModifyTempoOptions {
|
|
600
|
+
partIndex: number;
|
|
601
|
+
measureIndex: number;
|
|
602
|
+
/** Index of the tempo direction to modify (among tempo directions in the measure) */
|
|
603
|
+
directionIndex?: number;
|
|
604
|
+
/** New BPM value */
|
|
605
|
+
bpm?: number;
|
|
606
|
+
/** New beat unit */
|
|
607
|
+
beatUnit?: 'whole' | 'half' | 'quarter' | 'eighth' | '16th' | '32nd' | '64th';
|
|
608
|
+
/** Beat unit dot */
|
|
609
|
+
beatUnitDot?: boolean;
|
|
610
|
+
/** New tempo text (e.g., 'Allegro') */
|
|
611
|
+
text?: string;
|
|
612
|
+
/** Placement */
|
|
613
|
+
placement?: 'above' | 'below';
|
|
614
|
+
}
|
|
615
|
+
/**
|
|
616
|
+
* Modify an existing tempo marking in a measure
|
|
617
|
+
*/
|
|
618
|
+
declare function modifyTempo(score: Score, options: ModifyTempoOptions): OperationResult<Score>;
|
|
619
|
+
interface AddWedgeOptions {
|
|
620
|
+
partIndex: number;
|
|
621
|
+
/** Starting measure index */
|
|
622
|
+
startMeasureIndex: number;
|
|
623
|
+
/** Starting position in divisions */
|
|
624
|
+
startPosition: number;
|
|
625
|
+
/** Ending measure index */
|
|
626
|
+
endMeasureIndex: number;
|
|
627
|
+
/** Ending position in divisions */
|
|
628
|
+
endPosition: number;
|
|
629
|
+
/** Wedge type */
|
|
630
|
+
type: 'crescendo' | 'diminuendo';
|
|
631
|
+
/** Staff number (for multi-staff parts) */
|
|
632
|
+
staff?: number;
|
|
633
|
+
/** Placement (above/below) */
|
|
634
|
+
placement?: 'above' | 'below';
|
|
635
|
+
}
|
|
636
|
+
/**
|
|
637
|
+
* Add a wedge (crescendo or diminuendo) spanning one or more measures.
|
|
638
|
+
*/
|
|
639
|
+
declare function addWedge(score: Score, options: AddWedgeOptions): OperationResult<Score>;
|
|
640
|
+
interface RemoveWedgeOptions {
|
|
641
|
+
partIndex: number;
|
|
642
|
+
measureIndex: number;
|
|
643
|
+
/** Index of the wedge start direction to remove */
|
|
644
|
+
directionIndex?: number;
|
|
645
|
+
}
|
|
646
|
+
/**
|
|
647
|
+
* Remove a wedge (and its corresponding stop).
|
|
648
|
+
*/
|
|
649
|
+
declare function removeWedge(score: Score, options: RemoveWedgeOptions): OperationResult<Score>;
|
|
650
|
+
interface AddFermataOptions {
|
|
651
|
+
partIndex: number;
|
|
652
|
+
measureIndex: number;
|
|
653
|
+
noteIndex: number;
|
|
654
|
+
/** Fermata shape */
|
|
655
|
+
shape?: 'normal' | 'angled' | 'square' | 'double-angled' | 'double-square' | 'double-dot' | 'half-curve' | 'curlew';
|
|
656
|
+
/** Fermata type (upright or inverted) */
|
|
657
|
+
fermataType?: 'upright' | 'inverted';
|
|
658
|
+
/** Placement */
|
|
659
|
+
placement?: 'above' | 'below';
|
|
660
|
+
}
|
|
661
|
+
/**
|
|
662
|
+
* Add a fermata to a note.
|
|
663
|
+
*/
|
|
664
|
+
declare function addFermata(score: Score, options: AddFermataOptions): OperationResult<Score>;
|
|
665
|
+
interface RemoveFermataOptions {
|
|
666
|
+
partIndex: number;
|
|
667
|
+
measureIndex: number;
|
|
668
|
+
noteIndex: number;
|
|
669
|
+
}
|
|
670
|
+
/**
|
|
671
|
+
* Remove a fermata from a note.
|
|
672
|
+
*/
|
|
673
|
+
declare function removeFermata(score: Score, options: RemoveFermataOptions): OperationResult<Score>;
|
|
674
|
+
interface AddOrnamentOptions {
|
|
675
|
+
partIndex: number;
|
|
676
|
+
measureIndex: number;
|
|
677
|
+
noteIndex: number;
|
|
678
|
+
/** Ornament type */
|
|
679
|
+
ornament: OrnamentType;
|
|
680
|
+
/** Placement */
|
|
681
|
+
placement?: 'above' | 'below';
|
|
682
|
+
/** Accidental mark for the ornament */
|
|
683
|
+
accidentalMark?: 'sharp' | 'flat' | 'natural' | 'double-sharp' | 'flat-flat';
|
|
684
|
+
}
|
|
685
|
+
/**
|
|
686
|
+
* Add an ornament (trill, mordent, turn, etc.) to a note.
|
|
687
|
+
*/
|
|
688
|
+
declare function addOrnament(score: Score, options: AddOrnamentOptions): OperationResult<Score>;
|
|
689
|
+
interface RemoveOrnamentOptions {
|
|
690
|
+
partIndex: number;
|
|
691
|
+
measureIndex: number;
|
|
692
|
+
noteIndex: number;
|
|
693
|
+
/** Specific ornament to remove (removes first ornament if not specified) */
|
|
694
|
+
ornament?: OrnamentType;
|
|
695
|
+
}
|
|
696
|
+
/**
|
|
697
|
+
* Remove an ornament from a note.
|
|
698
|
+
*/
|
|
699
|
+
declare function removeOrnament(score: Score, options: RemoveOrnamentOptions): OperationResult<Score>;
|
|
700
|
+
interface AddPedalOptions {
|
|
701
|
+
partIndex: number;
|
|
702
|
+
measureIndex: number;
|
|
703
|
+
/** Position in divisions */
|
|
704
|
+
position: number;
|
|
705
|
+
/** Pedal type */
|
|
706
|
+
pedalType: 'start' | 'stop' | 'change' | 'continue';
|
|
707
|
+
/** Show as line or Ped/star symbols */
|
|
708
|
+
line?: boolean;
|
|
709
|
+
/** Placement */
|
|
710
|
+
placement?: 'above' | 'below';
|
|
711
|
+
}
|
|
712
|
+
/**
|
|
713
|
+
* Add a pedal marking.
|
|
714
|
+
*/
|
|
715
|
+
declare function addPedal(score: Score, options: AddPedalOptions): OperationResult<Score>;
|
|
716
|
+
interface RemovePedalOptions {
|
|
717
|
+
partIndex: number;
|
|
718
|
+
measureIndex: number;
|
|
719
|
+
/** Index of the pedal direction to remove (among pedal directions) */
|
|
720
|
+
directionIndex?: number;
|
|
721
|
+
}
|
|
722
|
+
/**
|
|
723
|
+
* Remove a pedal marking.
|
|
724
|
+
*/
|
|
725
|
+
declare function removePedal(score: Score, options: RemovePedalOptions): OperationResult<Score>;
|
|
726
|
+
interface AddTextDirectionOptions {
|
|
727
|
+
partIndex: number;
|
|
728
|
+
measureIndex: number;
|
|
729
|
+
/** Position in divisions */
|
|
730
|
+
position: number;
|
|
731
|
+
/** Text content */
|
|
732
|
+
text: string;
|
|
733
|
+
/** Font style */
|
|
734
|
+
fontStyle?: 'normal' | 'italic';
|
|
735
|
+
/** Font weight */
|
|
736
|
+
fontWeight?: 'normal' | 'bold';
|
|
737
|
+
/** Placement */
|
|
738
|
+
placement?: 'above' | 'below';
|
|
739
|
+
}
|
|
740
|
+
/**
|
|
741
|
+
* Add a text direction (expression text, performance instruction).
|
|
742
|
+
*/
|
|
743
|
+
declare function addTextDirection(score: Score, options: AddTextDirectionOptions): OperationResult<Score>;
|
|
744
|
+
interface AddRehearsalMarkOptions {
|
|
745
|
+
partIndex: number;
|
|
746
|
+
measureIndex: number;
|
|
747
|
+
/** Rehearsal mark text (e.g., 'A', 'B', '1', '2') */
|
|
748
|
+
text: string;
|
|
749
|
+
/** Enclosure type */
|
|
750
|
+
enclosure?: 'square' | 'circle' | 'oval' | 'rectangle' | 'diamond' | 'triangle' | 'pentagon' | 'hexagon' | 'none';
|
|
751
|
+
}
|
|
752
|
+
/**
|
|
753
|
+
* Add a rehearsal mark to a measure.
|
|
754
|
+
*/
|
|
755
|
+
declare function addRehearsalMark(score: Score, options: AddRehearsalMarkOptions): OperationResult<Score>;
|
|
756
|
+
type BarStyle = 'regular' | 'dotted' | 'dashed' | 'heavy' | 'light-light' | 'light-heavy' | 'heavy-light' | 'heavy-heavy' | 'tick' | 'short' | 'none';
|
|
757
|
+
interface AddRepeatBarlineOptions {
|
|
758
|
+
partIndex: number;
|
|
759
|
+
measureIndex: number;
|
|
760
|
+
direction: 'forward' | 'backward';
|
|
761
|
+
times?: number;
|
|
762
|
+
}
|
|
763
|
+
/**
|
|
764
|
+
* Add a repeat barline to a measure.
|
|
765
|
+
* Forward repeats go on the left, backward repeats go on the right.
|
|
766
|
+
* This operation applies to all parts at the specified measure index.
|
|
767
|
+
*/
|
|
768
|
+
declare function addRepeatBarline(score: Score, options: AddRepeatBarlineOptions): OperationResult<Score>;
|
|
769
|
+
interface RemoveRepeatBarlineOptions {
|
|
770
|
+
partIndex: number;
|
|
771
|
+
measureIndex: number;
|
|
772
|
+
location: 'left' | 'right';
|
|
773
|
+
}
|
|
774
|
+
/**
|
|
775
|
+
* Remove a repeat barline from a measure.
|
|
776
|
+
* This operation applies to all parts at the specified measure index.
|
|
777
|
+
*/
|
|
778
|
+
declare function removeRepeatBarline(score: Score, options: RemoveRepeatBarlineOptions): OperationResult<Score>;
|
|
779
|
+
interface AddEndingOptions {
|
|
780
|
+
partIndex: number;
|
|
781
|
+
measureIndex: number;
|
|
782
|
+
number: string;
|
|
783
|
+
type: 'start' | 'stop' | 'discontinue';
|
|
784
|
+
}
|
|
785
|
+
/**
|
|
786
|
+
* Add an ending (volta bracket) to a measure.
|
|
787
|
+
* Start endings go on the left barline, stop/discontinue on the right.
|
|
788
|
+
* This operation applies to all parts at the specified measure index.
|
|
789
|
+
*/
|
|
790
|
+
declare function addEnding(score: Score, options: AddEndingOptions): OperationResult<Score>;
|
|
791
|
+
interface RemoveEndingOptions {
|
|
792
|
+
partIndex: number;
|
|
793
|
+
measureIndex: number;
|
|
794
|
+
location: 'left' | 'right';
|
|
795
|
+
}
|
|
796
|
+
/**
|
|
797
|
+
* Remove an ending (volta bracket) from a measure.
|
|
798
|
+
* This operation applies to all parts at the specified measure index.
|
|
799
|
+
*/
|
|
800
|
+
declare function removeEnding(score: Score, options: RemoveEndingOptions): OperationResult<Score>;
|
|
801
|
+
interface ChangeBarlineOptions {
|
|
802
|
+
partIndex: number;
|
|
803
|
+
measureIndex: number;
|
|
804
|
+
location: 'left' | 'right' | 'middle';
|
|
805
|
+
barStyle: BarStyle;
|
|
806
|
+
}
|
|
807
|
+
/**
|
|
808
|
+
* Change the barline style at a specific location in a measure.
|
|
809
|
+
* This operation applies to all parts at the specified measure index.
|
|
810
|
+
*/
|
|
811
|
+
declare function changeBarline(score: Score, options: ChangeBarlineOptions): OperationResult<Score>;
|
|
812
|
+
interface AddSegnoOptions {
|
|
813
|
+
partIndex: number;
|
|
814
|
+
measureIndex: number;
|
|
815
|
+
position?: number;
|
|
816
|
+
}
|
|
817
|
+
/**
|
|
818
|
+
* Add a segno sign to a measure.
|
|
819
|
+
*/
|
|
820
|
+
declare function addSegno(score: Score, options: AddSegnoOptions): OperationResult<Score>;
|
|
821
|
+
interface AddCodaOptions {
|
|
822
|
+
partIndex: number;
|
|
823
|
+
measureIndex: number;
|
|
824
|
+
position?: number;
|
|
825
|
+
}
|
|
826
|
+
/**
|
|
827
|
+
* Add a coda sign to a measure.
|
|
828
|
+
*/
|
|
829
|
+
declare function addCoda(score: Score, options: AddCodaOptions): OperationResult<Score>;
|
|
830
|
+
interface AddNavigationOptions {
|
|
831
|
+
partIndex: number;
|
|
832
|
+
measureIndex: number;
|
|
833
|
+
position?: number;
|
|
834
|
+
}
|
|
835
|
+
/**
|
|
836
|
+
* Add a D.C. (Da Capo) marking to a measure.
|
|
837
|
+
* This adds both the text direction and the sound element.
|
|
838
|
+
*/
|
|
839
|
+
declare function addDaCapo(score: Score, options: AddNavigationOptions): OperationResult<Score>;
|
|
840
|
+
/**
|
|
841
|
+
* Add a D.S. (Dal Segno) marking to a measure.
|
|
842
|
+
*/
|
|
843
|
+
declare function addDalSegno(score: Score, options: AddNavigationOptions): OperationResult<Score>;
|
|
844
|
+
/**
|
|
845
|
+
* Add a Fine marking to a measure.
|
|
846
|
+
*/
|
|
847
|
+
declare function addFine(score: Score, options: AddNavigationOptions): OperationResult<Score>;
|
|
848
|
+
/**
|
|
849
|
+
* Add a To Coda marking to a measure.
|
|
850
|
+
*/
|
|
851
|
+
declare function addToCoda(score: Score, options: AddNavigationOptions): OperationResult<Score>;
|
|
852
|
+
interface AddGraceNoteOptions {
|
|
853
|
+
partIndex: number;
|
|
854
|
+
measureIndex: number;
|
|
855
|
+
targetNoteIndex: number;
|
|
856
|
+
pitch: Pitch;
|
|
857
|
+
noteType?: NoteType;
|
|
858
|
+
slash?: boolean;
|
|
859
|
+
voice?: string;
|
|
860
|
+
staff?: number;
|
|
861
|
+
}
|
|
862
|
+
/**
|
|
863
|
+
* Add a grace note before a target note.
|
|
864
|
+
* Grace notes do not have duration in MusicXML.
|
|
865
|
+
*/
|
|
866
|
+
declare function addGraceNote(score: Score, options: AddGraceNoteOptions): OperationResult<Score>;
|
|
867
|
+
interface RemoveGraceNoteOptions {
|
|
868
|
+
partIndex: number;
|
|
869
|
+
measureIndex: number;
|
|
870
|
+
graceNoteIndex: number;
|
|
871
|
+
}
|
|
872
|
+
/**
|
|
873
|
+
* Remove a grace note from a measure.
|
|
874
|
+
*/
|
|
875
|
+
declare function removeGraceNote(score: Score, options: RemoveGraceNoteOptions): OperationResult<Score>;
|
|
876
|
+
interface ConvertToGraceOptions {
|
|
877
|
+
partIndex: number;
|
|
878
|
+
measureIndex: number;
|
|
879
|
+
noteIndex: number;
|
|
880
|
+
slash?: boolean;
|
|
881
|
+
}
|
|
882
|
+
/**
|
|
883
|
+
* Convert a regular note to a grace note.
|
|
884
|
+
* The note's duration will be removed.
|
|
885
|
+
*/
|
|
886
|
+
declare function convertToGrace(score: Score, options: ConvertToGraceOptions): OperationResult<Score>;
|
|
887
|
+
interface AddLyricOptions {
|
|
888
|
+
partIndex: number;
|
|
889
|
+
measureIndex: number;
|
|
890
|
+
noteIndex: number;
|
|
891
|
+
text: string;
|
|
892
|
+
syllabic?: 'single' | 'begin' | 'middle' | 'end';
|
|
893
|
+
verse?: number;
|
|
894
|
+
extend?: boolean;
|
|
895
|
+
}
|
|
896
|
+
/**
|
|
897
|
+
* Add a lyric to a note.
|
|
898
|
+
*/
|
|
899
|
+
declare function addLyric(score: Score, options: AddLyricOptions): OperationResult<Score>;
|
|
900
|
+
interface RemoveLyricOptions {
|
|
901
|
+
partIndex: number;
|
|
902
|
+
measureIndex: number;
|
|
903
|
+
noteIndex: number;
|
|
904
|
+
verse?: number;
|
|
905
|
+
}
|
|
906
|
+
/**
|
|
907
|
+
* Remove a lyric from a note.
|
|
908
|
+
*/
|
|
909
|
+
declare function removeLyric(score: Score, options: RemoveLyricOptions): OperationResult<Score>;
|
|
910
|
+
interface UpdateLyricOptions {
|
|
911
|
+
partIndex: number;
|
|
912
|
+
measureIndex: number;
|
|
913
|
+
noteIndex: number;
|
|
914
|
+
verse?: number;
|
|
915
|
+
text?: string;
|
|
916
|
+
syllabic?: 'single' | 'begin' | 'middle' | 'end';
|
|
917
|
+
extend?: boolean;
|
|
918
|
+
}
|
|
919
|
+
/**
|
|
920
|
+
* Update an existing lyric on a note.
|
|
921
|
+
*/
|
|
922
|
+
declare function updateLyric(score: Score, options: UpdateLyricOptions): OperationResult<Score>;
|
|
923
|
+
type HarmonyKind = 'major' | 'minor' | 'augmented' | 'diminished' | 'dominant' | 'major-seventh' | 'minor-seventh' | 'diminished-seventh' | 'augmented-seventh' | 'half-diminished' | 'major-minor' | 'major-sixth' | 'minor-sixth' | 'dominant-ninth' | 'major-ninth' | 'minor-ninth' | 'dominant-11th' | 'major-11th' | 'minor-11th' | 'dominant-13th' | 'major-13th' | 'minor-13th' | 'suspended-second' | 'suspended-fourth' | 'Neapolitan' | 'Italian' | 'French' | 'German' | 'pedal' | 'power' | 'Tristan' | 'other' | 'none';
|
|
924
|
+
interface AddHarmonyOptions {
|
|
925
|
+
partIndex: number;
|
|
926
|
+
measureIndex: number;
|
|
927
|
+
position: number;
|
|
928
|
+
root: {
|
|
929
|
+
step: string;
|
|
930
|
+
alter?: number;
|
|
931
|
+
};
|
|
932
|
+
kind: HarmonyKind;
|
|
933
|
+
kindText?: string;
|
|
934
|
+
bass?: {
|
|
935
|
+
step: string;
|
|
936
|
+
alter?: number;
|
|
937
|
+
};
|
|
938
|
+
degrees?: {
|
|
939
|
+
value: number;
|
|
940
|
+
alter?: number;
|
|
941
|
+
type: 'add' | 'alter' | 'subtract';
|
|
942
|
+
}[];
|
|
943
|
+
staff?: number;
|
|
944
|
+
placement?: 'above' | 'below';
|
|
945
|
+
}
|
|
946
|
+
/**
|
|
947
|
+
* Add a harmony (chord symbol) to a measure.
|
|
948
|
+
*/
|
|
949
|
+
declare function addHarmony(score: Score, options: AddHarmonyOptions): OperationResult<Score>;
|
|
950
|
+
interface RemoveHarmonyOptions {
|
|
951
|
+
partIndex: number;
|
|
952
|
+
measureIndex: number;
|
|
953
|
+
harmonyIndex: number;
|
|
954
|
+
}
|
|
955
|
+
/**
|
|
956
|
+
* Remove a harmony from a measure.
|
|
957
|
+
*/
|
|
958
|
+
declare function removeHarmony(score: Score, options: RemoveHarmonyOptions): OperationResult<Score>;
|
|
959
|
+
interface UpdateHarmonyOptions {
|
|
960
|
+
partIndex: number;
|
|
961
|
+
measureIndex: number;
|
|
962
|
+
harmonyIndex: number;
|
|
963
|
+
root?: {
|
|
964
|
+
step: string;
|
|
965
|
+
alter?: number;
|
|
966
|
+
};
|
|
967
|
+
kind?: HarmonyKind;
|
|
968
|
+
kindText?: string;
|
|
969
|
+
bass?: {
|
|
970
|
+
step: string;
|
|
971
|
+
alter?: number;
|
|
972
|
+
} | null;
|
|
973
|
+
degrees?: {
|
|
974
|
+
value: number;
|
|
975
|
+
alter?: number;
|
|
976
|
+
type: 'add' | 'alter' | 'subtract';
|
|
977
|
+
}[] | null;
|
|
978
|
+
}
|
|
979
|
+
/**
|
|
980
|
+
* Update an existing harmony in a measure.
|
|
981
|
+
*/
|
|
982
|
+
declare function updateHarmony(score: Score, options: UpdateHarmonyOptions): OperationResult<Score>;
|
|
983
|
+
interface AddFingeringOptions {
|
|
984
|
+
partIndex: number;
|
|
985
|
+
measureIndex: number;
|
|
986
|
+
noteIndex: number;
|
|
987
|
+
fingering: string;
|
|
988
|
+
substitution?: boolean;
|
|
989
|
+
alternate?: boolean;
|
|
990
|
+
placement?: 'above' | 'below';
|
|
991
|
+
}
|
|
992
|
+
/**
|
|
993
|
+
* Add fingering notation to a note.
|
|
994
|
+
* Fingering is typically indicated 1,2,3,4,5.
|
|
995
|
+
*/
|
|
996
|
+
declare function addFingering(score: Score, options: AddFingeringOptions): OperationResult<Score>;
|
|
997
|
+
interface RemoveFingeringOptions {
|
|
998
|
+
partIndex: number;
|
|
999
|
+
measureIndex: number;
|
|
1000
|
+
noteIndex: number;
|
|
1001
|
+
}
|
|
1002
|
+
/**
|
|
1003
|
+
* Remove fingering notation from a note.
|
|
1004
|
+
*/
|
|
1005
|
+
declare function removeFingering(score: Score, options: RemoveFingeringOptions): OperationResult<Score>;
|
|
1006
|
+
type BowingType = 'up-bow' | 'down-bow';
|
|
1007
|
+
interface AddBowingOptions {
|
|
1008
|
+
partIndex: number;
|
|
1009
|
+
measureIndex: number;
|
|
1010
|
+
noteIndex: number;
|
|
1011
|
+
bowingType: BowingType;
|
|
1012
|
+
placement?: 'above' | 'below';
|
|
1013
|
+
}
|
|
1014
|
+
/**
|
|
1015
|
+
* Add bowing notation (up-bow or down-bow) to a note.
|
|
1016
|
+
* Used for bowed string instruments.
|
|
1017
|
+
*/
|
|
1018
|
+
declare function addBowing(score: Score, options: AddBowingOptions): OperationResult<Score>;
|
|
1019
|
+
interface RemoveBowingOptions {
|
|
1020
|
+
partIndex: number;
|
|
1021
|
+
measureIndex: number;
|
|
1022
|
+
noteIndex: number;
|
|
1023
|
+
bowingType?: BowingType;
|
|
1024
|
+
}
|
|
1025
|
+
/**
|
|
1026
|
+
* Remove bowing notation from a note.
|
|
1027
|
+
*/
|
|
1028
|
+
declare function removeBowing(score: Score, options: RemoveBowingOptions): OperationResult<Score>;
|
|
1029
|
+
interface AddStringNumberOptions {
|
|
1030
|
+
partIndex: number;
|
|
1031
|
+
measureIndex: number;
|
|
1032
|
+
noteIndex: number;
|
|
1033
|
+
stringNumber: number;
|
|
1034
|
+
placement?: 'above' | 'below';
|
|
1035
|
+
}
|
|
1036
|
+
/**
|
|
1037
|
+
* Add string number notation to a note.
|
|
1038
|
+
* Used for fretted instruments and bowed strings.
|
|
1039
|
+
*/
|
|
1040
|
+
declare function addStringNumber(score: Score, options: AddStringNumberOptions): OperationResult<Score>;
|
|
1041
|
+
interface RemoveStringNumberOptions {
|
|
1042
|
+
partIndex: number;
|
|
1043
|
+
measureIndex: number;
|
|
1044
|
+
noteIndex: number;
|
|
1045
|
+
}
|
|
1046
|
+
/**
|
|
1047
|
+
* Remove string number notation from a note.
|
|
1048
|
+
*/
|
|
1049
|
+
declare function removeStringNumber(score: Score, options: RemoveStringNumberOptions): OperationResult<Score>;
|
|
1050
|
+
type OctaveShiftType = 'up' | 'down';
|
|
1051
|
+
interface AddOctaveShiftOptions {
|
|
1052
|
+
partIndex: number;
|
|
1053
|
+
measureIndex: number;
|
|
1054
|
+
position: number;
|
|
1055
|
+
shiftType: OctaveShiftType;
|
|
1056
|
+
size?: number;
|
|
1057
|
+
}
|
|
1058
|
+
/**
|
|
1059
|
+
* Add an octave shift (8va/8vb) direction.
|
|
1060
|
+
* Type 'down' means notes appear higher than sounding (8va).
|
|
1061
|
+
* Type 'up' means notes appear lower than sounding (8vb).
|
|
1062
|
+
*/
|
|
1063
|
+
declare function addOctaveShift(score: Score, options: AddOctaveShiftOptions): OperationResult<Score>;
|
|
1064
|
+
interface StopOctaveShiftOptions {
|
|
1065
|
+
partIndex: number;
|
|
1066
|
+
measureIndex: number;
|
|
1067
|
+
position: number;
|
|
1068
|
+
size?: number;
|
|
1069
|
+
}
|
|
1070
|
+
/**
|
|
1071
|
+
* Stop an octave shift at the specified position.
|
|
1072
|
+
*/
|
|
1073
|
+
declare function stopOctaveShift(score: Score, options: StopOctaveShiftOptions): OperationResult<Score>;
|
|
1074
|
+
interface RemoveOctaveShiftOptions {
|
|
1075
|
+
partIndex: number;
|
|
1076
|
+
measureIndex: number;
|
|
1077
|
+
octaveShiftIndex?: number;
|
|
1078
|
+
}
|
|
1079
|
+
/**
|
|
1080
|
+
* Remove an octave shift direction from a measure.
|
|
1081
|
+
*/
|
|
1082
|
+
declare function removeOctaveShift(score: Score, options: RemoveOctaveShiftOptions): OperationResult<Score>;
|
|
1083
|
+
type BreathMarkValue = 'comma' | 'tick' | 'upbow' | 'salzedo';
|
|
1084
|
+
interface AddBreathMarkOptions {
|
|
1085
|
+
partIndex: number;
|
|
1086
|
+
measureIndex: number;
|
|
1087
|
+
noteIndex: number;
|
|
1088
|
+
breathMarkType?: BreathMarkValue;
|
|
1089
|
+
placement?: 'above' | 'below';
|
|
1090
|
+
}
|
|
1091
|
+
/**
|
|
1092
|
+
* Add a breath mark to a note.
|
|
1093
|
+
* Breath marks indicate where a performer should breathe.
|
|
1094
|
+
*/
|
|
1095
|
+
declare function addBreathMark(score: Score, options: AddBreathMarkOptions): OperationResult<Score>;
|
|
1096
|
+
interface RemoveBreathMarkOptions {
|
|
1097
|
+
partIndex: number;
|
|
1098
|
+
measureIndex: number;
|
|
1099
|
+
noteIndex: number;
|
|
1100
|
+
}
|
|
1101
|
+
/**
|
|
1102
|
+
* Remove a breath mark from a note.
|
|
1103
|
+
*/
|
|
1104
|
+
declare function removeBreathMark(score: Score, options: RemoveBreathMarkOptions): OperationResult<Score>;
|
|
1105
|
+
type CaesuraValue = 'normal' | 'thick' | 'short' | 'curved' | 'single';
|
|
1106
|
+
interface AddCaesuraOptions {
|
|
1107
|
+
partIndex: number;
|
|
1108
|
+
measureIndex: number;
|
|
1109
|
+
noteIndex: number;
|
|
1110
|
+
caesuraType?: CaesuraValue;
|
|
1111
|
+
placement?: 'above' | 'below';
|
|
1112
|
+
}
|
|
1113
|
+
/**
|
|
1114
|
+
* Add a caesura to a note.
|
|
1115
|
+
* A caesura indicates a brief, silent pause.
|
|
1116
|
+
* It is notated using a "railroad tracks" symbol.
|
|
1117
|
+
*/
|
|
1118
|
+
declare function addCaesura(score: Score, options: AddCaesuraOptions): OperationResult<Score>;
|
|
1119
|
+
interface RemoveCaesuraOptions {
|
|
1120
|
+
partIndex: number;
|
|
1121
|
+
measureIndex: number;
|
|
1122
|
+
noteIndex: number;
|
|
1123
|
+
}
|
|
1124
|
+
/**
|
|
1125
|
+
* Remove a caesura from a note.
|
|
1126
|
+
*/
|
|
1127
|
+
declare function removeCaesura(score: Score, options: RemoveCaesuraOptions): OperationResult<Score>;
|
|
1128
|
+
/**
|
|
1129
|
+
* Kinds of score element `setColor` can paint.
|
|
1130
|
+
*
|
|
1131
|
+
* `'note'` colours the `<note>` element itself, which notation programs treat
|
|
1132
|
+
* as the colour of the whole note. The finer-grained targets below it colour
|
|
1133
|
+
* an individual child element, which overrides the note colour for that part
|
|
1134
|
+
* of the note only.
|
|
1135
|
+
*/
|
|
1136
|
+
type ColorTarget = 'note' | 'notehead' | 'stem' | 'beam' | 'accidental' | 'dot' | 'noteType' | 'notation' | 'lyric' | 'direction' | 'harmony' | 'figuredBass' | 'clef' | 'key' | 'time' | 'barline';
|
|
1137
|
+
/** Every `ColorTarget`, in a stable order. */
|
|
1138
|
+
declare const ALL_COLOR_TARGETS: readonly ColorTarget[];
|
|
1139
|
+
interface SetColorOptions {
|
|
1140
|
+
/** Colour to apply (e.g. `"#FF0000"`), or `null` to remove it. */
|
|
1141
|
+
color: Color | null;
|
|
1142
|
+
/** Element kinds to paint. Defaults to `['note']`. */
|
|
1143
|
+
targets?: ColorTarget[];
|
|
1144
|
+
/** Restrict to these part indices. Defaults to every part. */
|
|
1145
|
+
partIndices?: number[];
|
|
1146
|
+
/** Restrict to these part IDs (e.g. `'P1'`). Defaults to every part. */
|
|
1147
|
+
partIds?: string[];
|
|
1148
|
+
/** Restrict to these measure numbers. Defaults to every measure. */
|
|
1149
|
+
measureNumbers?: (string | number)[];
|
|
1150
|
+
/**
|
|
1151
|
+
* Only paint notes for which this returns true. Applies to the note targets
|
|
1152
|
+
* (`note`, `notehead`, `stem`, `beam`, `accidental`, `dot`, `noteType`,
|
|
1153
|
+
* `notation`, `lyric`); other targets are unaffected by it.
|
|
1154
|
+
*/
|
|
1155
|
+
noteFilter?: (note: NoteEntry) => boolean;
|
|
1156
|
+
}
|
|
1157
|
+
/**
|
|
1158
|
+
* Set (or clear) the colour of score elements.
|
|
1159
|
+
*
|
|
1160
|
+
* Returns a new Score; the input is left untouched. With no `targets` it
|
|
1161
|
+
* paints the `<note>` elements, which is what "colour these notes" usually
|
|
1162
|
+
* means.
|
|
1163
|
+
*
|
|
1164
|
+
* ```typescript
|
|
1165
|
+
* // every note in measures 5-6 of the first part, red
|
|
1166
|
+
* const marked = setColor(score, {
|
|
1167
|
+
* color: '#FF0000',
|
|
1168
|
+
* partIndices: [0],
|
|
1169
|
+
* measureNumbers: [5, 6],
|
|
1170
|
+
* });
|
|
1171
|
+
*
|
|
1172
|
+
* // a single note found earlier, plus its stem and beams
|
|
1173
|
+
* const one = setColor(score, {
|
|
1174
|
+
* color: '#0000FF',
|
|
1175
|
+
* targets: ['note', 'stem', 'beam'],
|
|
1176
|
+
* noteFilter: (n) => n._id === noteId,
|
|
1177
|
+
* });
|
|
1178
|
+
* ```
|
|
1179
|
+
*/
|
|
1180
|
+
declare function setColor(score: Score, options: SetColorOptions): Score;
|
|
1181
|
+
/**
|
|
1182
|
+
* Remove every colour from a score — including the ones this library's
|
|
1183
|
+
* targeted operations do not reach, such as part names and credit words.
|
|
1184
|
+
*
|
|
1185
|
+
* Returns a new Score; the input is left untouched.
|
|
1186
|
+
*/
|
|
1187
|
+
declare function clearColors(score: Score): Score;
|
|
1188
|
+
/**
|
|
1189
|
+
* Add text to the score. Alias for addTextDirection.
|
|
1190
|
+
*/
|
|
1191
|
+
declare const addText: typeof addTextDirection;
|
|
1192
|
+
type AddTextOptions = AddTextDirectionOptions;
|
|
1193
|
+
/**
|
|
1194
|
+
* Set beaming for notes. Alias for autoBeam.
|
|
1195
|
+
*/
|
|
1196
|
+
declare const setBeaming: typeof autoBeam;
|
|
1197
|
+
type SetBeamingOptions = AutoBeamOptions;
|
|
1198
|
+
/**
|
|
1199
|
+
* Add a chord symbol. Alias for addHarmony.
|
|
1200
|
+
*/
|
|
1201
|
+
declare const addChordSymbol: typeof addHarmony;
|
|
1202
|
+
type AddChordSymbolOptions = AddHarmonyOptions;
|
|
1203
|
+
/**
|
|
1204
|
+
* Remove a chord symbol. Alias for removeHarmony.
|
|
1205
|
+
*/
|
|
1206
|
+
declare const removeChordSymbol: typeof removeHarmony;
|
|
1207
|
+
type RemoveChordSymbolOptions = RemoveHarmonyOptions;
|
|
1208
|
+
/**
|
|
1209
|
+
* Update a chord symbol. Alias for updateHarmony.
|
|
1210
|
+
*/
|
|
1211
|
+
declare const updateChordSymbol: typeof updateHarmony;
|
|
1212
|
+
type UpdateChordSymbolOptions = UpdateHarmonyOptions;
|
|
1213
|
+
/**
|
|
1214
|
+
* Change the clef at a position. Alias for insertClefChange.
|
|
1215
|
+
*/
|
|
1216
|
+
declare const changeClef: typeof insertClefChange;
|
|
1217
|
+
type ChangeClefOptions = InsertClefChangeOptions;
|
|
1218
|
+
/**
|
|
1219
|
+
* Set barline style. Alias for changeBarline.
|
|
1220
|
+
*/
|
|
1221
|
+
declare const setBarline: typeof changeBarline;
|
|
1222
|
+
type SetBarlineOptions = ChangeBarlineOptions;
|
|
1223
|
+
/**
|
|
1224
|
+
* Add a repeat barline. Alias for addRepeatBarline.
|
|
1225
|
+
*/
|
|
1226
|
+
declare const addRepeat: typeof addRepeatBarline;
|
|
1227
|
+
type AddRepeatOptions = AddRepeatBarlineOptions;
|
|
1228
|
+
/**
|
|
1229
|
+
* Remove a repeat barline. Alias for removeRepeatBarline.
|
|
1230
|
+
*/
|
|
1231
|
+
declare const removeRepeat: typeof removeRepeatBarline;
|
|
1232
|
+
type RemoveRepeatOptions = RemoveRepeatBarlineOptions;
|
|
1233
|
+
|
|
1234
|
+
export { ALL_COLOR_TARGETS, type AddArticulationOptions, type AddBeamOptions, type AddBowingOptions, type AddBreathMarkOptions, type AddCaesuraOptions, type AddChordOptions, type AddChordSymbolOptions, type AddCodaOptions, type AddDynamicsOptions, type AddEndingOptions, type AddFermataOptions, type AddFingeringOptions, type AddGraceNoteOptions, type AddHarmonyOptions, type AddLyricOptions, type AddNavigationOptions, type AddOctaveShiftOptions, type AddOrnamentOptions, type AddPartOptions, type AddPedalOptions, type AddRehearsalMarkOptions, type AddRepeatBarlineOptions, type AddRepeatOptions, type AddSegnoOptions, type AddSlurOptions, type AddStringNumberOptions, type AddTempoOptions, type AddTextDirectionOptions, type AddTextOptions, type AddTieOptions, type AddVoiceOptions, type AddWedgeOptions, type AutoBeamOptions, type BarStyle, type BowingType, type BreathMarkValue, type CaesuraValue, type ChangeBarlineOptions, type ChangeClefOptions, type ChangeNoteDurationOptions, type ColorTarget, type ConvertToGraceOptions, type CopyNotesMultiMeasureOptions, type CopyNotesOptions, type CreateTupletOptions, type CutNotesOptions, type DuplicatePartOptions, type HarmonyKind, type InsertClefChangeOptions, type InsertNoteOptions, type LowerAccidentalOptions, type ModifyDynamicsOptions, type ModifyTempoOptions, type MoveNoteToStaffOptions, type MultiMeasureSelection, type NoteSelection, type OctaveShiftType, type OperationErrorCode, type OperationResult, type PasteNotesMultiMeasureOptions, type PasteNotesOptions, type RaiseAccidentalOptions, type RemoveArticulationOptions, type RemoveBeamOptions, type RemoveBowingOptions, type RemoveBreathMarkOptions, type RemoveCaesuraOptions, type RemoveChordSymbolOptions, type RemoveDynamicsOptions, type RemoveEndingOptions, type RemoveFermataOptions, type RemoveFingeringOptions, type RemoveGraceNoteOptions, type RemoveHarmonyOptions, type RemoveLyricOptions, type RemoveNoteOptions, type RemoveOctaveShiftOptions, type RemoveOrnamentOptions, type RemovePedalOptions, type RemoveRepeatBarlineOptions, type RemoveRepeatOptions, type RemoveSlurOptions, type RemoveStringNumberOptions, type RemoveTempoOptions, type RemoveTieOptions, type RemoveTupletOptions, type RemoveWedgeOptions, type SetBarlineOptions, type SetBeamingOptions, type SetColorOptions, type SetNotePitchBySemitoneOptions, type SetNotePitchOptions, type SetStavesOptions, type ShiftNotePitchOptions, type StopOctaveShiftOptions, type UpdateChordSymbolOptions, type UpdateHarmonyOptions, type UpdateLyricOptions, ValidationError, addArticulation, addBeam, addBowing, addBreathMark, addCaesura, addChord, addChordNote, addChordNoteChecked, addChordSymbol, addCoda, addDaCapo, addDalSegno, addDynamics, addEnding, addFermata, addFine, addFingering, addGraceNote, addHarmony, addLyric, addNote, addNoteChecked, addOctaveShift, addOrnament, addPart, addPedal, addRehearsalMark, addRepeat, addRepeatBarline, addSegno, addSlur, addStringNumber, addTempo, addText, addTextDirection, addTie, addToCoda, addVoice, addWedge, autoBeam, changeBarline, changeClef, changeKey, changeNoteDuration, changeTime, clearColors, convertToGrace, copyNotes, copyNotesMultiMeasure, createTuplet, cutNotes, deleteMeasure, deleteNote, deleteNoteChecked, duplicatePart, insertClefChange, insertMeasure, insertNote, lowerAccidental, modifyDynamics, modifyNoteDuration, modifyNoteDurationChecked, modifyNotePitch, modifyNotePitchChecked, modifyTempo, moveNoteToStaff, pasteNotes, pasteNotesMultiMeasure, raiseAccidental, removeArticulation, removeBeam, removeBowing, removeBreathMark, removeCaesura, removeChordSymbol, removeDynamics, removeEnding, removeFermata, removeFingering, removeGraceNote, removeHarmony, removeLyric, removeNote, removeOctaveShift, removeOrnament, removePart, removePedal, removeRepeat, removeRepeatBarline, removeSlur, removeStringNumber, removeTempo, removeTie, removeTuplet, removeWedge, setBarline, setBeaming, setColor, setNotePitch, setNotePitchBySemitone, setStaves, shiftNotePitch, stopOctaveShift, transpose, transposeChecked, updateChordSymbol, updateHarmony, updateLyric };
|