musicxml-io 0.3.9 → 0.5.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.
@@ -8,7 +8,7 @@
8
8
 
9
9
 
10
10
 
11
- var _chunk24XBPMRJjs = require('./chunk-24XBPMRJ.js');
11
+ var _chunkVE2KCZMAjs = require('./chunk-VE2KCZMA.js');
12
12
 
13
13
  // src/id.ts
14
14
  var _nanoid = require('nanoid');
@@ -1560,18 +1560,18 @@ function setNotePitchBySemitone(score, options) {
1560
1560
  const result = cloneScore(score);
1561
1561
  const measure = result.parts[options.partIndex].measures[options.measureIndex];
1562
1562
  const measureNumber = _nullishCoalesce(measure.number, () => ( String(options.measureIndex + 1)));
1563
- const attrs = _chunk24XBPMRJjs.getAttributesAtMeasure.call(void 0, result, { part: options.partIndex, measure: measureNumber });
1563
+ const attrs = _chunkVE2KCZMAjs.getAttributesAtMeasure.call(void 0, result, { part: options.partIndex, measure: measureNumber });
1564
1564
  const keySignature = _nullishCoalesce(attrs.key, () => ( { fifths: 0 }));
1565
1565
  let noteCount = 0;
1566
1566
  for (const entry of measure.entries) {
1567
1567
  if (entry.type === "note" && !entry.rest) {
1568
1568
  if (noteCount === options.noteIndex) {
1569
- const notePosition = _chunk24XBPMRJjs.getAbsolutePositionForNote.call(void 0, entry, measure);
1570
- const accidentalsInMeasure = _chunk24XBPMRJjs.getAccidentalsInMeasure.call(void 0, measure, notePosition, entry.voice);
1571
- const newPitch = _chunk24XBPMRJjs.semitoneToKeyAwarePitch.call(void 0, options.semitone, keySignature, {
1569
+ const notePosition = _chunkVE2KCZMAjs.getAbsolutePositionForNote.call(void 0, entry, measure);
1570
+ const accidentalsInMeasure = _chunkVE2KCZMAjs.getAccidentalsInMeasure.call(void 0, measure, notePosition, entry.voice);
1571
+ const newPitch = _chunkVE2KCZMAjs.semitoneToKeyAwarePitch.call(void 0, options.semitone, keySignature, {
1572
1572
  preferSharp: options.preferSharp
1573
1573
  });
1574
- const accidental = _chunk24XBPMRJjs.determineAccidental.call(void 0, newPitch, keySignature, accidentalsInMeasure);
1574
+ const accidental = _chunkVE2KCZMAjs.determineAccidental.call(void 0, newPitch, keySignature, accidentalsInMeasure);
1575
1575
  entry.pitch = newPitch;
1576
1576
  if (accidental) {
1577
1577
  entry.accidental = { value: accidental };
@@ -1605,7 +1605,7 @@ function shiftNotePitch(score, options) {
1605
1605
  if (!entry.pitch) {
1606
1606
  return failure([operationError("NOTE_NOT_FOUND", "Note has no pitch", { partIndex: options.partIndex, measureIndex: options.measureIndex })]);
1607
1607
  }
1608
- currentSemitone = _chunk24XBPMRJjs.pitchToSemitone.call(void 0, entry.pitch);
1608
+ currentSemitone = _chunkVE2KCZMAjs.pitchToSemitone.call(void 0, entry.pitch);
1609
1609
  break;
1610
1610
  }
1611
1611
  noteCount++;
@@ -1633,7 +1633,7 @@ function raiseAccidental(score, options) {
1633
1633
  const result = cloneScore(score);
1634
1634
  const measure = result.parts[options.partIndex].measures[options.measureIndex];
1635
1635
  const measureNumber = _nullishCoalesce(measure.number, () => ( String(options.measureIndex + 1)));
1636
- const attrs = _chunk24XBPMRJjs.getAttributesAtMeasure.call(void 0, result, { part: options.partIndex, measure: measureNumber });
1636
+ const attrs = _chunkVE2KCZMAjs.getAttributesAtMeasure.call(void 0, result, { part: options.partIndex, measure: measureNumber });
1637
1637
  const keySignature = _nullishCoalesce(attrs.key, () => ( { fifths: 0 }));
1638
1638
  let noteCount = 0;
1639
1639
  for (const entry of measure.entries) {
@@ -1648,9 +1648,9 @@ function raiseAccidental(score, options) {
1648
1648
  return failure([operationError("ACCIDENTAL_OUT_OF_BOUNDS", `Cannot raise accidental beyond double-sharp (current: ${currentAlter})`, { partIndex: options.partIndex, measureIndex: options.measureIndex })]);
1649
1649
  }
1650
1650
  entry.pitch.alter = newAlter === 0 ? void 0 : newAlter;
1651
- const notePosition = _chunk24XBPMRJjs.getAbsolutePositionForNote.call(void 0, entry, measure);
1652
- const accidentalsInMeasure = _chunk24XBPMRJjs.getAccidentalsInMeasure.call(void 0, measure, notePosition, entry.voice);
1653
- const accidental = _chunk24XBPMRJjs.determineAccidental.call(void 0, entry.pitch, keySignature, accidentalsInMeasure);
1651
+ const notePosition = _chunkVE2KCZMAjs.getAbsolutePositionForNote.call(void 0, entry, measure);
1652
+ const accidentalsInMeasure = _chunkVE2KCZMAjs.getAccidentalsInMeasure.call(void 0, measure, notePosition, entry.voice);
1653
+ const accidental = _chunkVE2KCZMAjs.determineAccidental.call(void 0, entry.pitch, keySignature, accidentalsInMeasure);
1654
1654
  if (accidental) {
1655
1655
  entry.accidental = { value: accidental };
1656
1656
  } else {
@@ -1674,7 +1674,7 @@ function lowerAccidental(score, options) {
1674
1674
  const result = cloneScore(score);
1675
1675
  const measure = result.parts[options.partIndex].measures[options.measureIndex];
1676
1676
  const measureNumber = _nullishCoalesce(measure.number, () => ( String(options.measureIndex + 1)));
1677
- const attrs = _chunk24XBPMRJjs.getAttributesAtMeasure.call(void 0, result, { part: options.partIndex, measure: measureNumber });
1677
+ const attrs = _chunkVE2KCZMAjs.getAttributesAtMeasure.call(void 0, result, { part: options.partIndex, measure: measureNumber });
1678
1678
  const keySignature = _nullishCoalesce(attrs.key, () => ( { fifths: 0 }));
1679
1679
  let noteCount = 0;
1680
1680
  for (const entry of measure.entries) {
@@ -1689,9 +1689,9 @@ function lowerAccidental(score, options) {
1689
1689
  return failure([operationError("ACCIDENTAL_OUT_OF_BOUNDS", `Cannot lower accidental beyond double-flat (current: ${currentAlter})`, { partIndex: options.partIndex, measureIndex: options.measureIndex })]);
1690
1690
  }
1691
1691
  entry.pitch.alter = newAlter === 0 ? void 0 : newAlter;
1692
- const notePosition = _chunk24XBPMRJjs.getAbsolutePositionForNote.call(void 0, entry, measure);
1693
- const accidentalsInMeasure = _chunk24XBPMRJjs.getAccidentalsInMeasure.call(void 0, measure, notePosition, entry.voice);
1694
- const accidental = _chunk24XBPMRJjs.determineAccidental.call(void 0, entry.pitch, keySignature, accidentalsInMeasure);
1692
+ const notePosition = _chunkVE2KCZMAjs.getAbsolutePositionForNote.call(void 0, entry, measure);
1693
+ const accidentalsInMeasure = _chunkVE2KCZMAjs.getAccidentalsInMeasure.call(void 0, measure, notePosition, entry.voice);
1694
+ const accidental = _chunkVE2KCZMAjs.determineAccidental.call(void 0, entry.pitch, keySignature, accidentalsInMeasure);
1695
1695
  if (accidental) {
1696
1696
  entry.accidental = { value: accidental };
1697
1697
  } else {
@@ -1725,7 +1725,7 @@ function addVoice(score, options) {
1725
1725
  const context = getMeasureContext(result, options.partIndex, options.measureIndex);
1726
1726
  const measureDuration = context.time ? getMeasureDuration(context.divisions, context.time) : context.divisions * 4;
1727
1727
  const rest = createRest(measureDuration, options.voice, options.staff);
1728
- const currentEnd = _chunk24XBPMRJjs.getMeasureEndPosition.call(void 0, measure);
1728
+ const currentEnd = _chunkVE2KCZMAjs.getMeasureEndPosition.call(void 0, measure);
1729
1729
  if (currentEnd > 0) {
1730
1730
  measure.entries.push({ _id: generateId(), type: "backup", duration: currentEnd });
1731
1731
  }
@@ -1733,14 +1733,14 @@ function addVoice(score, options) {
1733
1733
  return success(result);
1734
1734
  }
1735
1735
  function transposePitch(pitch, semitones) {
1736
- const currentSemitone = _chunk24XBPMRJjs.STEP_SEMITONES[pitch.step] + (_nullishCoalesce(pitch.alter, () => ( 0))) + pitch.octave * 12;
1736
+ const currentSemitone = _chunkVE2KCZMAjs.STEP_SEMITONES[pitch.step] + (_nullishCoalesce(pitch.alter, () => ( 0))) + pitch.octave * 12;
1737
1737
  const targetSemitone = currentSemitone + semitones;
1738
1738
  const targetOctave = Math.floor(targetSemitone / 12);
1739
1739
  const targetPitchClass = (targetSemitone % 12 + 12) % 12;
1740
1740
  let bestStep = "C";
1741
1741
  let bestAlter = 99;
1742
- for (const step of _chunk24XBPMRJjs.STEPS) {
1743
- const stepSemitone = _chunk24XBPMRJjs.STEP_SEMITONES[step];
1742
+ for (const step of _chunkVE2KCZMAjs.STEPS) {
1743
+ const stepSemitone = _chunkVE2KCZMAjs.STEP_SEMITONES[step];
1744
1744
  let diff = targetPitchClass - stepSemitone;
1745
1745
  if (diff > 6) diff -= 12;
1746
1746
  if (diff < -6) diff += 12;
@@ -3803,7 +3803,7 @@ function addDaCapo(score, options) {
3803
3803
  }
3804
3804
  const result = cloneScore(score);
3805
3805
  const measure = result.parts[partIndex].measures[measureIndex];
3806
- const attrs = _chunk24XBPMRJjs.getAttributesAtMeasure.call(void 0, result, { part: partIndex, measure: measureIndex });
3806
+ const attrs = _chunkVE2KCZMAjs.getAttributesAtMeasure.call(void 0, result, { part: partIndex, measure: measureIndex });
3807
3807
  const measureDuration = getMeasureDuration(_nullishCoalesce(attrs.divisions, () => ( 1)), _nullishCoalesce(attrs.time, () => ( { beats: "4", beatType: 4 })));
3808
3808
  const insertPos = _nullishCoalesce(position, () => ( measureDuration));
3809
3809
  const direction = {
@@ -3832,7 +3832,7 @@ function addDalSegno(score, options) {
3832
3832
  }
3833
3833
  const result = cloneScore(score);
3834
3834
  const measure = result.parts[partIndex].measures[measureIndex];
3835
- const attrs = _chunk24XBPMRJjs.getAttributesAtMeasure.call(void 0, result, { part: partIndex, measure: measureIndex });
3835
+ const attrs = _chunkVE2KCZMAjs.getAttributesAtMeasure.call(void 0, result, { part: partIndex, measure: measureIndex });
3836
3836
  const measureDuration = getMeasureDuration(_nullishCoalesce(attrs.divisions, () => ( 1)), _nullishCoalesce(attrs.time, () => ( { beats: "4", beatType: 4 })));
3837
3837
  const insertPos = _nullishCoalesce(position, () => ( measureDuration));
3838
3838
  const direction = {
@@ -3861,7 +3861,7 @@ function addFine(score, options) {
3861
3861
  }
3862
3862
  const result = cloneScore(score);
3863
3863
  const measure = result.parts[partIndex].measures[measureIndex];
3864
- const attrs = _chunk24XBPMRJjs.getAttributesAtMeasure.call(void 0, result, { part: partIndex, measure: measureIndex });
3864
+ const attrs = _chunkVE2KCZMAjs.getAttributesAtMeasure.call(void 0, result, { part: partIndex, measure: measureIndex });
3865
3865
  const measureDuration = getMeasureDuration(_nullishCoalesce(attrs.divisions, () => ( 1)), _nullishCoalesce(attrs.time, () => ( { beats: "4", beatType: 4 })));
3866
3866
  const insertPos = _nullishCoalesce(position, () => ( measureDuration));
3867
3867
  const direction = {
@@ -3890,7 +3890,7 @@ function addToCoda(score, options) {
3890
3890
  }
3891
3891
  const result = cloneScore(score);
3892
3892
  const measure = result.parts[partIndex].measures[measureIndex];
3893
- const attrs = _chunk24XBPMRJjs.getAttributesAtMeasure.call(void 0, result, { part: partIndex, measure: measureIndex });
3893
+ const attrs = _chunkVE2KCZMAjs.getAttributesAtMeasure.call(void 0, result, { part: partIndex, measure: measureIndex });
3894
3894
  const measureDuration = getMeasureDuration(_nullishCoalesce(attrs.divisions, () => ( 1)), _nullishCoalesce(attrs.time, () => ( { beats: "4", beatType: 4 })));
3895
3895
  const insertPos = _nullishCoalesce(position, () => ( measureDuration));
3896
3896
  const direction = {
@@ -8,7 +8,7 @@ import {
8
8
  getMeasureEndPosition,
9
9
  pitchToSemitone,
10
10
  semitoneToKeyAwarePitch
11
- } from "./chunk-LYSKKBKA.mjs";
11
+ } from "./chunk-MCKPGXUF.mjs";
12
12
 
13
13
  // src/id.ts
14
14
  import { nanoid } from "nanoid";
@@ -254,7 +254,7 @@ function getChords(measure, filter) {
254
254
  chords.push({
255
255
  position,
256
256
  duration,
257
- notes: notes.map(({ absolutePosition, ...note }) => note)
257
+ notes: notes.map(({ absolutePosition: _, ...note }) => note)
258
258
  });
259
259
  }
260
260
  return chords.sort((a, b) => a.position - b.position);
@@ -62,7 +62,7 @@ function semitoneToKeyAwarePitch(semitone, key, options) {
62
62
  const octave = Math.floor(semitone / 12);
63
63
  const pitchClass = (semitone % 12 + 12) % 12;
64
64
  const keyPreferSharp = key.fifths >= 0;
65
- const preferSharp = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _ => _.preferSharp]), () => ( keyPreferSharp));
65
+ const preferSharp = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _2 => _2.preferSharp]), () => ( keyPreferSharp));
66
66
  for (const step of STEPS) {
67
67
  const stepSemitone = STEP_SEMITONES[step];
68
68
  if (stepSemitone === pitchClass) {
@@ -254,7 +254,7 @@ function getChords(measure, filter) {
254
254
  chords.push({
255
255
  position,
256
256
  duration,
257
- notes: notes.map(({ absolutePosition, ...note }) => note)
257
+ notes: notes.map(({ absolutePosition: _, ...note }) => note)
258
258
  });
259
259
  }
260
260
  return chords.sort((a, b) => a.position - b.position);
@@ -308,7 +308,7 @@ function isRestMeasure(measure) {
308
308
  }
309
309
  function getNormalizedPosition(note, measure, options) {
310
310
  const absolutePosition = getAbsolutePosition(note, measure);
311
- const currentDivisions = _nullishCoalesce(_nullishCoalesce(options.currentDivisions, () => ( _optionalChain([measure, 'access', _2 => _2.attributes, 'optionalAccess', _3 => _3.divisions]))), () => ( 1));
311
+ const currentDivisions = _nullishCoalesce(_nullishCoalesce(options.currentDivisions, () => ( _optionalChain([measure, 'access', _3 => _3.attributes, 'optionalAccess', _4 => _4.divisions]))), () => ( 1));
312
312
  return absolutePosition * options.baseDivisions / currentDivisions;
313
313
  }
314
314
  function getNormalizedDuration(note, options) {
@@ -401,7 +401,7 @@ function getClefForStaff(score, options) {
401
401
  }
402
402
  }
403
403
  }
404
- if (_optionalChain([measure, 'access', _4 => _4.attributes, 'optionalAccess', _5 => _5.clef])) {
404
+ if (_optionalChain([measure, 'access', _5 => _5.attributes, 'optionalAccess', _6 => _6.clef])) {
405
405
  for (const clef of measure.attributes.clef) {
406
406
  if ((_nullishCoalesce(clef.staff, () => ( 1))) === options.staff) {
407
407
  return clef;
@@ -429,7 +429,7 @@ function getStaffRange(score, partIndex) {
429
429
  let min = 1;
430
430
  let max = 1;
431
431
  for (const measure of part.measures) {
432
- if (_optionalChain([measure, 'access', _6 => _6.attributes, 'optionalAccess', _7 => _7.staves]) !== void 0) {
432
+ if (_optionalChain([measure, 'access', _7 => _7.attributes, 'optionalAccess', _8 => _8.staves]) !== void 0) {
433
433
  max = Math.max(max, measure.attributes.staves);
434
434
  }
435
435
  for (const entry of measure.entries) {
@@ -447,15 +447,15 @@ function getEntriesAtPosition(measure, position, options) {
447
447
  const currentPosition = entry.type === "note" && entry.chord ? state.lastNonChordPosition : state.position;
448
448
  if (currentPosition === position) {
449
449
  if (entry.type === "note") {
450
- if (_optionalChain([options, 'optionalAccess', _8 => _8.staff]) !== void 0 && (_nullishCoalesce(entry.staff, () => ( 1))) !== options.staff) {
450
+ if (_optionalChain([options, 'optionalAccess', _9 => _9.staff]) !== void 0 && (_nullishCoalesce(entry.staff, () => ( 1))) !== options.staff) {
451
451
  updatePositionForEntry(state, entry);
452
452
  continue;
453
453
  }
454
- if (_optionalChain([options, 'optionalAccess', _9 => _9.voice]) !== void 0 && entry.voice !== options.voice) {
454
+ if (_optionalChain([options, 'optionalAccess', _10 => _10.voice]) !== void 0 && entry.voice !== options.voice) {
455
455
  updatePositionForEntry(state, entry);
456
456
  continue;
457
457
  }
458
- if (_optionalChain([options, 'optionalAccess', _10 => _10.includeChordNotes]) === false && entry.chord) {
458
+ if (_optionalChain([options, 'optionalAccess', _11 => _11.includeChordNotes]) === false && entry.chord) {
459
459
  updatePositionForEntry(state, entry);
460
460
  continue;
461
461
  }
@@ -478,15 +478,15 @@ function getEntriesInRange(measure, range, options) {
478
478
  const currentPosition = entry.type === "note" && entry.chord ? state.lastNonChordPosition : state.position;
479
479
  if (currentPosition >= range.start && currentPosition < range.end) {
480
480
  if (entry.type === "note") {
481
- if (_optionalChain([options, 'optionalAccess', _11 => _11.staff]) !== void 0 && (_nullishCoalesce(entry.staff, () => ( 1))) !== options.staff) {
481
+ if (_optionalChain([options, 'optionalAccess', _12 => _12.staff]) !== void 0 && (_nullishCoalesce(entry.staff, () => ( 1))) !== options.staff) {
482
482
  updatePositionForEntry(state, entry);
483
483
  continue;
484
484
  }
485
- if (_optionalChain([options, 'optionalAccess', _12 => _12.voice]) !== void 0 && entry.voice !== options.voice) {
485
+ if (_optionalChain([options, 'optionalAccess', _13 => _13.voice]) !== void 0 && entry.voice !== options.voice) {
486
486
  updatePositionForEntry(state, entry);
487
487
  continue;
488
488
  }
489
- if (_optionalChain([options, 'optionalAccess', _13 => _13.includeChordNotes]) === false && entry.chord) {
489
+ if (_optionalChain([options, 'optionalAccess', _14 => _14.includeChordNotes]) === false && entry.chord) {
490
490
  updatePositionForEntry(state, entry);
491
491
  continue;
492
492
  }
@@ -692,13 +692,13 @@ function getAdjacentNotes(score, context) {
692
692
  }
693
693
  function getDirections(score, options) {
694
694
  const results = [];
695
- const startPart = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _14 => _14.partIndex]), () => ( 0));
696
- const endPart = _optionalChain([options, 'optionalAccess', _15 => _15.partIndex]) !== void 0 ? options.partIndex + 1 : score.parts.length;
695
+ const startPart = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _15 => _15.partIndex]), () => ( 0));
696
+ const endPart = _optionalChain([options, 'optionalAccess', _16 => _16.partIndex]) !== void 0 ? options.partIndex + 1 : score.parts.length;
697
697
  for (let partIndex = startPart; partIndex < endPart; partIndex++) {
698
698
  const part = score.parts[partIndex];
699
699
  if (!part) continue;
700
- const startMeasure = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _16 => _16.measureIndex]), () => ( 0));
701
- const endMeasure = _optionalChain([options, 'optionalAccess', _17 => _17.measureIndex]) !== void 0 ? options.measureIndex + 1 : part.measures.length;
700
+ const startMeasure = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _17 => _17.measureIndex]), () => ( 0));
701
+ const endMeasure = _optionalChain([options, 'optionalAccess', _18 => _18.measureIndex]) !== void 0 ? options.measureIndex + 1 : part.measures.length;
702
702
  for (let measureIndex = startMeasure; measureIndex < endMeasure; measureIndex++) {
703
703
  const measure = part.measures[measureIndex];
704
704
  if (!measure) continue;
@@ -739,8 +739,8 @@ function findDirectionsByType(score, kind) {
739
739
  }
740
740
  function getDynamics(score, options) {
741
741
  const results = [];
742
- const startPart = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _18 => _18.partIndex]), () => ( 0));
743
- const endPart = _optionalChain([options, 'optionalAccess', _19 => _19.partIndex]) !== void 0 ? options.partIndex + 1 : score.parts.length;
742
+ const startPart = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _19 => _19.partIndex]), () => ( 0));
743
+ const endPart = _optionalChain([options, 'optionalAccess', _20 => _20.partIndex]) !== void 0 ? options.partIndex + 1 : score.parts.length;
744
744
  for (let partIndex = startPart; partIndex < endPart; partIndex++) {
745
745
  const part = score.parts[partIndex];
746
746
  if (!part) continue;
@@ -801,8 +801,8 @@ function getTempoMarkings(score) {
801
801
  }
802
802
  function getPedalMarkings(score, options) {
803
803
  const results = [];
804
- const startPart = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _20 => _20.partIndex]), () => ( 0));
805
- const endPart = _optionalChain([options, 'optionalAccess', _21 => _21.partIndex]) !== void 0 ? options.partIndex + 1 : score.parts.length;
804
+ const startPart = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _21 => _21.partIndex]), () => ( 0));
805
+ const endPart = _optionalChain([options, 'optionalAccess', _22 => _22.partIndex]) !== void 0 ? options.partIndex + 1 : score.parts.length;
806
806
  for (let partIndex = startPart; partIndex < endPart; partIndex++) {
807
807
  const part = score.parts[partIndex];
808
808
  if (!part) continue;
@@ -831,8 +831,8 @@ function getPedalMarkings(score, options) {
831
831
  }
832
832
  function getWedges(score, options) {
833
833
  const results = [];
834
- const startPart = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _22 => _22.partIndex]), () => ( 0));
835
- const endPart = _optionalChain([options, 'optionalAccess', _23 => _23.partIndex]) !== void 0 ? options.partIndex + 1 : score.parts.length;
834
+ const startPart = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _23 => _23.partIndex]), () => ( 0));
835
+ const endPart = _optionalChain([options, 'optionalAccess', _24 => _24.partIndex]) !== void 0 ? options.partIndex + 1 : score.parts.length;
836
836
  for (let partIndex = startPart; partIndex < endPart; partIndex++) {
837
837
  const part = score.parts[partIndex];
838
838
  if (!part) continue;
@@ -861,8 +861,8 @@ function getWedges(score, options) {
861
861
  }
862
862
  function getOctaveShifts(score, options) {
863
863
  const results = [];
864
- const startPart = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _24 => _24.partIndex]), () => ( 0));
865
- const endPart = _optionalChain([options, 'optionalAccess', _25 => _25.partIndex]) !== void 0 ? options.partIndex + 1 : score.parts.length;
864
+ const startPart = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _25 => _25.partIndex]), () => ( 0));
865
+ const endPart = _optionalChain([options, 'optionalAccess', _26 => _26.partIndex]) !== void 0 ? options.partIndex + 1 : score.parts.length;
866
866
  for (let partIndex = startPart; partIndex < endPart; partIndex++) {
867
867
  const part = score.parts[partIndex];
868
868
  if (!part) continue;
@@ -892,8 +892,8 @@ function getOctaveShifts(score, options) {
892
892
  }
893
893
  function getTiedNoteGroups(score, options) {
894
894
  const results = [];
895
- const startPart = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _26 => _26.partIndex]), () => ( 0));
896
- const endPart = _optionalChain([options, 'optionalAccess', _27 => _27.partIndex]) !== void 0 ? options.partIndex + 1 : score.parts.length;
895
+ const startPart = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _27 => _27.partIndex]), () => ( 0));
896
+ const endPart = _optionalChain([options, 'optionalAccess', _28 => _28.partIndex]) !== void 0 ? options.partIndex + 1 : score.parts.length;
897
897
  for (let partIndex = startPart; partIndex < endPart; partIndex++) {
898
898
  const part = score.parts[partIndex];
899
899
  if (!part) continue;
@@ -913,8 +913,8 @@ function getTiedNoteGroups(score, options) {
913
913
  measureIndex,
914
914
  position
915
915
  };
916
- const hasTieStart = _optionalChain([entry, 'access', _28 => _28.tie, 'optionalAccess', _29 => _29.type]) === "start" || _optionalChain([entry, 'access', _30 => _30.ties, 'optionalAccess', _31 => _31.some, 'call', _32 => _32((t) => t.type === "start")]) || _optionalChain([entry, 'access', _33 => _33.notations, 'optionalAccess', _34 => _34.some, 'call', _35 => _35((n) => n.type === "tied" && n.tiedType === "start")]);
917
- const hasTieStop = _optionalChain([entry, 'access', _36 => _36.tie, 'optionalAccess', _37 => _37.type]) === "stop" || _optionalChain([entry, 'access', _38 => _38.ties, 'optionalAccess', _39 => _39.some, 'call', _40 => _40((t) => t.type === "stop")]) || _optionalChain([entry, 'access', _41 => _41.notations, 'optionalAccess', _42 => _42.some, 'call', _43 => _43((n) => n.type === "tied" && n.tiedType === "stop")]);
916
+ const hasTieStart = _optionalChain([entry, 'access', _29 => _29.tie, 'optionalAccess', _30 => _30.type]) === "start" || _optionalChain([entry, 'access', _31 => _31.ties, 'optionalAccess', _32 => _32.some, 'call', _33 => _33((t) => t.type === "start")]) || _optionalChain([entry, 'access', _34 => _34.notations, 'optionalAccess', _35 => _35.some, 'call', _36 => _36((n) => n.type === "tied" && n.tiedType === "start")]);
917
+ const hasTieStop = _optionalChain([entry, 'access', _37 => _37.tie, 'optionalAccess', _38 => _38.type]) === "stop" || _optionalChain([entry, 'access', _39 => _39.ties, 'optionalAccess', _40 => _40.some, 'call', _41 => _41((t) => t.type === "stop")]) || _optionalChain([entry, 'access', _42 => _42.notations, 'optionalAccess', _43 => _43.some, 'call', _44 => _44((n) => n.type === "tied" && n.tiedType === "stop")]);
918
918
  if (hasTieStop && pendingTies.has(pitchKey)) {
919
919
  const group = pendingTies.get(pitchKey);
920
920
  group.push(context);
@@ -935,8 +935,8 @@ function getTiedNoteGroups(score, options) {
935
935
  }
936
936
  function getSlurSpans(score, options) {
937
937
  const results = [];
938
- const startPart = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _44 => _44.partIndex]), () => ( 0));
939
- const endPart = _optionalChain([options, 'optionalAccess', _45 => _45.partIndex]) !== void 0 ? options.partIndex + 1 : score.parts.length;
938
+ const startPart = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _45 => _45.partIndex]), () => ( 0));
939
+ const endPart = _optionalChain([options, 'optionalAccess', _46 => _46.partIndex]) !== void 0 ? options.partIndex + 1 : score.parts.length;
940
940
  for (let partIndex = startPart; partIndex < endPart; partIndex++) {
941
941
  const part = score.parts[partIndex];
942
942
  if (!part) continue;
@@ -992,8 +992,8 @@ function getSlurSpans(score, options) {
992
992
  }
993
993
  function getTupletGroups(score, options) {
994
994
  const results = [];
995
- const startPart = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _46 => _46.partIndex]), () => ( 0));
996
- const endPart = _optionalChain([options, 'optionalAccess', _47 => _47.partIndex]) !== void 0 ? options.partIndex + 1 : score.parts.length;
995
+ const startPart = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _47 => _47.partIndex]), () => ( 0));
996
+ const endPart = _optionalChain([options, 'optionalAccess', _48 => _48.partIndex]) !== void 0 ? options.partIndex + 1 : score.parts.length;
997
997
  for (let partIndex = startPart; partIndex < endPart; partIndex++) {
998
998
  const part = score.parts[partIndex];
999
999
  if (!part) continue;
@@ -1017,8 +1017,8 @@ function getTupletGroups(score, options) {
1017
1017
  if (notation.type === "tuplet") {
1018
1018
  const tupletNumber = _nullishCoalesce(notation.number, () => ( 1));
1019
1019
  if (notation.tupletType === "start") {
1020
- const actualNotes = _nullishCoalesce(_optionalChain([entry, 'access', _48 => _48.timeModification, 'optionalAccess', _49 => _49.actualNotes]), () => ( 3));
1021
- const normalNotes = _nullishCoalesce(_optionalChain([entry, 'access', _50 => _50.timeModification, 'optionalAccess', _51 => _51.normalNotes]), () => ( 2));
1020
+ const actualNotes = _nullishCoalesce(_optionalChain([entry, 'access', _49 => _49.timeModification, 'optionalAccess', _50 => _50.actualNotes]), () => ( 3));
1021
+ const normalNotes = _nullishCoalesce(_optionalChain([entry, 'access', _51 => _51.timeModification, 'optionalAccess', _52 => _52.normalNotes]), () => ( 2));
1022
1022
  pendingTuplets.set(tupletNumber, {
1023
1023
  notes: [context],
1024
1024
  actualNotes,
@@ -1038,7 +1038,7 @@ function getTupletGroups(score, options) {
1038
1038
  }
1039
1039
  }
1040
1040
  }
1041
- if (entry.timeModification && !_optionalChain([entry, 'access', _52 => _52.notations, 'optionalAccess', _53 => _53.some, 'call', _54 => _54((n) => n.type === "tuplet")])) {
1041
+ if (entry.timeModification && !_optionalChain([entry, 'access', _53 => _53.notations, 'optionalAccess', _54 => _54.some, 'call', _55 => _55((n) => n.type === "tuplet")])) {
1042
1042
  for (const [, pending] of pendingTuplets) {
1043
1043
  if (entry.timeModification.actualNotes === pending.actualNotes && entry.timeModification.normalNotes === pending.normalNotes) {
1044
1044
  pending.notes.push(context);
@@ -1091,8 +1091,8 @@ function getBeamGroups(measure) {
1091
1091
  }
1092
1092
  function findNotesWithNotation(score, notationType, options) {
1093
1093
  const results = [];
1094
- const startPart = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _55 => _55.partIndex]), () => ( 0));
1095
- const endPart = _optionalChain([options, 'optionalAccess', _56 => _56.partIndex]) !== void 0 ? options.partIndex + 1 : score.parts.length;
1094
+ const startPart = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _56 => _56.partIndex]), () => ( 0));
1095
+ const endPart = _optionalChain([options, 'optionalAccess', _57 => _57.partIndex]) !== void 0 ? options.partIndex + 1 : score.parts.length;
1096
1096
  for (let partIndex = startPart; partIndex < endPart; partIndex++) {
1097
1097
  const part = score.parts[partIndex];
1098
1098
  if (!part) continue;
@@ -1102,7 +1102,7 @@ function findNotesWithNotation(score, notationType, options) {
1102
1102
  for (const entry of measure.entries) {
1103
1103
  if (entry.type === "note") {
1104
1104
  const position = entry.chord ? state.lastNonChordPosition : state.position;
1105
- if (_optionalChain([entry, 'access', _57 => _57.notations, 'optionalAccess', _58 => _58.some, 'call', _59 => _59((n) => n.type === notationType)])) {
1105
+ if (_optionalChain([entry, 'access', _58 => _58.notations, 'optionalAccess', _59 => _59.some, 'call', _60 => _60((n) => n.type === notationType)])) {
1106
1106
  results.push({
1107
1107
  note: entry,
1108
1108
  part,
@@ -1121,8 +1121,8 @@ function findNotesWithNotation(score, notationType, options) {
1121
1121
  }
1122
1122
  function getHarmonies(score, options) {
1123
1123
  const results = [];
1124
- const startPart = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _60 => _60.partIndex]), () => ( 0));
1125
- const endPart = _optionalChain([options, 'optionalAccess', _61 => _61.partIndex]) !== void 0 ? options.partIndex + 1 : score.parts.length;
1124
+ const startPart = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _61 => _61.partIndex]), () => ( 0));
1125
+ const endPart = _optionalChain([options, 'optionalAccess', _62 => _62.partIndex]) !== void 0 ? options.partIndex + 1 : score.parts.length;
1126
1126
  for (let partIndex = startPart; partIndex < endPart; partIndex++) {
1127
1127
  const part = score.parts[partIndex];
1128
1128
  if (!part) continue;
@@ -1185,8 +1185,8 @@ function getChordProgression(score, options) {
1185
1185
  }
1186
1186
  function getLyrics(score, options) {
1187
1187
  const results = [];
1188
- const startPart = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _62 => _62.partIndex]), () => ( 0));
1189
- const endPart = _optionalChain([options, 'optionalAccess', _63 => _63.partIndex]) !== void 0 ? options.partIndex + 1 : score.parts.length;
1188
+ const startPart = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _63 => _63.partIndex]), () => ( 0));
1189
+ const endPart = _optionalChain([options, 'optionalAccess', _64 => _64.partIndex]) !== void 0 ? options.partIndex + 1 : score.parts.length;
1190
1190
  for (let partIndex = startPart; partIndex < endPart; partIndex++) {
1191
1191
  const part = score.parts[partIndex];
1192
1192
  if (!part) continue;
@@ -1198,7 +1198,7 @@ function getLyrics(score, options) {
1198
1198
  const position = entry.chord ? state.lastNonChordPosition : state.position;
1199
1199
  for (const lyric of entry.lyrics) {
1200
1200
  const verse = _nullishCoalesce(lyric.number, () => ( 1));
1201
- if (_optionalChain([options, 'optionalAccess', _64 => _64.verse]) !== void 0 && verse !== options.verse) {
1201
+ if (_optionalChain([options, 'optionalAccess', _65 => _65.verse]) !== void 0 && verse !== options.verse) {
1202
1202
  continue;
1203
1203
  }
1204
1204
  results.push({
@@ -1258,8 +1258,8 @@ function getLyricText(score, options) {
1258
1258
  }
1259
1259
  function getVerseCount(score, options) {
1260
1260
  const verses = /* @__PURE__ */ new Set();
1261
- const startPart = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _65 => _65.partIndex]), () => ( 0));
1262
- const endPart = _optionalChain([options, 'optionalAccess', _66 => _66.partIndex]) !== void 0 ? options.partIndex + 1 : score.parts.length;
1261
+ const startPart = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _66 => _66.partIndex]), () => ( 0));
1262
+ const endPart = _optionalChain([options, 'optionalAccess', _67 => _67.partIndex]) !== void 0 ? options.partIndex + 1 : score.parts.length;
1263
1263
  for (let partIndex = startPart; partIndex < endPart; partIndex++) {
1264
1264
  const part = score.parts[partIndex];
1265
1265
  if (!part) continue;
@@ -1277,7 +1277,7 @@ function getVerseCount(score, options) {
1277
1277
  }
1278
1278
  function getRepeatStructure(score, options) {
1279
1279
  const results = [];
1280
- const partIndex = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _67 => _67.partIndex]), () => ( 0));
1280
+ const partIndex = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _68 => _68.partIndex]), () => ( 0));
1281
1281
  const part = score.parts[partIndex];
