musicxml-io 0.2.12 → 0.3.0

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-Csxc_VGi.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-Dw7hpp4y.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-Csxc_VGi.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-BTs3ZCQC.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-Csxc_VGi.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-Csxc_VGi.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,
@@ -75,14 +75,34 @@ interface PageMargins {
75
75
  rightMargin?: number;
76
76
  topMargin?: number;
77
77
  bottomMargin?: number;
78
+ leftMarginRaw?: string;
79
+ rightMarginRaw?: string;
80
+ topMarginRaw?: string;
81
+ bottomMarginRaw?: string;
78
82
  }
79
83
  interface SystemLayout {
80
84
  systemMargins?: {
81
85
  leftMargin?: number;
82
86
  rightMargin?: number;
87
+ leftMarginRaw?: string;
88
+ rightMarginRaw?: string;
83
89
  };
84
90
  systemDistance?: number;
91
+ systemDistanceRaw?: string;
85
92
  topSystemDistance?: number;
93
+ topSystemDistanceRaw?: string;
94
+ systemDividers?: {
95
+ leftDivider?: {
96
+ printObject?: boolean;
97
+ halign?: string;
98
+ valign?: string;
99
+ };
100
+ rightDivider?: {
101
+ printObject?: boolean;
102
+ halign?: string;
103
+ valign?: string;
104
+ };
105
+ };
86
106
  }
