musicxml-io 0.2.9 → 0.2.12
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 +76 -5
- package/dist/{index-BvwdY5YQ.d.mts → index-DPW0wqXK.d.mts} +116 -29
- package/dist/{index-B-GcfEfL.d.ts → index-DkvcsWdo.d.ts} +116 -29
- package/dist/index.d.mts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +3579 -74
- package/dist/index.mjs +3483 -74
- package/dist/operations/index.d.mts +2 -2
- package/dist/operations/index.d.ts +2 -2
- package/dist/operations/index.js +133 -4
- package/dist/operations/index.mjs +122 -4
- package/dist/query/index.d.mts +1 -1
- package/dist/query/index.d.ts +1 -1
- package/dist/{types-Bpq2o5JS.d.mts → types-JohtsbUB.d.mts} +1 -0
- package/dist/{types-Bpq2o5JS.d.ts → types-JohtsbUB.d.ts} +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -181,15 +181,42 @@ const { valid, errors } = validate(score);
|
|
|
181
181
|
| Function | Description |
|
|
182
182
|
|----------|-------------|
|
|
183
183
|
| `transpose(score, semitones)` | Transpose pitches |
|
|
184
|
-
| `
|
|
185
|
-
| `
|
|
186
|
-
| `
|
|
187
|
-
| `
|
|
188
|
-
| `
|
|
184
|
+
| `insertNote(score, options)` | Insert note at position |
|
|
185
|
+
| `removeNote(score, options)` | Remove note (replace with rest) |
|
|
186
|
+
| `addChord(score, options)` | Add note to chord |
|
|
187
|
+
| `setNotePitch(score, options)` | Change note pitch |
|
|
188
|
+
| `changeNoteDuration(score, options)` | Change note duration |
|
|
189
|
+
| `addVoice(score, options)` | Add voice to measure |
|
|
190
|
+
| `addPart(score, options)` | Add part to score |
|
|
191
|
+
| `removePart(score, options)` | Remove part from score |
|
|
192
|
+
| `setStaves(score, options)` | Set staff count |
|
|
189
193
|
| `changeKey(score, key, part, measure)` | Change key signature |
|
|
190
194
|
| `changeTime(score, time, part, measure)` | Change time signature |
|
|
191
195
|
| `insertMeasure(score, part, after)` | Insert measure |
|
|
192
196
|
| `deleteMeasure(score, part, measure)` | Delete measure |
|
|
197
|
+
| `addTie(score, options)` | Add tie between notes |
|
|
198
|
+
| `addSlur(score, options)` | Add slur between notes |
|
|
199
|
+
| `addArticulation(score, options)` | Add staccato, accent, etc. |
|
|
200
|
+
| `addDynamics(score, options)` | Add dynamics (f, p, etc.) |
|
|
201
|
+
| `modifyDynamics(score, options)` | Modify dynamics |
|
|
202
|
+
| `addTempo(score, options)` | Add tempo marking |
|
|
203
|
+
| `modifyTempo(score, options)` | Modify tempo |
|
|
204
|
+
| `addOrnament(score, options)` | Add trill, turn, etc. |
|
|
205
|
+
| `addText(score, options)` | Add text direction |
|
|
206
|
+
| `addLyric(score, options)` | Add lyric to note |
|
|
207
|
+
| `autoBeam(score, options)` | Auto-beam notes |
|
|
208
|
+
| `createTuplet(score, options)` | Create tuplet |
|
|
209
|
+
| `addChordSymbol(score, options)` | Add chord symbol |
|
|
210
|
+
| `changeClef(score, options)` | Change clef |
|
|
211
|
+
| `setBarline(score, options)` | Change barline style |
|
|
212
|
+
| `addRepeat(score, options)` | Add repeat barline |
|
|
213
|
+
| `addEnding(score, options)` | Add first/second ending |
|
|
214
|
+
| `addFermata(score, options)` | Add fermata |
|
|
215
|
+
| `addWedge(score, options)` | Add crescendo/diminuendo |
|
|
216
|
+
| `addPedal(score, options)` | Add pedal marking |
|
|
217
|
+
| `addGraceNote(score, options)` | Add grace note |
|
|
218
|
+
|
|
219
|
+
See [OPERATIONS.md](OPERATIONS.md) for the complete list.
|
|
193
220
|
|
|
194
221
|
### Query
|
|
195
222
|
|
|
@@ -303,6 +330,50 @@ This feature enables:
|
|
|
303
330
|
| Node coverage | 99.9% |
|
|
304
331
|
| Attribute coverage | 95.9% |
|
|
305
332
|
|
|
333
|
+
## Contributing
|
|
334
|
+
|
|
335
|
+
Contributions are welcome! Whether it's bug reports, feature requests, documentation improvements, or code contributions, we appreciate your help in making this library better.
|
|
336
|
+
|
|
337
|
+
### Development Setup
|
|
338
|
+
|
|
339
|
+
```bash
|
|
340
|
+
# Clone the repository
|
|
341
|
+
git clone https://github.com/tan-z-tan/musicxml-io.git
|
|
342
|
+
cd musicxml-io
|
|
343
|
+
|
|
344
|
+
# Install dependencies
|
|
345
|
+
npm install
|
|
346
|
+
|
|
347
|
+
# Run tests
|
|
348
|
+
npm test
|
|
349
|
+
|
|
350
|
+
# Build
|
|
351
|
+
npm run build
|
|
352
|
+
|
|
353
|
+
# Type check
|
|
354
|
+
npm run typecheck
|
|
355
|
+
|
|
356
|
+
# Lint
|
|
357
|
+
npm run lint
|
|
358
|
+
```
|
|
359
|
+
|
|
360
|
+
### How to Contribute
|
|
361
|
+
|
|
362
|
+
1. Fork the repository
|
|
363
|
+
2. Create a feature branch (`git checkout -b feature/amazing-feature`)
|
|
364
|
+
3. Make your changes
|
|
365
|
+
4. Run tests to ensure everything works (`npm test`)
|
|
366
|
+
5. Commit your changes (`git commit -m 'Add amazing feature'`)
|
|
367
|
+
6. Push to the branch (`git push origin feature/amazing-feature`)
|
|
368
|
+
7. Open a Pull Request
|
|
369
|
+
|
|
370
|
+
### Guidelines
|
|
371
|
+
|
|
372
|
+
- Write tests for new features
|
|
373
|
+
- Follow the existing code style
|
|
374
|
+
- Update documentation as needed
|
|
375
|
+
- Keep PRs focused on a single change
|
|
376
|
+
|
|
306
377
|
## License
|
|
307
378
|
|
|
308
379
|
MIT
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { S as Score, M as Measure, n as TimeSignature, f as Part,
|
|
1
|
+
import { S as Score, M as Measure, n as TimeSignature, f as Part, P as Pitch, N as NoteEntry, K as KeySignature, C as Clef, ac as ArticulationType, m as DynamicsValue, ad as OrnamentType, i as NoteType } from './types-JohtsbUB.mjs';
|
|
2
2
|
|
|
3
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
4
|
type ValidationLevel = 'error' | 'warning' | 'info';
|
|
@@ -212,45 +212,49 @@ interface InsertNoteOptions {
|
|
|
212
212
|
* - If the note exceeds measure duration, returns EXCEEDS_MEASURE error
|
|
213
213
|
*/
|
|
214
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: {
|
|
215
|
+
interface RemoveNoteOptions {
|
|
219
216
|
partIndex: number;
|
|
220
217
|
measureIndex: number;
|
|
221
218
|
noteIndex: number;
|
|
222
|
-
}
|
|
219
|
+
}
|
|
223
220
|
/**
|
|
224
|
-
*
|
|
221
|
+
* Remove a note and replace with rest
|
|
225
222
|
*/
|
|
226
|
-
declare function
|
|
223
|
+
declare function removeNote(score: Score, options: RemoveNoteOptions): OperationResult<Score>;
|
|
224
|
+
interface AddChordOptions {
|
|
227
225
|
partIndex: number;
|
|
228
226
|
measureIndex: number;
|
|
229
227
|
noteIndex: number;
|
|
230
228
|
pitch: Pitch;
|
|
231
|
-
}
|
|
229
|
+
}
|
|
232
230
|
/**
|
|
233
|
-
*
|
|
234
|
-
* - If longer: consumes following rests/notes, returns error if would overwrite notes
|
|
235
|
-
* - If shorter: fills remainder with rest
|
|
231
|
+
* Add a chord note to an existing note
|
|
236
232
|
*/
|
|
237
|
-
declare function
|
|
233
|
+
declare function addChord(score: Score, options: AddChordOptions): OperationResult<Score>;
|
|
234
|
+
interface ChangeNoteDurationOptions {
|
|
238
235
|
partIndex: number;
|
|
239
236
|
measureIndex: number;
|
|
240
237
|
noteIndex: number;
|
|
241
238
|
newDuration: number;
|
|
242
239
|
noteType?: NoteEntry['noteType'];
|
|
243
240
|
dots?: number;
|
|
244
|
-
}
|
|
241
|
+
}
|
|
245
242
|
/**
|
|
246
|
-
*
|
|
243
|
+
* Change note duration with proper handling of following notes
|
|
244
|
+
* - If longer: consumes following rests/notes, returns error if would overwrite notes
|
|
245
|
+
* - If shorter: fills remainder with rest
|
|
247
246
|
*/
|
|
248
|
-
declare function
|
|
247
|
+
declare function changeNoteDuration(score: Score, options: ChangeNoteDurationOptions): OperationResult<Score>;
|
|
248
|
+
interface SetNotePitchOptions {
|
|
249
249
|
partIndex: number;
|
|
250
250
|
measureIndex: number;
|
|
251
251
|
noteIndex: number;
|
|
252
252
|
pitch: Pitch;
|
|
253
|
-
}
|
|
253
|
+
}
|
|
254
|
+
/**
|
|
255
|
+
* Set note pitch (simple pitch change, no validation needed)
|
|
256
|
+
*/
|
|
257
|
+
declare function setNotePitch(score: Score, options: SetNotePitchOptions): OperationResult<Score>;
|
|
254
258
|
interface SetNotePitchBySemitoneOptions {
|
|
255
259
|
partIndex: number;
|
|
256
260
|
measureIndex: number;
|
|
@@ -303,15 +307,16 @@ interface LowerAccidentalOptions {
|
|
|
303
307
|
* Returns error if alter would go below -2.
|
|
304
308
|
*/
|
|
305
309
|
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
|
+
interface AddVoiceOptions {
|
|
310
311
|
partIndex: number;
|
|
311
312
|
measureIndex: number;
|
|
312
313
|
voice: number;
|
|
313
314
|
staff?: number;
|
|
314
|
-
}
|
|
315
|
+
}
|
|
316
|
+
/**
|
|
317
|
+
* Add a new voice to a measure, filled with a whole-measure rest
|
|
318
|
+
*/
|
|
319
|
+
declare function addVoice(score: Score, options: AddVoiceOptions): OperationResult<Score>;
|
|
315
320
|
/**
|
|
316
321
|
* Transpose all notes in the score
|
|
317
322
|
*/
|
|
@@ -328,23 +333,26 @@ interface AddPartOptions {
|
|
|
328
333
|
}
|
|
329
334
|
declare function addPart(score: Score, options: AddPartOptions): OperationResult<Score>;
|
|
330
335
|
declare function removePart(score: Score, partId: string): OperationResult<Score>;
|
|
331
|
-
|
|
336
|
+
interface DuplicatePartOptions {
|
|
332
337
|
sourcePartId: string;
|
|
333
338
|
newPartId: string;
|
|
334
339
|
newPartName?: string;
|
|
335
|
-
}
|
|
336
|
-
declare function
|
|
340
|
+
}
|
|
341
|
+
declare function duplicatePart(score: Score, options: DuplicatePartOptions): OperationResult<Score>;
|
|
342
|
+
interface SetStavesOptions {
|
|
337
343
|
partIndex: number;
|
|
338
344
|
staves: number;
|
|
339
345
|
clefs?: Clef[];
|
|
340
346
|
fromMeasure?: number;
|
|
341
|
-
}
|
|
342
|
-
declare function
|
|
347
|
+
}
|
|
348
|
+
declare function setStaves(score: Score, options: SetStavesOptions): OperationResult<Score>;
|
|
349
|
+
interface MoveNoteToStaffOptions {
|
|
343
350
|
partIndex: number;
|
|
344
351
|
measureIndex: number;
|
|
345
352
|
noteIndex: number;
|
|
346
353
|
targetStaff: number;
|
|
347
|
-
}
|
|
354
|
+
}
|
|
355
|
+
declare function moveNoteToStaff(score: Score, options: MoveNoteToStaffOptions): OperationResult<Score>;
|
|
348
356
|
declare function changeKey(score: Score, key: KeySignature, options: {
|
|
349
357
|
fromMeasure: string | number;
|
|
350
358
|
}): Score;
|
|
@@ -443,6 +451,20 @@ interface RemoveDynamicsOptions {
|
|
|
443
451
|
* Remove a dynamics direction from a measure
|
|
444
452
|
*/
|
|
445
453
|
declare function removeDynamics(score: Score, options: RemoveDynamicsOptions): OperationResult<Score>;
|
|
454
|
+
interface ModifyDynamicsOptions {
|
|
455
|
+
partIndex: number;
|
|
456
|
+
measureIndex: number;
|
|
457
|
+
/** Index of the dynamics direction to modify (among dynamics directions in the measure) */
|
|
458
|
+
directionIndex: number;
|
|
459
|
+
/** New dynamics value */
|
|
460
|
+
dynamics: DynamicsValue;
|
|
461
|
+
/** New placement (optional) */
|
|
462
|
+
placement?: 'above' | 'below';
|
|
463
|
+
}
|
|
464
|
+
/**
|
|
465
|
+
* Modify an existing dynamics marking in a measure
|
|
466
|
+
*/
|
|
467
|
+
declare function modifyDynamics(score: Score, options: ModifyDynamicsOptions): OperationResult<Score>;
|
|
446
468
|
interface InsertClefChangeOptions {
|
|
447
469
|
partIndex: number;
|
|
448
470
|
measureIndex: number;
|
|
@@ -756,6 +778,26 @@ interface RemoveTempoOptions {
|
|
|
756
778
|
* Remove a tempo marking from a measure.
|
|
757
779
|
*/
|
|
758
780
|
declare function removeTempo(score: Score, options: RemoveTempoOptions): OperationResult<Score>;
|
|
781
|
+
interface ModifyTempoOptions {
|
|
782
|
+
partIndex: number;
|
|
783
|
+
measureIndex: number;
|
|
784
|
+
/** Index of the tempo direction to modify (among tempo directions in the measure) */
|
|
785
|
+
directionIndex?: number;
|
|
786
|
+
/** New BPM value */
|
|
787
|
+
bpm?: number;
|
|
788
|
+
/** New beat unit */
|
|
789
|
+
beatUnit?: 'whole' | 'half' | 'quarter' | 'eighth' | '16th' | '32nd' | '64th';
|
|
790
|
+
/** Beat unit dot */
|
|
791
|
+
beatUnitDot?: boolean;
|
|
792
|
+
/** New tempo text (e.g., 'Allegro') */
|
|
793
|
+
text?: string;
|
|
794
|
+
/** Placement */
|
|
795
|
+
placement?: 'above' | 'below';
|
|
796
|
+
}
|
|
797
|
+
/**
|
|
798
|
+
* Modify an existing tempo marking in a measure
|
|
799
|
+
*/
|
|
800
|
+
declare function modifyTempo(score: Score, options: ModifyTempoOptions): OperationResult<Score>;
|
|
759
801
|
interface AddWedgeOptions {
|
|
760
802
|
partIndex: number;
|
|
761
803
|
/** Starting measure index */
|
|
@@ -1265,5 +1307,50 @@ interface RemoveCaesuraOptions {
|
|
|
1265
1307
|
* Remove a caesura from a note.
|
|
1266
1308
|
*/
|
|
1267
1309
|
declare function removeCaesura(score: Score, options: RemoveCaesuraOptions): OperationResult<Score>;
|
|
1310
|
+
/**
|
|
1311
|
+
* Add text to the score. Alias for addTextDirection.
|
|
1312
|
+
*/
|
|
1313
|
+
declare const addText: typeof addTextDirection;
|
|
1314
|
+
type AddTextOptions = AddTextDirectionOptions;
|
|
1315
|
+
/**
|
|
1316
|
+
* Set beaming for notes. Alias for autoBeam.
|
|
1317
|
+
*/
|
|
1318
|
+
declare const setBeaming: typeof autoBeam;
|
|
1319
|
+
type SetBeamingOptions = AutoBeamOptions;
|
|
1320
|
+
/**
|
|
1321
|
+
* Add a chord symbol. Alias for addHarmony.
|
|
1322
|
+
*/
|
|
1323
|
+
declare const addChordSymbol: typeof addHarmony;
|
|
1324
|
+
type AddChordSymbolOptions = AddHarmonyOptions;
|
|
1325
|
+
/**
|
|
1326
|
+
* Remove a chord symbol. Alias for removeHarmony.
|
|
1327
|
+
*/
|
|
1328
|
+
declare const removeChordSymbol: typeof removeHarmony;
|
|
1329
|
+
type RemoveChordSymbolOptions = RemoveHarmonyOptions;
|
|
1330
|
+
/**
|
|
1331
|
+
* Update a chord symbol. Alias for updateHarmony.
|
|
1332
|
+
*/
|
|
1333
|
+
declare const updateChordSymbol: typeof updateHarmony;
|
|
1334
|
+
type UpdateChordSymbolOptions = UpdateHarmonyOptions;
|
|
1335
|
+
/**
|
|
1336
|
+
* Change the clef at a position. Alias for insertClefChange.
|
|
1337
|
+
*/
|
|
1338
|
+
declare const changeClef: typeof insertClefChange;
|
|
1339
|
+
type ChangeClefOptions = InsertClefChangeOptions;
|
|
1340
|
+
/**
|
|
1341
|
+
* Set barline style. Alias for changeBarline.
|
|
1342
|
+
*/
|
|
1343
|
+
declare const setBarline: typeof changeBarline;
|
|
1344
|
+
type SetBarlineOptions = ChangeBarlineOptions;
|
|
1345
|
+
/**
|
|
1346
|
+
* Add a repeat barline. Alias for addRepeatBarline.
|
|
1347
|
+
*/
|
|
1348
|
+
declare const addRepeat: typeof addRepeatBarline;
|
|
1349
|
+
type AddRepeatOptions = AddRepeatBarlineOptions;
|
|
1350
|
+
/**
|
|
1351
|
+
* Remove a repeat barline. Alias for removeRepeatBarline.
|
|
1352
|
+
*/
|
|
1353
|
+
declare const removeRepeat: typeof removeRepeatBarline;
|
|
1354
|
+
type RemoveRepeatOptions = RemoveRepeatBarlineOptions;
|
|
1268
1355
|
|
|
1269
|
-
export {
|
|
1356
|
+
export { copyNotesMultiMeasure as $, setStaves as A, moveNoteToStaff as B, changeKey as C, changeTime as D, insertMeasure as E, deleteMeasure as F, addTie as G, removeTie as H, addSlur as I, removeSlur as J, addArticulation as K, removeArticulation as L, addDynamics as M, removeDynamics as N, modifyDynamics as O, insertClefChange as P, changeClef as Q, createTuplet as R, removeTuplet as S, addBeam as T, removeBeam as U, type ValidateOptions as V, autoBeam as W, setBeaming as X, copyNotes as Y, pasteNotes as Z, cutNotes as _, type ValidationResult as a, type RaiseAccidentalOptions as a$, pasteNotesMultiMeasure as a0, addTempo as a1, removeTempo as a2, modifyTempo as a3, addWedge as a4, removeWedge as a5, addFermata as a6, removeFermata as a7, addOrnament as a8, removeOrnament as a9, removeHarmony as aA, updateHarmony as aB, addChordSymbol as aC, removeChordSymbol as aD, updateChordSymbol as aE, addFingering as aF, removeFingering as aG, addBowing as aH, removeBowing as aI, addStringNumber as aJ, removeStringNumber as aK, addOctaveShift as aL, stopOctaveShift as aM, removeOctaveShift as aN, addBreathMark as aO, removeBreathMark as aP, addCaesura as aQ, removeCaesura as aR, type OperationResult as aS, type OperationErrorCode as aT, type InsertNoteOptions as aU, type RemoveNoteOptions as aV, type AddChordOptions as aW, type ChangeNoteDurationOptions as aX, type SetNotePitchOptions as aY, type SetNotePitchBySemitoneOptions as aZ, type ShiftNotePitchOptions as a_, addPedal as aa, removePedal as ab, addTextDirection as ac, addText as ad, addRehearsalMark as ae, addRepeatBarline as af, removeRepeatBarline as ag, addRepeat as ah, removeRepeat as ai, addEnding as aj, removeEnding as ak, changeBarline as al, setBarline as am, addSegno as an, addCoda as ao, addDaCapo as ap, addDalSegno as aq, addFine as ar, addToCoda as as, addGraceNote as at, removeGraceNote as au, convertToGrace as av, addLyric as aw, removeLyric as ax, updateLyric as ay, addHarmony as az, addChord as b, type AddHarmonyOptions as b$, type LowerAccidentalOptions as b0, type AddVoiceOptions as b1, type AddPartOptions as b2, type DuplicatePartOptions as b3, type SetStavesOptions as b4, type MoveNoteToStaffOptions as b5, type AddTieOptions as b6, type RemoveTieOptions as b7, type AddSlurOptions as b8, type RemoveSlurOptions as b9, type RemoveFermataOptions as bA, type AddOrnamentOptions as bB, type RemoveOrnamentOptions as bC, type AddPedalOptions as bD, type RemovePedalOptions as bE, type AddTextDirectionOptions as bF, type AddTextOptions as bG, type AddRehearsalMarkOptions as bH, type AddRepeatBarlineOptions as bI, type RemoveRepeatBarlineOptions as bJ, type AddRepeatOptions as bK, type RemoveRepeatOptions as bL, type AddEndingOptions as bM, type RemoveEndingOptions as bN, type ChangeBarlineOptions as bO, type SetBarlineOptions as bP, type BarStyle as bQ, type AddSegnoOptions as bR, type AddCodaOptions as bS, type AddNavigationOptions as bT, type AddGraceNoteOptions as bU, type RemoveGraceNoteOptions as bV, type ConvertToGraceOptions as bW, type AddLyricOptions as bX, type RemoveLyricOptions as bY, type UpdateLyricOptions as bZ, type HarmonyKind as b_, type AddArticulationOptions as ba, type RemoveArticulationOptions as bb, type AddDynamicsOptions as bc, type RemoveDynamicsOptions as bd, type ModifyDynamicsOptions as be, type InsertClefChangeOptions as bf, type ChangeClefOptions as bg, type CreateTupletOptions as bh, type RemoveTupletOptions as bi, type AddBeamOptions as bj, type RemoveBeamOptions as bk, type AutoBeamOptions as bl, type SetBeamingOptions as bm, type NoteSelection as bn, type CopyNotesOptions as bo, type PasteNotesOptions as bp, type CutNotesOptions as bq, type CopyNotesMultiMeasureOptions as br, type MultiMeasureSelection as bs, type PasteNotesMultiMeasureOptions as bt, type AddTempoOptions as bu, type RemoveTempoOptions as bv, type ModifyTempoOptions as bw, type AddWedgeOptions as bx, type RemoveWedgeOptions as by, type AddFermataOptions as bz, setNotePitchBySemitone as c, type RemoveHarmonyOptions as c0, type UpdateHarmonyOptions as c1, type AddChordSymbolOptions as c2, type RemoveChordSymbolOptions as c3, type UpdateChordSymbolOptions as c4, type AddFingeringOptions as c5, type RemoveFingeringOptions as c6, type BowingType as c7, type AddBowingOptions as c8, type RemoveBowingOptions as c9, validateTiesAcrossMeasures as cA, validateSlursAcrossMeasures as cB, formatLocation as cC, ValidationException as cD, validateMeasureLocal as cE, getMeasureContext as cF, assertMeasureValid as cG, type ValidationError as cH, type ValidationLocation as cI, type ValidationErrorCode as cJ, type ValidationLevel as cK, type MeasureValidationContext as cL, type LocalValidateOptions as cM, type AddStringNumberOptions as ca, type RemoveStringNumberOptions as cb, type OctaveShiftType as cc, type AddOctaveShiftOptions as cd, type StopOctaveShiftOptions as ce, type RemoveOctaveShiftOptions as cf, type BreathMarkValue as cg, type AddBreathMarkOptions as ch, type RemoveBreathMarkOptions as ci, type CaesuraValue as cj, type AddCaesuraOptions as ck, type RemoveCaesuraOptions as cl, validate as cm, isValid as cn, assertValid as co, validateDivisions as cp, validateMeasureDuration as cq, validateBackupForward as cr, validateTies as cs, validateBeams as ct, validateSlurs as cu, validateTuplets as cv, validatePartReferences as cw, validatePartStructure as cx, validateStaffStructure as cy, validateVoiceStaff as cz, shiftNotePitch as d, changeNoteDuration as e, raiseAccidental as f, addNote as g, deleteNote as h, insertNote as i, addChordNote as j, modifyNoteDuration as k, lowerAccidental as l, modifyNotePitch as m, addNoteChecked as n, deleteNoteChecked as o, addChordNoteChecked as p, modifyNotePitchChecked as q, removeNote as r, setNotePitch as s, transpose as t, modifyNoteDurationChecked as u, transposeChecked as v, addVoice as w, addPart as x, removePart as y, duplicatePart as z };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { S as Score, M as Measure, n as TimeSignature, f as Part,
|
|
1
|
+
import { S as Score, M as Measure, n as TimeSignature, f as Part, P as Pitch, N as NoteEntry, K as KeySignature, C as Clef, ac as ArticulationType, m as DynamicsValue, ad as OrnamentType, i as NoteType } from './types-JohtsbUB.js';
|
|
2
2
|
|
|
3
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
4
|
type ValidationLevel = 'error' | 'warning' | 'info';
|
|
@@ -212,45 +212,49 @@ interface InsertNoteOptions {
|
|
|
212
212
|
* - If the note exceeds measure duration, returns EXCEEDS_MEASURE error
|
|
213
213
|
*/
|
|
214
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: {
|
|
215
|
+
interface RemoveNoteOptions {
|
|
219
216
|
partIndex: number;
|
|
220
217
|
measureIndex: number;
|
|
221
218
|
noteIndex: number;
|
|
222
|
-
}
|
|
219
|
+
}
|
|
223
220
|
/**
|
|
224
|
-
*
|
|
221
|
+
* Remove a note and replace with rest
|
|
225
222
|
*/
|
|
226
|
-
declare function
|
|
223
|
+
declare function removeNote(score: Score, options: RemoveNoteOptions): OperationResult<Score>;
|
|
224
|
+
interface AddChordOptions {
|
|
227
225
|
partIndex: number;
|
|
228
226
|
measureIndex: number;
|
|
229
227
|
noteIndex: number;
|
|
230
228
|
pitch: Pitch;
|
|
231
|
-
}
|
|
229
|
+
}
|
|
232
230
|
/**
|
|
233
|
-
*
|
|
234
|
-
* - If longer: consumes following rests/notes, returns error if would overwrite notes
|
|
235
|
-
* - If shorter: fills remainder with rest
|
|
231
|
+
* Add a chord note to an existing note
|
|
236
232
|
*/
|
|
237
|
-
declare function
|
|
233
|
+
declare function addChord(score: Score, options: AddChordOptions): OperationResult<Score>;
|
|
234
|
+
interface ChangeNoteDurationOptions {
|
|
238
235
|
partIndex: number;
|
|
239
236
|
measureIndex: number;
|
|
240
237
|
noteIndex: number;
|
|
241
238
|
newDuration: number;
|
|
242
239
|
noteType?: NoteEntry['noteType'];
|
|
243
240
|
dots?: number;
|
|
244
|
-
}
|
|
241
|
+
}
|
|
245
242
|
/**
|
|
246
|
-
*
|
|
243
|
+
* Change note duration with proper handling of following notes
|
|
244
|
+
* - If longer: consumes following rests/notes, returns error if would overwrite notes
|
|
245
|
+
* - If shorter: fills remainder with rest
|
|
247
246
|
*/
|
|
248
|
-
declare function
|
|
247
|
+
declare function changeNoteDuration(score: Score, options: ChangeNoteDurationOptions): OperationResult<Score>;
|
|
248
|
+
interface SetNotePitchOptions {
|
|
249
249
|
partIndex: number;
|
|
250
250
|
measureIndex: number;
|
|
251
251
|
noteIndex: number;
|
|
252
252
|
pitch: Pitch;
|
|
253
|
-
}
|
|
253
|
+
}
|
|
254
|
+
/**
|
|
255
|
+
* Set note pitch (simple pitch change, no validation needed)
|
|
256
|
+
*/
|
|
257
|
+
declare function setNotePitch(score: Score, options: SetNotePitchOptions): OperationResult<Score>;
|
|
254
258
|
interface SetNotePitchBySemitoneOptions {
|
|
255
259
|
partIndex: number;
|
|
256
260
|
measureIndex: number;
|
|
@@ -303,15 +307,16 @@ interface LowerAccidentalOptions {
|
|
|
303
307
|
* Returns error if alter would go below -2.
|
|
304
308
|
*/
|
|
305
309
|
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
|
+
interface AddVoiceOptions {
|
|
310
311
|
partIndex: number;
|
|
311
312
|
measureIndex: number;
|
|
312
313
|
voice: number;
|
|
313
314
|
staff?: number;
|
|
314
|
-
}
|
|
315
|
+
}
|
|
316
|
+
/**
|
|
317
|
+
* Add a new voice to a measure, filled with a whole-measure rest
|
|
318
|
+
*/
|
|
319
|
+
declare function addVoice(score: Score, options: AddVoiceOptions): OperationResult<Score>;
|
|
315
320
|
/**
|
|
316
321
|
* Transpose all notes in the score
|
|
317
322
|
*/
|
|
@@ -328,23 +333,26 @@ interface AddPartOptions {
|
|
|
328
333
|
}
|
|
329
334
|
declare function addPart(score: Score, options: AddPartOptions): OperationResult<Score>;
|
|
330
335
|
declare function removePart(score: Score, partId: string): OperationResult<Score>;
|
|
331
|
-
|
|
336
|
+
interface DuplicatePartOptions {
|
|
332
337
|
sourcePartId: string;
|
|
333
338
|
newPartId: string;
|
|
334
339
|
newPartName?: string;
|
|
335
|
-
}
|
|
336
|
-
declare function
|
|
340
|
+
}
|
|
341
|
+
declare function duplicatePart(score: Score, options: DuplicatePartOptions): OperationResult<Score>;
|
|
342
|
+
interface SetStavesOptions {
|
|
337
343
|
partIndex: number;
|
|
338
344
|
staves: number;
|
|
339
345
|
clefs?: Clef[];
|
|
340
346
|
fromMeasure?: number;
|
|
341
|
-
}
|
|
342
|
-
declare function
|
|
347
|
+
}
|
|
348
|
+
declare function setStaves(score: Score, options: SetStavesOptions): OperationResult<Score>;
|
|
349
|
+
interface MoveNoteToStaffOptions {
|
|
343
350
|
partIndex: number;
|
|
344
351
|
measureIndex: number;
|
|
345
352
|
noteIndex: number;
|
|
346
353
|
targetStaff: number;
|
|
347
|
-
}
|
|
354
|
+
}
|
|
355
|
+
declare function moveNoteToStaff(score: Score, options: MoveNoteToStaffOptions): OperationResult<Score>;
|
|
348
356
|
declare function changeKey(score: Score, key: KeySignature, options: {
|
|
349
357
|
fromMeasure: string | number;
|
|
350
358
|
}): Score;
|
|
@@ -443,6 +451,20 @@ interface RemoveDynamicsOptions {
|
|
|
443
451
|
* Remove a dynamics direction from a measure
|
|
444
452
|
*/
|
|
445
453
|
declare function removeDynamics(score: Score, options: RemoveDynamicsOptions): OperationResult<Score>;
|
|
454
|
+
interface ModifyDynamicsOptions {
|
|
455
|
+
partIndex: number;
|
|
456
|
+
measureIndex: number;
|
|
457
|
+
/** Index of the dynamics direction to modify (among dynamics directions in the measure) */
|
|
458
|
+
directionIndex: number;
|
|
459
|
+
/** New dynamics value */
|
|
460
|
+
dynamics: DynamicsValue;
|
|
461
|
+
/** New placement (optional) */
|
|
462
|
+
placement?: 'above' | 'below';
|
|
463
|
+
}
|
|
464
|
+
/**
|
|
465
|
+
* Modify an existing dynamics marking in a measure
|
|
466
|
+
*/
|
|
467
|
+
declare function modifyDynamics(score: Score, options: ModifyDynamicsOptions): OperationResult<Score>;
|
|
446
468
|
interface InsertClefChangeOptions {
|
|
447
469
|
partIndex: number;
|
|
448
470
|
measureIndex: number;
|
|
@@ -756,6 +778,26 @@ interface RemoveTempoOptions {
|
|
|
756
778
|
* Remove a tempo marking from a measure.
|
|
757
779
|
*/
|
|
758
780
|
declare function removeTempo(score: Score, options: RemoveTempoOptions): OperationResult<Score>;
|
|
781
|
+
interface ModifyTempoOptions {
|
|
782
|
+
partIndex: number;
|
|
783
|
+
measureIndex: number;
|
|
784
|
+
/** Index of the tempo direction to modify (among tempo directions in the measure) */
|
|
785
|
+
directionIndex?: number;
|
|
786
|
+
/** New BPM value */
|
|
787
|
+
bpm?: number;
|
|
788
|
+
/** New beat unit */
|
|
789
|
+
beatUnit?: 'whole' | 'half' | 'quarter' | 'eighth' | '16th' | '32nd' | '64th';
|
|
790
|
+
/** Beat unit dot */
|
|
791
|
+
beatUnitDot?: boolean;
|
|
792
|
+
/** New tempo text (e.g., 'Allegro') */
|
|
793
|
+
text?: string;
|
|
794
|
+
/** Placement */
|
|
795
|
+
placement?: 'above' | 'below';
|
|
796
|
+
}
|
|
797
|
+
/**
|
|
798
|
+
* Modify an existing tempo marking in a measure
|
|
799
|
+
*/
|
|
800
|
+
declare function modifyTempo(score: Score, options: ModifyTempoOptions): OperationResult<Score>;
|
|
759
801
|
interface AddWedgeOptions {
|
|
760
802
|
partIndex: number;
|
|
761
803
|
/** Starting measure index */
|
|
@@ -1265,5 +1307,50 @@ interface RemoveCaesuraOptions {
|
|
|
1265
1307
|
* Remove a caesura from a note.
|
|
1266
1308
|
*/
|
|
1267
1309
|
declare function removeCaesura(score: Score, options: RemoveCaesuraOptions): OperationResult<Score>;
|
|
1310
|
+
/**
|
|
1311
|
+
* Add text to the score. Alias for addTextDirection.
|
|
1312
|
+
*/
|
|
1313
|
+
declare const addText: typeof addTextDirection;
|
|
1314
|
+
type AddTextOptions = AddTextDirectionOptions;
|
|
1315
|
+
/**
|
|
1316
|
+
* Set beaming for notes. Alias for autoBeam.
|
|
1317
|
+
*/
|
|
1318
|
+
declare const setBeaming: typeof autoBeam;
|
|
1319
|
+
type SetBeamingOptions = AutoBeamOptions;
|
|
1320
|
+
/**
|
|
1321
|
+
* Add a chord symbol. Alias for addHarmony.
|
|
1322
|
+
*/
|
|
1323
|
+
declare const addChordSymbol: typeof addHarmony;
|
|
1324
|
+
type AddChordSymbolOptions = AddHarmonyOptions;
|
|
1325
|
+
/**
|
|
1326
|
+
* Remove a chord symbol. Alias for removeHarmony.
|
|
1327
|
+
*/
|
|
1328
|
+
declare const removeChordSymbol: typeof removeHarmony;
|
|
1329
|
+
type RemoveChordSymbolOptions = RemoveHarmonyOptions;
|
|
1330
|
+
/**
|
|
1331
|
+
* Update a chord symbol. Alias for updateHarmony.
|
|
1332
|
+
*/
|
|
1333
|
+
declare const updateChordSymbol: typeof updateHarmony;
|
|
1334
|
+
type UpdateChordSymbolOptions = UpdateHarmonyOptions;
|
|
1335
|
+
/**
|
|
1336
|
+
* Change the clef at a position. Alias for insertClefChange.
|
|
1337
|
+
*/
|
|
1338
|
+
declare const changeClef: typeof insertClefChange;
|
|
1339
|
+
type ChangeClefOptions = InsertClefChangeOptions;
|
|
1340
|
+
/**
|
|
1341
|
+
* Set barline style. Alias for changeBarline.
|
|
1342
|
+
*/
|
|
1343
|
+
declare const setBarline: typeof changeBarline;
|
|
1344
|
+
type SetBarlineOptions = ChangeBarlineOptions;
|
|
1345
|
+
/**
|
|
1346
|
+
* Add a repeat barline. Alias for addRepeatBarline.
|
|
1347
|
+
*/
|
|
1348
|
+
declare const addRepeat: typeof addRepeatBarline;
|
|
1349
|
+
type AddRepeatOptions = AddRepeatBarlineOptions;
|
|
1350
|
+
/**
|
|
1351
|
+
* Remove a repeat barline. Alias for removeRepeatBarline.
|
|
1352
|
+
*/
|
|
1353
|
+
declare const removeRepeat: typeof removeRepeatBarline;
|
|
1354
|
+
type RemoveRepeatOptions = RemoveRepeatBarlineOptions;
|
|
1268
1355
|
|
|
1269
|
-
export {
|
|
1356
|
+
export { copyNotesMultiMeasure as $, setStaves as A, moveNoteToStaff as B, changeKey as C, changeTime as D, insertMeasure as E, deleteMeasure as F, addTie as G, removeTie as H, addSlur as I, removeSlur as J, addArticulation as K, removeArticulation as L, addDynamics as M, removeDynamics as N, modifyDynamics as O, insertClefChange as P, changeClef as Q, createTuplet as R, removeTuplet as S, addBeam as T, removeBeam as U, type ValidateOptions as V, autoBeam as W, setBeaming as X, copyNotes as Y, pasteNotes as Z, cutNotes as _, type ValidationResult as a, type RaiseAccidentalOptions as a$, pasteNotesMultiMeasure as a0, addTempo as a1, removeTempo as a2, modifyTempo as a3, addWedge as a4, removeWedge as a5, addFermata as a6, removeFermata as a7, addOrnament as a8, removeOrnament as a9, removeHarmony as aA, updateHarmony as aB, addChordSymbol as aC, removeChordSymbol as aD, updateChordSymbol as aE, addFingering as aF, removeFingering as aG, addBowing as aH, removeBowing as aI, addStringNumber as aJ, removeStringNumber as aK, addOctaveShift as aL, stopOctaveShift as aM, removeOctaveShift as aN, addBreathMark as aO, removeBreathMark as aP, addCaesura as aQ, removeCaesura as aR, type OperationResult as aS, type OperationErrorCode as aT, type InsertNoteOptions as aU, type RemoveNoteOptions as aV, type AddChordOptions as aW, type ChangeNoteDurationOptions as aX, type SetNotePitchOptions as aY, type SetNotePitchBySemitoneOptions as aZ, type ShiftNotePitchOptions as a_, addPedal as aa, removePedal as ab, addTextDirection as ac, addText as ad, addRehearsalMark as ae, addRepeatBarline as af, removeRepeatBarline as ag, addRepeat as ah, removeRepeat as ai, addEnding as aj, removeEnding as ak, changeBarline as al, setBarline as am, addSegno as an, addCoda as ao, addDaCapo as ap, addDalSegno as aq, addFine as ar, addToCoda as as, addGraceNote as at, removeGraceNote as au, convertToGrace as av, addLyric as aw, removeLyric as ax, updateLyric as ay, addHarmony as az, addChord as b, type AddHarmonyOptions as b$, type LowerAccidentalOptions as b0, type AddVoiceOptions as b1, type AddPartOptions as b2, type DuplicatePartOptions as b3, type SetStavesOptions as b4, type MoveNoteToStaffOptions as b5, type AddTieOptions as b6, type RemoveTieOptions as b7, type AddSlurOptions as b8, type RemoveSlurOptions as b9, type RemoveFermataOptions as bA, type AddOrnamentOptions as bB, type RemoveOrnamentOptions as bC, type AddPedalOptions as bD, type RemovePedalOptions as bE, type AddTextDirectionOptions as bF, type AddTextOptions as bG, type AddRehearsalMarkOptions as bH, type AddRepeatBarlineOptions as bI, type RemoveRepeatBarlineOptions as bJ, type AddRepeatOptions as bK, type RemoveRepeatOptions as bL, type AddEndingOptions as bM, type RemoveEndingOptions as bN, type ChangeBarlineOptions as bO, type SetBarlineOptions as bP, type BarStyle as bQ, type AddSegnoOptions as bR, type AddCodaOptions as bS, type AddNavigationOptions as bT, type AddGraceNoteOptions as bU, type RemoveGraceNoteOptions as bV, type ConvertToGraceOptions as bW, type AddLyricOptions as bX, type RemoveLyricOptions as bY, type UpdateLyricOptions as bZ, type HarmonyKind as b_, type AddArticulationOptions as ba, type RemoveArticulationOptions as bb, type AddDynamicsOptions as bc, type RemoveDynamicsOptions as bd, type ModifyDynamicsOptions as be, type InsertClefChangeOptions as bf, type ChangeClefOptions as bg, type CreateTupletOptions as bh, type RemoveTupletOptions as bi, type AddBeamOptions as bj, type RemoveBeamOptions as bk, type AutoBeamOptions as bl, type SetBeamingOptions as bm, type NoteSelection as bn, type CopyNotesOptions as bo, type PasteNotesOptions as bp, type CutNotesOptions as bq, type CopyNotesMultiMeasureOptions as br, type MultiMeasureSelection as bs, type PasteNotesMultiMeasureOptions as bt, type AddTempoOptions as bu, type RemoveTempoOptions as bv, type ModifyTempoOptions as bw, type AddWedgeOptions as bx, type RemoveWedgeOptions as by, type AddFermataOptions as bz, setNotePitchBySemitone as c, type RemoveHarmonyOptions as c0, type UpdateHarmonyOptions as c1, type AddChordSymbolOptions as c2, type RemoveChordSymbolOptions as c3, type UpdateChordSymbolOptions as c4, type AddFingeringOptions as c5, type RemoveFingeringOptions as c6, type BowingType as c7, type AddBowingOptions as c8, type RemoveBowingOptions as c9, validateTiesAcrossMeasures as cA, validateSlursAcrossMeasures as cB, formatLocation as cC, ValidationException as cD, validateMeasureLocal as cE, getMeasureContext as cF, assertMeasureValid as cG, type ValidationError as cH, type ValidationLocation as cI, type ValidationErrorCode as cJ, type ValidationLevel as cK, type MeasureValidationContext as cL, type LocalValidateOptions as cM, type AddStringNumberOptions as ca, type RemoveStringNumberOptions as cb, type OctaveShiftType as cc, type AddOctaveShiftOptions as cd, type StopOctaveShiftOptions as ce, type RemoveOctaveShiftOptions as cf, type BreathMarkValue as cg, type AddBreathMarkOptions as ch, type RemoveBreathMarkOptions as ci, type CaesuraValue as cj, type AddCaesuraOptions as ck, type RemoveCaesuraOptions as cl, validate as cm, isValid as cn, assertValid as co, validateDivisions as cp, validateMeasureDuration as cq, validateBackupForward as cr, validateTies as cs, validateBeams as ct, validateSlurs as cu, validateTuplets as cv, validatePartReferences as cw, validatePartStructure as cx, validateStaffStructure as cy, validateVoiceStaff as cz, shiftNotePitch as d, changeNoteDuration as e, raiseAccidental as f, addNote as g, deleteNote as h, insertNote as i, addChordNote as j, modifyNoteDuration as k, lowerAccidental as l, modifyNotePitch as m, addNoteChecked as n, deleteNoteChecked as o, addChordNoteChecked as p, modifyNotePitchChecked as q, removeNote as r, setNotePitch as s, transpose as t, modifyNoteDurationChecked as u, transposeChecked as v, addVoice as w, addPart as x, removePart as y, duplicatePart as z };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { S as Score, P as Pitch, M as Measure, D as DirectionType, a as DirectionEntry, N as NoteEntry, b as PartListEntry, c as PartInfo } from './types-
|
|
2
|
-
export { A as Accidental, j as AccidentalInfo, O as AdjacentNotes, a4 as AssembledLyrics, B as BackupEntry, p as Barline, a5 as BarlineWithContext, a0 as BeamGroup, k as BeamInfo, s as Chord, C as Clef, aa as ClefChangeInfo, w as Credit, v as Defaults, Q as DirectionKind, z as DirectionWithContext, R as DynamicWithContext, m as DynamicsValue, a7 as EndingInfo, E as EntryWithContext, F as ForwardEntry, a2 as HarmonyWithContext, a8 as KeyChangeInfo, K as KeySignature, L as Lyric, a3 as LyricWithContext, g as MeasureAttributes, h as MeasureEntry, l as Notation, a1 as NotationType, t as NoteIteratorItem, i as NoteType, y as NoteWithContext, r as NoteWithPosition, Y as OctaveShiftWithContext, f as Part, e as PartGroup, W as PedalWithContext, H as PositionQueryOptions, u as Print, a6 as RepeatInfo, d as ScoreMetadata, _ as SlurSpan, q as StaffGroup, G as StaffRange, ab as StructuralChanges, U as TempoWithContext, T as TieInfo, Z as TiedNoteGroup, a9 as TimeChangeInfo, n as TimeSignature, o as Transpose, $ as TupletGroup, I as VerticalSlice, V as VoiceGroup, J as VoiceLine, x as VoiceToStaffMap, X as WedgeWithContext } from './types-
|
|
3
|
-
import { V as ValidateOptions, a as ValidationResult } from './index-
|
|
4
|
-
export {
|
|
1
|
+
import { S as Score, P as Pitch, M as Measure, D as DirectionType, a as DirectionEntry, N as NoteEntry, b as PartListEntry, c as PartInfo } from './types-JohtsbUB.mjs';
|
|
2
|
+
export { A as Accidental, j as AccidentalInfo, O as AdjacentNotes, a4 as AssembledLyrics, B as BackupEntry, p as Barline, a5 as BarlineWithContext, a0 as BeamGroup, k as BeamInfo, s as Chord, C as Clef, aa as ClefChangeInfo, w as Credit, v as Defaults, Q as DirectionKind, z as DirectionWithContext, R as DynamicWithContext, m as DynamicsValue, a7 as EndingInfo, E as EntryWithContext, F as ForwardEntry, a2 as HarmonyWithContext, a8 as KeyChangeInfo, K as KeySignature, L as Lyric, a3 as LyricWithContext, g as MeasureAttributes, h as MeasureEntry, l as Notation, a1 as NotationType, t as NoteIteratorItem, i as NoteType, y as NoteWithContext, r as NoteWithPosition, Y as OctaveShiftWithContext, f as Part, e as PartGroup, W as PedalWithContext, H as PositionQueryOptions, u as Print, a6 as RepeatInfo, d as ScoreMetadata, _ as SlurSpan, q as StaffGroup, G as StaffRange, ab as StructuralChanges, U as TempoWithContext, T as TieInfo, Z as TiedNoteGroup, a9 as TimeChangeInfo, n as TimeSignature, o as Transpose, $ as TupletGroup, I as VerticalSlice, V as VoiceGroup, J as VoiceLine, x as VoiceToStaffMap, X as WedgeWithContext } from './types-JohtsbUB.mjs';
|
|
3
|
+
import { V as ValidateOptions, a as ValidationResult } from './index-DPW0wqXK.mjs';
|
|
4
|
+
export { ba as AddArticulationOptions, bj as AddBeamOptions, c8 as AddBowingOptions, ch as AddBreathMarkOptions, ck as AddCaesuraOptions, aW as AddChordOptions, c2 as AddChordSymbolOptions, bS as AddCodaOptions, bc as AddDynamicsOptions, bM as AddEndingOptions, bz as AddFermataOptions, c5 as AddFingeringOptions, bU as AddGraceNoteOptions, b$ as AddHarmonyOptions, bX as AddLyricOptions, bT as AddNavigationOptions, cd as AddOctaveShiftOptions, bB as AddOrnamentOptions, b2 as AddPartOptions, bD as AddPedalOptions, bH as AddRehearsalMarkOptions, bI as AddRepeatBarlineOptions, bK as AddRepeatOptions, bR as AddSegnoOptions, b8 as AddSlurOptions, ca as AddStringNumberOptions, bu as AddTempoOptions, bF as AddTextDirectionOptions, bG as AddTextOptions, b6 as AddTieOptions, b1 as AddVoiceOptions, bx as AddWedgeOptions, bl as AutoBeamOptions, bQ as BarStyle, c7 as BowingType, cg as BreathMarkValue, cj as CaesuraValue, bO as ChangeBarlineOptions, bg as ChangeClefOptions, aX as ChangeNoteDurationOptions, bW as ConvertToGraceOptions, br as CopyNotesMultiMeasureOptions, bo as CopyNotesOptions, bh as CreateTupletOptions, bq as CutNotesOptions, b3 as DuplicatePartOptions, b_ as HarmonyKind, bf as InsertClefChangeOptions, aU as InsertNoteOptions, cM as LocalValidateOptions, b0 as LowerAccidentalOptions, cL as MeasureValidationContext, be as ModifyDynamicsOptions, bw as ModifyTempoOptions, b5 as MoveNoteToStaffOptions, bs as MultiMeasureSelection, bn as NoteSelection, cc as OctaveShiftType, aT as OperationErrorCode, aS as OperationResult, bt as PasteNotesMultiMeasureOptions, bp as PasteNotesOptions, a$ as RaiseAccidentalOptions, bb as RemoveArticulationOptions, bk as RemoveBeamOptions, c9 as RemoveBowingOptions, ci as RemoveBreathMarkOptions, cl as RemoveCaesuraOptions, c3 as RemoveChordSymbolOptions, bd as RemoveDynamicsOptions, bN as RemoveEndingOptions, bA as RemoveFermataOptions, c6 as RemoveFingeringOptions, bV as RemoveGraceNoteOptions, c0 as RemoveHarmonyOptions, bY as RemoveLyricOptions, aV as RemoveNoteOptions, cf as RemoveOctaveShiftOptions, bC as RemoveOrnamentOptions, bE as RemovePedalOptions, bJ as RemoveRepeatBarlineOptions, bL as RemoveRepeatOptions, b9 as RemoveSlurOptions, cb as RemoveStringNumberOptions, bv as RemoveTempoOptions, b7 as RemoveTieOptions, bi as RemoveTupletOptions, by as RemoveWedgeOptions, bP as SetBarlineOptions, bm as SetBeamingOptions, aZ as SetNotePitchBySemitoneOptions, aY as SetNotePitchOptions, b4 as SetStavesOptions, a_ as ShiftNotePitchOptions, ce as StopOctaveShiftOptions, c4 as UpdateChordSymbolOptions, c1 as UpdateHarmonyOptions, bZ as UpdateLyricOptions, cH as ValidationError, cJ as ValidationErrorCode, cD as ValidationException, cK as ValidationLevel, cI as ValidationLocation, K as addArticulation, T as addBeam, aH as addBowing, aO as addBreathMark, aQ as addCaesura, b as addChord, j as addChordNote, p as addChordNoteChecked, aC as addChordSymbol, ao as addCoda, ap as addDaCapo, aq as addDalSegno, M as addDynamics, aj as addEnding, a6 as addFermata, ar as addFine, aF as addFingering, at as addGraceNote, az as addHarmony, aw as addLyric, g as addNote, n as addNoteChecked, aL as addOctaveShift, a8 as addOrnament, x as addPart, aa as addPedal, ae as addRehearsalMark, ah as addRepeat, af as addRepeatBarline, an as addSegno, I as addSlur, aJ as addStringNumber, a1 as addTempo, ad as addText, ac as addTextDirection, G as addTie, as as addToCoda, w as addVoice, a4 as addWedge, cG as assertMeasureValid, co as assertValid, W as autoBeam, al as changeBarline, Q as changeClef, C as changeKey, e as changeNoteDuration, D as changeTime, av as convertToGrace, Y as copyNotes, $ as copyNotesMultiMeasure, R as createTuplet, _ as cutNotes, F as deleteMeasure, h as deleteNote, o as deleteNoteChecked, z as duplicatePart, cC as formatLocation, cF as getMeasureContext, P as insertClefChange, E as insertMeasure, i as insertNote, cn as isValid, l as lowerAccidental, O as modifyDynamics, k as modifyNoteDuration, u as modifyNoteDurationChecked, m as modifyNotePitch, q as modifyNotePitchChecked, a3 as modifyTempo, B as moveNoteToStaff, Z as pasteNotes, a0 as pasteNotesMultiMeasure, f as raiseAccidental, L as removeArticulation, U as removeBeam, aI as removeBowing, aP as removeBreathMark, aR as removeCaesura, aD as removeChordSymbol, N as removeDynamics, ak as removeEnding, a7 as removeFermata, aG as removeFingering, au as removeGraceNote, aA as removeHarmony, ax as removeLyric, r as removeNote, aN as removeOctaveShift, a9 as removeOrnament, y as removePart, ab as removePedal, ai as removeRepeat, ag as removeRepeatBarline, J as removeSlur, aK as removeStringNumber, a2 as removeTempo, H as removeTie, S as removeTuplet, a5 as removeWedge, am as setBarline, X as setBeaming, s as setNotePitch, c as setNotePitchBySemitone, A as setStaves, d as shiftNotePitch, aM as stopOctaveShift, t as transpose, v as transposeChecked, aE as updateChordSymbol, aB as updateHarmony, ay as updateLyric, cm as validate, cr as validateBackupForward, ct as validateBeams, cp as validateDivisions, cq as validateMeasureDuration, cE as validateMeasureLocal, cw as validatePartReferences, cx as validatePartStructure, cu as validateSlurs, cB as validateSlursAcrossMeasures, cy as validateStaffStructure, cs as validateTies, cA as validateTiesAcrossMeasures, cv as validateTuplets, cz as validateVoiceStaff } from './index-DPW0wqXK.mjs';
|
|
5
5
|
export { FindNotesFilter, NormalizedPositionOptions, PitchRange, RoundtripMetrics, VoiceFilter, buildVoiceToStaffMap, buildVoiceToStaffMapForPart, countNotes, findBarlines, findDirectionsByType, findNotes, findNotesWithNotation, getAbsolutePosition, getAdjacentNotes, getAllNotes, getAttributesAtMeasure, getBeamGroups, getChordProgression, getChords, getClefChanges, getClefForStaff, getDirections, getDirectionsAtPosition, getDivisions, getDuration, getDynamics, getEffectiveStaff, getEndings, getEntriesAtPosition, getEntriesForStaff, getEntriesInRange, getHarmonies, getHarmonyAtPosition, getKeyChanges, getLyricText, getLyrics, getMeasure, getMeasureByIndex, getMeasureCount, getNextNote, getNormalizedDuration, getNormalizedPosition, getNotesAtPosition, getNotesForStaff, getNotesForVoice, getNotesInRange, getOctaveShifts, getPartById, getPartByIndex, getPartCount, getPartIds, getPartIndex, getPedalMarkings, getPrevNote, getRepeatStructure, getSlurSpans, getStaffRange, getStaveCount, getStaves, getStructuralChanges, getTempoMarkings, getTiedNoteGroups, getTimeChanges, getTupletGroups, getVerseCount, getVerticalSlice, getVoiceLine, getVoiceLineInRange, getVoices, getVoicesForStaff, getWedges, groupByStaff, groupByVoice, hasMultipleStaves, hasNotes, inferStaff, isRestMeasure, iterateEntries, iterateNotes, measureRoundtrip, scoresEqual, withAbsolutePositions } from './query/index.mjs';
|
|
6
6
|
|
|
7
7
|
declare function parse(xmlString: string): Score;
|