1282
1282
  if (!part) return results;
1283
1283
  for (let measureIndex = 0; measureIndex < part.measures.length; measureIndex++) {
@@ -1300,8 +1300,8 @@ function getRepeatStructure(score, options) {
1300
1300
  }
1301
1301
  function findBarlines(score, options) {
1302
1302
  const results = [];
1303
- const startPart = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _68 => _68.partIndex]), () => ( 0));
1304
- const endPart = _optionalChain([options, 'optionalAccess', _69 => _69.partIndex]) !== void 0 ? options.partIndex + 1 : score.parts.length;
1303
+ const startPart = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _69 => _69.partIndex]), () => ( 0));
1304
+ const endPart = _optionalChain([options, 'optionalAccess', _70 => _70.partIndex]) !== void 0 ? options.partIndex + 1 : score.parts.length;
1305
1305
  for (let partIndex = startPart; partIndex < endPart; partIndex++) {
1306
1306
  const part = score.parts[partIndex];
1307
1307
  if (!part) continue;
@@ -1310,10 +1310,10 @@ function findBarlines(score, options) {
1310
1310
  const measureNumber = _nullishCoalesce(measure.number, () => ( String(measureIndex + 1)));
1311
1311
  if (measure.barlines) {
1312
1312
  for (const barline of measure.barlines) {
1313
- if (_optionalChain([options, 'optionalAccess', _70 => _70.style]) !== void 0 && barline.barStyle !== options.style) {
1313
+ if (_optionalChain([options, 'optionalAccess', _71 => _71.style]) !== void 0 && barline.barStyle !== options.style) {
1314
1314
  continue;
1315
1315
  }
1316
- if (_optionalChain([options, 'optionalAccess', _71 => _71.repeat]) !== void 0) {
1316
+ if (_optionalChain([options, 'optionalAccess', _72 => _72.repeat]) !== void 0) {
1317
1317
  const hasRepeat = barline.repeat !== void 0;
1318
1318
  if (hasRepeat !== options.repeat) {
1319
1319
  continue;
@@ -1333,8 +1333,8 @@ function findBarlines(score, options) {
1333
1333
  }
1334
1334
  function getEndings(score, options) {
1335
1335
  const results = [];
1336
- const startPart = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _72 => _72.partIndex]), () => ( 0));
1337
- const endPart = _optionalChain([options, 'optionalAccess', _73 => _73.partIndex]) !== void 0 ? options.partIndex + 1 : score.parts.length;
1336
+ const startPart = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _73 => _73.partIndex]), () => ( 0));
1337
+ const endPart = _optionalChain([options, 'optionalAccess', _74 => _74.partIndex]) !== void 0 ? options.partIndex + 1 : score.parts.length;
1338
1338
  for (let partIndex = startPart; partIndex < endPart; partIndex++) {
1339
1339
  const part = score.parts[partIndex];
1340
1340
  if (!part) continue;
@@ -1360,8 +1360,8 @@ function getEndings(score, options) {
1360
1360
  }
1361
1361
  function getKeyChanges(score, options) {
1362
1362
  const results = [];
1363
- const startPart = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _74 => _74.partIndex]), () => ( 0));
1364
- const endPart = _optionalChain([options, 'optionalAccess', _75 => _75.partIndex]) !== void 0 ? options.partIndex + 1 : score.parts.length;
1363
+ const startPart = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _75 => _75.partIndex]), () => ( 0));
1364
+ const endPart = _optionalChain([options, 'optionalAccess', _76 => _76.partIndex]) !== void 0 ? options.partIndex + 1 : score.parts.length;
1365
1365
  for (let partIndex = startPart; partIndex < endPart; partIndex++) {
1366
1366
  const part = score.parts[partIndex];
1367
1367
  if (!part) continue;
@@ -1370,7 +1370,7 @@ function getKeyChanges(score, options) {
1370
1370
  const measure = part.measures[measureIndex];
1371
1371
  const measureNumber = _nullishCoalesce(measure.number, () => ( String(measureIndex + 1)));
1372
1372
  const state = createPositionState();
1373
- if (_optionalChain([measure, 'access', _76 => _76.attributes, 'optionalAccess', _77 => _77.key])) {
1373
+ if (_optionalChain([measure, 'access', _77 => _77.attributes, 'optionalAccess', _78 => _78.key])) {
1374
1374
  const key = measure.attributes.key;
1375
1375
  if (!lastKey || lastKey.fifths !== key.fifths || lastKey.mode !== key.mode) {
1376
1376
  results.push({
@@ -1405,8 +1405,8 @@ function getKeyChanges(score, options) {
1405
1405
  }
1406
1406
  function getTimeChanges(score, options) {
1407
1407
  const results = [];
1408
- const startPart = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _78 => _78.partIndex]), () => ( 0));
1409
- const endPart = _optionalChain([options, 'optionalAccess', _79 => _79.partIndex]) !== void 0 ? options.partIndex + 1 : score.parts.length;
1408
+ const startPart = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _79 => _79.partIndex]), () => ( 0));
1409
+ const endPart = _optionalChain([options, 'optionalAccess', _80 => _80.partIndex]) !== void 0 ? options.partIndex + 1 : score.parts.length;
1410
1410
  for (let partIndex = startPart; partIndex < endPart; partIndex++) {
1411
1411
  const part = score.parts[partIndex];
1412
1412
  if (!part) continue;
@@ -1414,7 +1414,7 @@ function getTimeChanges(score, options) {
1414
1414
  for (let measureIndex = 0; measureIndex < part.measures.length; measureIndex++) {
1415
1415
  const measure = part.measures[measureIndex];
1416
1416
  const measureNumber = _nullishCoalesce(measure.number, () => ( String(measureIndex + 1)));
1417
- if (_optionalChain([measure, 'access', _80 => _80.attributes, 'optionalAccess', _81 => _81.time])) {
1417
+ if (_optionalChain([measure, 'access', _81 => _81.attributes, 'optionalAccess', _82 => _82.time])) {
1418
1418
  const time = measure.attributes.time;
1419
1419
  if (!lastTime || lastTime.beats !== time.beats || lastTime.beatType !== time.beatType) {
1420
1420
  results.push({
@@ -1446,8 +1446,8 @@ function getTimeChanges(score, options) {
1446
1446
  }
1447
1447
  function getClefChanges(score, options) {
1448
1448
  const results = [];
1449
- const startPart = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _82 => _82.partIndex]), () => ( 0));
1450
- const endPart = _optionalChain([options, 'optionalAccess', _83 => _83.partIndex]) !== void 0 ? options.partIndex + 1 : score.parts.length;
1449
+ const startPart = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _83 => _83.partIndex]), () => ( 0));
1450
+ const endPart = _optionalChain([options, 'optionalAccess', _84 => _84.partIndex]) !== void 0 ? options.partIndex + 1 : score.parts.length;
1451
1451
  for (let partIndex = startPart; partIndex < endPart; partIndex++) {
1452
1452
  const part = score.parts[partIndex];
1453
1453
  if (!part) continue;
@@ -1456,10 +1456,10 @@ function getClefChanges(score, options) {
1456
1456
  const measure = part.measures[measureIndex];
1457
1457
  const measureNumber = _nullishCoalesce(measure.number, () => ( String(measureIndex + 1)));
1458
1458
  const state = createPositionState();
1459
- if (_optionalChain([measure, 'access', _84 => _84.attributes, 'optionalAccess', _85 => _85.clef])) {
1459
+ if (_optionalChain([measure, 'access', _85 => _85.attributes, 'optionalAccess', _86 => _86.clef])) {
1460
1460
  for (const clef of measure.attributes.clef) {
1461
1461
  const staff = _nullishCoalesce(clef.staff, () => ( 1));
1462
- if (_optionalChain([options, 'optionalAccess', _86 => _86.staff]) !== void 0 && staff !== options.staff) {
1462
+ if (_optionalChain([options, 'optionalAccess', _87 => _87.staff]) !== void 0 && staff !== options.staff) {
1463
1463
  continue;
1464
1464
  }
1465
1465
  const lastClef = lastClefs.get(staff);
@@ -1480,7 +1480,7 @@ function getClefChanges(score, options) {
1480
1480
  if (entry.type === "attributes" && entry.attributes.clef) {
1481
1481
  for (const clef of entry.attributes.clef) {
1482
1482
  const staff = _nullishCoalesce(clef.staff, () => ( 1));
1483
- if (_optionalChain([options, 'optionalAccess', _87 => _87.staff]) !== void 0 && staff !== options.staff) {
1483
+ if (_optionalChain([options, 'optionalAccess', _88 => _88.staff]) !== void 0 && staff !== options.staff) {
1484
1484
  continue;
1485
1485
  }
1486
1486
  const lastClef = lastClefs.get(staff);
@@ -1543,14 +1543,14 @@ function getDivisions(score, options) {
1543
1543
  const m = part.measures[i];
1544
1544
  const mNum = parseInt(m.number, 10);
1545
1545
  if (!isNaN(mNum) && mNum > targetMeasure) break;
1546
- if (_optionalChain([m, 'access', _88 => _88.attributes, 'optionalAccess', _89 => _89.divisions]) !== void 0) {
1546
+ if (_optionalChain([m, 'access', _89 => _89.attributes, 'optionalAccess', _90 => _90.divisions]) !== void 0) {
1547
1547
  }
1548
1548
  }
1549
1549
  let divisions = 1;
1550
1550
  for (const m of part.measures) {
1551
1551
  const mNum = parseInt(m.number, 10);
1552
1552
  if (!isNaN(mNum) && mNum > targetMeasure) break;
1553
- if (_optionalChain([m, 'access', _90 => _90.attributes, 'optionalAccess', _91 => _91.divisions]) !== void 0) {
1553
+ if (_optionalChain([m, 'access', _91 => _91.attributes, 'optionalAccess', _92 => _92.divisions]) !== void 0) {
1554
1554
  divisions = m.attributes.divisions;
1555
1555
  }
1556
1556
  }
@@ -1611,7 +1611,7 @@ function getDuration(score) {
1611
1611
  let totalDuration = 0;
1612
1612
  let divisions = 1;
1613
1613
  for (const measure of part.measures) {
1614
- if (_optionalChain([measure, 'access', _92 => _92.attributes, 'optionalAccess', _93 => _93.divisions]) !== void 0) {
1614
+ if (_optionalChain([measure, 'access', _93 => _93.attributes, 'optionalAccess', _94 => _94.divisions]) !== void 0) {
1615
1615
  divisions = measure.attributes.divisions;
1616
1616
  }
1617
1617
  let measureDuration = 0;
@@ -1640,7 +1640,7 @@ function hasMultipleStaves(score, partIndex = 0) {
1640
1640
  const part = score.parts[partIndex];
1641
1641
  if (!part) return false;
1642
1642
  for (const measure of part.measures) {
1643
- if (_optionalChain([measure, 'access', _94 => _94.attributes, 'optionalAccess', _95 => _95.staves]) !== void 0 && measure.attributes.staves > 1) {
1643
+ if (_optionalChain([measure, 'access', _95 => _95.attributes, 'optionalAccess', _96 => _96.staves]) !== void 0 && measure.attributes.staves > 1) {
1644
1644
  return true;
1645
1645
  }
1646
1646
  }
@@ -1650,7 +1650,7 @@ function getStaveCount(score, partIndex = 0) {
1650
1650
  const part = score.parts[partIndex];
1651
1651
  if (!part) return 1;
1652
1652
  for (const measure of part.measures) {
1653
- if (_optionalChain([measure, 'access', _96 => _96.attributes, 'optionalAccess', _97 => _97.staves]) !== void 0) {
1653
+ if (_optionalChain([measure, 'access', _97 => _97.attributes, 'optionalAccess', _98 => _98.staves]) !== void 0) {
1654
1654
  return measure.attributes.staves;
1655
1655
  }
1656
1656
  }
@@ -687,8 +687,7 @@ interface PasteNotesOptions {
687
687
  * Paste notes from a NoteSelection to a target position.
688
688
  */
689
689
  declare function pasteNotes(score: Score, options: PasteNotesOptions): OperationResult<Score>;
690
- interface CutNotesOptions extends CopyNotesOptions {
691
- }
690
+ type CutNotesOptions = CopyNotesOptions;
692
691
  /**
693
692
  * Cut notes from a range (copy and delete).
694
693
  * Returns both the selection and the modified score.
@@ -687,8 +687,7 @@ interface PasteNotesOptions {
687
687
  * Paste notes from a NoteSelection to a target position.
688
688
  */
689
689
  declare function pasteNotes(score: Score, options: PasteNotesOptions): OperationResult<Score>;
690
- interface CutNotesOptions extends CopyNotesOptions {
691
- }
690
+ type CutNotesOptions = CopyNotesOptions;
692
691
  /**
693
692
  * Cut notes from a range (copy and delete).
694
693
  * Returns both the selection and the modified score.