87
107
  interface FontInfo {
88
108
  fontFamily?: string;
@@ -106,6 +126,7 @@ interface CreditWords {
106
126
  text: string;
107
127
  defaultX?: number;
108
128
  defaultY?: number;
129
+ fontFamily?: string;
109
130
  fontSize?: string;
110
131
  fontWeight?: string;
111
132
  fontStyle?: string;
@@ -237,6 +258,7 @@ interface StaffDetails {
237
258
  staffSizeScaling?: number;
238
259
  showFrets?: 'numbers' | 'letters';
239
260
  printObject?: boolean;
261
+ printSpacing?: boolean;
240
262
  }
241
263
  interface StaffTuning {
242
264
  line: number;
@@ -265,6 +287,7 @@ interface TimeSignature {
265
287
  beats: string;
266
288
  beatType: number;
267
289
  beatsList?: number[];
290
+ beatsStrList?: string[];
268
291
  beatTypeList?: number[];
269
292
  symbol?: 'common' | 'cut' | 'single-number' | 'note' | 'dotted-note' | 'normal';
270
293
  printObject?: boolean;
@@ -288,7 +311,7 @@ interface KeyOctave {
288
311
  }
289
312
  interface Clef {
290
313
  sign: 'G' | 'F' | 'C' | 'percussion' | 'TAB';
291
- line: number;
314
+ line?: number;
292
315
  staff?: number;
293
316
  clefOctaveChange?: number;
294
317
  printObject?: boolean;
@@ -306,13 +329,17 @@ interface Barline {
306
329
  repeat?: {
307
330
  direction: 'forward' | 'backward';
308
331
  times?: number;
332
+ winged?: string;
309
333
  };
310
334
  ending?: {
311
335
  number: string;
312
336
  type: 'start' | 'stop' | 'discontinue';
337
+ text?: string;
338
+ defaultY?: number;
339
+ endLength?: number;
313
340
  };
314
341
  }
315
- type MeasureEntry = NoteEntry | BackupEntry | ForwardEntry | DirectionEntry | HarmonyEntry | FiguredBassEntry | SoundEntry | AttributesEntry;
342
+ type MeasureEntry = NoteEntry | BackupEntry | ForwardEntry | DirectionEntry | HarmonyEntry | FiguredBassEntry | SoundEntry | AttributesEntry | GroupingEntry;
316
343
  interface AttributesEntry {
317
344
  _id: string;
318
345
  type: 'attributes';
@@ -328,7 +355,7 @@ interface NoteEntry {
328
355
  displayOctave?: number;
329
356
  };
330
357
  duration: number;
331
- voice: number;
358
+ voice?: number;
332
359
  staff?: number;
333
360
  chord?: boolean;
334
361
  cue?: boolean;
@@ -336,6 +363,7 @@ interface NoteEntry {
336
363
  dynamics?: number;
337
364
  printObject?: boolean;
338
365
  printSpacing?: boolean;
366
+ printDot?: boolean;
339
367
  defaultX?: number;
340
368
  defaultY?: number;
341
369
  relativeX?: number;
@@ -426,6 +454,12 @@ interface SoundEntry {
426
454
  softPedal?: boolean | 'yes' | 'no';
427
455
  sostenutoPedal?: boolean | 'yes' | 'no';
428
456
  }
457
+ interface GroupingEntry {
458
+ _id: string;
459
+ type: 'grouping';
460
+ groupingType: 'start' | 'stop' | 'single';
461
+ number?: string;
462
+ }
429
463
  interface HarmonyEntry {
430
464
  _id: string;
431
465
  type: 'harmony';
@@ -435,10 +469,13 @@ interface HarmonyEntry {
435
469
  };
436
470
  kind: string;
437
471
  kindText?: string;
472
+ kindHalign?: string;
438
473
  bass?: {
439
474
  bassStep: string;
440
475
  bassAlter?: number;
476
+ arrangement?: string;
441
477
  };
478
+ inversion?: number;
442
479
  degrees?: HarmonyDegree[];
443
480
  frame?: HarmonyFrame;
444
481
  staff?: number;
@@ -525,7 +562,7 @@ interface BeamInfo {
525
562
  number: number;
526
563
  type: 'begin' | 'continue' | 'end' | 'forward hook' | 'backward hook';
527
564
  }
528
- type Notation = ArticulationNotation | OrnamentNotation | TechnicalNotation | SlurNotation | TiedNotation | TupletNotation | DynamicsNotation | FermataNotation | ArpeggiateNotation | GlissandoNotation | SlideNotation | OtherNotation;
565
+ type Notation = ArticulationNotation | OrnamentNotation | TechnicalNotation | SlurNotation | TiedNotation | TupletNotation | DynamicsNotation | FermataNotation | ArpeggiateNotation | NonArpeggiateNotation | AccidentalMarkNotation | GlissandoNotation | SlideNotation | OtherNotation;
529
566
  interface BaseNotation {
530
567
  placement?: 'above' | 'below';
531
568
  notationsIndex?: number;
@@ -555,7 +592,7 @@ interface OrnamentNotation extends BaseNotation {
555
592
  defaultX?: number;
556
593
  defaultY?: number;
557
594
  }
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';
595
+ 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
596
  interface TechnicalNotation extends BaseNotation {
560
597
  type: 'technical';
561
598
  technical: TechnicalType;
@@ -568,13 +605,14 @@ interface TechnicalNotation extends BaseNotation {
568
605
  bendAlter?: number;
569
606
  preBend?: boolean;
570
607
  release?: boolean;
571
- withBar?: number;
608
+ withBar?: boolean;
572
609
  harmonicNatural?: boolean;
573
610
  harmonicArtificial?: boolean;
574
611
  basePitch?: boolean;
575
612
  touchingPitch?: boolean;
576
613
  soundingPitch?: boolean;
577
614
  startStop?: 'start' | 'stop';
615
+ number?: number;
578
616
  substitution?: boolean;
579
617
  defaultX?: number;
580
618
  defaultY?: number;
@@ -634,6 +672,17 @@ interface ArpeggiateNotation extends BaseNotation {
634
672
  type: 'arpeggiate';
635
673
  direction?: 'up' | 'down';
636
674
  number?: number;
675
+ defaultX?: number;
676
+ defaultY?: number;
677
+ }
678
+ interface NonArpeggiateNotation extends BaseNotation {
679
+ type: 'non-arpeggiate';
680
+ nonArpeggiateType: 'top' | 'bottom';
681
+ number?: number;
682
+ }
683
+ interface AccidentalMarkNotation extends BaseNotation {
684
+ type: 'accidental-mark';
685
+ value: string;
637
686
  }
638
687
  interface GlissandoNotation extends BaseNotation {
639
688
  type: 'glissando';
@@ -647,6 +696,7 @@ interface SlideNotation extends BaseNotation {
647
696
  slideType: 'start' | 'stop';
648
697
  number?: number;
649
698
  lineType?: 'solid' | 'dashed' | 'dotted' | 'wavy';
699
+ text?: string;
650
700
  }
651
701
  interface OtherNotation extends BaseNotation {
652
702
  type: 'other-notation';
@@ -655,7 +705,8 @@ interface OtherNotation extends BaseNotation {
655
705
  }
656
706
  type DirectionType = {
657
707
  kind: 'dynamics';
658
- value: DynamicsValue;
708
+ value?: DynamicsValue;
709
+ otherDynamics?: string;
659
710
  defaultX?: number;
660
711
  defaultY?: number;
661
712
  relativeX?: number;
@@ -734,7 +785,8 @@ type DirectionType = {
734
785
  } | {
735
786
  kind: 'accordion-registration';
736
787
  high?: boolean;
737
- middle?: number;
788
+ middle?: number | string;
789
+ middlePresent?: boolean;
738
790
  low?: boolean;
739
791
  } | {
740
792
  kind: 'swing';
@@ -910,7 +962,8 @@ type DirectionKind = DirectionType['kind'];
910
962
  * Dynamic marking with context
911
963
  */
912
964
  interface DynamicWithContext {
913
- dynamic: DynamicsValue;
965
+ dynamic?: DynamicsValue;
966
+ otherDynamics?: string;
914
967
  direction: DirectionEntry;
915
968
  part: Part;
916
969
  partIndex: number;