musicxml-io 0.2.12 → 0.3.1

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.
@@ -1,2 +1,2 @@
1
- import '../types-JohtsbUB.mjs';
2
- 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, b0 as LowerAccidentalOptions, 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, 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, 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, P as insertClefChange, E as insertMeasure, i as insertNote, 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 } from '../index-DPW0wqXK.mjs';
1
+ import '../types-D0G3_ykl.mjs';
2
+ 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, b0 as LowerAccidentalOptions, 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, 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, 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, P as insertClefChange, E as insertMeasure, i as insertNote, 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 } from '../index-Dy4LmZRQ.mjs';
@@ -1,2 +1,2 @@
1
- import '../types-JohtsbUB.js';
2
- 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, b0 as LowerAccidentalOptions, 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, 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, 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, P as insertClefChange, E as insertMeasure, i as insertNote, 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 } from '../index-DkvcsWdo.js';
1
+ import '../types-D0G3_ykl.js';
2
+ 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, b0 as LowerAccidentalOptions, 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, 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, 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, P as insertClefChange, E as insertMeasure, i as insertNote, 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 } from '../index-C1gu_fLF.js';
@@ -842,7 +842,7 @@ function validateVoiceStaff(measure, staves, location) {
842
842
  for (let entryIndex = 0; entryIndex < measure.entries.length; entryIndex++) {
843
843
  const entry = measure.entries[entryIndex];
844
844
  if (entry.type !== "note") continue;
845
- if (entry.voice <= 0) {
845
+ if (entry.voice !== void 0 && entry.voice <= 0) {
846
846
  errors.push({
847
847
  code: "INVALID_VOICE_NUMBER",
848
848
  level: "error",
@@ -1300,14 +1300,17 @@ function hasNotesInRange(voiceEntries, startPos, endPos) {
1300
1300
  return { hasNotes: conflicting.length > 0, conflictingNotes: conflicting };
1301
1301
  }
1302
1302
  function createRest(duration, voice, staff) {
1303
- return {
1303
+ const note = {
1304
1304
  _id: generateId(),
1305
1305
  type: "note",
1306
1306
  rest: { displayStep: void 0, displayOctave: void 0 },
1307
1307
  duration,
1308
- voice,
1309
1308
  staff
1310
1309
  };
1310
+ if (voice !== void 0) {
1311
+ note.voice = voice;
1312
+ }
1313
+ return note;
1311
1314
  }
1312
1315
  function rebuildMeasureWithVoice(measure, voice, newEntries, measureDuration, staff) {
1313
1316
  const otherEntries = [];
@@ -2861,7 +2864,7 @@ function autoBeam(score, options) {
2861
2864
  for (const entry of measure.entries) {
2862
2865
  if (entry.type === "note") {
2863
2866
  if (!entry.chord && !entry.rest) {
2864
- const voice = entry.voice;
2867
+ const voice = entry.voice ?? 1;
2865
2868
  if (options.voice === void 0 || voice === options.voice) {
2866
2869
  if (!notesByVoice.has(voice)) {
2867
2870
  notesByVoice.set(voice, []);
@@ -711,7 +711,7 @@ function validateVoiceStaff(measure, staves, location) {
711
711
  for (let entryIndex = 0; entryIndex < measure.entries.length; entryIndex++) {
712
712
  const entry = measure.entries[entryIndex];
713
713
  if (entry.type !== "note") continue;
714
- if (entry.voice <= 0) {
714
+ if (entry.voice !== void 0 && entry.voice <= 0) {
715
715
  errors.push({
716
716
  code: "INVALID_VOICE_NUMBER",
717
717
  level: "error",
@@ -1169,14 +1169,17 @@ function hasNotesInRange(voiceEntries, startPos, endPos) {
1169
1169
  return { hasNotes: conflicting.length > 0, conflictingNotes: conflicting };
1170
1170
  }
1171
1171
  function createRest(duration, voice, staff) {
1172
- return {
1172
+ const note = {
1173
1173
  _id: generateId(),
1174
1174
  type: "note",
1175
1175
  rest: { displayStep: void 0, displayOctave: void 0 },
1176
1176
  duration,
1177
- voice,
1178
1177
  staff
1179
1178
  };
1179
+ if (voice !== void 0) {
1180
+ note.voice = voice;
1181
+ }
1182
+ return note;
1180
1183
  }
1181
1184
  function rebuildMeasureWithVoice(measure, voice, newEntries, measureDuration, staff) {
1182
1185
  const otherEntries = [];
@@ -2730,7 +2733,7 @@ function autoBeam(score, options) {
2730
2733
  for (const entry of measure.entries) {
2731
2734
  if (entry.type === "note") {
2732
2735
  if (!entry.chord && !entry.rest) {
2733
- const voice = entry.voice;
2736
+ const voice = entry.voice ?? 1;
2734
2737
  if (options.voice === void 0 || voice === options.voice) {
2735
2738
  if (!notesByVoice.has(voice)) {
2736
2739
  notesByVoice.set(voice, []);
@@ -1,4 +1,4 @@
1
- import { M as Measure, N as NoteEntry, V as VoiceGroup, q as StaffGroup, r as NoteWithPosition, s as Chord, S as Score, t as NoteIteratorItem, h as MeasureEntry, x as VoiceToStaffMap, f as Part, C as Clef, G as StaffRange, H as PositionQueryOptions, I as VerticalSlice, J as VoiceLine, E as EntryWithContext, y as NoteWithContext, O as AdjacentNotes, z as DirectionWithContext, a as DirectionEntry, Q as DirectionKind, R as DynamicWithContext, U as TempoWithContext, W as PedalWithContext, X as WedgeWithContext, Y as OctaveShiftWithContext, Z as TiedNoteGroup, _ as SlurSpan, $ as TupletGroup, a0 as BeamGroup, a1 as NotationType, a2 as HarmonyWithContext, ae as HarmonyEntry, a3 as LyricWithContext, a4 as AssembledLyrics, a6 as RepeatInfo, a5 as BarlineWithContext, a7 as EndingInfo, a8 as KeyChangeInfo, a9 as TimeChangeInfo, aa as ClefChangeInfo, ab as StructuralChanges, g as MeasureAttributes, P as Pitch } from '../types-JohtsbUB.mjs';
1
+ import { M as Measure, N as NoteEntry, V as VoiceGroup, q as StaffGroup, r as NoteWithPosition, s as Chord, S as Score, t as NoteIteratorItem, h as MeasureEntry, x as VoiceToStaffMap, f as Part, C as Clef, G as StaffRange, H as PositionQueryOptions, I as VerticalSlice, J as VoiceLine, E as EntryWithContext, y as NoteWithContext, O as AdjacentNotes, z as DirectionWithContext, a as DirectionEntry, Q as DirectionKind, R as DynamicWithContext, U as TempoWithContext, W as PedalWithContext, X as WedgeWithContext, Y as OctaveShiftWithContext, Z as TiedNoteGroup, _ as SlurSpan, $ as TupletGroup, a0 as BeamGroup, a1 as NotationType, a2 as HarmonyWithContext, ae as HarmonyEntry, a3 as LyricWithContext, a4 as AssembledLyrics, a6 as RepeatInfo, a5 as BarlineWithContext, a7 as EndingInfo, a8 as KeyChangeInfo, a9 as TimeChangeInfo, aa as ClefChangeInfo, ab as StructuralChanges, g as MeasureAttributes, P as Pitch } from '../types-D0G3_ykl.mjs';
2
2
 
3
3
  /**
4
4
  * Filter options for voice/staff selection
@@ -1,4 +1,4 @@
1
- import { M as Measure, N as NoteEntry, V as VoiceGroup, q as StaffGroup, r as NoteWithPosition, s as Chord, S as Score, t as NoteIteratorItem, h as MeasureEntry, x as VoiceToStaffMap, f as Part, C as Clef, G as StaffRange, H as PositionQueryOptions, I as VerticalSlice, J as VoiceLine, E as EntryWithContext, y as NoteWithContext, O as AdjacentNotes, z as DirectionWithContext, a as DirectionEntry, Q as DirectionKind, R as DynamicWithContext, U as TempoWithContext, W as PedalWithContext, X as WedgeWithContext, Y as OctaveShiftWithContext, Z as TiedNoteGroup, _ as SlurSpan, $ as TupletGroup, a0 as BeamGroup, a1 as NotationType, a2 as HarmonyWithContext, ae as HarmonyEntry, a3 as LyricWithContext, a4 as AssembledLyrics, a6 as RepeatInfo, a5 as BarlineWithContext, a7 as EndingInfo, a8 as KeyChangeInfo, a9 as TimeChangeInfo, aa as ClefChangeInfo, ab as StructuralChanges, g as MeasureAttributes, P as Pitch } from '../types-JohtsbUB.js';
1
+ import { M as Measure, N as NoteEntry, V as VoiceGroup, q as StaffGroup, r as NoteWithPosition, s as Chord, S as Score, t as NoteIteratorItem, h as MeasureEntry, x as VoiceToStaffMap, f as Part, C as Clef, G as StaffRange, H as PositionQueryOptions, I as VerticalSlice, J as VoiceLine, E as EntryWithContext, y as NoteWithContext, O as AdjacentNotes, z as DirectionWithContext, a as DirectionEntry, Q as DirectionKind, R as DynamicWithContext, U as TempoWithContext, W as PedalWithContext, X as WedgeWithContext, Y as OctaveShiftWithContext, Z as TiedNoteGroup, _ as SlurSpan, $ as TupletGroup, a0 as BeamGroup, a1 as NotationType, a2 as HarmonyWithContext, ae as HarmonyEntry, a3 as LyricWithContext, a4 as AssembledLyrics, a6 as RepeatInfo, a5 as BarlineWithContext, a7 as EndingInfo, a8 as KeyChangeInfo, a9 as TimeChangeInfo, aa as ClefChangeInfo, ab as StructuralChanges, g as MeasureAttributes, P as Pitch } from '../types-D0G3_ykl.js';
2
2
 
3
3
  /**
4
4
  * Filter options for voice/staff selection
@@ -168,7 +168,7 @@ function groupByVoice(measure) {
168
168
  for (const entry of measure.entries) {
169
169
  if (entry.type !== "note") continue;
170
170
  const staff = entry.staff ?? 1;
171
- const voice = entry.voice;
171
+ const voice = entry.voice ?? 1;
172
172
  const key = `${staff}-${voice}`;
173
173
  if (!groups.has(key)) {
174
174
  groups.set(key, { staff, voice, notes: [] });
@@ -262,7 +262,7 @@ function getVoices(measure) {
262
262
  const voices = /* @__PURE__ */ new Set();
263
263
  for (const entry of measure.entries) {
264
264
  if (entry.type === "note") {
265
- voices.add(entry.voice);
265
+ voices.add(entry.voice ?? 1);
266
266
  }
267
267
  }
268
268
  return Array.from(voices).sort((a, b) => a - b);
@@ -313,7 +313,7 @@ function buildVoiceToStaffMap(measure) {
313
313
  const map = /* @__PURE__ */ new Map();
314
314
  for (const entry of measure.entries) {
315
315
  if (entry.type === "note" && entry.staff !== void 0) {
316
- const voice = entry.voice;
316
+ const voice = entry.voice ?? 1;
317
317
  const staff = entry.staff;
318
318
  if (!map.has(voice)) {
319
319
  map.set(voice, staff);
@@ -332,7 +332,7 @@ function buildVoiceToStaffMapForPart(part) {
332
332
  for (const measure of part.measures) {
333
333
  for (const entry of measure.entries) {
334
334
  if (entry.type === "note" && entry.staff !== void 0) {
335
- const voice = entry.voice;
335
+ const voice = entry.voice ?? 1;
336
336
  const staff = entry.staff;
337
337
  if (!map.has(voice)) {
338
338
  map.set(voice, staff);
@@ -351,7 +351,7 @@ function inferStaff(entry, voiceToStaffMap) {
351
351
  if (entry.staff !== void 0) {
352
352
  return entry.staff;
353
353
  }
354
- const inferredStaff = voiceToStaffMap.get(entry.voice);
354
+ const inferredStaff = voiceToStaffMap.get(entry.voice ?? 1);
355
355
  if (inferredStaff !== void 0) {
356
356
  return inferredStaff;
357
357
  }
@@ -394,7 +394,7 @@ function getVoicesForStaff(measure, staff) {
394
394
  if (entry.type === "note") {
395
395
  const entryStaff = entry.staff ?? 1;
396
396
  if (entryStaff === staff) {
397
- voices.add(entry.voice);
397
+ voices.add(entry.voice ?? 1);
398
398
  }
399
399
  }
400
400
  }
@@ -730,6 +730,7 @@ function getDynamics(score, options) {
730
730
  if (dirType.kind === "dynamics") {
731
731
  results.push({
732
732
  dynamic: dirType.value,
733
+ otherDynamics: dirType.otherDynamics,
733
734
  direction: entry,
734
735
  part,
735
736
  partIndex,
@@ -66,7 +66,7 @@ function groupByVoice(measure) {
66
66
  for (const entry of measure.entries) {
67
67
  if (entry.type !== "note") continue;
68
68
  const staff = entry.staff ?? 1;
69
- const voice = entry.voice;
69
+ const voice = entry.voice ?? 1;
70
70
  const key = `${staff}-${voice}`;
71
71
  if (!groups.has(key)) {
72
72
  groups.set(key, { staff, voice, notes: [] });
@@ -160,7 +160,7 @@ function getVoices(measure) {
160
160
  const voices = /* @__PURE__ */ new Set();
161
161
  for (const entry of measure.entries) {
162
162
  if (entry.type === "note") {
163
- voices.add(entry.voice);
163
+ voices.add(entry.voice ?? 1);
164
164
  }
165
165
  }
166
166
  return Array.from(voices).sort((a, b) => a - b);
@@ -211,7 +211,7 @@ function buildVoiceToStaffMap(measure) {
211
211
  const map = /* @__PURE__ */ new Map();
212
212
  for (const entry of measure.entries) {
213
213
  if (entry.type === "note" && entry.staff !== void 0) {
214
- const voice = entry.voice;
214
+ const voice = entry.voice ?? 1;
215
215
  const staff = entry.staff;
216
216
  if (!map.has(voice)) {
217
217
  map.set(voice, staff);
@@ -230,7 +230,7 @@ function buildVoiceToStaffMapForPart(part) {
230
230
  for (const measure of part.measures) {
231
231
  for (const entry of measure.entries) {
232
232
  if (entry.type === "note" && entry.staff !== void 0) {
233
- const voice = entry.voice;
233
+ const voice = entry.voice ?? 1;
234
234
  const staff = entry.staff;
235
235
  if (!map.has(voice)) {
236
236
  map.set(voice, staff);
@@ -249,7 +249,7 @@ function inferStaff(entry, voiceToStaffMap) {
249
249
  if (entry.staff !== void 0) {
250
250
  return entry.staff;
251
251
  }
252
- const inferredStaff = voiceToStaffMap.get(entry.voice);
252
+ const inferredStaff = voiceToStaffMap.get(entry.voice ?? 1);
253
253
  if (inferredStaff !== void 0) {
254
254
  return inferredStaff;
255
255
  }
@@ -292,7 +292,7 @@ function getVoicesForStaff(measure, staff) {
292
292
  if (entry.type === "note") {
293
293
  const entryStaff = entry.staff ?? 1;
294
294
  if (entryStaff === staff) {
295
- voices.add(entry.voice);
295
+ voices.add(entry.voice ?? 1);
296
296
  }
297
297
  }
298
298
  }
@@ -628,6 +628,7 @@ function getDynamics(score, options) {
628
628
  if (dirType.kind === "dynamics") {
629
629
  results.push({
630
630
  dynamic: dirType.value,
631
+ otherDynamics: dirType.otherDynamics,
631
632
  direction: entry,
632
633
  part,
633
634
  partIndex,
@@ -5,6 +5,7 @@ interface Score {
5
5
  parts: Part[];
6
6
  defaults?: Defaults;
7
7
  credits?: Credit[];
8
+ version?: string;
8
9
  }
9
10
  interface ScoreMetadata {
10
11
  workTitle?: string;
@@ -75,14 +76,34 @@ interface PageMargins {
75
76
  rightMargin?: number;
76
77
  topMargin?: number;
77
78
  bottomMargin?: number;
79
+ leftMarginRaw?: string;
80
+ rightMarginRaw?: string;
81
+ topMarginRaw?: string;
82
+ bottomMarginRaw?: string;
78
83
  }
79
84
  interface SystemLayout {
80
85
  systemMargins?: {
81
86
  leftMargin?: number;
82
87
  rightMargin?: number;
88
+ leftMarginRaw?: string;
89
+ rightMarginRaw?: string;
83
90
  };
84
91
  systemDistance?: number;
92
+ systemDistanceRaw?: string;
85
93
  topSystemDistance?: number;
94
+ topSystemDistanceRaw?: string;
95
+ systemDividers?: {
96
+ leftDivider?: {
97
+ printObject?: boolean;
98
+ halign?: string;
99
+ valign?: string;
100
+ };
101
+ rightDivider?: {
102
+ printObject?: boolean;
103
+ halign?: string;
104
+ valign?: string;
105
+ };
106
+ };
86
107
  }
87
108
  interface FontInfo {
88
109
  fontFamily?: string;
@@ -106,6 +127,7 @@ interface CreditWords {
106
127
  text: string;
107
128
  defaultX?: number;
108
129
  defaultY?: number;
130
+ fontFamily?: string;
109
131
  fontSize?: string;
110
132
  fontWeight?: string;
111
133
  fontStyle?: string;
@@ -237,6 +259,7 @@ interface StaffDetails {
237
259
  staffSizeScaling?: number;
238
260
  showFrets?: 'numbers' | 'letters';
239
261
  printObject?: boolean;
262
+ printSpacing?: boolean;
240
263
  }
241
264
  interface StaffTuning {
242
265
  line: number;
@@ -265,6 +288,7 @@ interface TimeSignature {
265
288
  beats: string;
266
289
  beatType: number;
267
290
  beatsList?: number[];
291
+ beatsStrList?: string[];
268
292
  beatTypeList?: number[];
269
293
  symbol?: 'common' | 'cut' | 'single-number' | 'note' | 'dotted-note' | 'normal';
270
294
  printObject?: boolean;
@@ -288,7 +312,7 @@ interface KeyOctave {
288
312
  }
289
313
  interface Clef {
290
314
  sign: 'G' | 'F' | 'C' | 'percussion' | 'TAB';
291
- line: number;
315
+ line?: number;
292
316
  staff?: number;
293
317
  clefOctaveChange?: number;
294
318
  printObject?: boolean;
@@ -306,13 +330,17 @@ interface Barline {
306
330
  repeat?: {
307
331
  direction: 'forward' | 'backward';
308
332
  times?: number;
333
+ winged?: string;
309
334
  };
310
335
  ending?: {
311
336
  number: string;
312
337
  type: 'start' | 'stop' | 'discontinue';
338
+ text?: string;
339
+ defaultY?: number;
340
+ endLength?: number;
313
341
  };
314
342
  }
315
- type MeasureEntry = NoteEntry | BackupEntry | ForwardEntry | DirectionEntry | HarmonyEntry | FiguredBassEntry | SoundEntry | AttributesEntry;
343
+ type MeasureEntry = NoteEntry | BackupEntry | ForwardEntry | DirectionEntry | HarmonyEntry | FiguredBassEntry | SoundEntry | AttributesEntry | GroupingEntry;
316
344
  interface AttributesEntry {
317
345
  _id: string;
318
346
  type: 'attributes';
@@ -328,7 +356,7 @@ interface NoteEntry {
328
356
  displayOctave?: number;
329
357
  };
330
358
  duration: number;
331
- voice: number;
359
+ voice?: number;
332
360
  staff?: number;
333
361
  chord?: boolean;
334
362
  cue?: boolean;
@@ -336,6 +364,7 @@ interface NoteEntry {
336
364
  dynamics?: number;
337
365
  printObject?: boolean;
338
366
  printSpacing?: boolean;
367
+ printDot?: boolean;
339
368
  defaultX?: number;
340
369
  defaultY?: number;
341
370
  relativeX?: number;
@@ -426,6 +455,12 @@ interface SoundEntry {
426
455
  softPedal?: boolean | 'yes' | 'no';
427
456
  sostenutoPedal?: boolean | 'yes' | 'no';
428
457
  }
458
+ interface GroupingEntry {
459
+ _id: string;
460
+ type: 'grouping';
461
+ groupingType: 'start' | 'stop' | 'single';
462
+ number?: string;
463
+ }
429
464
  interface HarmonyEntry {
430
465
  _id: string;
431
466
  type: 'harmony';
@@ -435,10 +470,13 @@ interface HarmonyEntry {
435
470
  };
436
471
  kind: string;
437
472
  kindText?: string;
473
+ kindHalign?: string;
438
474
  bass?: {
439
475
  bassStep: string;
440
476
  bassAlter?: number;
477
+ arrangement?: string;
441
478
  };
479
+ inversion?: number;
442
480
  degrees?: HarmonyDegree[];
443
481
  frame?: HarmonyFrame;
444
482
  staff?: number;
@@ -525,7 +563,7 @@ interface BeamInfo {
525
563
  number: number;
526
564
  type: 'begin' | 'continue' | 'end' | 'forward hook' | 'backward hook';
527
565
  }
528
- type Notation = ArticulationNotation | OrnamentNotation | TechnicalNotation | SlurNotation | TiedNotation | TupletNotation | DynamicsNotation | FermataNotation | ArpeggiateNotation | GlissandoNotation | SlideNotation | OtherNotation;
566
+ type Notation = ArticulationNotation | OrnamentNotation | TechnicalNotation | SlurNotation | TiedNotation | TupletNotation | DynamicsNotation | FermataNotation | ArpeggiateNotation | NonArpeggiateNotation | AccidentalMarkNotation | GlissandoNotation | SlideNotation | OtherNotation;
529
567
  interface BaseNotation {
530
568
  placement?: 'above' | 'below';
531
569
  notationsIndex?: number;
@@ -555,7 +593,7 @@ interface OrnamentNotation extends BaseNotation {
555
593
  defaultX?: number;
556
594
  defaultY?: number;
557
595
  }
558
- type OrnamentType = 'trill-mark' | 'mordent' | 'inverted-mordent' | 'turn' | 'inverted-turn' | 'delayed-turn' | 'delayed-inverted-turn' | 'vertical-turn' | 'inverted-vertical-turn' | 'shake' | 'wavy-line' | 'schleifer' | 'tremolo' | 'haydn' | 'other-ornament';
596
+ type OrnamentType = 'trill-mark' | 'mordent' | 'inverted-mordent' | 'turn' | 'inverted-turn' | 'delayed-turn' | 'delayed-inverted-turn' | 'vertical-turn' | 'inverted-vertical-turn' | 'shake' | 'wavy-line' | 'schleifer' | 'tremolo' | 'haydn' | 'other-ornament' | 'empty';
559
597
  interface TechnicalNotation extends BaseNotation {
560
598
  type: 'technical';
561
599
  technical: TechnicalType;
@@ -568,13 +606,14 @@ interface TechnicalNotation extends BaseNotation {
568
606
  bendAlter?: number;
569
607
  preBend?: boolean;
570
608
  release?: boolean;
571
- withBar?: number;
609
+ withBar?: boolean;
572
610
  harmonicNatural?: boolean;
573
611
  harmonicArtificial?: boolean;
574
612
  basePitch?: boolean;
575
613
  touchingPitch?: boolean;
576
614
  soundingPitch?: boolean;
577
615
  startStop?: 'start' | 'stop';
616
+ number?: number;
578
617
  substitution?: boolean;
579
618
  defaultX?: number;
580
619
  defaultY?: number;
@@ -634,6 +673,17 @@ interface ArpeggiateNotation extends BaseNotation {
634
673
  type: 'arpeggiate';
635
674
  direction?: 'up' | 'down';
636
675
  number?: number;
676
+ defaultX?: number;
677
+ defaultY?: number;
678
+ }
679
+ interface NonArpeggiateNotation extends BaseNotation {
680
+ type: 'non-arpeggiate';
681
+ nonArpeggiateType: 'top' | 'bottom';
682
+ number?: number;
683
+ }
684
+ interface AccidentalMarkNotation extends BaseNotation {
685
+ type: 'accidental-mark';
686
+ value: string;
637
687
  }
638
688
  interface GlissandoNotation extends BaseNotation {
639
689
  type: 'glissando';
@@ -647,6 +697,7 @@ interface SlideNotation extends BaseNotation {
647
697
  slideType: 'start' | 'stop';
648
698
  number?: number;
649
699
  lineType?: 'solid' | 'dashed' | 'dotted' | 'wavy';
700
+ text?: string;
650
701
  }
651
702
  interface OtherNotation extends BaseNotation {
652
703
  type: 'other-notation';
@@ -655,7 +706,8 @@ interface OtherNotation extends BaseNotation {
655
706
  }
656
707
  type DirectionType = {
657
708
  kind: 'dynamics';
658
- value: DynamicsValue;
709
+ value?: DynamicsValue;
710
+ otherDynamics?: string;
659
711
  defaultX?: number;
660
712
  defaultY?: number;
661
713
  relativeX?: number;
@@ -734,7 +786,8 @@ type DirectionType = {
734
786
  } | {
735
787
  kind: 'accordion-registration';
736
788
  high?: boolean;
737
- middle?: number;
789
+ middle?: number | string;
790
+ middlePresent?: boolean;
738
791
  low?: boolean;
739
792
  } | {
740
793
  kind: 'swing';
@@ -910,7 +963,8 @@ type DirectionKind = DirectionType['kind'];
910
963
  * Dynamic marking with context
911
964
  */
912
965
  interface DynamicWithContext {
913
- dynamic: DynamicsValue;
966
+ dynamic?: DynamicsValue;
967
+ otherDynamics?: string;
914
968
  direction: DirectionEntry;
915
969
  part: Part;
916
970
  partIndex: number;