musicxml-io 0.2.0 → 0.2.7
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 +27 -0
- package/dist/accessors/index.d.mts +1 -1
- package/dist/accessors/index.d.ts +1 -1
- package/dist/index-CVGy8DJi.d.ts +1269 -0
- package/dist/index-D4hW6ANJ.d.mts +1269 -0
- package/dist/index.d.mts +18 -5
- package/dist/index.d.ts +18 -5
- package/dist/index.js +31 -4
- package/dist/index.mjs +30 -4
- package/dist/operations/index.d.mts +2 -2
- package/dist/operations/index.d.ts +2 -2
- package/dist/operations/index.js +3211 -55
- package/dist/operations/index.mjs +3142 -54
- package/dist/query/index.d.mts +1 -1
- package/dist/query/index.d.ts +1 -1
- package/dist/{types-Dp9zcgIg.d.mts → types-CSI8kV28.d.mts} +17 -2
- package/dist/{types-Dp9zcgIg.d.ts → types-CSI8kV28.d.ts} +17 -2
- package/package.json +3 -2
- package/dist/index-DCty0U8p.d.ts +0 -377
- package/dist/index-nCaclfqu.d.mts +0 -377
|
@@ -0,0 +1,1269 @@
|
|
|
1
|
+
import { S as Score, M as Measure, n as TimeSignature, e as Part, N as NoteEntry, K as KeySignature, P as Pitch, C as Clef, ad as ArticulationType, m as DynamicsValue, ae as OrnamentType, h as NoteType } from './types-CSI8kV28.mjs';
|
|
2
|
+
|
|
3
|
+
type ValidationErrorCode = 'MISSING_DIVISIONS' | 'INVALID_DIVISIONS' | 'MEASURE_DURATION_MISMATCH' | 'MEASURE_DURATION_OVERFLOW' | 'MEASURE_DURATION_UNDERFLOW' | 'VOICE_INCOMPLETE' | 'VOICE_GAP' | 'NEGATIVE_POSITION' | 'BACKUP_EXCEEDS_POSITION' | 'TIE_START_WITHOUT_STOP' | 'TIE_STOP_WITHOUT_START' | 'TIE_PITCH_MISMATCH' | 'BEAM_BEGIN_WITHOUT_END' | 'BEAM_END_WITHOUT_BEGIN' | 'SLUR_START_WITHOUT_STOP' | 'SLUR_STOP_WITHOUT_START' | 'TUPLET_START_WITHOUT_STOP' | 'TUPLET_STOP_WITHOUT_START' | 'PART_ID_NOT_IN_PART_LIST' | 'PART_LIST_ID_NOT_IN_PARTS' | 'PART_MEASURE_COUNT_MISMATCH' | 'PART_MEASURE_NUMBER_MISMATCH' | 'PART_GROUP_START_WITHOUT_STOP' | 'PART_GROUP_STOP_WITHOUT_START' | 'DUPLICATE_PART_ID' | 'INVALID_VOICE_NUMBER' | 'INVALID_STAFF_NUMBER' | 'STAFF_EXCEEDS_STAVES' | 'MISSING_STAVES_DECLARATION' | 'STAVES_DECLARATION_MISMATCH' | 'MISSING_CLEF_FOR_STAFF' | 'CLEF_STAFF_EXCEEDS_STAVES' | 'INVALID_DURATION' | 'EMPTY_MEASURE';
|
|
4
|
+
type ValidationLevel = 'error' | 'warning' | 'info';
|
|
5
|
+
interface ValidationLocation {
|
|
6
|
+
partIndex?: number;
|
|
7
|
+
partId?: string;
|
|
8
|
+
measureIndex?: number;
|
|
9
|
+
measureNumber?: string;
|
|
10
|
+
entryIndex?: number;
|
|
11
|
+
voice?: number;
|
|
12
|
+
staff?: number;
|
|
13
|
+
}
|
|
14
|
+
interface ValidationError {
|
|
15
|
+
code: ValidationErrorCode;
|
|
16
|
+
level: ValidationLevel;
|
|
17
|
+
message: string;
|
|
18
|
+
location: ValidationLocation;
|
|
19
|
+
details?: Record<string, unknown>;
|
|
20
|
+
}
|
|
21
|
+
interface ValidationResult {
|
|
22
|
+
valid: boolean;
|
|
23
|
+
errors: ValidationError[];
|
|
24
|
+
warnings: ValidationError[];
|
|
25
|
+
infos: ValidationError[];
|
|
26
|
+
}
|
|
27
|
+
interface ValidateOptions {
|
|
28
|
+
/** Check divisions consistency (default: true) */
|
|
29
|
+
checkDivisions?: boolean;
|
|
30
|
+
/** Check measure durations match time signature (default: true) */
|
|
31
|
+
checkMeasureDuration?: boolean;
|
|
32
|
+
/** Check that each voice fills the entire measure (Piano Roll semantics) (default: false) */
|
|
33
|
+
checkMeasureFullness?: boolean;
|
|
34
|
+
/** Check backup/forward position consistency (default: true) */
|
|
35
|
+
checkPosition?: boolean;
|
|
36
|
+
/** Check tie start/stop pairing (default: true) */
|
|
37
|
+
checkTies?: boolean;
|
|
38
|
+
/** Check beam begin/end pairing (default: true) */
|
|
39
|
+
checkBeams?: boolean;
|
|
40
|
+
/** Check slur start/stop pairing (default: true) */
|
|
41
|
+
checkSlurs?: boolean;
|
|
42
|
+
/** Check tuplet start/stop pairing (default: true) */
|
|
43
|
+
checkTuplets?: boolean;
|
|
44
|
+
/** Check part ID references (default: true) */
|
|
45
|
+
checkPartReferences?: boolean;
|
|
46
|
+
/** Check part structure (measure count, numbers) (default: true) */
|
|
47
|
+
checkPartStructure?: boolean;
|
|
48
|
+
/** Check voice/staff numbers (default: true) */
|
|
49
|
+
checkVoiceStaff?: boolean;
|
|
50
|
+
/** Check staff structure (staves declaration, clefs) (default: true) */
|
|
51
|
+
checkStaffStructure?: boolean;
|
|
52
|
+
/** Tolerance for measure duration (in divisions, default: 0) */
|
|
53
|
+
durationTolerance?: number;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Validate a Score for internal consistency
|
|
57
|
+
*/
|
|
58
|
+
declare function validate(score: Score, options?: ValidateOptions): ValidationResult;
|
|
59
|
+
/**
|
|
60
|
+
* Validate that divisions are defined and consistent
|
|
61
|
+
*/
|
|
62
|
+
declare function validateDivisions(score: Score): ValidationError[];
|
|
63
|
+
/**
|
|
64
|
+
* Validate measure duration matches time signature
|
|
65
|
+
*/
|
|
66
|
+
declare function validateMeasureDuration(measure: Measure, divisions: number, time: TimeSignature, location: ValidationLocation, tolerance?: number): ValidationError[];
|
|
67
|
+
/**
|
|
68
|
+
* Validate backup/forward position consistency
|
|
69
|
+
*/
|
|
70
|
+
declare function validateBackupForward(measure: Measure, location: ValidationLocation): ValidationError[];
|
|
71
|
+
/**
|
|
72
|
+
* Validate tie start/stop pairing
|
|
73
|
+
*/
|
|
74
|
+
declare function validateTies(measure: Measure, location: ValidationLocation): ValidationError[];
|
|
75
|
+
/**
|
|
76
|
+
* Validate beam begin/end pairing
|
|
77
|
+
*/
|
|
78
|
+
declare function validateBeams(measure: Measure, location: ValidationLocation): ValidationError[];
|
|
79
|
+
/**
|
|
80
|
+
* Validate slur start/stop pairing
|
|
81
|
+
*/
|
|
82
|
+
declare function validateSlurs(measure: Measure, _location: ValidationLocation): ValidationError[];
|
|
83
|
+
/**
|
|
84
|
+
* Validate tuplet start/stop pairing
|
|
85
|
+
*/
|
|
86
|
+
declare function validateTuplets(measure: Measure, location: ValidationLocation): ValidationError[];
|
|
87
|
+
/**
|
|
88
|
+
* Validate part ID references between partList and parts
|
|
89
|
+
*/
|
|
90
|
+
declare function validatePartReferences(score: Score): ValidationError[];
|
|
91
|
+
/**
|
|
92
|
+
* Validate voice and staff numbers
|
|
93
|
+
*/
|
|
94
|
+
declare function validateVoiceStaff(measure: Measure, staves: number, location: ValidationLocation): ValidationError[];
|
|
95
|
+
/**
|
|
96
|
+
* Validate part structure (measure counts and numbers match across parts)
|
|
97
|
+
*/
|
|
98
|
+
declare function validatePartStructure(score: Score): ValidationError[];
|
|
99
|
+
/**
|
|
100
|
+
* Validate staff structure within a part
|
|
101
|
+
*/
|
|
102
|
+
declare function validateStaffStructure(part: Part, partIndex: number): ValidationError[];
|
|
103
|
+
/**
|
|
104
|
+
* Context needed to validate a single measure
|
|
105
|
+
*/
|
|
106
|
+
interface MeasureValidationContext {
|
|
107
|
+
/** Current divisions value (from previous attributes) */
|
|
108
|
+
divisions: number;
|
|
109
|
+
/** Current time signature */
|
|
110
|
+
time?: TimeSignature;
|
|
111
|
+
/** Current staves count */
|
|
112
|
+
staves: number;
|
|
113
|
+
/** Part index (for error location) */
|
|
114
|
+
partIndex: number;
|
|
115
|
+
/** Part ID (for error location) */
|
|
116
|
+
partId: string;
|
|
117
|
+
/** Measure index (for error location) */
|
|
118
|
+
measureIndex: number;
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Options for local measure validation
|
|
122
|
+
*/
|
|
123
|
+
interface LocalValidateOptions {
|
|
124
|
+
checkMeasureDuration?: boolean;
|
|
125
|
+
checkMeasureFullness?: boolean;
|
|
126
|
+
checkPosition?: boolean;
|
|
127
|
+
checkBeams?: boolean;
|
|
128
|
+
checkTuplets?: boolean;
|
|
129
|
+
checkVoiceStaff?: boolean;
|
|
130
|
+
durationTolerance?: number;
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* Validate a single measure with provided context.
|
|
134
|
+
* This is useful for validating after local operations like addNote, deleteNote.
|
|
135
|
+
*
|
|
136
|
+
* @example
|
|
137
|
+
* ```typescript
|
|
138
|
+
* const context = getMeasureContext(score, partIndex, measureIndex);
|
|
139
|
+
* const errors = validateMeasureLocal(measure, context);
|
|
140
|
+
* if (errors.length > 0) {
|
|
141
|
+
* throw new Error('Operation created invalid state');
|
|
142
|
+
* }
|
|
143
|
+
* ```
|
|
144
|
+
*/
|
|
145
|
+
declare function validateMeasureLocal(measure: Measure, context: MeasureValidationContext, options?: LocalValidateOptions): ValidationError[];
|
|
146
|
+
/**
|
|
147
|
+
* Get the validation context for a measure by traversing previous attributes.
|
|
148
|
+
* This collects divisions, time, and staves from measure 0 to the target measure.
|
|
149
|
+
*/
|
|
150
|
+
declare function getMeasureContext(score: Score, partIndex: number, measureIndex: number): MeasureValidationContext;
|
|
151
|
+
/**
|
|
152
|
+
* Validate a measure after an operation, throwing if invalid.
|
|
153
|
+
* Convenience wrapper around validateMeasureLocal.
|
|
154
|
+
*/
|
|
155
|
+
declare function assertMeasureValid(score: Score, partIndex: number, measureIndex: number, options?: LocalValidateOptions): void;
|
|
156
|
+
/**
|
|
157
|
+
* Check if a score is valid (no errors)
|
|
158
|
+
*/
|
|
159
|
+
declare function isValid(score: Score, options?: ValidateOptions): boolean;
|
|
160
|
+
/**
|
|
161
|
+
* Validate and throw if invalid
|
|
162
|
+
*/
|
|
163
|
+
declare function assertValid(score: Score, options?: ValidateOptions): void;
|
|
164
|
+
/**
|
|
165
|
+
* Format a validation location for display
|
|
166
|
+
*/
|
|
167
|
+
declare function formatLocation(location: ValidationLocation): string;
|
|
168
|
+
/**
|
|
169
|
+
* Validation exception with structured error information
|
|
170
|
+
*/
|
|
171
|
+
declare class ValidationException extends Error {
|
|
172
|
+
readonly errors: ValidationError[];
|
|
173
|
+
constructor(errors: ValidationError[], message: string);
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* Validate ties across measures
|
|
177
|
+
* This is more complex as ties can span multiple measures
|
|
178
|
+
*/
|
|
179
|
+
declare function validateTiesAcrossMeasures(part: Part): ValidationError[];
|
|
180
|
+
/**
|
|
181
|
+
* Validate slurs across measures
|
|
182
|
+
*/
|
|
183
|
+
declare function validateSlursAcrossMeasures(part: Part): ValidationError[];
|
|
184
|
+
|
|
185
|
+
/**
|
|
186
|
+
* Operation result type - success with data or failure with errors
|
|
187
|
+
*/
|
|
188
|
+
type OperationResult<T> = {
|
|
189
|
+
success: true;
|
|
190
|
+
data: T;
|
|
191
|
+
warnings?: ValidationError[];
|
|
192
|
+
} | {
|
|
193
|
+
success: false;
|
|
194
|
+
errors: ValidationError[];
|
|
195
|
+
};
|
|
196
|
+
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';
|
|
197
|
+
interface InsertNoteOptions {
|
|
198
|
+
partIndex: number;
|
|
199
|
+
measureIndex: number;
|
|
200
|
+
voice: number;
|
|
201
|
+
staff?: number;
|
|
202
|
+
position: number;
|
|
203
|
+
pitch: Pitch;
|
|
204
|
+
duration: number;
|
|
205
|
+
noteType?: NoteEntry['noteType'];
|
|
206
|
+
dots?: number;
|
|
207
|
+
}
|
|
208
|
+
/**
|
|
209
|
+
* Insert a note at the specified position in a voice.
|
|
210
|
+
* - If the position has a rest, replaces it with the note
|
|
211
|
+
* - If there's a conflicting note, returns NOTE_CONFLICT error
|
|
212
|
+
* - If the note exceeds measure duration, returns EXCEEDS_MEASURE error
|
|
213
|
+
*/
|
|
214
|
+
declare function insertNote(score: Score, options: InsertNoteOptions): OperationResult<Score>;
|
|
215
|
+
/**
|
|
216
|
+
* Remove a note and replace with rest
|
|
217
|
+
*/
|
|
218
|
+
declare function removeNote(score: Score, options: {
|
|
219
|
+
partIndex: number;
|
|
220
|
+
measureIndex: number;
|
|
221
|
+
noteIndex: number;
|
|
222
|
+
}): OperationResult<Score>;
|
|
223
|
+
/**
|
|
224
|
+
* Add a chord note to an existing note
|
|
225
|
+
*/
|
|
226
|
+
declare function addChord(score: Score, options: {
|
|
227
|
+
partIndex: number;
|
|
228
|
+
measureIndex: number;
|
|
229
|
+
noteIndex: number;
|
|
230
|
+
pitch: Pitch;
|
|
231
|
+
}): OperationResult<Score>;
|
|
232
|
+
/**
|
|
233
|
+
* Change note duration with proper handling of following notes
|
|
234
|
+
* - If longer: consumes following rests/notes, returns error if would overwrite notes
|
|
235
|
+
* - If shorter: fills remainder with rest
|
|
236
|
+
*/
|
|
237
|
+
declare function changeNoteDuration(score: Score, options: {
|
|
238
|
+
partIndex: number;
|
|
239
|
+
measureIndex: number;
|
|
240
|
+
noteIndex: number;
|
|
241
|
+
newDuration: number;
|
|
242
|
+
noteType?: NoteEntry['noteType'];
|
|
243
|
+
dots?: number;
|
|
244
|
+
}): OperationResult<Score>;
|
|
245
|
+
/**
|
|
246
|
+
* Set note pitch (simple pitch change, no validation needed)
|
|
247
|
+
*/
|
|
248
|
+
declare function setNotePitch(score: Score, options: {
|
|
249
|
+
partIndex: number;
|
|
250
|
+
measureIndex: number;
|
|
251
|
+
noteIndex: number;
|
|
252
|
+
pitch: Pitch;
|
|
253
|
+
}): OperationResult<Score>;
|
|
254
|
+
interface SetNotePitchBySemitoneOptions {
|
|
255
|
+
partIndex: number;
|
|
256
|
+
measureIndex: number;
|
|
257
|
+
noteIndex: number;
|
|
258
|
+
/** MIDI-like semitone value (C4 = 48, C#4 = 49, etc.) */
|
|
259
|
+
semitone: number;
|
|
260
|
+
/** Prefer sharp spelling over flat (defaults to key signature preference) */
|
|
261
|
+
preferSharp?: boolean;
|
|
262
|
+
}
|
|
263
|
+
/**
|
|
264
|
+
* Set note pitch by semitone value, considering key signature and accidentals.
|
|
265
|
+
* Automatically determines the appropriate enharmonic spelling and sets the accidental if needed.
|
|
266
|
+
*/
|
|
267
|
+
declare function setNotePitchBySemitone(score: Score, options: SetNotePitchBySemitoneOptions): OperationResult<Score>;
|
|
268
|
+
interface ShiftNotePitchOptions {
|
|
269
|
+
partIndex: number;
|
|
270
|
+
measureIndex: number;
|
|
271
|
+
noteIndex: number;
|
|
272
|
+
/** Number of semitones to shift (positive = up, negative = down) */
|
|
273
|
+
semitones: number;
|
|
274
|
+
/** Prefer sharp spelling over flat (defaults to key signature preference) */
|
|
275
|
+
preferSharp?: boolean;
|
|
276
|
+
}
|
|
277
|
+
/**
|
|
278
|
+
* Shift note pitch by a number of semitones, considering key signature and accidentals.
|
|
279
|
+
* Automatically determines the appropriate enharmonic spelling and sets the accidental if needed.
|
|
280
|
+
*/
|
|
281
|
+
declare function shiftNotePitch(score: Score, options: ShiftNotePitchOptions): OperationResult<Score>;
|
|
282
|
+
interface RaiseAccidentalOptions {
|
|
283
|
+
partIndex: number;
|
|
284
|
+
measureIndex: number;
|
|
285
|
+
noteIndex: number;
|
|
286
|
+
}
|
|
287
|
+
/**
|
|
288
|
+
* Raise the accidental of a note by one step.
|
|
289
|
+
* C → C#, C# → C##, Db → D, etc.
|
|
290
|
+
* Keeps the note's step (letter name) and increments alter by 1.
|
|
291
|
+
* Returns error if alter would exceed +2.
|
|
292
|
+
*/
|
|
293
|
+
declare function raiseAccidental(score: Score, options: RaiseAccidentalOptions): OperationResult<Score>;
|
|
294
|
+
interface LowerAccidentalOptions {
|
|
295
|
+
partIndex: number;
|
|
296
|
+
measureIndex: number;
|
|
297
|
+
noteIndex: number;
|
|
298
|
+
}
|
|
299
|
+
/**
|
|
300
|
+
* Lower the accidental of a note by one step.
|
|
301
|
+
* C# → C, C## → C#, D → Db, Db → Dbb, etc.
|
|
302
|
+
* Keeps the note's step (letter name) and decrements alter by 1.
|
|
303
|
+
* Returns error if alter would go below -2.
|
|
304
|
+
*/
|
|
305
|
+
declare function lowerAccidental(score: Score, options: LowerAccidentalOptions): OperationResult<Score>;
|
|
306
|
+
/**
|
|
307
|
+
* Add a new voice to a measure, filled with a whole-measure rest
|
|
308
|
+
*/
|
|
309
|
+
declare function addVoice(score: Score, options: {
|
|
310
|
+
partIndex: number;
|
|
311
|
+
measureIndex: number;
|
|
312
|
+
voice: number;
|
|
313
|
+
staff?: number;
|
|
314
|
+
}): OperationResult<Score>;
|
|
315
|
+
/**
|
|
316
|
+
* Transpose all notes in the score
|
|
317
|
+
*/
|
|
318
|
+
declare function transpose(score: Score, semitones: number): OperationResult<Score>;
|
|
319
|
+
interface AddPartOptions {
|
|
320
|
+
id: string;
|
|
321
|
+
name?: string;
|
|
322
|
+
abbreviation?: string;
|
|
323
|
+
insertIndex?: number;
|
|
324
|
+
time?: TimeSignature;
|
|
325
|
+
key?: KeySignature;
|
|
326
|
+
clef?: Clef;
|
|
327
|
+
divisions?: number;
|
|
328
|
+
}
|
|
329
|
+
declare function addPart(score: Score, options: AddPartOptions): OperationResult<Score>;
|
|
330
|
+
declare function removePart(score: Score, partId: string): OperationResult<Score>;
|
|
331
|
+
declare function duplicatePart(score: Score, options: {
|
|
332
|
+
sourcePartId: string;
|
|
333
|
+
newPartId: string;
|
|
334
|
+
newPartName?: string;
|
|
335
|
+
}): OperationResult<Score>;
|
|
336
|
+
declare function setStaves(score: Score, options: {
|
|
337
|
+
partIndex: number;
|
|
338
|
+
staves: number;
|
|
339
|
+
clefs?: Clef[];
|
|
340
|
+
fromMeasure?: number;
|
|
341
|
+
}): OperationResult<Score>;
|
|
342
|
+
declare function moveNoteToStaff(score: Score, options: {
|
|
343
|
+
partIndex: number;
|
|
344
|
+
measureIndex: number;
|
|
345
|
+
noteIndex: number;
|
|
346
|
+
targetStaff: number;
|
|
347
|
+
}): OperationResult<Score>;
|
|
348
|
+
declare function changeKey(score: Score, key: KeySignature, options: {
|
|
349
|
+
fromMeasure: string | number;
|
|
350
|
+
}): Score;
|
|
351
|
+
declare function changeTime(score: Score, time: TimeSignature, options: {
|
|
352
|
+
fromMeasure: string | number;
|
|
353
|
+
}): Score;
|
|
354
|
+
declare function insertMeasure(score: Score, options: {
|
|
355
|
+
afterMeasure: string | number;
|
|
356
|
+
copyAttributes?: boolean;
|
|
357
|
+
}): Score;
|
|
358
|
+
declare function deleteMeasure(score: Score, measureNumber: string | number): Score;
|
|
359
|
+
interface AddTieOptions {
|
|
360
|
+
partIndex: number;
|
|
361
|
+
startMeasureIndex: number;
|
|
362
|
+
startNoteIndex: number;
|
|
363
|
+
endMeasureIndex: number;
|
|
364
|
+
endNoteIndex: number;
|
|
365
|
+
}
|
|
366
|
+
/**
|
|
367
|
+
* Add a tie between two notes.
|
|
368
|
+
* The notes must have the same pitch.
|
|
369
|
+
* Adds tie start to the first note and tie stop to the second note.
|
|
370
|
+
*/
|
|
371
|
+
declare function addTie(score: Score, options: AddTieOptions): OperationResult<Score>;
|
|
372
|
+
interface RemoveTieOptions {
|
|
373
|
+
partIndex: number;
|
|
374
|
+
measureIndex: number;
|
|
375
|
+
noteIndex: number;
|
|
376
|
+
}
|
|
377
|
+
/**
|
|
378
|
+
* Remove a tie from a note (removes both start and stop if the note is part of a tie)
|
|
379
|
+
*/
|
|
380
|
+
declare function removeTie(score: Score, options: RemoveTieOptions): OperationResult<Score>;
|
|
381
|
+
interface AddSlurOptions {
|
|
382
|
+
partIndex: number;
|
|
383
|
+
startMeasureIndex: number;
|
|
384
|
+
startNoteIndex: number;
|
|
385
|
+
endMeasureIndex: number;
|
|
386
|
+
endNoteIndex: number;
|
|
387
|
+
number?: number;
|
|
388
|
+
placement?: 'above' | 'below';
|
|
389
|
+
}
|
|
390
|
+
/**
|
|
391
|
+
* Add a slur between two notes
|
|
392
|
+
*/
|
|
393
|
+
declare function addSlur(score: Score, options: AddSlurOptions): OperationResult<Score>;
|
|
394
|
+
interface RemoveSlurOptions {
|
|
395
|
+
partIndex: number;
|
|
396
|
+
measureIndex: number;
|
|
397
|
+
noteIndex: number;
|
|
398
|
+
number?: number;
|
|
399
|
+
}
|
|
400
|
+
/**
|
|
401
|
+
* Remove a slur from a note
|
|
402
|
+
*/
|
|
403
|
+
declare function removeSlur(score: Score, options: RemoveSlurOptions): OperationResult<Score>;
|
|
404
|
+
interface AddArticulationOptions {
|
|
405
|
+
partIndex: number;
|
|
406
|
+
measureIndex: number;
|
|
407
|
+
noteIndex: number;
|
|
408
|
+
articulation: ArticulationType;
|
|
409
|
+
placement?: 'above' | 'below';
|
|
410
|
+
}
|
|
411
|
+
/**
|
|
412
|
+
* Add an articulation to a note
|
|
413
|
+
*/
|
|
414
|
+
declare function addArticulation(score: Score, options: AddArticulationOptions): OperationResult<Score>;
|
|
415
|
+
interface RemoveArticulationOptions {
|
|
416
|
+
partIndex: number;
|
|
417
|
+
measureIndex: number;
|
|
418
|
+
noteIndex: number;
|
|
419
|
+
articulation: ArticulationType;
|
|
420
|
+
}
|
|
421
|
+
/**
|
|
422
|
+
* Remove an articulation from a note
|
|
423
|
+
*/
|
|
424
|
+
declare function removeArticulation(score: Score, options: RemoveArticulationOptions): OperationResult<Score>;
|
|
425
|
+
interface AddDynamicsOptions {
|
|
426
|
+
partIndex: number;
|
|
427
|
+
measureIndex: number;
|
|
428
|
+
position: number;
|
|
429
|
+
dynamics: DynamicsValue;
|
|
430
|
+
staff?: number;
|
|
431
|
+
placement?: 'above' | 'below';
|
|
432
|
+
}
|
|
433
|
+
/**
|
|
434
|
+
* Add a dynamics marking at a specific position in a measure
|
|
435
|
+
*/
|
|
436
|
+
declare function addDynamics(score: Score, options: AddDynamicsOptions): OperationResult<Score>;
|
|
437
|
+
interface RemoveDynamicsOptions {
|
|
438
|
+
partIndex: number;
|
|
439
|
+
measureIndex: number;
|
|
440
|
+
directionIndex: number;
|
|
441
|
+
}
|
|
442
|
+
/**
|
|
443
|
+
* Remove a dynamics direction from a measure
|
|
444
|
+
*/
|
|
445
|
+
declare function removeDynamics(score: Score, options: RemoveDynamicsOptions): OperationResult<Score>;
|
|
446
|
+
interface InsertClefChangeOptions {
|
|
447
|
+
partIndex: number;
|
|
448
|
+
measureIndex: number;
|
|
449
|
+
position: number;
|
|
450
|
+
clef: Clef;
|
|
451
|
+
}
|
|
452
|
+
/**
|
|
453
|
+
* Insert a clef change at a specific position within a measure
|
|
454
|
+
*/
|
|
455
|
+
declare function insertClefChange(score: Score, options: InsertClefChangeOptions): OperationResult<Score>;
|
|
456
|
+
/** @deprecated Use insertNote instead */
|
|
457
|
+
declare const addNote: (score: Score, options: {
|
|
458
|
+
partIndex: number;
|
|
459
|
+
measureIndex: number;
|
|
460
|
+
staff?: number;
|
|
461
|
+
voice: number;
|
|
462
|
+
position: number;
|
|
463
|
+
note: Omit<NoteEntry, "type" | "voice" | "staff">;
|
|
464
|
+
}) => Score;
|
|
465
|
+
/** @deprecated Use removeNote instead */
|
|
466
|
+
declare const deleteNote: (score: Score, options: {
|
|
467
|
+
partIndex: number;
|
|
468
|
+
measureIndex: number;
|
|
469
|
+
noteIndex: number;
|
|
470
|
+
}) => Score;
|
|
471
|
+
/** @deprecated Use addChord instead */
|
|
472
|
+
declare const addChordNote: (score: Score, options: {
|
|
473
|
+
partIndex: number;
|
|
474
|
+
measureIndex: number;
|
|
475
|
+
afterNoteIndex: number;
|
|
476
|
+
pitch: Pitch;
|
|
477
|
+
}) => Score;
|
|
478
|
+
/** @deprecated Use setNotePitch instead */
|
|
479
|
+
declare const modifyNotePitch: (score: Score, options: {
|
|
480
|
+
partIndex: number;
|
|
481
|
+
measureIndex: number;
|
|
482
|
+
noteIndex: number;
|
|
483
|
+
pitch: Pitch;
|
|
484
|
+
}) => Score;
|
|
485
|
+
/** @deprecated Use changeNoteDuration instead */
|
|
486
|
+
declare const modifyNoteDuration: (score: Score, options: {
|
|
487
|
+
partIndex: number;
|
|
488
|
+
measureIndex: number;
|
|
489
|
+
noteIndex: number;
|
|
490
|
+
duration: number;
|
|
491
|
+
noteType?: NoteEntry["noteType"];
|
|
492
|
+
dots?: number;
|
|
493
|
+
}) => Score;
|
|
494
|
+
/** @deprecated Use insertNote instead */
|
|
495
|
+
declare const addNoteChecked: (score: Score, options: {
|
|
496
|
+
partIndex: number;
|
|
497
|
+
measureIndex: number;
|
|
498
|
+
staff?: number;
|
|
499
|
+
voice: number;
|
|
500
|
+
position: number;
|
|
501
|
+
note: Omit<NoteEntry, "type" | "voice" | "staff">;
|
|
502
|
+
}) => OperationResult<Score>;
|
|
503
|
+
/** @deprecated Use removeNote instead */
|
|
504
|
+
declare const deleteNoteChecked: typeof removeNote;
|
|
505
|
+
/** @deprecated Use addChord instead */
|
|
506
|
+
declare const addChordNoteChecked: (score: Score, options: {
|
|
507
|
+
partIndex: number;
|
|
508
|
+
measureIndex: number;
|
|
509
|
+
afterNoteIndex: number;
|
|
510
|
+
pitch: Pitch;
|
|
511
|
+
}) => OperationResult<Score>;
|
|
512
|
+
/** @deprecated Use setNotePitch instead */
|
|
513
|
+
declare const modifyNotePitchChecked: typeof setNotePitch;
|
|
514
|
+
/** @deprecated Use changeNoteDuration instead */
|
|
515
|
+
declare const modifyNoteDurationChecked: (score: Score, options: {
|
|
516
|
+
partIndex: number;
|
|
517
|
+
measureIndex: number;
|
|
518
|
+
noteIndex: number;
|
|
519
|
+
duration: number;
|
|
520
|
+
noteType?: NoteEntry["noteType"];
|
|
521
|
+
dots?: number;
|
|
522
|
+
}) => OperationResult<Score>;
|
|
523
|
+
/** @deprecated Use transpose instead */
|
|
524
|
+
declare const transposeChecked: typeof transpose;
|
|
525
|
+
interface CreateTupletOptions {
|
|
526
|
+
partIndex: number;
|
|
527
|
+
measureIndex: number;
|
|
528
|
+
/** Starting note index (0-based, counting pitched notes only) */
|
|
529
|
+
startNoteIndex: number;
|
|
530
|
+
/** Number of notes to include in the tuplet */
|
|
531
|
+
noteCount: number;
|
|
532
|
+
/** Actual notes in the time of normal notes (e.g., 3 for triplet) */
|
|
533
|
+
actualNotes: number;
|
|
534
|
+
/** Normal notes (e.g., 2 for triplet) */
|
|
535
|
+
normalNotes: number;
|
|
536
|
+
/** Show bracket (default: true) */
|
|
537
|
+
bracket?: boolean;
|
|
538
|
+
/** Show number display (default: 'actual') */
|
|
539
|
+
showNumber?: 'actual' | 'both' | 'none';
|
|
540
|
+
}
|
|
541
|
+
/**
|
|
542
|
+
* Create a tuplet from consecutive notes.
|
|
543
|
+
* A tuplet fits `actualNotes` notes in the time of `normalNotes` (e.g., 3 in the time of 2 for triplets).
|
|
544
|
+
*
|
|
545
|
+
* @example
|
|
546
|
+
* // Create a triplet from 3 eighth notes (3 in the time of 2)
|
|
547
|
+
* createTuplet(score, {
|
|
548
|
+
* partIndex: 0,
|
|
549
|
+
* measureIndex: 0,
|
|
550
|
+
* startNoteIndex: 0,
|
|
551
|
+
* noteCount: 3,
|
|
552
|
+
* actualNotes: 3,
|
|
553
|
+
* normalNotes: 2,
|
|
554
|
+
* })
|
|
555
|
+
*/
|
|
556
|
+
declare function createTuplet(score: Score, options: CreateTupletOptions): OperationResult<Score>;
|
|
557
|
+
interface RemoveTupletOptions {
|
|
558
|
+
partIndex: number;
|
|
559
|
+
measureIndex: number;
|
|
560
|
+
/** Note index of any note within the tuplet */
|
|
561
|
+
noteIndex: number;
|
|
562
|
+
}
|
|
563
|
+
/**
|
|
564
|
+
* Remove tuplet from notes.
|
|
565
|
+
* Finds the tuplet containing the specified note and removes all tuplet information.
|
|
566
|
+
*/
|
|
567
|
+
declare function removeTuplet(score: Score, options: RemoveTupletOptions): OperationResult<Score>;
|
|
568
|
+
interface AddBeamOptions {
|
|
569
|
+
partIndex: number;
|
|
570
|
+
measureIndex: number;
|
|
571
|
+
/** Starting note index */
|
|
572
|
+
startNoteIndex: number;
|
|
573
|
+
/** Number of notes to beam together */
|
|
574
|
+
noteCount: number;
|
|
575
|
+
/** Beam level (1 = eighth notes, 2 = sixteenth notes, etc.) */
|
|
576
|
+
beamLevel?: number;
|
|
577
|
+
}
|
|
578
|
+
/**
|
|
579
|
+
* Add beaming to consecutive notes.
|
|
580
|
+
* Notes must be in the same voice and should be eighth notes or shorter.
|
|
581
|
+
*/
|
|
582
|
+
declare function addBeam(score: Score, options: AddBeamOptions): OperationResult<Score>;
|
|
583
|
+
interface RemoveBeamOptions {
|
|
584
|
+
partIndex: number;
|
|
585
|
+
measureIndex: number;
|
|
586
|
+
/** Note index of any note within the beam group */
|
|
587
|
+
noteIndex: number;
|
|
588
|
+
/** Beam level to remove (default: all levels) */
|
|
589
|
+
beamLevel?: number;
|
|
590
|
+
}
|
|
591
|
+
/**
|
|
592
|
+
* Remove beaming from notes.
|
|
593
|
+
*/
|
|
594
|
+
declare function removeBeam(score: Score, options: RemoveBeamOptions): OperationResult<Score>;
|
|
595
|
+
interface AutoBeamOptions {
|
|
596
|
+
partIndex: number;
|
|
597
|
+
measureIndex: number;
|
|
598
|
+
/** Optional voice filter */
|
|
599
|
+
voice?: number;
|
|
600
|
+
/** Group by beat (default: true) */
|
|
601
|
+
groupByBeat?: boolean;
|
|
602
|
+
}
|
|
603
|
+
/**
|
|
604
|
+
* Automatically beam notes based on time signature and beat groupings.
|
|
605
|
+
* Groups eighth notes and shorter notes by beat.
|
|
606
|
+
*/
|
|
607
|
+
declare function autoBeam(score: Score, options: AutoBeamOptions): OperationResult<Score>;
|
|
608
|
+
/**
|
|
609
|
+
* Selection represents copied content that can be pasted
|
|
610
|
+
*/
|
|
611
|
+
interface NoteSelection {
|
|
612
|
+
/** Source information */
|
|
613
|
+
source: {
|
|
614
|
+
partIndex: number;
|
|
615
|
+
measureIndex: number;
|
|
616
|
+
startPosition: number;
|
|
617
|
+
endPosition: number;
|
|
618
|
+
voice: number;
|
|
619
|
+
staff?: number;
|
|
620
|
+
};
|
|
621
|
+
/** Copied notes with their relative positions */
|
|
622
|
+
notes: Array<{
|
|
623
|
+
/** Relative position from selection start */
|
|
624
|
+
relativePosition: number;
|
|
625
|
+
/** Note data (deep cloned) */
|
|
626
|
+
note: NoteEntry;
|
|
627
|
+
}>;
|
|
628
|
+
/** Total duration of the selection */
|
|
629
|
+
duration: number;
|
|
630
|
+
}
|
|
631
|
+
interface CopyNotesOptions {
|
|
632
|
+
partIndex: number;
|
|
633
|
+
measureIndex: number;
|
|
634
|
+
/** Start position in the measure (in divisions) */
|
|
635
|
+
startPosition: number;
|
|
636
|
+
/** End position in the measure (in divisions) */
|
|
637
|
+
endPosition: number;
|
|
638
|
+
/** Voice to copy from */
|
|
639
|
+
voice: number;
|
|
640
|
+
/** Staff to copy from (optional) */
|
|
641
|
+
staff?: number;
|
|
642
|
+
}
|
|
643
|
+
/**
|
|
644
|
+
* Copy notes from a range in a measure.
|
|
645
|
+
* Returns a NoteSelection that can be used with pasteNotes.
|
|
646
|
+
*/
|
|
647
|
+
declare function copyNotes(score: Score, options: CopyNotesOptions): OperationResult<NoteSelection>;
|
|
648
|
+
interface PasteNotesOptions {
|
|
649
|
+
/** Selection to paste */
|
|
650
|
+
selection: NoteSelection;
|
|
651
|
+
/** Target part index */
|
|
652
|
+
partIndex: number;
|
|
653
|
+
/** Target measure index */
|
|
654
|
+
measureIndex: number;
|
|
655
|
+
/** Target position in the measure */
|
|
656
|
+
position: number;
|
|
657
|
+
/** Target voice (defaults to original voice) */
|
|
658
|
+
voice?: number;
|
|
659
|
+
/** Target staff (defaults to original staff) */
|
|
660
|
+
staff?: number;
|
|
661
|
+
/** Clear existing notes in the paste range (default: true) */
|
|
662
|
+
overwrite?: boolean;
|
|
663
|
+
}
|
|
664
|
+
/**
|
|
665
|
+
* Paste notes from a NoteSelection to a target position.
|
|
666
|
+
*/
|
|
667
|
+
declare function pasteNotes(score: Score, options: PasteNotesOptions): OperationResult<Score>;
|
|
668
|
+
interface CutNotesOptions extends CopyNotesOptions {
|
|
669
|
+
}
|
|
670
|
+
/**
|
|
671
|
+
* Cut notes from a range (copy and delete).
|
|
672
|
+
* Returns both the selection and the modified score.
|
|
673
|
+
*/
|
|
674
|
+
declare function cutNotes(score: Score, options: CutNotesOptions): OperationResult<{
|
|
675
|
+
score: Score;
|
|
676
|
+
selection: NoteSelection;
|
|
677
|
+
}>;
|
|
678
|
+
interface CopyNotesMultiMeasureOptions {
|
|
679
|
+
partIndex: number;
|
|
680
|
+
/** Starting measure index */
|
|
681
|
+
startMeasureIndex: number;
|
|
682
|
+
/** Ending measure index (inclusive) */
|
|
683
|
+
endMeasureIndex: number;
|
|
684
|
+
/** Voice to copy from */
|
|
685
|
+
voice: number;
|
|
686
|
+
/** Staff to copy from (optional) */
|
|
687
|
+
staff?: number;
|
|
688
|
+
}
|
|
689
|
+
/**
|
|
690
|
+
* Selection for multiple measures
|
|
691
|
+
*/
|
|
692
|
+
interface MultiMeasureSelection {
|
|
693
|
+
source: {
|
|
694
|
+
partIndex: number;
|
|
695
|
+
startMeasureIndex: number;
|
|
696
|
+
endMeasureIndex: number;
|
|
697
|
+
voice: number;
|
|
698
|
+
staff?: number;
|
|
699
|
+
};
|
|
700
|
+
/** Notes grouped by measure offset */
|
|
701
|
+
measures: Array<{
|
|
702
|
+
measureOffset: number;
|
|
703
|
+
notes: Array<{
|
|
704
|
+
relativePosition: number;
|
|
705
|
+
note: NoteEntry;
|
|
706
|
+
}>;
|
|
707
|
+
}>;
|
|
708
|
+
}
|
|
709
|
+
/**
|
|
710
|
+
* Copy notes across multiple measures.
|
|
711
|
+
*/
|
|
712
|
+
declare function copyNotesMultiMeasure(score: Score, options: CopyNotesMultiMeasureOptions): OperationResult<MultiMeasureSelection>;
|
|
713
|
+
interface PasteNotesMultiMeasureOptions {
|
|
714
|
+
selection: MultiMeasureSelection;
|
|
715
|
+
partIndex: number;
|
|
716
|
+
/** Target starting measure index */
|
|
717
|
+
startMeasureIndex: number;
|
|
718
|
+
/** Target voice (defaults to original voice) */
|
|
719
|
+
voice?: number;
|
|
720
|
+
/** Target staff (defaults to original staff) */
|
|
721
|
+
staff?: number;
|
|
722
|
+
/** Clear existing notes in paste measures (default: true) */
|
|
723
|
+
overwrite?: boolean;
|
|
724
|
+
}
|
|
725
|
+
/**
|
|
726
|
+
* Paste notes across multiple measures.
|
|
727
|
+
*/
|
|
728
|
+
declare function pasteNotesMultiMeasure(score: Score, options: PasteNotesMultiMeasureOptions): OperationResult<Score>;
|
|
729
|
+
interface AddTempoOptions {
|
|
730
|
+
partIndex: number;
|
|
731
|
+
measureIndex: number;
|
|
732
|
+
/** Position in divisions within the measure */
|
|
733
|
+
position: number;
|
|
734
|
+
/** Tempo in BPM */
|
|
735
|
+
bpm: number;
|
|
736
|
+
/** Beat unit (e.g., 'quarter', 'half', 'eighth') */
|
|
737
|
+
beatUnit?: 'whole' | 'half' | 'quarter' | 'eighth' | '16th';
|
|
738
|
+
/** Whether beat unit has a dot */
|
|
739
|
+
beatUnitDot?: boolean;
|
|
740
|
+
/** Text description (e.g., 'Allegro', 'Andante') */
|
|
741
|
+
text?: string;
|
|
742
|
+
/** Placement (above/below staff) */
|
|
743
|
+
placement?: 'above' | 'below';
|
|
744
|
+
}
|
|
745
|
+
/**
|
|
746
|
+
* Add a tempo marking to a measure.
|
|
747
|
+
*/
|
|
748
|
+
declare function addTempo(score: Score, options: AddTempoOptions): OperationResult<Score>;
|
|
749
|
+
interface RemoveTempoOptions {
|
|
750
|
+
partIndex: number;
|
|
751
|
+
measureIndex: number;
|
|
752
|
+
/** Index of the direction to remove (among tempo directions) */
|
|
753
|
+
directionIndex?: number;
|
|
754
|
+
}
|
|
755
|
+
/**
|
|
756
|
+
* Remove a tempo marking from a measure.
|
|
757
|
+
*/
|
|
758
|
+
declare function removeTempo(score: Score, options: RemoveTempoOptions): OperationResult<Score>;
|
|
759
|
+
interface AddWedgeOptions {
|
|
760
|
+
partIndex: number;
|
|
761
|
+
/** Starting measure index */
|
|
762
|
+
startMeasureIndex: number;
|
|
763
|
+
/** Starting position in divisions */
|
|
764
|
+
startPosition: number;
|
|
765
|
+
/** Ending measure index */
|
|
766
|
+
endMeasureIndex: number;
|
|
767
|
+
/** Ending position in divisions */
|
|
768
|
+
endPosition: number;
|
|
769
|
+
/** Wedge type */
|
|
770
|
+
type: 'crescendo' | 'diminuendo';
|
|
771
|
+
/** Staff number (for multi-staff parts) */
|
|
772
|
+
staff?: number;
|
|
773
|
+
/** Placement (above/below) */
|
|
774
|
+
placement?: 'above' | 'below';
|
|
775
|
+
}
|
|
776
|
+
/**
|
|
777
|
+
* Add a wedge (crescendo or diminuendo) spanning one or more measures.
|
|
778
|
+
*/
|
|
779
|
+
declare function addWedge(score: Score, options: AddWedgeOptions): OperationResult<Score>;
|
|
780
|
+
interface RemoveWedgeOptions {
|
|
781
|
+
partIndex: number;
|
|
782
|
+
measureIndex: number;
|
|
783
|
+
/** Index of the wedge start direction to remove */
|
|
784
|
+
directionIndex?: number;
|
|
785
|
+
}
|
|
786
|
+
/**
|
|
787
|
+
* Remove a wedge (and its corresponding stop).
|
|
788
|
+
*/
|
|
789
|
+
declare function removeWedge(score: Score, options: RemoveWedgeOptions): OperationResult<Score>;
|
|
790
|
+
interface AddFermataOptions {
|
|
791
|
+
partIndex: number;
|
|
792
|
+
measureIndex: number;
|
|
793
|
+
noteIndex: number;
|
|
794
|
+
/** Fermata shape */
|
|
795
|
+
shape?: 'normal' | 'angled' | 'square' | 'double-angled' | 'double-square' | 'double-dot' | 'half-curve' | 'curlew';
|
|
796
|
+
/** Fermata type (upright or inverted) */
|
|
797
|
+
fermataType?: 'upright' | 'inverted';
|
|
798
|
+
/** Placement */
|
|
799
|
+
placement?: 'above' | 'below';
|
|
800
|
+
}
|
|
801
|
+
/**
|
|
802
|
+
* Add a fermata to a note.
|
|
803
|
+
*/
|
|
804
|
+
declare function addFermata(score: Score, options: AddFermataOptions): OperationResult<Score>;
|
|
805
|
+
interface RemoveFermataOptions {
|
|
806
|
+
partIndex: number;
|
|
807
|
+
measureIndex: number;
|
|
808
|
+
noteIndex: number;
|
|
809
|
+
}
|
|
810
|
+
/**
|
|
811
|
+
* Remove a fermata from a note.
|
|
812
|
+
*/
|
|
813
|
+
declare function removeFermata(score: Score, options: RemoveFermataOptions): OperationResult<Score>;
|
|
814
|
+
interface AddOrnamentOptions {
|
|
815
|
+
partIndex: number;
|
|
816
|
+
measureIndex: number;
|
|
817
|
+
noteIndex: number;
|
|
818
|
+
/** Ornament type */
|
|
819
|
+
ornament: OrnamentType;
|
|
820
|
+
/** Placement */
|
|
821
|
+
placement?: 'above' | 'below';
|
|
822
|
+
/** Accidental mark for the ornament */
|
|
823
|
+
accidentalMark?: 'sharp' | 'flat' | 'natural' | 'double-sharp' | 'flat-flat';
|
|
824
|
+
}
|
|
825
|
+
/**
|
|
826
|
+
* Add an ornament (trill, mordent, turn, etc.) to a note.
|
|
827
|
+
*/
|
|
828
|
+
declare function addOrnament(score: Score, options: AddOrnamentOptions): OperationResult<Score>;
|
|
829
|
+
interface RemoveOrnamentOptions {
|
|
830
|
+
partIndex: number;
|
|
831
|
+
measureIndex: number;
|
|
832
|
+
noteIndex: number;
|
|
833
|
+
/** Specific ornament to remove (removes first ornament if not specified) */
|
|
834
|
+
ornament?: OrnamentType;
|
|
835
|
+
}
|
|
836
|
+
/**
|
|
837
|
+
* Remove an ornament from a note.
|
|
838
|
+
*/
|
|
839
|
+
declare function removeOrnament(score: Score, options: RemoveOrnamentOptions): OperationResult<Score>;
|
|
840
|
+
interface AddPedalOptions {
|
|
841
|
+
partIndex: number;
|
|
842
|
+
measureIndex: number;
|
|
843
|
+
/** Position in divisions */
|
|
844
|
+
position: number;
|
|
845
|
+
/** Pedal type */
|
|
846
|
+
pedalType: 'start' | 'stop' | 'change' | 'continue';
|
|
847
|
+
/** Show as line or Ped/star symbols */
|
|
848
|
+
line?: boolean;
|
|
849
|
+
/** Placement */
|
|
850
|
+
placement?: 'above' | 'below';
|
|
851
|
+
}
|
|
852
|
+
/**
|
|
853
|
+
* Add a pedal marking.
|
|
854
|
+
*/
|
|
855
|
+
declare function addPedal(score: Score, options: AddPedalOptions): OperationResult<Score>;
|
|
856
|
+
interface RemovePedalOptions {
|
|
857
|
+
partIndex: number;
|
|
858
|
+
measureIndex: number;
|
|
859
|
+
/** Index of the pedal direction to remove (among pedal directions) */
|
|
860
|
+
directionIndex?: number;
|
|
861
|
+
}
|
|
862
|
+
/**
|
|
863
|
+
* Remove a pedal marking.
|
|
864
|
+
*/
|
|
865
|
+
declare function removePedal(score: Score, options: RemovePedalOptions): OperationResult<Score>;
|
|
866
|
+
interface AddTextDirectionOptions {
|
|
867
|
+
partIndex: number;
|
|
868
|
+
measureIndex: number;
|
|
869
|
+
/** Position in divisions */
|
|
870
|
+
position: number;
|
|
871
|
+
/** Text content */
|
|
872
|
+
text: string;
|
|
873
|
+
/** Font style */
|
|
874
|
+
fontStyle?: 'normal' | 'italic';
|
|
875
|
+
/** Font weight */
|
|
876
|
+
fontWeight?: 'normal' | 'bold';
|
|
877
|
+
/** Placement */
|
|
878
|
+
placement?: 'above' | 'below';
|
|
879
|
+
}
|
|
880
|
+
/**
|
|
881
|
+
* Add a text direction (expression text, performance instruction).
|
|
882
|
+
*/
|
|
883
|
+
declare function addTextDirection(score: Score, options: AddTextDirectionOptions): OperationResult<Score>;
|
|
884
|
+
interface AddRehearsalMarkOptions {
|
|
885
|
+
partIndex: number;
|
|
886
|
+
measureIndex: number;
|
|
887
|
+
/** Rehearsal mark text (e.g., 'A', 'B', '1', '2') */
|
|
888
|
+
text: string;
|
|
889
|
+
/** Enclosure type */
|
|
890
|
+
enclosure?: 'square' | 'circle' | 'oval' | 'rectangle' | 'diamond' | 'triangle' | 'pentagon' | 'hexagon' | 'none';
|
|
891
|
+
}
|
|
892
|
+
/**
|
|
893
|
+
* Add a rehearsal mark to a measure.
|
|
894
|
+
*/
|
|
895
|
+
declare function addRehearsalMark(score: Score, options: AddRehearsalMarkOptions): OperationResult<Score>;
|
|
896
|
+
type BarStyle = 'regular' | 'dotted' | 'dashed' | 'heavy' | 'light-light' | 'light-heavy' | 'heavy-light' | 'heavy-heavy' | 'tick' | 'short' | 'none';
|
|
897
|
+
interface AddRepeatBarlineOptions {
|
|
898
|
+
partIndex: number;
|
|
899
|
+
measureIndex: number;
|
|
900
|
+
direction: 'forward' | 'backward';
|
|
901
|
+
times?: number;
|
|
902
|
+
}
|
|
903
|
+
/**
|
|
904
|
+
* Add a repeat barline to a measure.
|
|
905
|
+
* Forward repeats go on the left, backward repeats go on the right.
|
|
906
|
+
* This operation applies to all parts at the specified measure index.
|
|
907
|
+
*/
|
|
908
|
+
declare function addRepeatBarline(score: Score, options: AddRepeatBarlineOptions): OperationResult<Score>;
|
|
909
|
+
interface RemoveRepeatBarlineOptions {
|
|
910
|
+
partIndex: number;
|
|
911
|
+
measureIndex: number;
|
|
912
|
+
location: 'left' | 'right';
|
|
913
|
+
}
|
|
914
|
+
/**
|
|
915
|
+
* Remove a repeat barline from a measure.
|
|
916
|
+
* This operation applies to all parts at the specified measure index.
|
|
917
|
+
*/
|
|
918
|
+
declare function removeRepeatBarline(score: Score, options: RemoveRepeatBarlineOptions): OperationResult<Score>;
|
|
919
|
+
interface AddEndingOptions {
|
|
920
|
+
partIndex: number;
|
|
921
|
+
measureIndex: number;
|
|
922
|
+
number: string;
|
|
923
|
+
type: 'start' | 'stop' | 'discontinue';
|
|
924
|
+
}
|
|
925
|
+
/**
|
|
926
|
+
* Add an ending (volta bracket) to a measure.
|
|
927
|
+
* Start endings go on the left barline, stop/discontinue on the right.
|
|
928
|
+
* This operation applies to all parts at the specified measure index.
|
|
929
|
+
*/
|
|
930
|
+
declare function addEnding(score: Score, options: AddEndingOptions): OperationResult<Score>;
|
|
931
|
+
interface RemoveEndingOptions {
|
|
932
|
+
partIndex: number;
|
|
933
|
+
measureIndex: number;
|
|
934
|
+
location: 'left' | 'right';
|
|
935
|
+
}
|
|
936
|
+
/**
|
|
937
|
+
* Remove an ending (volta bracket) from a measure.
|
|
938
|
+
* This operation applies to all parts at the specified measure index.
|
|
939
|
+
*/
|
|
940
|
+
declare function removeEnding(score: Score, options: RemoveEndingOptions): OperationResult<Score>;
|
|
941
|
+
interface ChangeBarlineOptions {
|
|
942
|
+
partIndex: number;
|
|
943
|
+
measureIndex: number;
|
|
944
|
+
location: 'left' | 'right' | 'middle';
|
|
945
|
+
barStyle: BarStyle;
|
|
946
|
+
}
|
|
947
|
+
/**
|
|
948
|
+
* Change the barline style at a specific location in a measure.
|
|
949
|
+
* This operation applies to all parts at the specified measure index.
|
|
950
|
+
*/
|
|
951
|
+
declare function changeBarline(score: Score, options: ChangeBarlineOptions): OperationResult<Score>;
|
|
952
|
+
interface AddSegnoOptions {
|
|
953
|
+
partIndex: number;
|
|
954
|
+
measureIndex: number;
|
|
955
|
+
position?: number;
|
|
956
|
+
}
|
|
957
|
+
/**
|
|
958
|
+
* Add a segno sign to a measure.
|
|
959
|
+
*/
|
|
960
|
+
declare function addSegno(score: Score, options: AddSegnoOptions): OperationResult<Score>;
|
|
961
|
+
interface AddCodaOptions {
|
|
962
|
+
partIndex: number;
|
|
963
|
+
measureIndex: number;
|
|
964
|
+
position?: number;
|
|
965
|
+
}
|
|
966
|
+
/**
|
|
967
|
+
* Add a coda sign to a measure.
|
|
968
|
+
*/
|
|
969
|
+
declare function addCoda(score: Score, options: AddCodaOptions): OperationResult<Score>;
|
|
970
|
+
interface AddNavigationOptions {
|
|
971
|
+
partIndex: number;
|
|
972
|
+
measureIndex: number;
|
|
973
|
+
position?: number;
|
|
974
|
+
}
|
|
975
|
+
/**
|
|
976
|
+
* Add a D.C. (Da Capo) marking to a measure.
|
|
977
|
+
* This adds both the text direction and the sound element.
|
|
978
|
+
*/
|
|
979
|
+
declare function addDaCapo(score: Score, options: AddNavigationOptions): OperationResult<Score>;
|
|
980
|
+
/**
|
|
981
|
+
* Add a D.S. (Dal Segno) marking to a measure.
|
|
982
|
+
*/
|
|
983
|
+
declare function addDalSegno(score: Score, options: AddNavigationOptions): OperationResult<Score>;
|
|
984
|
+
/**
|
|
985
|
+
* Add a Fine marking to a measure.
|
|
986
|
+
*/
|
|
987
|
+
declare function addFine(score: Score, options: AddNavigationOptions): OperationResult<Score>;
|
|
988
|
+
/**
|
|
989
|
+
* Add a To Coda marking to a measure.
|
|
990
|
+
*/
|
|
991
|
+
declare function addToCoda(score: Score, options: AddNavigationOptions): OperationResult<Score>;
|
|
992
|
+
interface AddGraceNoteOptions {
|
|
993
|
+
partIndex: number;
|
|
994
|
+
measureIndex: number;
|
|
995
|
+
targetNoteIndex: number;
|
|
996
|
+
pitch: Pitch;
|
|
997
|
+
noteType?: NoteType;
|
|
998
|
+
slash?: boolean;
|
|
999
|
+
voice?: number;
|
|
1000
|
+
staff?: number;
|
|
1001
|
+
}
|
|
1002
|
+
/**
|
|
1003
|
+
* Add a grace note before a target note.
|
|
1004
|
+
* Grace notes do not have duration in MusicXML.
|
|
1005
|
+
*/
|
|
1006
|
+
declare function addGraceNote(score: Score, options: AddGraceNoteOptions): OperationResult<Score>;
|
|
1007
|
+
interface RemoveGraceNoteOptions {
|
|
1008
|
+
partIndex: number;
|
|
1009
|
+
measureIndex: number;
|
|
1010
|
+
graceNoteIndex: number;
|
|
1011
|
+
}
|
|
1012
|
+
/**
|
|
1013
|
+
* Remove a grace note from a measure.
|
|
1014
|
+
*/
|
|
1015
|
+
declare function removeGraceNote(score: Score, options: RemoveGraceNoteOptions): OperationResult<Score>;
|
|
1016
|
+
interface ConvertToGraceOptions {
|
|
1017
|
+
partIndex: number;
|
|
1018
|
+
measureIndex: number;
|
|
1019
|
+
noteIndex: number;
|
|
1020
|
+
slash?: boolean;
|
|
1021
|
+
}
|
|
1022
|
+
/**
|
|
1023
|
+
* Convert a regular note to a grace note.
|
|
1024
|
+
* The note's duration will be removed.
|
|
1025
|
+
*/
|
|
1026
|
+
declare function convertToGrace(score: Score, options: ConvertToGraceOptions): OperationResult<Score>;
|
|
1027
|
+
interface AddLyricOptions {
|
|
1028
|
+
partIndex: number;
|
|
1029
|
+
measureIndex: number;
|
|
1030
|
+
noteIndex: number;
|
|
1031
|
+
text: string;
|
|
1032
|
+
syllabic?: 'single' | 'begin' | 'middle' | 'end';
|
|
1033
|
+
verse?: number;
|
|
1034
|
+
extend?: boolean;
|
|
1035
|
+
}
|
|
1036
|
+
/**
|
|
1037
|
+
* Add a lyric to a note.
|
|
1038
|
+
*/
|
|
1039
|
+
declare function addLyric(score: Score, options: AddLyricOptions): OperationResult<Score>;
|
|
1040
|
+
interface RemoveLyricOptions {
|
|
1041
|
+
partIndex: number;
|
|
1042
|
+
measureIndex: number;
|
|
1043
|
+
noteIndex: number;
|
|
1044
|
+
verse?: number;
|
|
1045
|
+
}
|
|
1046
|
+
/**
|
|
1047
|
+
* Remove a lyric from a note.
|
|
1048
|
+
*/
|
|
1049
|
+
declare function removeLyric(score: Score, options: RemoveLyricOptions): OperationResult<Score>;
|
|
1050
|
+
interface UpdateLyricOptions {
|
|
1051
|
+
partIndex: number;
|
|
1052
|
+
measureIndex: number;
|
|
1053
|
+
noteIndex: number;
|
|
1054
|
+
verse?: number;
|
|
1055
|
+
text?: string;
|
|
1056
|
+
syllabic?: 'single' | 'begin' | 'middle' | 'end';
|
|
1057
|
+
extend?: boolean;
|
|
1058
|
+
}
|
|
1059
|
+
/**
|
|
1060
|
+
* Update an existing lyric on a note.
|
|
1061
|
+
*/
|
|
1062
|
+
declare function updateLyric(score: Score, options: UpdateLyricOptions): OperationResult<Score>;
|
|
1063
|
+
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';
|
|
1064
|
+
interface AddHarmonyOptions {
|
|
1065
|
+
partIndex: number;
|
|
1066
|
+
measureIndex: number;
|
|
1067
|
+
position: number;
|
|
1068
|
+
root: {
|
|
1069
|
+
step: string;
|
|
1070
|
+
alter?: number;
|
|
1071
|
+
};
|
|
1072
|
+
kind: HarmonyKind;
|
|
1073
|
+
kindText?: string;
|
|
1074
|
+
bass?: {
|
|
1075
|
+
step: string;
|
|
1076
|
+
alter?: number;
|
|
1077
|
+
};
|
|
1078
|
+
degrees?: {
|
|
1079
|
+
value: number;
|
|
1080
|
+
alter?: number;
|
|
1081
|
+
type: 'add' | 'alter' | 'subtract';
|
|
1082
|
+
}[];
|
|
1083
|
+
staff?: number;
|
|
1084
|
+
placement?: 'above' | 'below';
|
|
1085
|
+
}
|
|
1086
|
+
/**
|
|
1087
|
+
* Add a harmony (chord symbol) to a measure.
|
|
1088
|
+
*/
|
|
1089
|
+
declare function addHarmony(score: Score, options: AddHarmonyOptions): OperationResult<Score>;
|
|
1090
|
+
interface RemoveHarmonyOptions {
|
|
1091
|
+
partIndex: number;
|
|
1092
|
+
measureIndex: number;
|
|
1093
|
+
harmonyIndex: number;
|
|
1094
|
+
}
|
|
1095
|
+
/**
|
|
1096
|
+
* Remove a harmony from a measure.
|
|
1097
|
+
*/
|
|
1098
|
+
declare function removeHarmony(score: Score, options: RemoveHarmonyOptions): OperationResult<Score>;
|
|
1099
|
+
interface UpdateHarmonyOptions {
|
|
1100
|
+
partIndex: number;
|
|
1101
|
+
measureIndex: number;
|
|
1102
|
+
harmonyIndex: number;
|
|
1103
|
+
root?: {
|
|
1104
|
+
step: string;
|
|
1105
|
+
alter?: number;
|
|
1106
|
+
};
|
|
1107
|
+
kind?: HarmonyKind;
|
|
1108
|
+
kindText?: string;
|
|
1109
|
+
bass?: {
|
|
1110
|
+
step: string;
|
|
1111
|
+
alter?: number;
|
|
1112
|
+
} | null;
|
|
1113
|
+
degrees?: {
|
|
1114
|
+
value: number;
|
|
1115
|
+
alter?: number;
|
|
1116
|
+
type: 'add' | 'alter' | 'subtract';
|
|
1117
|
+
}[] | null;
|
|
1118
|
+
}
|
|
1119
|
+
/**
|
|
1120
|
+
* Update an existing harmony in a measure.
|
|
1121
|
+
*/
|
|
1122
|
+
declare function updateHarmony(score: Score, options: UpdateHarmonyOptions): OperationResult<Score>;
|
|
1123
|
+
interface AddFingeringOptions {
|
|
1124
|
+
partIndex: number;
|
|
1125
|
+
measureIndex: number;
|
|
1126
|
+
noteIndex: number;
|
|
1127
|
+
fingering: string;
|
|
1128
|
+
substitution?: boolean;
|
|
1129
|
+
alternate?: boolean;
|
|
1130
|
+
placement?: 'above' | 'below';
|
|
1131
|
+
}
|
|
1132
|
+
/**
|
|
1133
|
+
* Add fingering notation to a note.
|
|
1134
|
+
* Fingering is typically indicated 1,2,3,4,5.
|
|
1135
|
+
*/
|
|
1136
|
+
declare function addFingering(score: Score, options: AddFingeringOptions): OperationResult<Score>;
|
|
1137
|
+
interface RemoveFingeringOptions {
|
|
1138
|
+
partIndex: number;
|
|
1139
|
+
measureIndex: number;
|
|
1140
|
+
noteIndex: number;
|
|
1141
|
+
}
|
|
1142
|
+
/**
|
|
1143
|
+
* Remove fingering notation from a note.
|
|
1144
|
+
*/
|
|
1145
|
+
declare function removeFingering(score: Score, options: RemoveFingeringOptions): OperationResult<Score>;
|
|
1146
|
+
type BowingType = 'up-bow' | 'down-bow';
|
|
1147
|
+
interface AddBowingOptions {
|
|
1148
|
+
partIndex: number;
|
|
1149
|
+
measureIndex: number;
|
|
1150
|
+
noteIndex: number;
|
|
1151
|
+
bowingType: BowingType;
|
|
1152
|
+
placement?: 'above' | 'below';
|
|
1153
|
+
}
|
|
1154
|
+
/**
|
|
1155
|
+
* Add bowing notation (up-bow or down-bow) to a note.
|
|
1156
|
+
* Used for bowed string instruments.
|
|
1157
|
+
*/
|
|
1158
|
+
declare function addBowing(score: Score, options: AddBowingOptions): OperationResult<Score>;
|
|
1159
|
+
interface RemoveBowingOptions {
|
|
1160
|
+
partIndex: number;
|
|
1161
|
+
measureIndex: number;
|
|
1162
|
+
noteIndex: number;
|
|
1163
|
+
bowingType?: BowingType;
|
|
1164
|
+
}
|
|
1165
|
+
/**
|
|
1166
|
+
* Remove bowing notation from a note.
|
|
1167
|
+
*/
|
|
1168
|
+
declare function removeBowing(score: Score, options: RemoveBowingOptions): OperationResult<Score>;
|
|
1169
|
+
interface AddStringNumberOptions {
|
|
1170
|
+
partIndex: number;
|
|
1171
|
+
measureIndex: number;
|
|
1172
|
+
noteIndex: number;
|
|
1173
|
+
stringNumber: number;
|
|
1174
|
+
placement?: 'above' | 'below';
|
|
1175
|
+
}
|
|
1176
|
+
/**
|
|
1177
|
+
* Add string number notation to a note.
|
|
1178
|
+
* Used for fretted instruments and bowed strings.
|
|
1179
|
+
*/
|
|
1180
|
+
declare function addStringNumber(score: Score, options: AddStringNumberOptions): OperationResult<Score>;
|
|
1181
|
+
interface RemoveStringNumberOptions {
|
|
1182
|
+
partIndex: number;
|
|
1183
|
+
measureIndex: number;
|
|
1184
|
+
noteIndex: number;
|
|
1185
|
+
}
|
|
1186
|
+
/**
|
|
1187
|
+
* Remove string number notation from a note.
|
|
1188
|
+
*/
|
|
1189
|
+
declare function removeStringNumber(score: Score, options: RemoveStringNumberOptions): OperationResult<Score>;
|
|
1190
|
+
type OctaveShiftType = 'up' | 'down';
|
|
1191
|
+
interface AddOctaveShiftOptions {
|
|
1192
|
+
partIndex: number;
|
|
1193
|
+
measureIndex: number;
|
|
1194
|
+
position: number;
|
|
1195
|
+
shiftType: OctaveShiftType;
|
|
1196
|
+
size?: number;
|
|
1197
|
+
}
|
|
1198
|
+
/**
|
|
1199
|
+
* Add an octave shift (8va/8vb) direction.
|
|
1200
|
+
* Type 'down' means notes appear higher than sounding (8va).
|
|
1201
|
+
* Type 'up' means notes appear lower than sounding (8vb).
|
|
1202
|
+
*/
|
|
1203
|
+
declare function addOctaveShift(score: Score, options: AddOctaveShiftOptions): OperationResult<Score>;
|
|
1204
|
+
interface StopOctaveShiftOptions {
|
|
1205
|
+
partIndex: number;
|
|
1206
|
+
measureIndex: number;
|
|
1207
|
+
position: number;
|
|
1208
|
+
size?: number;
|
|
1209
|
+
}
|
|
1210
|
+
/**
|
|
1211
|
+
* Stop an octave shift at the specified position.
|
|
1212
|
+
*/
|
|
1213
|
+
declare function stopOctaveShift(score: Score, options: StopOctaveShiftOptions): OperationResult<Score>;
|
|
1214
|
+
interface RemoveOctaveShiftOptions {
|
|
1215
|
+
partIndex: number;
|
|
1216
|
+
measureIndex: number;
|
|
1217
|
+
octaveShiftIndex?: number;
|
|
1218
|
+
}
|
|
1219
|
+
/**
|
|
1220
|
+
* Remove an octave shift direction from a measure.
|
|
1221
|
+
*/
|
|
1222
|
+
declare function removeOctaveShift(score: Score, options: RemoveOctaveShiftOptions): OperationResult<Score>;
|
|
1223
|
+
type BreathMarkValue = 'comma' | 'tick' | 'upbow' | 'salzedo';
|
|
1224
|
+
interface AddBreathMarkOptions {
|
|
1225
|
+
partIndex: number;
|
|
1226
|
+
measureIndex: number;
|
|
1227
|
+
noteIndex: number;
|
|
1228
|
+
breathMarkType?: BreathMarkValue;
|
|
1229
|
+
placement?: 'above' | 'below';
|
|
1230
|
+
}
|
|
1231
|
+
/**
|
|
1232
|
+
* Add a breath mark to a note.
|
|
1233
|
+
* Breath marks indicate where a performer should breathe.
|
|
1234
|
+
*/
|
|
1235
|
+
declare function addBreathMark(score: Score, options: AddBreathMarkOptions): OperationResult<Score>;
|
|
1236
|
+
interface RemoveBreathMarkOptions {
|
|
1237
|
+
partIndex: number;
|
|
1238
|
+
measureIndex: number;
|
|
1239
|
+
noteIndex: number;
|
|
1240
|
+
}
|
|
1241
|
+
/**
|
|
1242
|
+
* Remove a breath mark from a note.
|
|
1243
|
+
*/
|
|
1244
|
+
declare function removeBreathMark(score: Score, options: RemoveBreathMarkOptions): OperationResult<Score>;
|
|
1245
|
+
type CaesuraValue = 'normal' | 'thick' | 'short' | 'curved' | 'single';
|
|
1246
|
+
interface AddCaesuraOptions {
|
|
1247
|
+
partIndex: number;
|
|
1248
|
+
measureIndex: number;
|
|
1249
|
+
noteIndex: number;
|
|
1250
|
+
caesuraType?: CaesuraValue;
|
|
1251
|
+
placement?: 'above' | 'below';
|
|
1252
|
+
}
|
|
1253
|
+
/**
|
|
1254
|
+
* Add a caesura to a note.
|
|
1255
|
+
* A caesura indicates a brief, silent pause.
|
|
1256
|
+
* It is notated using a "railroad tracks" symbol.
|
|
1257
|
+
*/
|
|
1258
|
+
declare function addCaesura(score: Score, options: AddCaesuraOptions): OperationResult<Score>;
|
|
1259
|
+
interface RemoveCaesuraOptions {
|
|
1260
|
+
partIndex: number;
|
|
1261
|
+
measureIndex: number;
|
|
1262
|
+
noteIndex: number;
|
|
1263
|
+
}
|
|
1264
|
+
/**
|
|
1265
|
+
* Remove a caesura from a note.
|
|
1266
|
+
*/
|
|
1267
|
+
declare function removeCaesura(score: Score, options: RemoveCaesuraOptions): OperationResult<Score>;
|
|
1268
|
+
|
|
1269
|
+
export { type LowerAccidentalOptions as $, validateSlursAcrossMeasures as A, formatLocation as B, ValidationException as C, validateMeasureLocal as D, getMeasureContext as E, assertMeasureValid as F, type ValidationError as G, type ValidationLocation as H, type ValidationErrorCode as I, type ValidationLevel as J, type OperationErrorCode as K, type LocalValidateOptions as L, type MeasureValidationContext as M, type InsertNoteOptions as N, type OperationResult as O, insertNote as P, removeNote as Q, addChord as R, changeNoteDuration as S, setNotePitch as T, type SetNotePitchBySemitoneOptions as U, type ValidateOptions as V, setNotePitchBySemitone as W, type ShiftNotePitchOptions as X, shiftNotePitch as Y, type RaiseAccidentalOptions as Z, raiseAccidental as _, type ValidationResult as a, addFermata as a$, lowerAccidental as a0, addVoice as a1, type AddPartOptions as a2, addPart as a3, removePart as a4, duplicatePart as a5, setStaves as a6, moveNoteToStaff as a7, type AddTieOptions as a8, addTie as a9, type AddBeamOptions as aA, addBeam as aB, type RemoveBeamOptions as aC, removeBeam as aD, type AutoBeamOptions as aE, autoBeam as aF, type NoteSelection as aG, type CopyNotesOptions as aH, copyNotes as aI, type PasteNotesOptions as aJ, pasteNotes as aK, type CutNotesOptions as aL, cutNotes as aM, type CopyNotesMultiMeasureOptions as aN, type MultiMeasureSelection as aO, copyNotesMultiMeasure as aP, type PasteNotesMultiMeasureOptions as aQ, pasteNotesMultiMeasure as aR, type AddTempoOptions as aS, addTempo as aT, type RemoveTempoOptions as aU, removeTempo as aV, type AddWedgeOptions as aW, addWedge as aX, type RemoveWedgeOptions as aY, removeWedge as aZ, type AddFermataOptions as a_, type RemoveTieOptions as aa, removeTie as ab, type AddSlurOptions as ac, addSlur as ad, type RemoveSlurOptions as ae, removeSlur as af, type AddArticulationOptions as ag, addArticulation as ah, type RemoveArticulationOptions as ai, removeArticulation as aj, type AddDynamicsOptions as ak, addDynamics as al, type RemoveDynamicsOptions as am, removeDynamics as an, type InsertClefChangeOptions as ao, insertClefChange as ap, addNoteChecked as aq, deleteNoteChecked as ar, addChordNoteChecked as as, modifyNotePitchChecked as at, modifyNoteDurationChecked as au, transposeChecked as av, type CreateTupletOptions as aw, createTuplet as ax, type RemoveTupletOptions as ay, removeTuplet as az, addNote as b, addStringNumber as b$, type RemoveFermataOptions as b0, removeFermata as b1, type AddOrnamentOptions as b2, addOrnament as b3, type RemoveOrnamentOptions as b4, removeOrnament as b5, type AddPedalOptions as b6, addPedal as b7, type RemovePedalOptions as b8, removePedal as b9, type RemoveGraceNoteOptions as bA, removeGraceNote as bB, type ConvertToGraceOptions as bC, convertToGrace as bD, type AddLyricOptions as bE, addLyric as bF, type RemoveLyricOptions as bG, removeLyric as bH, type UpdateLyricOptions as bI, updateLyric as bJ, type HarmonyKind as bK, type AddHarmonyOptions as bL, addHarmony as bM, type RemoveHarmonyOptions as bN, removeHarmony as bO, type UpdateHarmonyOptions as bP, updateHarmony as bQ, type AddFingeringOptions as bR, addFingering as bS, type RemoveFingeringOptions as bT, removeFingering as bU, type BowingType as bV, type AddBowingOptions as bW, addBowing as bX, type RemoveBowingOptions as bY, removeBowing as bZ, type AddStringNumberOptions as b_, type AddTextDirectionOptions as ba, addTextDirection as bb, type AddRehearsalMarkOptions as bc, addRehearsalMark as bd, type BarStyle as be, type AddRepeatBarlineOptions as bf, addRepeatBarline as bg, type RemoveRepeatBarlineOptions as bh, removeRepeatBarline as bi, type AddEndingOptions as bj, addEnding as bk, type RemoveEndingOptions as bl, removeEnding as bm, type ChangeBarlineOptions as bn, changeBarline as bo, type AddSegnoOptions as bp, addSegno as bq, type AddCodaOptions as br, addCoda as bs, type AddNavigationOptions as bt, addDaCapo as bu, addDalSegno as bv, addFine as bw, addToCoda as bx, type AddGraceNoteOptions as by, addGraceNote as bz, changeKey as c, type RemoveStringNumberOptions as c0, removeStringNumber as c1, type OctaveShiftType as c2, type AddOctaveShiftOptions as c3, addOctaveShift as c4, type StopOctaveShiftOptions as c5, stopOctaveShift as c6, type RemoveOctaveShiftOptions as c7, removeOctaveShift as c8, type BreathMarkValue as c9, type AddBreathMarkOptions as ca, addBreathMark as cb, type RemoveBreathMarkOptions as cc, removeBreathMark as cd, type CaesuraValue as ce, type AddCaesuraOptions as cf, addCaesura as cg, type RemoveCaesuraOptions as ch, removeCaesura as ci, deleteNote as d, changeTime as e, deleteMeasure as f, addChordNote as g, modifyNoteDuration as h, insertMeasure as i, isValid as j, assertValid as k, validateDivisions as l, modifyNotePitch as m, validateMeasureDuration as n, validateBackupForward as o, validateTies as p, validateBeams as q, validateSlurs as r, validateTuplets as s, transpose as t, validatePartReferences as u, validate as v, validatePartStructure as w, validateStaffStructure as x, validateVoiceStaff as y, validateTiesAcrossMeasures as z };
|