musicxml-io 0.8.0 → 0.8.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1,150 +1,10 @@
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-CzsW5TLm.js';
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-CzsW5TLm.js';
3
- import { V as ValidateOptions, a as ValidationResult } from './index-rtFmAs-i.js';
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-rtFmAs-i.js';
5
- import { ExpressionOptions, TimingSidecar } from './query/index.js';
6
- export { ExpressionHint, ExpressionKind, FindNotesFilter, NormalizedPositionOptions, PitchRange, PlaybackControls, PlaybackMeasure, RoundtripMetrics, TimingBreakpoint, TimingMapOptions, VoiceFilter, buildVoiceToStaffMap, buildVoiceToStaffMapForPart, countNotes, extractPlaybackControls, findBarlines, findDirectionsByType, findNotes, findNotesWithNotation, generatePlaybackSequence, generatePlaybackTimeline, 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, hasPlaybackControls, inferStaff, isRestMeasure, iterateEntries, iterateNotes, measureRoundtrip, scoresEqual, withAbsolutePositions } from './query/index.js';
7
-
8
- declare function parse(input: string | Uint8Array): Score;
9
-
10
- /**
11
- * Parse a compressed MusicXML (.mxl) file
12
- * @param data - The compressed file data as Uint8Array or Buffer
13
- * @returns The parsed Score
14
- */
15
- declare function parseCompressed(data: Uint8Array): Score;
16
- /**
17
- * Check if data is a compressed MusicXML file
18
- * @param data - The file data
19
- * @returns true if the data appears to be a ZIP file
20
- */
21
- declare function isCompressed(data: Uint8Array): boolean;
22
- /**
23
- * Parse either compressed (.mxl) or uncompressed (.xml/.musicxml) MusicXML
24
- * Automatically detects the format
25
- * @param data - The file data as Uint8Array or string
26
- * @returns The parsed Score
27
- */
28
- declare function parseAuto(data: Uint8Array | string): Score;
29
-
30
- /**
31
- * ABC Notation Parser
32
- * Parses ABC notation format into the Score internal model.
33
- *
34
- * Supports ABC standard v2.1 core features:
35
- * - Header fields (X, T, C, M, L, Q, K, V, w)
36
- * - Notes with pitch, duration, accidentals, octave modifiers
37
- * - Rests (z, Z)
38
- * - Bar lines (|, ||, |], [|, |:, :|, ::)
39
- * - Repeats and volta endings ([1, [2)
40
- * - Chords (simultaneous notes: [CEG])
41
- * - Chord symbols ("Am", "G7", etc.)
42
- * - Ties (-) and slurs ((...))
43
- * - Grace notes ({...})
44
- * - Tuplets ((3..., (p:q:r...)
45
- * - Dynamics (!p!, !f!, etc.)
46
- * - Lyrics (w: field)
47
- * - Multi-voice (V: field)
48
- */
49
-
50
- /**
51
- * Parse an ABC notation string into a Score object.
52
- */
53
- declare function parseAbc(abcString: string): Score;
54
-
55
- interface SerializeOptions {
56
- version?: string;
57
- indent?: string;
58
- /** Validate score before serializing (default: false) */
59
- validate?: boolean;
60
- /** Options for validation (if validate is true) */
61
- validateOptions?: ValidateOptions;
62
- /** Throw error if validation fails (default: false, will only warn) */
63
- throwOnValidationError?: boolean;
64
- /** Callback to receive validation result */
65
- onValidation?: (result: ValidationResult) => void;
66
- }
67
- declare function serialize(score: Score, options?: SerializeOptions): string;
68
-
69
- /**
70
- * Serialize a Score to compressed MusicXML (.mxl) format
71
- * @param score - The Score to serialize
72
- * @param options - Serialization options
73
- * @returns The compressed file data as Uint8Array
74
- */
75
- declare function serializeCompressed(score: Score, options?: SerializeOptions): Uint8Array;
76
-
77
- /**
78
- * MIDI export options
79
- *
80
- * Extends {@link ExpressionOptions} so fermata holds and rit./accel. ramps land
81
- * in the exported tempo map (and the timing sidecar) identically.
82
- */
83
- interface MidiExportOptions extends ExpressionOptions {
84
- /** Ticks per quarter note (default: 480) */
85
- ticksPerQuarterNote?: number;
86
- /** Default tempo in BPM (default: 120) */
87
- defaultTempo?: number;
88
- /** Default velocity for notes when no dynamics are present (default: 80) */
89
- defaultVelocity?: number;
90
- }
91
- /**
92
- * A single point on the timing sidecar: a correspondence between a time in the
93
- * generated MIDI and a conceptual musical position (measure + beat).
94
- *
95
- * Breakpoints are emitted at every played-measure start and every tempo change
96
- * (plus a terminal point). Between two consecutive breakpoints the relationship
97
- * `midiSec ↔ quarterPos` is linear (tempo is piecewise-constant), so a consumer
98
- * can interpolate any intermediate time exactly.
99
- */
100
- /** Result of {@link exportMidiWithTimingMap}. */
101
- interface MidiWithTimingMap {
102
- /** The Standard MIDI File data. */
103
- midi: Uint8Array;
104
- /** The MIDI-time ↔ musical-position sidecar. */
105
- sidecar: TimingSidecar;
106
- }
107
- /**
108
- * Export a Score to Standard MIDI File format (SMF Type 1)
109
- * @param score - The Score to export
110
- * @param options - Export options
111
- * @returns The MIDI file data as Uint8Array
112
- */
113
- declare function exportMidi(score: Score, options?: MidiExportOptions): Uint8Array;
114
- /**
115
- * Export a Score to MIDI together with a timing sidecar that maps the generated
116
- * MIDI timeline to conceptual musical positions (measure + beat).
117
- *
118
- * The MIDI bytes are byte-for-byte identical to {@link exportMidi}; the sidecar
119
- * is derived from the same internal time computation so the two can never drift.
120
- *
121
- * @param score - The Score to export
122
- * @param options - Export options (must match those used for any aligned audio)
123
- * @returns The MIDI data and its timing sidecar
124
- */
125
- declare function exportMidiWithTimingMap(score: Score, options?: MidiExportOptions): MidiWithTimingMap;
126
-
127
- /**
128
- * ABC Notation Serializer
129
- * Converts Score internal model to ABC notation format string.
130
- */
131
-
132
- interface AbcSerializeOptions {
133
- /** Reference number (X: field). Default: 1 */
134
- referenceNumber?: number;
135
- /** Maximum notes per line before wrapping. Default: no limit */
136
- notesPerLine?: number;
137
- /** Include chord symbols. Default: true */
138
- includeChordSymbols?: boolean;
139
- /** Include dynamics. Default: true */
140
- includeDynamics?: boolean;
141
- /** Include lyrics. Default: true */
142
- includeLyrics?: boolean;
143
- }
144
- /**
145
- * Serialize a Score object to ABC notation format string.
146
- */
147
- declare function serializeAbc(score: Score, options?: AbcSerializeOptions): string;
1
+ import { S as Score } from './types-B_6pqTfs.js';
2
+ export { A as Accidental, i as AccidentalInfo, O as AdjacentNotes, a4 as AssembledLyrics, B as BackupEntry, p as Barline, a5 as BarlineWithContext, a0 as BeamGroup, j as BeamInfo, s as Chord, C as Clef, aa as ClefChangeInfo, w as Credit, v as Defaults, D as DirectionEntry, Q as DirectionKind, l as DirectionType, 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, M as Measure, e as MeasureAttributes, f as MeasureEntry, k as Notation, a1 as NotationType, N as NoteEntry, t as NoteIteratorItem, h as NoteType, y as NoteWithContext, r as NoteWithPosition, Y as OctaveShiftWithContext, d as Part, b as PartGroup, P as PartInfo, c as PartListEntry, W as PedalWithContext, g as Pitch, H as PositionQueryOptions, u as Print, a6 as RepeatInfo, a 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-B_6pqTfs.js';
3
+ import { SerializeOptions, MidiExportOptions } from './browser.js';
4
+ export { AbcSerializeOptions, MidiWithTimingMap, STEPS, STEP_SEMITONES, exportMidi, exportMidiWithTimingMap, generateId, getMeasureEndPosition, isCompressed, parse, parseAbc, parseAuto, parseCompressed, pitchToSemitone, serialize, serializeAbc, serializeCompressed } from './browser.js';
5
+ export { ExpressionHint, ExpressionKind, ExpressionOptions, FindNotesFilter, NormalizedPositionOptions, PitchRange, PlaybackControls, PlaybackMeasure, RoundtripMetrics, TimingBreakpoint, TimingMapOptions, TimingSidecar, VoiceFilter, buildVoiceToStaffMap, buildVoiceToStaffMapForPart, countNotes, extractPlaybackControls, findBarlines, findDirectionsByType, findNotes, findNotesWithNotation, generatePlaybackSequence, generatePlaybackTimeline, 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, hasPlaybackControls, inferStaff, isRestMeasure, iterateEntries, iterateNotes, measureRoundtrip, scoresEqual, withAbsolutePositions } from './query/index.js';
6
+ export { b8 as AddArticulationOptions, bh as AddBeamOptions, c6 as AddBowingOptions, cf as AddBreathMarkOptions, ci as AddCaesuraOptions, aU as AddChordOptions, c0 as AddChordSymbolOptions, bQ as AddCodaOptions, ba as AddDynamicsOptions, bK as AddEndingOptions, bx as AddFermataOptions, c3 as AddFingeringOptions, bS as AddGraceNoteOptions, bZ as AddHarmonyOptions, bV as AddLyricOptions, bR as AddNavigationOptions, cb as AddOctaveShiftOptions, bz as AddOrnamentOptions, b0 as AddPartOptions, bB as AddPedalOptions, bF as AddRehearsalMarkOptions, bG as AddRepeatBarlineOptions, bI as AddRepeatOptions, bP as AddSegnoOptions, b6 as AddSlurOptions, c8 as AddStringNumberOptions, bs as AddTempoOptions, bD as AddTextDirectionOptions, bE as AddTextOptions, b4 as AddTieOptions, a$ as AddVoiceOptions, bv as AddWedgeOptions, bj as AutoBeamOptions, bO as BarStyle, c5 as BowingType, ce as BreathMarkValue, ch as CaesuraValue, bM as ChangeBarlineOptions, be as ChangeClefOptions, aV as ChangeNoteDurationOptions, bU as ConvertToGraceOptions, bp as CopyNotesMultiMeasureOptions, bm as CopyNotesOptions, bf as CreateTupletOptions, bo as CutNotesOptions, b1 as DuplicatePartOptions, bY as HarmonyKind, bd as InsertClefChangeOptions, aS as InsertNoteOptions, cM as LocalValidateOptions, a_ as LowerAccidentalOptions, cL as MeasureValidationContext, bc as ModifyDynamicsOptions, bu as ModifyTempoOptions, b3 as MoveNoteToStaffOptions, bq as MultiMeasureSelection, bl as NoteSelection, ca as OctaveShiftType, aR as OperationErrorCode, aQ as OperationResult, br as PasteNotesMultiMeasureOptions, bn as PasteNotesOptions, aZ as RaiseAccidentalOptions, b9 as RemoveArticulationOptions, bi as RemoveBeamOptions, c7 as RemoveBowingOptions, cg as RemoveBreathMarkOptions, cj as RemoveCaesuraOptions, c1 as RemoveChordSymbolOptions, bb as RemoveDynamicsOptions, bL as RemoveEndingOptions, by as RemoveFermataOptions, c4 as RemoveFingeringOptions, bT as RemoveGraceNoteOptions, b_ as RemoveHarmonyOptions, bW as RemoveLyricOptions, aT as RemoveNoteOptions, cd as RemoveOctaveShiftOptions, bA as RemoveOrnamentOptions, bC as RemovePedalOptions, bH as RemoveRepeatBarlineOptions, bJ as RemoveRepeatOptions, b7 as RemoveSlurOptions, c9 as RemoveStringNumberOptions, bt as RemoveTempoOptions, b5 as RemoveTieOptions, bg as RemoveTupletOptions, bw as RemoveWedgeOptions, bN as SetBarlineOptions, bk as SetBeamingOptions, aX as SetNotePitchBySemitoneOptions, aW as SetNotePitchOptions, b2 as SetStavesOptions, aY as ShiftNotePitchOptions, cc as StopOctaveShiftOptions, c2 as UpdateChordSymbolOptions, b$ as UpdateHarmonyOptions, bX as UpdateLyricOptions, cK as ValidateOptions, cF as ValidationError, cI as ValidationErrorCode, cB as ValidationException, cJ as ValidationLevel, cH as ValidationLocation, cG as ValidationResult, J as addArticulation, S as addBeam, aF as addBowing, aM as addBreathMark, aO as addCaesura, a as addChord, h as addChordNote, o as addChordNoteChecked, aA as addChordSymbol, am as addCoda, an as addDaCapo, ao as addDalSegno, L as addDynamics, ah as addEnding, a4 as addFermata, ap as addFine, aD as addFingering, ar as addGraceNote, ax as addHarmony, au as addLyric, f as addNote, k as addNoteChecked, aJ as addOctaveShift, a6 as addOrnament, w as addPart, a8 as addPedal, ac as addRehearsalMark, af as addRepeat, ad as addRepeatBarline, al as addSegno, H as addSlur, aH as addStringNumber, $ as addTempo, ab as addText, aa as addTextDirection, F as addTie, aq as addToCoda, v as addVoice, a2 as addWedge, cE as assertMeasureValid, cm as assertValid, U as autoBeam, aj as changeBarline, P as changeClef, B as changeKey, d as changeNoteDuration, C as changeTime, at as convertToGrace, W as copyNotes, Z as copyNotesMultiMeasure, Q as createTuplet, Y as cutNotes, E as deleteMeasure, g as deleteNote, n as deleteNoteChecked, y as duplicatePart, cA as formatLocation, cD as getMeasureContext, O as insertClefChange, D as insertMeasure, i as insertNote, cl as isValid, l as lowerAccidental, N as modifyDynamics, j as modifyNoteDuration, q as modifyNoteDurationChecked, m as modifyNotePitch, p as modifyNotePitchChecked, a1 as modifyTempo, A as moveNoteToStaff, X as pasteNotes, _ as pasteNotesMultiMeasure, e as raiseAccidental, K as removeArticulation, T as removeBeam, aG as removeBowing, aN as removeBreathMark, aP as removeCaesura, aB as removeChordSymbol, M as removeDynamics, ai as removeEnding, a5 as removeFermata, aE as removeFingering, as as removeGraceNote, ay as removeHarmony, av as removeLyric, r as removeNote, aL as removeOctaveShift, a7 as removeOrnament, x as removePart, a9 as removePedal, ag as removeRepeat, ae as removeRepeatBarline, I as removeSlur, aI as removeStringNumber, a0 as removeTempo, G as removeTie, R as removeTuplet, a3 as removeWedge, ak as setBarline, V as setBeaming, s as setNotePitch, b as setNotePitchBySemitone, z as setStaves, c as shiftNotePitch, aK as stopOctaveShift, t as transpose, u as transposeChecked, aC as updateChordSymbol, az as updateHarmony, aw as updateLyric, ck as validate, cp as validateBackupForward, cr as validateBeams, cn as validateDivisions, co as validateMeasureDuration, cC as validateMeasureLocal, cu as validatePartReferences, cv as validatePartStructure, cs as validateSlurs, cz as validateSlursAcrossMeasures, cw as validateStaffStructure, cq as validateTies, cy as validateTiesAcrossMeasures, ct as validateTuplets, cx as validateVoiceStaff } from './index-se1B-IZl.js';
7
+ export { DirectionTypeOfKind, getAllPartInfos, getDirectionOfKind, getDirectionsOfKind, getPartAbbreviation, getPartInfo, getPartName, getPartNameMap, getSoundDamperPedal, getSoundDynamics, getSoundSoftPedal, getSoundSostenutoPedal, getSoundTempo, hasBeam, hasDirectionOfKind, hasLyrics, hasNotations, hasTie, hasTieStart, hasTieStop, hasTuplet, isChordNote, isCueNote, isGraceNote, isPartInfo, isPitchedNote, isRest, isUnpitchedNote } from './accessors/index.js';
148
8
 
149
9
  /**
150
10
  * Parse a MusicXML file from disk
@@ -176,206 +36,4 @@ interface ExportOptions extends SerializeOptions, MidiExportOptions {
176
36
  */
177
37
  declare function serializeToFile(score: Score, filePath: string, options?: ExportOptions): Promise<void>;
178
38
 
179
- declare const STEPS: Pitch['step'][];
180
- declare const STEP_SEMITONES: Record<Pitch['step'], number>;
181
- /** Convert pitch to semitone value (MIDI-like) */
182
- declare function pitchToSemitone(pitch: Pitch): number;
183
- /** Get position at end of measure */
184
- declare function getMeasureEndPosition(measure: Measure): number;
185
-
186
- /**
187
- * Entry-level accessors for DirectionEntry, NoteEntry, and PartInfo
188
- *
189
- * These are simple helper functions for working with individual entries,
190
- * complementing the score-level query functions in ./query.
191
- */
192
-
193
- /**
194
- * Extracts a specific DirectionType union member by its kind
195
- */
196
- type DirectionTypeOfKind<K extends DirectionType['kind']> = Extract<DirectionType, {
197
- kind: K;
198
- }>;
199
- /**
200
- * Get the first direction type of a specific kind from a DirectionEntry
201
- *
202
- * @example
203
- * const dynamics = getDirectionOfKind(entry, 'dynamics');
204
- * if (dynamics) {
205
- * console.log(dynamics.value); // 'ff', 'pp', etc.
206
- * }
207
- */
208
- declare function getDirectionOfKind<K extends DirectionType['kind']>(entry: DirectionEntry, kind: K): DirectionTypeOfKind<K> | undefined;
209
- /**
210
- * Get all direction types of a specific kind from a DirectionEntry
211
- *
212
- * @example
213
- * const allWords = getDirectionsOfKind(entry, 'words');
214
- * allWords.forEach(w => console.log(w.text));
215
- */
216
- declare function getDirectionsOfKind<K extends DirectionType['kind']>(entry: DirectionEntry, kind: K): DirectionTypeOfKind<K>[];
217
- /**
218
- * Check if a DirectionEntry contains a specific direction type
219
- *
220
- * @example
221
- * if (hasDirectionOfKind(entry, 'metronome')) {
222
- * // Handle tempo marking
223
- * }
224
- */
225
- declare function hasDirectionOfKind(entry: DirectionEntry, kind: DirectionType['kind']): boolean;
226
- /**
227
- * Get tempo from DirectionEntry.sound
228
- *
229
- * @example
230
- * const tempo = getSoundTempo(entry); // 120
231
- */
232
- declare function getSoundTempo(entry: DirectionEntry): number | undefined;
233
- /**
234
- * Get dynamics value from DirectionEntry.sound (MIDI velocity 0-127)
235
- *
236
- * @example
237
- * const dynamics = getSoundDynamics(entry); // 80
238
- */
239
- declare function getSoundDynamics(entry: DirectionEntry): number | undefined;
240
- /**
241
- * Get damper pedal state from DirectionEntry.sound
242
- */
243
- declare function getSoundDamperPedal(entry: DirectionEntry): 'yes' | 'no' | undefined;
244
- /**
245
- * Get soft pedal state from DirectionEntry.sound
246
- */
247
- declare function getSoundSoftPedal(entry: DirectionEntry): 'yes' | 'no' | undefined;
248
- /**
249
- * Get sostenuto pedal state from DirectionEntry.sound
250
- */
251
- declare function getSoundSostenutoPedal(entry: DirectionEntry): 'yes' | 'no' | undefined;
252
- /**
253
- * Check if a NoteEntry is a rest
254
- *
255
- * @example
256
- * if (isRest(note)) {
257
- * console.log('This is a rest');
258
- * }
259
- */
260
- declare function isRest(entry: NoteEntry): boolean;
261
- /**
262
- * Check if a NoteEntry is a pitched note (has pitch information)
263
- *
264
- * @example
265
- * if (isPitchedNote(note)) {
266
- * console.log(`Note: ${note.pitch!.step}${note.pitch!.octave}`);
267
- * }
268
- */
269
- declare function isPitchedNote(entry: NoteEntry): boolean;
270
- /**
271
- * Check if a NoteEntry is an unpitched note (percussion)
272
- */
273
- declare function isUnpitchedNote(entry: NoteEntry): boolean;
274
- /**
275
- * Check if a NoteEntry is part of a chord (shares onset with previous note)
276
- *
277
- * @example
278
- * const chordNotes = notes.filter(isChordNote);
279
- */
280
- declare function isChordNote(entry: NoteEntry): boolean;
281
- /**
282
- * Check if a NoteEntry is a grace note
283
- *
284
- * @example
285
- * if (isGraceNote(note)) {
286
- * console.log('Grace note with slash:', note.grace?.slash);
287
- * }
288
- */
289
- declare function isGraceNote(entry: NoteEntry): boolean;
290
- /**
291
- * Check if a NoteEntry has any tie (start, stop, or continue)
292
- *
293
- * @example
294
- * if (hasTie(note)) {
295
- * // Note is tied to another note
296
- * }
297
- */
298
- declare function hasTie(entry: NoteEntry): boolean;
299
- /**
300
- * Check if a NoteEntry has a tie start
301
- */
302
- declare function hasTieStart(entry: NoteEntry): boolean;
303
- /**
304
- * Check if a NoteEntry has a tie stop
305
- */
306
- declare function hasTieStop(entry: NoteEntry): boolean;
307
- /**
308
- * Check if a NoteEntry is a cue note
309
- */
310
- declare function isCueNote(entry: NoteEntry): boolean;
311
- /**
312
- * Check if a NoteEntry has any beams
313
- */
314
- declare function hasBeam(entry: NoteEntry): boolean;
315
- /**
316
- * Check if a NoteEntry has any lyrics
317
- */
318
- declare function hasLyrics(entry: NoteEntry): boolean;
319
- /**
320
- * Check if a NoteEntry has any notations (articulations, slurs, ornaments, etc.)
321
- */
322
- declare function hasNotations(entry: NoteEntry): boolean;
323
- /**
324
- * Check if a NoteEntry is part of a tuplet
325
- */
326
- declare function hasTuplet(entry: NoteEntry): boolean;
327
- /**
328
- * Check if a PartListEntry is a PartInfo (score-part)
329
- */
330
- declare function isPartInfo(entry: PartListEntry): entry is PartInfo;
331
- /**
332
- * Get PartInfo by part ID
333
- *
334
- * @example
335
- * const partInfo = getPartInfo(score, 'P1');
336
- * if (partInfo) {
337
- * console.log(partInfo.name); // 'Piano'
338
- * }
339
- */
340
- declare function getPartInfo(score: Score, partId: string): PartInfo | undefined;
341
- /**
342
- * Get part name by part ID
343
- *
344
- * @example
345
- * const name = getPartName(score, 'P1'); // 'Piano'
346
- */
347
- declare function getPartName(score: Score, partId: string): string | undefined;
348
- /**
349
- * Get part abbreviation by part ID
350
- *
351
- * @example
352
- * const abbr = getPartAbbreviation(score, 'P1'); // 'Pno.'
353
- */
354
- declare function getPartAbbreviation(score: Score, partId: string): string | undefined;
355
- /**
356
- * Get all PartInfo entries from a score
357
- */
358
- declare function getAllPartInfos(score: Score): PartInfo[];
359
- /**
360
- * Get a map of part ID to part name
361
- *
362
- * @example
363
- * const names = getPartNameMap(score);
364
- * // { 'P1': 'Piano', 'P2': 'Violin' }
365
- */
366
- declare function getPartNameMap(score: Score): Record<string, string | undefined>;
367
-
368
- /**
369
- * Generates a unique ID for elements in the Score structure.
370
- *
371
- * The ID format is "i" + nanoid(10), where:
372
- * - "i" prefix ensures XML ID compatibility (XML IDs must start with a letter or underscore)
373
- * - nanoid(10) generates a 10-character URL-safe unique identifier
374
- *
375
- * Example: "iV1StGXR8_"
376
- *
377
- * @returns A unique 11-character ID string
378
- */
379
- declare function generateId(): string;
380
-
381
- export { type AbcSerializeOptions, DirectionEntry, DirectionType, type DirectionTypeOfKind, ExpressionOptions, Measure, type MidiExportOptions, type MidiWithTimingMap, NoteEntry, PartInfo, PartListEntry, Pitch, STEPS, STEP_SEMITONES, Score, type SerializeOptions, TimingSidecar, ValidateOptions, ValidationResult, decodeBuffer, exportMidi, exportMidiWithTimingMap, generateId, getAllPartInfos, getDirectionOfKind, getDirectionsOfKind, getMeasureEndPosition, getPartAbbreviation, getPartInfo, getPartName, getPartNameMap, getSoundDamperPedal, getSoundDynamics, getSoundSoftPedal, getSoundSostenutoPedal, getSoundTempo, hasBeam, hasDirectionOfKind, hasLyrics, hasNotations, hasTie, hasTieStart, hasTieStop, hasTuplet, isChordNote, isCompressed, isCueNote, isGraceNote, isPartInfo, isPitchedNote, isRest, isUnpitchedNote, parse, parseAbc, parseAuto, parseCompressed, parseFile, pitchToSemitone, serialize, serializeAbc, serializeCompressed, serializeToFile };
39
+ export { MidiExportOptions, Score, SerializeOptions, decodeBuffer, parseFile, serializeToFile };