musicxml-io 0.12.1 → 0.12.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +38 -9
- package/dist/browser.d.mts +1 -1
- package/dist/browser.d.ts +1 -1
- package/dist/browser.js +7 -5
- package/dist/browser.mjs +7 -5
- package/dist/{chunk-B2KMOLL4.js → chunk-2EH2MGBY.js} +37 -48
- package/dist/{chunk-L3OFLCMK.mjs → chunk-63UT3IEY.mjs} +17 -2
- package/dist/{chunk-GIP6COPL.js → chunk-7D4MLQKO.js} +4 -4
- package/dist/{chunk-M5YMLKTI.js → chunk-A2CGW2UF.js} +2 -2
- package/dist/{chunk-EBDEQMLT.mjs → chunk-BDHPMB7Q.mjs} +4 -4
- package/dist/{chunk-WUXG75HN.js → chunk-HP4DAUGT.js} +17 -2
- package/dist/{chunk-L2NY7YKF.mjs → chunk-LFQXT7PV.mjs} +1 -1
- package/dist/{chunk-UIYZ7YKU.mjs → chunk-MMIZQMIO.mjs} +1 -1
- package/dist/{chunk-VMCD32Z5.mjs → chunk-TCXDBRRT.mjs} +36 -47
- package/dist/{chunk-4EV76LCL.js → chunk-WNQIUYWY.js} +6 -6
- package/dist/core.d.mts +1 -1
- package/dist/core.d.ts +1 -1
- package/dist/core.js +7 -5
- package/dist/core.mjs +7 -5
- package/dist/file.d.mts +1 -1
- package/dist/file.d.ts +1 -1
- package/dist/file.js +4 -4
- package/dist/file.mjs +3 -3
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +8 -6
- package/dist/index.mjs +8 -6
- package/dist/{musicxml-Clk_Vj4R.d.ts → musicxml-DWPClEqa.d.ts} +9 -2
- package/dist/{musicxml-CdXL6Vie.d.mts → musicxml-DzuFr2c3.d.mts} +9 -2
- package/dist/{musicxml-compressed-Z4FZUSXM.mjs → musicxml-compressed-7NUEGLSF.mjs} +2 -2
- package/dist/musicxml-compressed-7RL6QRF7.js +12 -0
- package/dist/musicxml-compressed-WPEIBOZ3.js +8 -0
- package/dist/{musicxml-compressed-Y3DMYWEO.mjs → musicxml-compressed-ZHZYFJ7H.mjs} +2 -2
- package/dist/musicxml-compressed.d.mts +1 -1
- package/dist/musicxml-compressed.d.ts +1 -1
- package/dist/musicxml-compressed.js +5 -5
- package/dist/musicxml-compressed.mjs +4 -4
- package/dist/musicxml.d.mts +1 -1
- package/dist/musicxml.d.ts +1 -1
- package/dist/musicxml.js +5 -3
- package/dist/musicxml.mjs +6 -4
- package/package.json +3 -2
- package/dist/musicxml-compressed-NWKKT32W.js +0 -12
- package/dist/musicxml-compressed-T5B6Z4IZ.js +0 -8
package/README.md
CHANGED
|
@@ -111,7 +111,7 @@ load optional formats dynamically, use the format-specific entry points:
|
|
|
111
111
|
| Import | Contents |
|
|
112
112
|
|--------|----------|
|
|
113
113
|
| `musicxml-io/core` | MusicXML/XML/MXL, query, operations, accessors, validation, IDs and their types; no ABC, MIDI or file I/O |
|
|
114
|
-
| `musicxml-io/musicxml` | `parse`, `serialize`, `
|
|
114
|
+
| `musicxml-io/musicxml` | `parse`, `serialize`, `serializeUnchecked`, serialization options and score types; no ZIP dependency |
|
|
115
115
|
| `musicxml-io/musicxml-compressed` | `parseAuto`, `parseCompressed`, `isCompressed`, `serializeCompressed` |
|
|
116
116
|
| `musicxml-io/abc` | `parseAbc`, `parseAbcTunes`, `serializeAbc`, `serializeAbcTunes`, `AbcSerializeOptions` |
|
|
117
117
|
| `musicxml-io/midi` | `exportMidi`, `exportMidiWithTimingMap` and MIDI export types |
|
|
@@ -153,11 +153,38 @@ only on the ABC path, and finish the asynchronous parsing **before** entering
|
|
|
153
153
|
the synchronous Yjs transaction in `ScoreDataManager.importFromMusicXML`.
|
|
154
154
|
Both projects need the version containing these entry points installed first.
|
|
155
155
|
|
|
156
|
+
For export paths that do not request validation, use `serializeUnchecked` to
|
|
157
|
+
keep the validator out of the bundle. Its output is identical to `serialize`
|
|
158
|
+
with validation disabled (the default), and it accepts `version` and `indent`:
|
|
159
|
+
|
|
160
|
+
```typescript
|
|
161
|
+
import { serializeUnchecked as serialize } from 'musicxml-io/musicxml';
|
|
162
|
+
|
|
163
|
+
const xml = serialize(score);
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
For example, Octava's `src/data/musicxml-exporter.ts` can use this import after
|
|
167
|
+
upgrading the dependency. Keep using `serialize` for callers that pass
|
|
168
|
+
`validate`, `validateOptions`, `throwOnValidationError` or `onValidation`.
|
|
169
|
+
The existing `serialize` API and its validation behavior remain unchanged.
|
|
170
|
+
|
|
156
171
|
`npm run check:bundle` builds the package, measures minified/gzipped consumer
|
|
157
172
|
bundles, checks that ABC stays out of initial MusicXML bundles (including a
|
|
158
|
-
lazy ABC consumer),
|
|
173
|
+
lazy ABC consumer), checks that unchecked export excludes validation, and
|
|
174
|
+
smoke-tests the published ESM and CommonJS exports.
|
|
159
175
|
`npm run bench:loading` measures XML/MXL parsing and ID generation; the MXL
|
|
160
176
|
benchmark includes an embedded asset to verify that unused files are not inflated.
|
|
177
|
+
`npm run bench:io` measures XML import/export at several sizes and peak import
|
|
178
|
+
RSS in a separate process. The largest case repeats ActorPrelude's measures
|
|
179
|
+
eight times (about 10 MB). To compare against a saved previous build, run
|
|
180
|
+
`npm run bench:io -- --baseline=/absolute/path/to/previous/dist`.
|
|
181
|
+
Timings are medians of nine runs, with baseline/current execution order
|
|
182
|
+
alternated. No performance thresholds are imposed on shared CI machines.
|
|
183
|
+
|
|
184
|
+
The importer converts completed measures immediately and releases their XML
|
|
185
|
+
subtrees. The exporter joins lines per measure and avoids temporary notation
|
|
186
|
+
groups on the common single-container path, reducing allocation and GC for
|
|
187
|
+
large scores while preserving the existing XML formatting.
|
|
161
188
|
|
|
162
189
|
`parseAbc` returns the first tune of a multi-tune file; use `parseAbcTunes`
|
|
163
190
|
to get them all.
|
|
@@ -535,19 +562,21 @@ import { isRest, getPartName } from 'musicxml-io/accessors';
|
|
|
535
562
|
```
|
|
536
563
|
|
|
537
564
|
The package declares `"sideEffects": false`, so bundlers can drop everything
|
|
538
|
-
you don't import — pulling in only `parse` costs roughly
|
|
539
|
-
(~
|
|
565
|
+
you don't import — pulling in only `parse` costs roughly 48 KB minified
|
|
566
|
+
(~13 KB gzip).
|
|
540
567
|
|
|
541
568
|
Approximate cost of common imports (minified / gzipped, measured with
|
|
542
569
|
esbuild against the published ESM build):
|
|
543
570
|
|
|
544
571
|
| Import | Size |
|
|
545
572
|
|--------|------|
|
|
546
|
-
| `parse` (.xml only) | ~
|
|
547
|
-
| `parseAuto` (.xml + .mxl, adds fflate's unzip) | ~
|
|
548
|
-
| `serialize` (includes the validator behind `validate: true`) | ~
|
|
549
|
-
| `
|
|
550
|
-
|
|
|
573
|
+
| `parse` (.xml only) | ~48 KB / ~13 KB |
|
|
574
|
+
| `parseAuto` (.xml + .mxl, adds fflate's unzip) | ~54 KB / ~16 KB |
|
|
575
|
+
| `serialize` (includes the validator behind `validate: true`) | ~58 KB / ~14 KB |
|
|
576
|
+
| `serializeUnchecked` (no validator) | ~45 KB / ~10 KB |
|
|
577
|
+
| `parse` + `serialize` | ~106 KB / ~27 KB |
|
|
578
|
+
| `parse` + `serializeUnchecked` | ~93 KB / ~23 KB |
|
|
579
|
+
| everything (browser entry) | ~324 KB / ~81 KB |
|
|
551
580
|
|
|
552
581
|
The ABC notation codecs (`parseAbc`, `serializeAbc`), MIDI export, query
|
|
553
582
|
helpers, operations, and the validator are all separate modules — they only
|
package/dist/browser.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { A as Accidental, i as AccidentalInfo, j as AccidentalMarkInfo, a2 as AdjacentNotes, ag as AssembledLyrics, B as BackupEntry, y as Barline, ah as BarlineWithContext, ac as BeamGroup, m as BeamInfo, G as Chord, w as Clef, am as ClefChangeInfo, C as Color, Q as Credit, U as CreditImage, R as CreditWords, O as Defaults, D as DirectionEntry, a3 as DirectionKind, o as DirectionType, Z as DirectionWithContext, u as DisplayText, a4 as DynamicWithContext, p as DynamicsValue, aj as EndingInfo, Y as EntryWithContext, s as FiguredBassEntry, F as ForwardEntry, H as HarmonyEntry, r as HarmonyFrame, ae as HarmonyWithContext, ak as KeyChangeInfo, K as KeySignature, L as Lyric, q as LyricTextElement, af as LyricWithContext, M as Measure, e as MeasureAttributes, f as MeasureEntry, t as MeasureStyle, n as Notation, ad as NotationType, N as NoteEntry, I as NoteIteratorItem, h as NoteType, X as NoteWithContext, E as NoteWithPosition, k as NoteheadInfo, a8 as OctaveShiftWithContext, d as Part, b as PartGroup, P as PartInfo, c as PartListEntry, a6 as PedalWithContext, g as Pitch, $ as PositionQueryOptions, J as Print, ai as RepeatInfo, S as Score, a as ScoreMetadata, aa as SlurSpan, z as StaffGroup, _ as StaffRange, l as StemInfo, an as StructuralChanges, a5 as TempoWithContext, T as TieInfo, a9 as TiedNoteGroup, al as TimeChangeInfo, v as TimeSignature, x as Transpose, ab as TupletGroup, a0 as VerticalSlice, V as VoiceGroup, a1 as VoiceLine, W as VoiceToStaffMap, a7 as WedgeWithContext } from './types-B-RGHY0c.mjs';
|
|
2
2
|
export { parse } from './musicxml.mjs';
|
|
3
3
|
export { isCompressed, parseAuto, parseCompressed, serializeCompressed } from './musicxml-compressed.mjs';
|
|
4
|
-
export { S as SerializeOptions, s as serialize } from './musicxml-
|
|
4
|
+
export { S as SerializeOptions, b as SerializeUncheckedOptions, s as serialize, a as serializeUnchecked } from './musicxml-DzuFr2c3.mjs';
|
|
5
5
|
export { FindNotesFilter, NormalizedPositionOptions, PitchRange, PlaybackControls, PlaybackMeasure, RoundtripMetrics, VoiceFilter, buildVoiceToStaffMap, buildVoiceToStaffMapForPart, countNotes, extractPlaybackControls, findBarlines, findDirectionsByType, findNotes, findNotesWithNotation, generatePlaybackSequence, 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.mjs';
|
|
6
6
|
export { ALL_COLOR_TARGETS, AddArticulationOptions, AddBeamOptions, AddBowingOptions, AddBreathMarkOptions, AddCaesuraOptions, AddChordOptions, AddChordSymbolOptions, AddCodaOptions, AddDynamicsOptions, AddEndingOptions, AddFermataOptions, AddFingeringOptions, AddGraceNoteOptions, AddHarmonyOptions, AddLyricOptions, AddNavigationOptions, AddOctaveShiftOptions, AddOrnamentOptions, AddPartOptions, AddPedalOptions, AddRehearsalMarkOptions, AddRepeatBarlineOptions, AddRepeatOptions, AddSegnoOptions, AddSlurOptions, AddStringNumberOptions, AddTempoOptions, AddTextDirectionOptions, AddTextOptions, AddTieOptions, AddVoiceOptions, AddWedgeOptions, AutoBeamOptions, BarStyle, BowingType, BreathMarkValue, CaesuraValue, ChangeBarlineOptions, ChangeClefOptions, ChangeNoteDurationOptions, ColorTarget, ConvertToGraceOptions, CopyNotesMultiMeasureOptions, CopyNotesOptions, CreateTupletOptions, CutNotesOptions, DuplicatePartOptions, HarmonyKind, InsertClefChangeOptions, InsertNoteOptions, LowerAccidentalOptions, ModifyDynamicsOptions, ModifyTempoOptions, MoveNoteToStaffOptions, MultiMeasureSelection, NoteSelection, OctaveShiftType, OperationErrorCode, OperationResult, PasteNotesMultiMeasureOptions, PasteNotesOptions, RaiseAccidentalOptions, RemoveArticulationOptions, RemoveBeamOptions, RemoveBowingOptions, RemoveBreathMarkOptions, RemoveCaesuraOptions, RemoveChordSymbolOptions, RemoveDynamicsOptions, RemoveEndingOptions, RemoveFermataOptions, RemoveFingeringOptions, RemoveGraceNoteOptions, RemoveHarmonyOptions, RemoveLyricOptions, RemoveNoteOptions, RemoveOctaveShiftOptions, RemoveOrnamentOptions, RemovePedalOptions, RemoveRepeatBarlineOptions, RemoveRepeatOptions, RemoveSlurOptions, RemoveStringNumberOptions, RemoveTempoOptions, RemoveTieOptions, RemoveTupletOptions, RemoveWedgeOptions, SetBarlineOptions, SetBeamingOptions, SetColorOptions, SetNotePitchBySemitoneOptions, SetNotePitchOptions, SetStavesOptions, ShiftNotePitchOptions, StopOctaveShiftOptions, UpdateChordSymbolOptions, UpdateHarmonyOptions, UpdateLyricOptions, addArticulation, addBeam, addBowing, addBreathMark, addCaesura, addChord, addChordNote, addChordNoteChecked, addChordSymbol, addCoda, addDaCapo, addDalSegno, addDynamics, addEnding, addFermata, addFine, addFingering, addGraceNote, addHarmony, addLyric, addNote, addNoteChecked, addOctaveShift, addOrnament, addPart, addPedal, addRehearsalMark, addRepeat, addRepeatBarline, addSegno, addSlur, addStringNumber, addTempo, addText, addTextDirection, addTie, addToCoda, addVoice, addWedge, autoBeam, changeBarline, changeClef, changeKey, changeNoteDuration, changeTime, clearColors, convertToGrace, copyNotes, copyNotesMultiMeasure, createTuplet, cutNotes, deleteMeasure, deleteNote, deleteNoteChecked, duplicatePart, insertClefChange, insertMeasure, insertNote, lowerAccidental, modifyDynamics, modifyNoteDuration, modifyNoteDurationChecked, modifyNotePitch, modifyNotePitchChecked, modifyTempo, moveNoteToStaff, pasteNotes, pasteNotesMultiMeasure, raiseAccidental, removeArticulation, removeBeam, removeBowing, removeBreathMark, removeCaesura, removeChordSymbol, removeDynamics, removeEnding, removeFermata, removeFingering, removeGraceNote, removeHarmony, removeLyric, removeNote, removeOctaveShift, removeOrnament, removePart, removePedal, removeRepeat, removeRepeatBarline, removeSlur, removeStringNumber, removeTempo, removeTie, removeTuplet, removeWedge, setBarline, setBeaming, setColor, setNotePitch, setNotePitchBySemitone, setStaves, shiftNotePitch, stopOctaveShift, transpose, transposeChecked, updateChordSymbol, updateHarmony, updateLyric } from './operations/index.mjs';
|
|
7
7
|
export { STEPS, STEP_SEMITONES, generateId, getMeasureEndPosition, pitchToSemitone } from './core.mjs';
|
package/dist/browser.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { A as Accidental, i as AccidentalInfo, j as AccidentalMarkInfo, a2 as AdjacentNotes, ag as AssembledLyrics, B as BackupEntry, y as Barline, ah as BarlineWithContext, ac as BeamGroup, m as BeamInfo, G as Chord, w as Clef, am as ClefChangeInfo, C as Color, Q as Credit, U as CreditImage, R as CreditWords, O as Defaults, D as DirectionEntry, a3 as DirectionKind, o as DirectionType, Z as DirectionWithContext, u as DisplayText, a4 as DynamicWithContext, p as DynamicsValue, aj as EndingInfo, Y as EntryWithContext, s as FiguredBassEntry, F as ForwardEntry, H as HarmonyEntry, r as HarmonyFrame, ae as HarmonyWithContext, ak as KeyChangeInfo, K as KeySignature, L as Lyric, q as LyricTextElement, af as LyricWithContext, M as Measure, e as MeasureAttributes, f as MeasureEntry, t as MeasureStyle, n as Notation, ad as NotationType, N as NoteEntry, I as NoteIteratorItem, h as NoteType, X as NoteWithContext, E as NoteWithPosition, k as NoteheadInfo, a8 as OctaveShiftWithContext, d as Part, b as PartGroup, P as PartInfo, c as PartListEntry, a6 as PedalWithContext, g as Pitch, $ as PositionQueryOptions, J as Print, ai as RepeatInfo, S as Score, a as ScoreMetadata, aa as SlurSpan, z as StaffGroup, _ as StaffRange, l as StemInfo, an as StructuralChanges, a5 as TempoWithContext, T as TieInfo, a9 as TiedNoteGroup, al as TimeChangeInfo, v as TimeSignature, x as Transpose, ab as TupletGroup, a0 as VerticalSlice, V as VoiceGroup, a1 as VoiceLine, W as VoiceToStaffMap, a7 as WedgeWithContext } from './types-B-RGHY0c.js';
|
|
2
2
|
export { parse } from './musicxml.js';
|
|
3
3
|
export { isCompressed, parseAuto, parseCompressed, serializeCompressed } from './musicxml-compressed.js';
|
|
4
|
-
export { S as SerializeOptions, s as serialize } from './musicxml-
|
|
4
|
+
export { S as SerializeOptions, b as SerializeUncheckedOptions, s as serialize, a as serializeUnchecked } from './musicxml-DWPClEqa.js';
|
|
5
5
|
export { FindNotesFilter, NormalizedPositionOptions, PitchRange, PlaybackControls, PlaybackMeasure, RoundtripMetrics, VoiceFilter, buildVoiceToStaffMap, buildVoiceToStaffMapForPart, countNotes, extractPlaybackControls, findBarlines, findDirectionsByType, findNotes, findNotesWithNotation, generatePlaybackSequence, 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
6
|
export { ALL_COLOR_TARGETS, AddArticulationOptions, AddBeamOptions, AddBowingOptions, AddBreathMarkOptions, AddCaesuraOptions, AddChordOptions, AddChordSymbolOptions, AddCodaOptions, AddDynamicsOptions, AddEndingOptions, AddFermataOptions, AddFingeringOptions, AddGraceNoteOptions, AddHarmonyOptions, AddLyricOptions, AddNavigationOptions, AddOctaveShiftOptions, AddOrnamentOptions, AddPartOptions, AddPedalOptions, AddRehearsalMarkOptions, AddRepeatBarlineOptions, AddRepeatOptions, AddSegnoOptions, AddSlurOptions, AddStringNumberOptions, AddTempoOptions, AddTextDirectionOptions, AddTextOptions, AddTieOptions, AddVoiceOptions, AddWedgeOptions, AutoBeamOptions, BarStyle, BowingType, BreathMarkValue, CaesuraValue, ChangeBarlineOptions, ChangeClefOptions, ChangeNoteDurationOptions, ColorTarget, ConvertToGraceOptions, CopyNotesMultiMeasureOptions, CopyNotesOptions, CreateTupletOptions, CutNotesOptions, DuplicatePartOptions, HarmonyKind, InsertClefChangeOptions, InsertNoteOptions, LowerAccidentalOptions, ModifyDynamicsOptions, ModifyTempoOptions, MoveNoteToStaffOptions, MultiMeasureSelection, NoteSelection, OctaveShiftType, OperationErrorCode, OperationResult, PasteNotesMultiMeasureOptions, PasteNotesOptions, RaiseAccidentalOptions, RemoveArticulationOptions, RemoveBeamOptions, RemoveBowingOptions, RemoveBreathMarkOptions, RemoveCaesuraOptions, RemoveChordSymbolOptions, RemoveDynamicsOptions, RemoveEndingOptions, RemoveFermataOptions, RemoveFingeringOptions, RemoveGraceNoteOptions, RemoveHarmonyOptions, RemoveLyricOptions, RemoveNoteOptions, RemoveOctaveShiftOptions, RemoveOrnamentOptions, RemovePedalOptions, RemoveRepeatBarlineOptions, RemoveRepeatOptions, RemoveSlurOptions, RemoveStringNumberOptions, RemoveTempoOptions, RemoveTieOptions, RemoveTupletOptions, RemoveWedgeOptions, SetBarlineOptions, SetBeamingOptions, SetColorOptions, SetNotePitchBySemitoneOptions, SetNotePitchOptions, SetStavesOptions, ShiftNotePitchOptions, StopOctaveShiftOptions, UpdateChordSymbolOptions, UpdateHarmonyOptions, UpdateLyricOptions, addArticulation, addBeam, addBowing, addBreathMark, addCaesura, addChord, addChordNote, addChordNoteChecked, addChordSymbol, addCoda, addDaCapo, addDalSegno, addDynamics, addEnding, addFermata, addFine, addFingering, addGraceNote, addHarmony, addLyric, addNote, addNoteChecked, addOctaveShift, addOrnament, addPart, addPedal, addRehearsalMark, addRepeat, addRepeatBarline, addSegno, addSlur, addStringNumber, addTempo, addText, addTextDirection, addTie, addToCoda, addVoice, addWedge, autoBeam, changeBarline, changeClef, changeKey, changeNoteDuration, changeTime, clearColors, convertToGrace, copyNotes, copyNotesMultiMeasure, createTuplet, cutNotes, deleteMeasure, deleteNote, deleteNoteChecked, duplicatePart, insertClefChange, insertMeasure, insertNote, lowerAccidental, modifyDynamics, modifyNoteDuration, modifyNoteDurationChecked, modifyNotePitch, modifyNotePitchChecked, modifyTempo, moveNoteToStaff, pasteNotes, pasteNotesMultiMeasure, raiseAccidental, removeArticulation, removeBeam, removeBowing, removeBreathMark, removeCaesura, removeChordSymbol, removeDynamics, removeEnding, removeFermata, removeFingering, removeGraceNote, removeHarmony, removeLyric, removeNote, removeOctaveShift, removeOrnament, removePart, removePedal, removeRepeat, removeRepeatBarline, removeSlur, removeStringNumber, removeTempo, removeTie, removeTuplet, removeWedge, setBarline, setBeaming, setColor, setNotePitch, setNotePitchBySemitone, setStaves, shiftNotePitch, stopOctaveShift, transpose, transposeChecked, updateChordSymbol, updateHarmony, updateLyric } from './operations/index.js';
|
|
7
7
|
export { STEPS, STEP_SEMITONES, generateId, getMeasureEndPosition, pitchToSemitone } from './core.js';
|
package/dist/browser.js
CHANGED
|
@@ -198,10 +198,10 @@ var _chunkPMPROVJWjs = require('./chunk-PMPROVJW.js');
|
|
|
198
198
|
|
|
199
199
|
|
|
200
200
|
|
|
201
|
-
var
|
|
201
|
+
var _chunk7D4MLQKOjs = require('./chunk-7D4MLQKO.js');
|
|
202
202
|
|
|
203
203
|
|
|
204
|
-
var
|
|
204
|
+
var _chunkA2CGW2UFjs = require('./chunk-A2CGW2UF.js');
|
|
205
205
|
|
|
206
206
|
|
|
207
207
|
|
|
@@ -253,10 +253,11 @@ var _chunkOEX7NVZNjs = require('./chunk-OEX7NVZN.js');
|
|
|
253
253
|
var _chunk626TXMVPjs = require('./chunk-626TXMVP.js');
|
|
254
254
|
|
|
255
255
|
|
|
256
|
-
var
|
|
256
|
+
var _chunkHP4DAUGTjs = require('./chunk-HP4DAUGT.js');
|
|
257
257
|
|
|
258
258
|
|
|
259
|
-
|
|
259
|
+
|
|
260
|
+
var _chunk2EH2MGBYjs = require('./chunk-2EH2MGBY.js');
|
|
260
261
|
|
|
261
262
|
|
|
262
263
|
|
|
@@ -539,4 +540,5 @@ var _chunk5EK7K5X3js = require('./chunk-5EK7K5X3.js');
|
|
|
539
540
|
|
|
540
541
|
|
|
541
542
|
|
|
542
|
-
exports.ALL_COLOR_TARGETS = _chunkASPCIBWDjs.ALL_COLOR_TARGETS; exports.STEPS = _chunkPMPROVJWjs.STEPS; exports.STEP_SEMITONES = _chunkPMPROVJWjs.STEP_SEMITONES; exports.ValidationException = _chunkJF5TM534js.ValidationException; exports.addArticulation = _chunkASPCIBWDjs.addArticulation; exports.addBeam = _chunkASPCIBWDjs.addBeam; exports.addBowing = _chunkASPCIBWDjs.addBowing; exports.addBreathMark = _chunkASPCIBWDjs.addBreathMark; exports.addCaesura = _chunkASPCIBWDjs.addCaesura; exports.addChord = _chunkASPCIBWDjs.addChord; exports.addChordNote = _chunkASPCIBWDjs.addChordNote; exports.addChordNoteChecked = _chunkASPCIBWDjs.addChordNoteChecked; exports.addChordSymbol = _chunkASPCIBWDjs.addChordSymbol; exports.addCoda = _chunkASPCIBWDjs.addCoda; exports.addDaCapo = _chunkASPCIBWDjs.addDaCapo; exports.addDalSegno = _chunkASPCIBWDjs.addDalSegno; exports.addDynamics = _chunkASPCIBWDjs.addDynamics; exports.addEnding = _chunkASPCIBWDjs.addEnding; exports.addFermata = _chunkASPCIBWDjs.addFermata; exports.addFine = _chunkASPCIBWDjs.addFine; exports.addFingering = _chunkASPCIBWDjs.addFingering; exports.addGraceNote = _chunkASPCIBWDjs.addGraceNote; exports.addHarmony = _chunkASPCIBWDjs.addHarmony; exports.addLyric = _chunkASPCIBWDjs.addLyric; exports.addNote = _chunkASPCIBWDjs.addNote; exports.addNoteChecked = _chunkASPCIBWDjs.addNoteChecked; exports.addOctaveShift = _chunkASPCIBWDjs.addOctaveShift; exports.addOrnament = _chunkASPCIBWDjs.addOrnament; exports.addPart = _chunkASPCIBWDjs.addPart; exports.addPedal = _chunkASPCIBWDjs.addPedal; exports.addRehearsalMark = _chunkASPCIBWDjs.addRehearsalMark; exports.addRepeat = _chunkASPCIBWDjs.addRepeat; exports.addRepeatBarline = _chunkASPCIBWDjs.addRepeatBarline; exports.addSegno = _chunkASPCIBWDjs.addSegno; exports.addSlur = _chunkASPCIBWDjs.addSlur; exports.addStringNumber = _chunkASPCIBWDjs.addStringNumber; exports.addTempo = _chunkASPCIBWDjs.addTempo; exports.addText = _chunkASPCIBWDjs.addText; exports.addTextDirection = _chunkASPCIBWDjs.addTextDirection; exports.addTie = _chunkASPCIBWDjs.addTie; exports.addToCoda = _chunkASPCIBWDjs.addToCoda; exports.addVoice = _chunkASPCIBWDjs.addVoice; exports.addWedge = _chunkASPCIBWDjs.addWedge; exports.assertMeasureValid = _chunkJF5TM534js.assertMeasureValid; exports.assertValid = _chunkJF5TM534js.assertValid; exports.autoBeam = _chunkASPCIBWDjs.autoBeam; exports.buildVoiceToStaffMap = _chunkPMPROVJWjs.buildVoiceToStaffMap; exports.buildVoiceToStaffMapForPart = _chunkPMPROVJWjs.buildVoiceToStaffMapForPart; exports.changeBarline = _chunkASPCIBWDjs.changeBarline; exports.changeClef = _chunkASPCIBWDjs.changeClef; exports.changeKey = _chunkASPCIBWDjs.changeKey; exports.changeNoteDuration = _chunkASPCIBWDjs.changeNoteDuration; exports.changeTime = _chunkASPCIBWDjs.changeTime; exports.clearColors = _chunkASPCIBWDjs.clearColors; exports.convertToGrace = _chunkASPCIBWDjs.convertToGrace; exports.copyNotes = _chunkASPCIBWDjs.copyNotes; exports.copyNotesMultiMeasure = _chunkASPCIBWDjs.copyNotesMultiMeasure; exports.countNotes = _chunkPMPROVJWjs.countNotes; exports.createTuplet = _chunkASPCIBWDjs.createTuplet; exports.cutNotes = _chunkASPCIBWDjs.cutNotes; exports.deleteMeasure = _chunkASPCIBWDjs.deleteMeasure; exports.deleteNote = _chunkASPCIBWDjs.deleteNote; exports.deleteNoteChecked = _chunkASPCIBWDjs.deleteNoteChecked; exports.duplicatePart = _chunkASPCIBWDjs.duplicatePart; exports.exportMidi = _chunk6EKVRPFFjs.exportMidi; exports.exportMidiWithTimingMap = _chunk6EKVRPFFjs.exportMidiWithTimingMap; exports.extractPlaybackControls = _chunk626TXMVPjs.extractPlaybackControls; exports.findBarlines = _chunkPMPROVJWjs.findBarlines; exports.findDirectionsByType = _chunkPMPROVJWjs.findDirectionsByType; exports.findNotes = _chunkPMPROVJWjs.findNotes; exports.findNotesWithNotation = _chunkPMPROVJWjs.findNotesWithNotation; exports.formatLocation = _chunkJF5TM534js.formatLocation; exports.generateId = _chunk5EK7K5X3js.generateId; exports.generatePlaybackSequence = _chunk626TXMVPjs.generatePlaybackSequence; exports.generatePlaybackTimeline = _chunk626TXMVPjs.generatePlaybackTimeline; exports.getAbsolutePosition = _chunkPMPROVJWjs.getAbsolutePosition; exports.getAdjacentNotes = _chunkPMPROVJWjs.getAdjacentNotes; exports.getAllNotes = _chunkPMPROVJWjs.getAllNotes; exports.getAllPartInfos = _chunkOEX7NVZNjs.getAllPartInfos; exports.getAttributesAtMeasure = _chunkPMPROVJWjs.getAttributesAtMeasure; exports.getBeamGroups = _chunkPMPROVJWjs.getBeamGroups; exports.getChordProgression = _chunkPMPROVJWjs.getChordProgression; exports.getChords = _chunkPMPROVJWjs.getChords; exports.getClefChanges = _chunkPMPROVJWjs.getClefChanges; exports.getClefForStaff = _chunkPMPROVJWjs.getClefForStaff; exports.getDirectionOfKind = _chunkOEX7NVZNjs.getDirectionOfKind; exports.getDirections = _chunkPMPROVJWjs.getDirections; exports.getDirectionsAtPosition = _chunkPMPROVJWjs.getDirectionsAtPosition; exports.getDirectionsOfKind = _chunkOEX7NVZNjs.getDirectionsOfKind; exports.getDivisions = _chunkPMPROVJWjs.getDivisions; exports.getDuration = _chunkPMPROVJWjs.getDuration; exports.getDynamics = _chunkPMPROVJWjs.getDynamics; exports.getEffectiveStaff = _chunkPMPROVJWjs.getEffectiveStaff; exports.getEndings = _chunkPMPROVJWjs.getEndings; exports.getEntriesAtPosition = _chunkPMPROVJWjs.getEntriesAtPosition; exports.getEntriesForStaff = _chunkPMPROVJWjs.getEntriesForStaff; exports.getEntriesInRange = _chunkPMPROVJWjs.getEntriesInRange; exports.getHarmonies = _chunkPMPROVJWjs.getHarmonies; exports.getHarmonyAtPosition = _chunkPMPROVJWjs.getHarmonyAtPosition; exports.getKeyChanges = _chunkPMPROVJWjs.getKeyChanges; exports.getLyricText = _chunkPMPROVJWjs.getLyricText; exports.getLyrics = _chunkPMPROVJWjs.getLyrics; exports.getMeasure = _chunkPMPROVJWjs.getMeasure; exports.getMeasureByIndex = _chunkPMPROVJWjs.getMeasureByIndex; exports.getMeasureContext = _chunkJF5TM534js.getMeasureContext; exports.getMeasureCount = _chunkPMPROVJWjs.getMeasureCount; exports.getMeasureEndPosition = _chunkPMPROVJWjs.getMeasureEndPosition; exports.getNextNote = _chunkPMPROVJWjs.getNextNote; exports.getNormalizedDuration = _chunkPMPROVJWjs.getNormalizedDuration; exports.getNormalizedPosition = _chunkPMPROVJWjs.getNormalizedPosition; exports.getNotesAtPosition = _chunkPMPROVJWjs.getNotesAtPosition; exports.getNotesForStaff = _chunkPMPROVJWjs.getNotesForStaff; exports.getNotesForVoice = _chunkPMPROVJWjs.getNotesForVoice; exports.getNotesInRange = _chunkPMPROVJWjs.getNotesInRange; exports.getOctaveShifts = _chunkPMPROVJWjs.getOctaveShifts; exports.getPartAbbreviation = _chunkOEX7NVZNjs.getPartAbbreviation; exports.getPartById = _chunkPMPROVJWjs.getPartById; exports.getPartByIndex = _chunkPMPROVJWjs.getPartByIndex; exports.getPartCount = _chunkPMPROVJWjs.getPartCount; exports.getPartIds = _chunkPMPROVJWjs.getPartIds; exports.getPartIndex = _chunkPMPROVJWjs.getPartIndex; exports.getPartInfo = _chunkOEX7NVZNjs.getPartInfo; exports.getPartName = _chunkOEX7NVZNjs.getPartName; exports.getPartNameMap = _chunkOEX7NVZNjs.getPartNameMap; exports.getPedalMarkings = _chunkPMPROVJWjs.getPedalMarkings; exports.getPrevNote = _chunkPMPROVJWjs.getPrevNote; exports.getRepeatStructure = _chunkPMPROVJWjs.getRepeatStructure; exports.getSlurSpans = _chunkPMPROVJWjs.getSlurSpans; exports.getSoundDamperPedal = _chunkOEX7NVZNjs.getSoundDamperPedal; exports.getSoundDynamics = _chunkOEX7NVZNjs.getSoundDynamics; exports.getSoundSoftPedal = _chunkOEX7NVZNjs.getSoundSoftPedal; exports.getSoundSostenutoPedal = _chunkOEX7NVZNjs.getSoundSostenutoPedal; exports.getSoundTempo = _chunkOEX7NVZNjs.getSoundTempo; exports.getStaffRange = _chunkPMPROVJWjs.getStaffRange; exports.getStaveCount = _chunkPMPROVJWjs.getStaveCount; exports.getStaves = _chunkPMPROVJWjs.getStaves; exports.getStructuralChanges = _chunkPMPROVJWjs.getStructuralChanges; exports.getTempoMarkings = _chunkPMPROVJWjs.getTempoMarkings; exports.getTiedNoteGroups = _chunkPMPROVJWjs.getTiedNoteGroups; exports.getTimeChanges = _chunkPMPROVJWjs.getTimeChanges; exports.getTupletGroups = _chunkPMPROVJWjs.getTupletGroups; exports.getVerseCount = _chunkPMPROVJWjs.getVerseCount; exports.getVerticalSlice = _chunkPMPROVJWjs.getVerticalSlice; exports.getVoiceLine = _chunkPMPROVJWjs.getVoiceLine; exports.getVoiceLineInRange = _chunkPMPROVJWjs.getVoiceLineInRange; exports.getVoices = _chunkPMPROVJWjs.getVoices; exports.getVoicesForStaff = _chunkPMPROVJWjs.getVoicesForStaff; exports.getWedges = _chunkPMPROVJWjs.getWedges; exports.groupByStaff = _chunkPMPROVJWjs.groupByStaff; exports.groupByVoice = _chunkPMPROVJWjs.groupByVoice; exports.hasBeam = _chunkOEX7NVZNjs.hasBeam; exports.hasDirectionOfKind = _chunkOEX7NVZNjs.hasDirectionOfKind; exports.hasLyrics = _chunkOEX7NVZNjs.hasLyrics; exports.hasMultipleStaves = _chunkPMPROVJWjs.hasMultipleStaves; exports.hasNotations = _chunkOEX7NVZNjs.hasNotations; exports.hasNotes = _chunkPMPROVJWjs.hasNotes; exports.hasPlaybackControls = _chunk626TXMVPjs.hasPlaybackControls; exports.hasTie = _chunkOEX7NVZNjs.hasTie; exports.hasTieStart = _chunkOEX7NVZNjs.hasTieStart; exports.hasTieStop = _chunkOEX7NVZNjs.hasTieStop; exports.hasTuplet = _chunkOEX7NVZNjs.hasTuplet; exports.inferStaff = _chunkPMPROVJWjs.inferStaff; exports.insertClefChange = _chunkASPCIBWDjs.insertClefChange; exports.insertMeasure = _chunkASPCIBWDjs.insertMeasure; exports.insertNote = _chunkASPCIBWDjs.insertNote; exports.isChordNote = _chunkOEX7NVZNjs.isChordNote; exports.isCompressed = _chunkGIP6COPLjs.isCompressed; exports.isCueNote = _chunkOEX7NVZNjs.isCueNote; exports.isGraceNote = _chunkOEX7NVZNjs.isGraceNote; exports.isPartInfo = _chunkOEX7NVZNjs.isPartInfo; exports.isPitchedNote = _chunkOEX7NVZNjs.isPitchedNote; exports.isRest = _chunkOEX7NVZNjs.isRest; exports.isRestMeasure = _chunkPMPROVJWjs.isRestMeasure; exports.isUnpitchedNote = _chunkOEX7NVZNjs.isUnpitchedNote; exports.isValid = _chunkJF5TM534js.isValid; exports.iterateEntries = _chunkPMPROVJWjs.iterateEntries; exports.iterateNotes = _chunkPMPROVJWjs.iterateNotes; exports.lowerAccidental = _chunkASPCIBWDjs.lowerAccidental; exports.measureRoundtrip = _chunkPMPROVJWjs.measureRoundtrip; exports.modifyDynamics = _chunkASPCIBWDjs.modifyDynamics; exports.modifyNoteDuration = _chunkASPCIBWDjs.modifyNoteDuration; exports.modifyNoteDurationChecked = _chunkASPCIBWDjs.modifyNoteDurationChecked; exports.modifyNotePitch = _chunkASPCIBWDjs.modifyNotePitch; exports.modifyNotePitchChecked = _chunkASPCIBWDjs.modifyNotePitchChecked; exports.modifyTempo = _chunkASPCIBWDjs.modifyTempo; exports.moveNoteToStaff = _chunkASPCIBWDjs.moveNoteToStaff; exports.parse = _chunkWUXG75HNjs.parse; exports.parseAbc = _chunkNIUEAHPNjs.parseAbc; exports.parseAbcTunes = _chunkNIUEAHPNjs.parseAbcTunes; exports.parseAuto = _chunkGIP6COPLjs.parseAuto; exports.parseCompressed = _chunkGIP6COPLjs.parseCompressed; exports.pasteNotes = _chunkASPCIBWDjs.pasteNotes; exports.pasteNotesMultiMeasure = _chunkASPCIBWDjs.pasteNotesMultiMeasure; exports.pitchToSemitone = _chunkPMPROVJWjs.pitchToSemitone; exports.raiseAccidental = _chunkASPCIBWDjs.raiseAccidental; exports.removeArticulation = _chunkASPCIBWDjs.removeArticulation; exports.removeBeam = _chunkASPCIBWDjs.removeBeam; exports.removeBowing = _chunkASPCIBWDjs.removeBowing; exports.removeBreathMark = _chunkASPCIBWDjs.removeBreathMark; exports.removeCaesura = _chunkASPCIBWDjs.removeCaesura; exports.removeChordSymbol = _chunkASPCIBWDjs.removeChordSymbol; exports.removeDynamics = _chunkASPCIBWDjs.removeDynamics; exports.removeEnding = _chunkASPCIBWDjs.removeEnding; exports.removeFermata = _chunkASPCIBWDjs.removeFermata; exports.removeFingering = _chunkASPCIBWDjs.removeFingering; exports.removeGraceNote = _chunkASPCIBWDjs.removeGraceNote; exports.removeHarmony = _chunkASPCIBWDjs.removeHarmony; exports.removeLyric = _chunkASPCIBWDjs.removeLyric; exports.removeNote = _chunkASPCIBWDjs.removeNote; exports.removeOctaveShift = _chunkASPCIBWDjs.removeOctaveShift; exports.removeOrnament = _chunkASPCIBWDjs.removeOrnament; exports.removePart = _chunkASPCIBWDjs.removePart; exports.removePedal = _chunkASPCIBWDjs.removePedal; exports.removeRepeat = _chunkASPCIBWDjs.removeRepeat; exports.removeRepeatBarline = _chunkASPCIBWDjs.removeRepeatBarline; exports.removeSlur = _chunkASPCIBWDjs.removeSlur; exports.removeStringNumber = _chunkASPCIBWDjs.removeStringNumber; exports.removeTempo = _chunkASPCIBWDjs.removeTempo; exports.removeTie = _chunkASPCIBWDjs.removeTie; exports.removeTuplet = _chunkASPCIBWDjs.removeTuplet; exports.removeWedge = _chunkASPCIBWDjs.removeWedge; exports.scoresEqual = _chunkPMPROVJWjs.scoresEqual; exports.serialize = _chunkB2KMOLL4js.serialize; exports.serializeAbc = _chunkZSEJQPBOjs.serializeAbc; exports.serializeAbcTunes = _chunkZSEJQPBOjs.serializeAbcTunes; exports.serializeCompressed = _chunkM5YMLKTIjs.serializeCompressed; exports.setBarline = _chunkASPCIBWDjs.setBarline; exports.setBeaming = _chunkASPCIBWDjs.setBeaming; exports.setColor = _chunkASPCIBWDjs.setColor; exports.setNotePitch = _chunkASPCIBWDjs.setNotePitch; exports.setNotePitchBySemitone = _chunkASPCIBWDjs.setNotePitchBySemitone; exports.setStaves = _chunkASPCIBWDjs.setStaves; exports.shiftNotePitch = _chunkASPCIBWDjs.shiftNotePitch; exports.stopOctaveShift = _chunkASPCIBWDjs.stopOctaveShift; exports.transpose = _chunkASPCIBWDjs.transpose; exports.transposeChecked = _chunkASPCIBWDjs.transposeChecked; exports.updateChordSymbol = _chunkASPCIBWDjs.updateChordSymbol; exports.updateHarmony = _chunkASPCIBWDjs.updateHarmony; exports.updateLyric = _chunkASPCIBWDjs.updateLyric; exports.validate = _chunkJF5TM534js.validate; exports.validateBackupForward = _chunkJF5TM534js.validateBackupForward; exports.validateBeams = _chunkJF5TM534js.validateBeams; exports.validateDivisions = _chunkJF5TM534js.validateDivisions; exports.validateMeasureDuration = _chunkJF5TM534js.validateMeasureDuration; exports.validateMeasureLocal = _chunkJF5TM534js.validateMeasureLocal; exports.validatePartReferences = _chunkJF5TM534js.validatePartReferences; exports.validatePartStructure = _chunkJF5TM534js.validatePartStructure; exports.validateSlurs = _chunkJF5TM534js.validateSlurs; exports.validateSlursAcrossMeasures = _chunkJF5TM534js.validateSlursAcrossMeasures; exports.validateStaffStructure = _chunkJF5TM534js.validateStaffStructure; exports.validateTies = _chunkJF5TM534js.validateTies; exports.validateTiesAcrossMeasures = _chunkJF5TM534js.validateTiesAcrossMeasures; exports.validateTuplets = _chunkJF5TM534js.validateTuplets; exports.validateVoiceStaff = _chunkJF5TM534js.validateVoiceStaff; exports.withAbsolutePositions = _chunkPMPROVJWjs.withAbsolutePositions;
|
|
543
|
+
|
|
544
|
+
exports.ALL_COLOR_TARGETS = _chunkASPCIBWDjs.ALL_COLOR_TARGETS; exports.STEPS = _chunkPMPROVJWjs.STEPS; exports.STEP_SEMITONES = _chunkPMPROVJWjs.STEP_SEMITONES; exports.ValidationException = _chunkJF5TM534js.ValidationException; exports.addArticulation = _chunkASPCIBWDjs.addArticulation; exports.addBeam = _chunkASPCIBWDjs.addBeam; exports.addBowing = _chunkASPCIBWDjs.addBowing; exports.addBreathMark = _chunkASPCIBWDjs.addBreathMark; exports.addCaesura = _chunkASPCIBWDjs.addCaesura; exports.addChord = _chunkASPCIBWDjs.addChord; exports.addChordNote = _chunkASPCIBWDjs.addChordNote; exports.addChordNoteChecked = _chunkASPCIBWDjs.addChordNoteChecked; exports.addChordSymbol = _chunkASPCIBWDjs.addChordSymbol; exports.addCoda = _chunkASPCIBWDjs.addCoda; exports.addDaCapo = _chunkASPCIBWDjs.addDaCapo; exports.addDalSegno = _chunkASPCIBWDjs.addDalSegno; exports.addDynamics = _chunkASPCIBWDjs.addDynamics; exports.addEnding = _chunkASPCIBWDjs.addEnding; exports.addFermata = _chunkASPCIBWDjs.addFermata; exports.addFine = _chunkASPCIBWDjs.addFine; exports.addFingering = _chunkASPCIBWDjs.addFingering; exports.addGraceNote = _chunkASPCIBWDjs.addGraceNote; exports.addHarmony = _chunkASPCIBWDjs.addHarmony; exports.addLyric = _chunkASPCIBWDjs.addLyric; exports.addNote = _chunkASPCIBWDjs.addNote; exports.addNoteChecked = _chunkASPCIBWDjs.addNoteChecked; exports.addOctaveShift = _chunkASPCIBWDjs.addOctaveShift; exports.addOrnament = _chunkASPCIBWDjs.addOrnament; exports.addPart = _chunkASPCIBWDjs.addPart; exports.addPedal = _chunkASPCIBWDjs.addPedal; exports.addRehearsalMark = _chunkASPCIBWDjs.addRehearsalMark; exports.addRepeat = _chunkASPCIBWDjs.addRepeat; exports.addRepeatBarline = _chunkASPCIBWDjs.addRepeatBarline; exports.addSegno = _chunkASPCIBWDjs.addSegno; exports.addSlur = _chunkASPCIBWDjs.addSlur; exports.addStringNumber = _chunkASPCIBWDjs.addStringNumber; exports.addTempo = _chunkASPCIBWDjs.addTempo; exports.addText = _chunkASPCIBWDjs.addText; exports.addTextDirection = _chunkASPCIBWDjs.addTextDirection; exports.addTie = _chunkASPCIBWDjs.addTie; exports.addToCoda = _chunkASPCIBWDjs.addToCoda; exports.addVoice = _chunkASPCIBWDjs.addVoice; exports.addWedge = _chunkASPCIBWDjs.addWedge; exports.assertMeasureValid = _chunkJF5TM534js.assertMeasureValid; exports.assertValid = _chunkJF5TM534js.assertValid; exports.autoBeam = _chunkASPCIBWDjs.autoBeam; exports.buildVoiceToStaffMap = _chunkPMPROVJWjs.buildVoiceToStaffMap; exports.buildVoiceToStaffMapForPart = _chunkPMPROVJWjs.buildVoiceToStaffMapForPart; exports.changeBarline = _chunkASPCIBWDjs.changeBarline; exports.changeClef = _chunkASPCIBWDjs.changeClef; exports.changeKey = _chunkASPCIBWDjs.changeKey; exports.changeNoteDuration = _chunkASPCIBWDjs.changeNoteDuration; exports.changeTime = _chunkASPCIBWDjs.changeTime; exports.clearColors = _chunkASPCIBWDjs.clearColors; exports.convertToGrace = _chunkASPCIBWDjs.convertToGrace; exports.copyNotes = _chunkASPCIBWDjs.copyNotes; exports.copyNotesMultiMeasure = _chunkASPCIBWDjs.copyNotesMultiMeasure; exports.countNotes = _chunkPMPROVJWjs.countNotes; exports.createTuplet = _chunkASPCIBWDjs.createTuplet; exports.cutNotes = _chunkASPCIBWDjs.cutNotes; exports.deleteMeasure = _chunkASPCIBWDjs.deleteMeasure; exports.deleteNote = _chunkASPCIBWDjs.deleteNote; exports.deleteNoteChecked = _chunkASPCIBWDjs.deleteNoteChecked; exports.duplicatePart = _chunkASPCIBWDjs.duplicatePart; exports.exportMidi = _chunk6EKVRPFFjs.exportMidi; exports.exportMidiWithTimingMap = _chunk6EKVRPFFjs.exportMidiWithTimingMap; exports.extractPlaybackControls = _chunk626TXMVPjs.extractPlaybackControls; exports.findBarlines = _chunkPMPROVJWjs.findBarlines; exports.findDirectionsByType = _chunkPMPROVJWjs.findDirectionsByType; exports.findNotes = _chunkPMPROVJWjs.findNotes; exports.findNotesWithNotation = _chunkPMPROVJWjs.findNotesWithNotation; exports.formatLocation = _chunkJF5TM534js.formatLocation; exports.generateId = _chunk5EK7K5X3js.generateId; exports.generatePlaybackSequence = _chunk626TXMVPjs.generatePlaybackSequence; exports.generatePlaybackTimeline = _chunk626TXMVPjs.generatePlaybackTimeline; exports.getAbsolutePosition = _chunkPMPROVJWjs.getAbsolutePosition; exports.getAdjacentNotes = _chunkPMPROVJWjs.getAdjacentNotes; exports.getAllNotes = _chunkPMPROVJWjs.getAllNotes; exports.getAllPartInfos = _chunkOEX7NVZNjs.getAllPartInfos; exports.getAttributesAtMeasure = _chunkPMPROVJWjs.getAttributesAtMeasure; exports.getBeamGroups = _chunkPMPROVJWjs.getBeamGroups; exports.getChordProgression = _chunkPMPROVJWjs.getChordProgression; exports.getChords = _chunkPMPROVJWjs.getChords; exports.getClefChanges = _chunkPMPROVJWjs.getClefChanges; exports.getClefForStaff = _chunkPMPROVJWjs.getClefForStaff; exports.getDirectionOfKind = _chunkOEX7NVZNjs.getDirectionOfKind; exports.getDirections = _chunkPMPROVJWjs.getDirections; exports.getDirectionsAtPosition = _chunkPMPROVJWjs.getDirectionsAtPosition; exports.getDirectionsOfKind = _chunkOEX7NVZNjs.getDirectionsOfKind; exports.getDivisions = _chunkPMPROVJWjs.getDivisions; exports.getDuration = _chunkPMPROVJWjs.getDuration; exports.getDynamics = _chunkPMPROVJWjs.getDynamics; exports.getEffectiveStaff = _chunkPMPROVJWjs.getEffectiveStaff; exports.getEndings = _chunkPMPROVJWjs.getEndings; exports.getEntriesAtPosition = _chunkPMPROVJWjs.getEntriesAtPosition; exports.getEntriesForStaff = _chunkPMPROVJWjs.getEntriesForStaff; exports.getEntriesInRange = _chunkPMPROVJWjs.getEntriesInRange; exports.getHarmonies = _chunkPMPROVJWjs.getHarmonies; exports.getHarmonyAtPosition = _chunkPMPROVJWjs.getHarmonyAtPosition; exports.getKeyChanges = _chunkPMPROVJWjs.getKeyChanges; exports.getLyricText = _chunkPMPROVJWjs.getLyricText; exports.getLyrics = _chunkPMPROVJWjs.getLyrics; exports.getMeasure = _chunkPMPROVJWjs.getMeasure; exports.getMeasureByIndex = _chunkPMPROVJWjs.getMeasureByIndex; exports.getMeasureContext = _chunkJF5TM534js.getMeasureContext; exports.getMeasureCount = _chunkPMPROVJWjs.getMeasureCount; exports.getMeasureEndPosition = _chunkPMPROVJWjs.getMeasureEndPosition; exports.getNextNote = _chunkPMPROVJWjs.getNextNote; exports.getNormalizedDuration = _chunkPMPROVJWjs.getNormalizedDuration; exports.getNormalizedPosition = _chunkPMPROVJWjs.getNormalizedPosition; exports.getNotesAtPosition = _chunkPMPROVJWjs.getNotesAtPosition; exports.getNotesForStaff = _chunkPMPROVJWjs.getNotesForStaff; exports.getNotesForVoice = _chunkPMPROVJWjs.getNotesForVoice; exports.getNotesInRange = _chunkPMPROVJWjs.getNotesInRange; exports.getOctaveShifts = _chunkPMPROVJWjs.getOctaveShifts; exports.getPartAbbreviation = _chunkOEX7NVZNjs.getPartAbbreviation; exports.getPartById = _chunkPMPROVJWjs.getPartById; exports.getPartByIndex = _chunkPMPROVJWjs.getPartByIndex; exports.getPartCount = _chunkPMPROVJWjs.getPartCount; exports.getPartIds = _chunkPMPROVJWjs.getPartIds; exports.getPartIndex = _chunkPMPROVJWjs.getPartIndex; exports.getPartInfo = _chunkOEX7NVZNjs.getPartInfo; exports.getPartName = _chunkOEX7NVZNjs.getPartName; exports.getPartNameMap = _chunkOEX7NVZNjs.getPartNameMap; exports.getPedalMarkings = _chunkPMPROVJWjs.getPedalMarkings; exports.getPrevNote = _chunkPMPROVJWjs.getPrevNote; exports.getRepeatStructure = _chunkPMPROVJWjs.getRepeatStructure; exports.getSlurSpans = _chunkPMPROVJWjs.getSlurSpans; exports.getSoundDamperPedal = _chunkOEX7NVZNjs.getSoundDamperPedal; exports.getSoundDynamics = _chunkOEX7NVZNjs.getSoundDynamics; exports.getSoundSoftPedal = _chunkOEX7NVZNjs.getSoundSoftPedal; exports.getSoundSostenutoPedal = _chunkOEX7NVZNjs.getSoundSostenutoPedal; exports.getSoundTempo = _chunkOEX7NVZNjs.getSoundTempo; exports.getStaffRange = _chunkPMPROVJWjs.getStaffRange; exports.getStaveCount = _chunkPMPROVJWjs.getStaveCount; exports.getStaves = _chunkPMPROVJWjs.getStaves; exports.getStructuralChanges = _chunkPMPROVJWjs.getStructuralChanges; exports.getTempoMarkings = _chunkPMPROVJWjs.getTempoMarkings; exports.getTiedNoteGroups = _chunkPMPROVJWjs.getTiedNoteGroups; exports.getTimeChanges = _chunkPMPROVJWjs.getTimeChanges; exports.getTupletGroups = _chunkPMPROVJWjs.getTupletGroups; exports.getVerseCount = _chunkPMPROVJWjs.getVerseCount; exports.getVerticalSlice = _chunkPMPROVJWjs.getVerticalSlice; exports.getVoiceLine = _chunkPMPROVJWjs.getVoiceLine; exports.getVoiceLineInRange = _chunkPMPROVJWjs.getVoiceLineInRange; exports.getVoices = _chunkPMPROVJWjs.getVoices; exports.getVoicesForStaff = _chunkPMPROVJWjs.getVoicesForStaff; exports.getWedges = _chunkPMPROVJWjs.getWedges; exports.groupByStaff = _chunkPMPROVJWjs.groupByStaff; exports.groupByVoice = _chunkPMPROVJWjs.groupByVoice; exports.hasBeam = _chunkOEX7NVZNjs.hasBeam; exports.hasDirectionOfKind = _chunkOEX7NVZNjs.hasDirectionOfKind; exports.hasLyrics = _chunkOEX7NVZNjs.hasLyrics; exports.hasMultipleStaves = _chunkPMPROVJWjs.hasMultipleStaves; exports.hasNotations = _chunkOEX7NVZNjs.hasNotations; exports.hasNotes = _chunkPMPROVJWjs.hasNotes; exports.hasPlaybackControls = _chunk626TXMVPjs.hasPlaybackControls; exports.hasTie = _chunkOEX7NVZNjs.hasTie; exports.hasTieStart = _chunkOEX7NVZNjs.hasTieStart; exports.hasTieStop = _chunkOEX7NVZNjs.hasTieStop; exports.hasTuplet = _chunkOEX7NVZNjs.hasTuplet; exports.inferStaff = _chunkPMPROVJWjs.inferStaff; exports.insertClefChange = _chunkASPCIBWDjs.insertClefChange; exports.insertMeasure = _chunkASPCIBWDjs.insertMeasure; exports.insertNote = _chunkASPCIBWDjs.insertNote; exports.isChordNote = _chunkOEX7NVZNjs.isChordNote; exports.isCompressed = _chunk7D4MLQKOjs.isCompressed; exports.isCueNote = _chunkOEX7NVZNjs.isCueNote; exports.isGraceNote = _chunkOEX7NVZNjs.isGraceNote; exports.isPartInfo = _chunkOEX7NVZNjs.isPartInfo; exports.isPitchedNote = _chunkOEX7NVZNjs.isPitchedNote; exports.isRest = _chunkOEX7NVZNjs.isRest; exports.isRestMeasure = _chunkPMPROVJWjs.isRestMeasure; exports.isUnpitchedNote = _chunkOEX7NVZNjs.isUnpitchedNote; exports.isValid = _chunkJF5TM534js.isValid; exports.iterateEntries = _chunkPMPROVJWjs.iterateEntries; exports.iterateNotes = _chunkPMPROVJWjs.iterateNotes; exports.lowerAccidental = _chunkASPCIBWDjs.lowerAccidental; exports.measureRoundtrip = _chunkPMPROVJWjs.measureRoundtrip; exports.modifyDynamics = _chunkASPCIBWDjs.modifyDynamics; exports.modifyNoteDuration = _chunkASPCIBWDjs.modifyNoteDuration; exports.modifyNoteDurationChecked = _chunkASPCIBWDjs.modifyNoteDurationChecked; exports.modifyNotePitch = _chunkASPCIBWDjs.modifyNotePitch; exports.modifyNotePitchChecked = _chunkASPCIBWDjs.modifyNotePitchChecked; exports.modifyTempo = _chunkASPCIBWDjs.modifyTempo; exports.moveNoteToStaff = _chunkASPCIBWDjs.moveNoteToStaff; exports.parse = _chunkHP4DAUGTjs.parse; exports.parseAbc = _chunkNIUEAHPNjs.parseAbc; exports.parseAbcTunes = _chunkNIUEAHPNjs.parseAbcTunes; exports.parseAuto = _chunk7D4MLQKOjs.parseAuto; exports.parseCompressed = _chunk7D4MLQKOjs.parseCompressed; exports.pasteNotes = _chunkASPCIBWDjs.pasteNotes; exports.pasteNotesMultiMeasure = _chunkASPCIBWDjs.pasteNotesMultiMeasure; exports.pitchToSemitone = _chunkPMPROVJWjs.pitchToSemitone; exports.raiseAccidental = _chunkASPCIBWDjs.raiseAccidental; exports.removeArticulation = _chunkASPCIBWDjs.removeArticulation; exports.removeBeam = _chunkASPCIBWDjs.removeBeam; exports.removeBowing = _chunkASPCIBWDjs.removeBowing; exports.removeBreathMark = _chunkASPCIBWDjs.removeBreathMark; exports.removeCaesura = _chunkASPCIBWDjs.removeCaesura; exports.removeChordSymbol = _chunkASPCIBWDjs.removeChordSymbol; exports.removeDynamics = _chunkASPCIBWDjs.removeDynamics; exports.removeEnding = _chunkASPCIBWDjs.removeEnding; exports.removeFermata = _chunkASPCIBWDjs.removeFermata; exports.removeFingering = _chunkASPCIBWDjs.removeFingering; exports.removeGraceNote = _chunkASPCIBWDjs.removeGraceNote; exports.removeHarmony = _chunkASPCIBWDjs.removeHarmony; exports.removeLyric = _chunkASPCIBWDjs.removeLyric; exports.removeNote = _chunkASPCIBWDjs.removeNote; exports.removeOctaveShift = _chunkASPCIBWDjs.removeOctaveShift; exports.removeOrnament = _chunkASPCIBWDjs.removeOrnament; exports.removePart = _chunkASPCIBWDjs.removePart; exports.removePedal = _chunkASPCIBWDjs.removePedal; exports.removeRepeat = _chunkASPCIBWDjs.removeRepeat; exports.removeRepeatBarline = _chunkASPCIBWDjs.removeRepeatBarline; exports.removeSlur = _chunkASPCIBWDjs.removeSlur; exports.removeStringNumber = _chunkASPCIBWDjs.removeStringNumber; exports.removeTempo = _chunkASPCIBWDjs.removeTempo; exports.removeTie = _chunkASPCIBWDjs.removeTie; exports.removeTuplet = _chunkASPCIBWDjs.removeTuplet; exports.removeWedge = _chunkASPCIBWDjs.removeWedge; exports.scoresEqual = _chunkPMPROVJWjs.scoresEqual; exports.serialize = _chunk2EH2MGBYjs.serialize; exports.serializeAbc = _chunkZSEJQPBOjs.serializeAbc; exports.serializeAbcTunes = _chunkZSEJQPBOjs.serializeAbcTunes; exports.serializeCompressed = _chunkA2CGW2UFjs.serializeCompressed; exports.serializeUnchecked = _chunk2EH2MGBYjs.serializeUnchecked; exports.setBarline = _chunkASPCIBWDjs.setBarline; exports.setBeaming = _chunkASPCIBWDjs.setBeaming; exports.setColor = _chunkASPCIBWDjs.setColor; exports.setNotePitch = _chunkASPCIBWDjs.setNotePitch; exports.setNotePitchBySemitone = _chunkASPCIBWDjs.setNotePitchBySemitone; exports.setStaves = _chunkASPCIBWDjs.setStaves; exports.shiftNotePitch = _chunkASPCIBWDjs.shiftNotePitch; exports.stopOctaveShift = _chunkASPCIBWDjs.stopOctaveShift; exports.transpose = _chunkASPCIBWDjs.transpose; exports.transposeChecked = _chunkASPCIBWDjs.transposeChecked; exports.updateChordSymbol = _chunkASPCIBWDjs.updateChordSymbol; exports.updateHarmony = _chunkASPCIBWDjs.updateHarmony; exports.updateLyric = _chunkASPCIBWDjs.updateLyric; exports.validate = _chunkJF5TM534js.validate; exports.validateBackupForward = _chunkJF5TM534js.validateBackupForward; exports.validateBeams = _chunkJF5TM534js.validateBeams; exports.validateDivisions = _chunkJF5TM534js.validateDivisions; exports.validateMeasureDuration = _chunkJF5TM534js.validateMeasureDuration; exports.validateMeasureLocal = _chunkJF5TM534js.validateMeasureLocal; exports.validatePartReferences = _chunkJF5TM534js.validatePartReferences; exports.validatePartStructure = _chunkJF5TM534js.validatePartStructure; exports.validateSlurs = _chunkJF5TM534js.validateSlurs; exports.validateSlursAcrossMeasures = _chunkJF5TM534js.validateSlursAcrossMeasures; exports.validateStaffStructure = _chunkJF5TM534js.validateStaffStructure; exports.validateTies = _chunkJF5TM534js.validateTies; exports.validateTiesAcrossMeasures = _chunkJF5TM534js.validateTiesAcrossMeasures; exports.validateTuplets = _chunkJF5TM534js.validateTuplets; exports.validateVoiceStaff = _chunkJF5TM534js.validateVoiceStaff; exports.withAbsolutePositions = _chunkPMPROVJWjs.withAbsolutePositions;
|
package/dist/browser.mjs
CHANGED
|
@@ -198,10 +198,10 @@ import {
|
|
|
198
198
|
isCompressed,
|
|
199
199
|
parseAuto,
|
|
200
200
|
parseCompressed
|
|
201
|
-
} from "./chunk-
|
|
201
|
+
} from "./chunk-LFQXT7PV.mjs";
|
|
202
202
|
import {
|
|
203
203
|
serializeCompressed
|
|
204
|
-
} from "./chunk-
|
|
204
|
+
} from "./chunk-MMIZQMIO.mjs";
|
|
205
205
|
import {
|
|
206
206
|
parseAbc,
|
|
207
207
|
parseAbcTunes
|
|
@@ -253,10 +253,11 @@ import {
|
|
|
253
253
|
} from "./chunk-K6DSQPVF.mjs";
|
|
254
254
|
import {
|
|
255
255
|
parse
|
|
256
|
-
} from "./chunk-
|
|
256
|
+
} from "./chunk-63UT3IEY.mjs";
|
|
257
257
|
import {
|
|
258
|
-
serialize
|
|
259
|
-
|
|
258
|
+
serialize,
|
|
259
|
+
serializeUnchecked
|
|
260
|
+
} from "./chunk-TCXDBRRT.mjs";
|
|
260
261
|
import {
|
|
261
262
|
ValidationException,
|
|
262
263
|
assertMeasureValid,
|
|
@@ -510,6 +511,7 @@ export {
|
|
|
510
511
|
serializeAbc,
|
|
511
512
|
serializeAbcTunes,
|
|
512
513
|
serializeCompressed,
|
|
514
|
+
serializeUnchecked,
|
|
513
515
|
setBarline,
|
|
514
516
|
setBeaming,
|
|
515
517
|
setColor,
|
|
@@ -18,6 +18,11 @@ function serialize(score, options = {}) {
|
|
|
18
18
|
${errorMessages}`);
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
|
+
return serializeUnchecked(score, { version, indent });
|
|
22
|
+
}
|
|
23
|
+
function serializeUnchecked(score, options = {}) {
|
|
24
|
+
const version = options.version || score.version || "4.0";
|
|
25
|
+
const indent = _nullishCoalesce(options.indent, () => ( " "));
|
|
21
26
|
const lines = [];
|
|
22
27
|
lines.push('<?xml version="1.0" encoding="UTF-8"?>');
|
|
23
28
|
lines.push(`<!DOCTYPE score-partwise PUBLIC "-//Recordare//DTD MusicXML ${version} Partwise//EN" "http://www.musicxml.org/dtds/partwise.dtd">`);
|
|
@@ -464,7 +469,9 @@ function serializePart(part, indent, out) {
|
|
|
464
469
|
const idAttr = part.id ? ` id="${escapeXml(part.id)}"` : "";
|
|
465
470
|
out.push(`${indent}<part${idAttr}>`);
|
|
466
471
|
for (const measure of part.measures) {
|
|
467
|
-
|
|
472
|
+
const measureLines = [];
|
|
473
|
+
serializeMeasure(measure, indent + indent, measureLines);
|
|
474
|
+
out.push(measureLines.join("\n"));
|
|
468
475
|
}
|
|
469
476
|
out.push(`${indent}</part>`);
|
|
470
477
|
}
|
|
@@ -852,13 +859,12 @@ function serializeNote(note, indent, out) {
|
|
|
852
859
|
out.push(`${indent}</note>`);
|
|
853
860
|
}
|
|
854
861
|
function serializePitch(pitch, indent, out) {
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
}
|
|
860
|
-
|
|
861
|
-
out.push(`${indent}</pitch>`);
|
|
862
|
+
const alter = pitch.alter !== void 0 && pitch.alter !== 0 ? `${indent} <alter>${pitch.alter}</alter>
|
|
863
|
+
` : "";
|
|
864
|
+
out.push(`${indent}<pitch>
|
|
865
|
+
${indent} <step>${pitch.step}</step>
|
|
866
|
+
${alter}${indent} <octave>${pitch.octave}</octave>
|
|
867
|
+
${indent}</pitch>`);
|
|
862
868
|
}
|
|
863
869
|
function serializeBeam(beam, indent, out) {
|
|
864
870
|
let beamAttrs = beam.fan ? ` fan="${beam.fan}"` : "";
|
|
@@ -866,6 +872,11 @@ function serializeBeam(beam, indent, out) {
|
|
|
866
872
|
out.push(`${indent}<beam number="${beam.number}"${beamAttrs}>${beam.type}</beam>`);
|
|
867
873
|
}
|
|
868
874
|
function serializeNotations(notations, indent, out) {
|
|
875
|
+
const firstIndex = _nullishCoalesce(_optionalChain([notations, 'access', _ => _[0], 'optionalAccess', _2 => _2.notationsIndex]), () => ( 0));
|
|
876
|
+
if (notations.every((notation) => (_nullishCoalesce(notation.notationsIndex, () => ( 0))) === firstIndex)) {
|
|
877
|
+
serializeNotationsGroup(notations, indent, out);
|
|
878
|
+
return;
|
|
879
|
+
}
|
|
869
880
|
const notationsGroups = /* @__PURE__ */ new Map();
|
|
870
881
|
for (const notation of notations) {
|
|
871
882
|
const idx = _nullishCoalesce(notation.notationsIndex, () => ( 0));
|
|
@@ -882,44 +893,21 @@ function serializeNotations(notations, indent, out) {
|
|
|
882
893
|
}
|
|
883
894
|
function serializeNotationsGroup(notations, indent, out) {
|
|
884
895
|
out.push(`${indent}<notations>`);
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
chunks.push({ kind: "ornaments", items: [notation] });
|
|
901
|
-
}
|
|
902
|
-
} else if (notation.type === "technical") {
|
|
903
|
-
const last = chunks[chunks.length - 1];
|
|
904
|
-
if (last && last.kind === "technical") {
|
|
905
|
-
last.items.push(notation);
|
|
906
|
-
} else {
|
|
907
|
-
chunks.push({ kind: "technical", items: [notation] });
|
|
908
|
-
}
|
|
909
|
-
} else {
|
|
910
|
-
chunks.push({ kind: "standalone", notation });
|
|
911
|
-
}
|
|
912
|
-
}
|
|
913
|
-
for (const chunk of chunks) {
|
|
914
|
-
if (chunk.kind === "standalone") {
|
|
915
|
-
serializeStandaloneNotation(chunk.notation, indent, out);
|
|
916
|
-
} else if (chunk.kind === "articulations") {
|
|
917
|
-
serializeArticulationsGroup(chunk.items, indent, out);
|
|
918
|
-
} else if (chunk.kind === "ornaments") {
|
|
919
|
-
serializeOrnamentsGroup(chunk.items, indent, out);
|
|
920
|
-
} else if (chunk.kind === "technical") {
|
|
921
|
-
serializeTechnicalGroup(chunk.items, indent, out);
|
|
922
|
-
}
|
|
896
|
+
for (let i = 0; i < notations.length; ) {
|
|
897
|
+
const notation = notations[i];
|
|
898
|
+
const type = notation.type;
|
|
899
|
+
if (type !== "articulation" && type !== "ornament" && type !== "technical") {
|
|
900
|
+
serializeStandaloneNotation(notation, indent, out);
|
|
901
|
+
i++;
|
|
902
|
+
continue;
|
|
903
|
+
}
|
|
904
|
+
let end = i + 1;
|
|
905
|
+
while (end < notations.length && notations[end].type === type && (type !== "articulation" || (_nullishCoalesce(notations[end].articulationsIndex, () => ( 0))) === (_nullishCoalesce(notation.articulationsIndex, () => ( 0))))) end++;
|
|
906
|
+
const items = i === 0 && end === notations.length ? notations : notations.slice(i, end);
|
|
907
|
+
if (type === "articulation") serializeArticulationsGroup(items, indent, out);
|
|
908
|
+
else if (type === "ornament") serializeOrnamentsGroup(items, indent, out);
|
|
909
|
+
else serializeTechnicalGroup(items, indent, out);
|
|
910
|
+
i = end;
|
|
923
911
|
}
|
|
924
912
|
out.push(`${indent}</notations>`);
|
|
925
913
|
}
|
|
@@ -1212,7 +1200,7 @@ function serializeLyric(lyric, indent, out) {
|
|
|
1212
1200
|
if (lyric.syllabic) {
|
|
1213
1201
|
out.push(`${indent} <syllabic>${lyric.syllabic}</syllabic>`);
|
|
1214
1202
|
}
|
|
1215
|
-
const textColor = _nullishCoalesce(lyric.textColor, () => ( _optionalChain([lyric, 'access',
|
|
1203
|
+
const textColor = _nullishCoalesce(lyric.textColor, () => ( _optionalChain([lyric, 'access', _3 => _3.textElements, 'optionalAccess', _4 => _4[0], 'optionalAccess', _5 => _5.color])));
|
|
1216
1204
|
out.push(`${indent} <text${colorAttr(textColor)}>${escapeXml(lyric.text)}</text>`);
|
|
1217
1205
|
}
|
|
1218
1206
|
if (lyric.extend) {
|
|
@@ -1807,4 +1795,5 @@ function serializeSound(sound, indent, out) {
|
|
|
1807
1795
|
|
|
1808
1796
|
|
|
1809
1797
|
|
|
1810
|
-
|
|
1798
|
+
|
|
1799
|
+
exports.serialize = serialize; exports.serializeUnchecked = serializeUnchecked;
|
|
@@ -21,6 +21,7 @@ function decodeXmlEntities(s) {
|
|
|
21
21
|
}
|
|
22
22
|
var EMPTY_ATTRS = Object.freeze({});
|
|
23
23
|
var EMPTY_CHILDREN = Object.freeze([]);
|
|
24
|
+
var LT = 60;
|
|
24
25
|
var GT = 62;
|
|
25
26
|
var SLASH = 47;
|
|
26
27
|
var BANG = 33;
|
|
@@ -63,6 +64,10 @@ function parseXml(xml) {
|
|
|
63
64
|
if (top !== void 0 && xml.startsWith(top.tagName, lt + 2)) {
|
|
64
65
|
const after = lt + 2 + top.tagName.length;
|
|
65
66
|
if (xml.charCodeAt(after) === GT) {
|
|
67
|
+
if (stack.length === 3 && top.tagName === "measure" && stack[1].tagName === "part" && stack[0].tagName === "score-partwise") {
|
|
68
|
+
top.measure = parseMeasure(top.children, top.attributes);
|
|
69
|
+
top.children = EMPTY_CHILDREN;
|
|
70
|
+
}
|
|
66
71
|
stack.pop();
|
|
67
72
|
children = stack.length > 0 ? stack[stack.length - 1].children : root;
|
|
68
73
|
pos = after + 1;
|
|
@@ -142,7 +147,8 @@ function parseXml(xml) {
|
|
|
142
147
|
let value;
|
|
143
148
|
if (ch === DQUOTE || ch === SQUOTE) {
|
|
144
149
|
const valStart = ++i;
|
|
145
|
-
|
|
150
|
+
const quoteEnd = xml.indexOf(ch === DQUOTE ? '"' : "'", i);
|
|
151
|
+
i = quoteEnd === -1 ? len : quoteEnd;
|
|
146
152
|
value = xml.slice(valStart, i);
|
|
147
153
|
i++;
|
|
148
154
|
} else {
|
|
@@ -164,6 +170,15 @@ function parseXml(xml) {
|
|
|
164
170
|
if (selfClosing) {
|
|
165
171
|
children.push({ tagName, attributes, children: EMPTY_CHILDREN });
|
|
166
172
|
} else {
|
|
173
|
+
if (xml.charCodeAt(i) !== LT) {
|
|
174
|
+
const textEnd = xml.indexOf("<", i);
|
|
175
|
+
const closeEnd = textEnd + tagName.length + 2;
|
|
176
|
+
if (textEnd !== -1 && xml.charCodeAt(textEnd + 1) === SLASH && xml.startsWith(tagName, textEnd + 2) && xml.charCodeAt(closeEnd) === GT) {
|
|
177
|
+
children.push({ tagName, attributes, children: [decodeXmlEntities(xml.slice(i, textEnd))] });
|
|
178
|
+
pos = closeEnd + 1;
|
|
179
|
+
continue;
|
|
180
|
+
}
|
|
181
|
+
}
|
|
167
182
|
const node = { tagName, attributes, children: [] };
|
|
168
183
|
children.push(node);
|
|
169
184
|
stack.push(node);
|
|
@@ -785,7 +800,7 @@ function parseParts(elements) {
|
|
|
785
800
|
if (measureEl.tagName === "measure") {
|
|
786
801
|
const measureAttrs = measureEl.attributes;
|
|
787
802
|
const measureContent = measureEl.children;
|
|
788
|
-
part.measures.push(parseMeasure(measureContent, measureAttrs));
|
|
803
|
+
part.measures.push(measureEl.measure ?? parseMeasure(measureContent, measureAttrs));
|
|
789
804
|
}
|
|
790
805
|
}
|
|
791
806
|
parts.push(part);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkHP4DAUGTjs = require('./chunk-HP4DAUGT.js');
|
|
4
4
|
|
|
5
5
|
// src/importers/musicxml-compressed.ts
|
|
6
6
|
var _fflate = require('fflate');
|
|
@@ -47,19 +47,19 @@ function parseCompressed(data) {
|
|
|
47
47
|
throw new Error("Could not find MusicXML file in compressed archive");
|
|
48
48
|
}
|
|
49
49
|
const xmlString = _fflate.strFromU8.call(void 0, xmlData);
|
|
50
|
-
return
|
|
50
|
+
return _chunkHP4DAUGTjs.parse.call(void 0, xmlString);
|
|
51
51
|
}
|
|
52
52
|
function isCompressed(data) {
|
|
53
53
|
return data.length >= 2 && data[0] === 80 && data[1] === 75;
|
|
54
54
|
}
|
|
55
55
|
function parseAuto(data) {
|
|
56
56
|
if (typeof data === "string") {
|
|
57
|
-
return
|
|
57
|
+
return _chunkHP4DAUGTjs.parse.call(void 0, data);
|
|
58
58
|
}
|
|
59
59
|
if (isCompressed(data)) {
|
|
60
60
|
return parseCompressed(data);
|
|
61
61
|
}
|
|
62
|
-
return
|
|
62
|
+
return _chunkHP4DAUGTjs.parse.call(void 0, data);
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunk2EH2MGBYjs = require('./chunk-2EH2MGBY.js');
|
|
4
4
|
|
|
5
5
|
// src/exporters/musicxml-compressed.ts
|
|
6
6
|
var _fflate = require('fflate');
|
|
7
7
|
function serializeCompressed(score, options = {}) {
|
|
8
|
-
const xmlString =
|
|
8
|
+
const xmlString = _chunk2EH2MGBYjs.serialize.call(void 0, score, options);
|
|
9
9
|
const rootFileName = "score.xml";
|
|
10
10
|
const containerXml = `<?xml version="1.0" encoding="UTF-8"?>
|
|
11
11
|
<container>
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
parse
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-63UT3IEY.mjs";
|
|
4
4
|
import {
|
|
5
5
|
serialize
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-TCXDBRRT.mjs";
|
|
7
7
|
|
|
8
8
|
// src/file.ts
|
|
9
9
|
import { readFile, writeFile } from "fs/promises";
|
|
@@ -16,7 +16,7 @@ async function parseFile(filePath) {
|
|
|
16
16
|
}
|
|
17
17
|
const data = await readFile(filePath);
|
|
18
18
|
if (data.length >= 2 && data[0] === 80 && data[1] === 75) {
|
|
19
|
-
const { parseCompressed } = await import("./musicxml-compressed-
|
|
19
|
+
const { parseCompressed } = await import("./musicxml-compressed-ZHZYFJ7H.mjs");
|
|
20
20
|
return parseCompressed(data);
|
|
21
21
|
}
|
|
22
22
|
const xmlString = decodeBuffer(data);
|
|
@@ -41,7 +41,7 @@ async function serializeToFile(score, filePath, options = {}) {
|
|
|
41
41
|
const abcString = serializeAbc(score);
|
|
42
42
|
await writeFile(filePath, abcString, "utf-8");
|
|
43
43
|
} else if (lowerPath.endsWith(".mxl")) {
|
|
44
|
-
const { serializeCompressed } = await import("./musicxml-compressed-
|
|
44
|
+
const { serializeCompressed } = await import("./musicxml-compressed-7NUEGLSF.mjs");
|
|
45
45
|
const data = serializeCompressed(score, options);
|
|
46
46
|
await writeFile(filePath, data);
|
|
47
47
|
} else if (lowerPath.endsWith(".mid") || lowerPath.endsWith(".midi")) {
|
|
@@ -21,6 +21,7 @@ function decodeXmlEntities(s) {
|
|
|
21
21
|
}
|
|
22
22
|
var EMPTY_ATTRS = Object.freeze({});
|
|
23
23
|
var EMPTY_CHILDREN = Object.freeze([]);
|
|
24
|
+
var LT = 60;
|
|
24
25
|
var GT = 62;
|
|
25
26
|
var SLASH = 47;
|
|
26
27
|
var BANG = 33;
|
|
@@ -63,6 +64,10 @@ function parseXml(xml) {
|
|
|
63
64
|
if (top !== void 0 && xml.startsWith(top.tagName, lt + 2)) {
|
|
64
65
|
const after = lt + 2 + top.tagName.length;
|
|
65
66
|
if (xml.charCodeAt(after) === GT) {
|
|
67
|
+
if (stack.length === 3 && top.tagName === "measure" && stack[1].tagName === "part" && stack[0].tagName === "score-partwise") {
|
|
68
|
+
top.measure = parseMeasure(top.children, top.attributes);
|
|
69
|
+
top.children = EMPTY_CHILDREN;
|
|
70
|
+
}
|
|
66
71
|
stack.pop();
|
|
67
72
|
children = stack.length > 0 ? stack[stack.length - 1].children : root;
|
|
68
73
|
pos = after + 1;
|
|
@@ -142,7 +147,8 @@ function parseXml(xml) {
|
|
|
142
147
|
let value;
|
|
143
148
|
if (ch === DQUOTE || ch === SQUOTE) {
|
|
144
149
|
const valStart = ++i;
|
|
145
|
-
|
|
150
|
+
const quoteEnd = xml.indexOf(ch === DQUOTE ? '"' : "'", i);
|
|
151
|
+
i = quoteEnd === -1 ? len : quoteEnd;
|
|
146
152
|
value = xml.slice(valStart, i);
|
|
147
153
|
i++;
|
|
148
154
|
} else {
|
|
@@ -164,6 +170,15 @@ function parseXml(xml) {
|
|
|
164
170
|
if (selfClosing) {
|
|
165
171
|
children.push({ tagName, attributes, children: EMPTY_CHILDREN });
|
|
166
172
|
} else {
|
|
173
|
+
if (xml.charCodeAt(i) !== LT) {
|
|
174
|
+
const textEnd = xml.indexOf("<", i);
|
|
175
|
+
const closeEnd = textEnd + tagName.length + 2;
|
|
176
|
+
if (textEnd !== -1 && xml.charCodeAt(textEnd + 1) === SLASH && xml.startsWith(tagName, textEnd + 2) && xml.charCodeAt(closeEnd) === GT) {
|
|
177
|
+
children.push({ tagName, attributes, children: [decodeXmlEntities(xml.slice(i, textEnd))] });
|
|
178
|
+
pos = closeEnd + 1;
|
|
179
|
+
continue;
|
|
180
|
+
}
|
|
181
|
+
}
|
|
167
182
|
const node = { tagName, attributes, children: [] };
|
|
168
183
|
children.push(node);
|
|
169
184
|
stack.push(node);
|
|
@@ -785,7 +800,7 @@ function parseParts(elements) {
|
|
|
785
800
|
if (measureEl.tagName === "measure") {
|
|
786
801
|
const measureAttrs = measureEl.attributes;
|
|
787
802
|
const measureContent = measureEl.children;
|
|
788
|
-
part.measures.push(parseMeasure(measureContent, measureAttrs));
|
|
803
|
+
part.measures.push(_nullishCoalesce(measureEl.measure, () => ( parseMeasure(measureContent, measureAttrs))));
|
|
789
804
|
}
|
|
790
805
|
}
|
|
791
806
|
parts.push(part);
|