musicxml-io 0.10.3 → 0.11.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.
package/dist/browser.js CHANGED
@@ -11,7 +11,7 @@
11
11
 
12
12
 
13
13
 
14
- var _chunk7UU6IQPMjs = require('./chunk-7UU6IQPM.js');
14
+ var _chunk7XEY7OWXjs = require('./chunk-7XEY7OWX.js');
15
15
 
16
16
 
17
17
 
@@ -517,4 +517,4 @@ var _chunkEWLB5X64js = require('./chunk-EWLB5X64.js');
517
517
 
518
518
 
519
519
 
520
- exports.ALL_COLOR_TARGETS = _chunkK7W4FSFVjs.ALL_COLOR_TARGETS; exports.STEPS = _chunkEWLB5X64js.STEPS; exports.STEP_SEMITONES = _chunkEWLB5X64js.STEP_SEMITONES; exports.ValidationException = _chunkK7W4FSFVjs.ValidationException; exports.addArticulation = _chunkK7W4FSFVjs.addArticulation; exports.addBeam = _chunkK7W4FSFVjs.addBeam; exports.addBowing = _chunkK7W4FSFVjs.addBowing; exports.addBreathMark = _chunkK7W4FSFVjs.addBreathMark; exports.addCaesura = _chunkK7W4FSFVjs.addCaesura; exports.addChord = _chunkK7W4FSFVjs.addChord; exports.addChordNote = _chunkK7W4FSFVjs.addChordNote; exports.addChordNoteChecked = _chunkK7W4FSFVjs.addChordNoteChecked; exports.addChordSymbol = _chunkK7W4FSFVjs.addChordSymbol; exports.addCoda = _chunkK7W4FSFVjs.addCoda; exports.addDaCapo = _chunkK7W4FSFVjs.addDaCapo; exports.addDalSegno = _chunkK7W4FSFVjs.addDalSegno; exports.addDynamics = _chunkK7W4FSFVjs.addDynamics; exports.addEnding = _chunkK7W4FSFVjs.addEnding; exports.addFermata = _chunkK7W4FSFVjs.addFermata; exports.addFine = _chunkK7W4FSFVjs.addFine; exports.addFingering = _chunkK7W4FSFVjs.addFingering; exports.addGraceNote = _chunkK7W4FSFVjs.addGraceNote; exports.addHarmony = _chunkK7W4FSFVjs.addHarmony; exports.addLyric = _chunkK7W4FSFVjs.addLyric; exports.addNote = _chunkK7W4FSFVjs.addNote; exports.addNoteChecked = _chunkK7W4FSFVjs.addNoteChecked; exports.addOctaveShift = _chunkK7W4FSFVjs.addOctaveShift; exports.addOrnament = _chunkK7W4FSFVjs.addOrnament; exports.addPart = _chunkK7W4FSFVjs.addPart; exports.addPedal = _chunkK7W4FSFVjs.addPedal; exports.addRehearsalMark = _chunkK7W4FSFVjs.addRehearsalMark; exports.addRepeat = _chunkK7W4FSFVjs.addRepeat; exports.addRepeatBarline = _chunkK7W4FSFVjs.addRepeatBarline; exports.addSegno = _chunkK7W4FSFVjs.addSegno; exports.addSlur = _chunkK7W4FSFVjs.addSlur; exports.addStringNumber = _chunkK7W4FSFVjs.addStringNumber; exports.addTempo = _chunkK7W4FSFVjs.addTempo; exports.addText = _chunkK7W4FSFVjs.addText; exports.addTextDirection = _chunkK7W4FSFVjs.addTextDirection; exports.addTie = _chunkK7W4FSFVjs.addTie; exports.addToCoda = _chunkK7W4FSFVjs.addToCoda; exports.addVoice = _chunkK7W4FSFVjs.addVoice; exports.addWedge = _chunkK7W4FSFVjs.addWedge; exports.assertMeasureValid = _chunkK7W4FSFVjs.assertMeasureValid; exports.assertValid = _chunkK7W4FSFVjs.assertValid; exports.autoBeam = _chunkK7W4FSFVjs.autoBeam; exports.buildVoiceToStaffMap = _chunkEWLB5X64js.buildVoiceToStaffMap; exports.buildVoiceToStaffMapForPart = _chunkEWLB5X64js.buildVoiceToStaffMapForPart; exports.changeBarline = _chunkK7W4FSFVjs.changeBarline; exports.changeClef = _chunkK7W4FSFVjs.changeClef; exports.changeKey = _chunkK7W4FSFVjs.changeKey; exports.changeNoteDuration = _chunkK7W4FSFVjs.changeNoteDuration; exports.changeTime = _chunkK7W4FSFVjs.changeTime; exports.clearColors = _chunkK7W4FSFVjs.clearColors; exports.convertToGrace = _chunkK7W4FSFVjs.convertToGrace; exports.copyNotes = _chunkK7W4FSFVjs.copyNotes; exports.copyNotesMultiMeasure = _chunkK7W4FSFVjs.copyNotesMultiMeasure; exports.countNotes = _chunkEWLB5X64js.countNotes; exports.createTuplet = _chunkK7W4FSFVjs.createTuplet; exports.cutNotes = _chunkK7W4FSFVjs.cutNotes; exports.deleteMeasure = _chunkK7W4FSFVjs.deleteMeasure; exports.deleteNote = _chunkK7W4FSFVjs.deleteNote; exports.deleteNoteChecked = _chunkK7W4FSFVjs.deleteNoteChecked; exports.duplicatePart = _chunkK7W4FSFVjs.duplicatePart; exports.exportMidi = _chunk7UU6IQPMjs.exportMidi; exports.exportMidiWithTimingMap = _chunk7UU6IQPMjs.exportMidiWithTimingMap; exports.extractPlaybackControls = _chunkEWLB5X64js.extractPlaybackControls; exports.findBarlines = _chunkEWLB5X64js.findBarlines; exports.findDirectionsByType = _chunkEWLB5X64js.findDirectionsByType; exports.findNotes = _chunkEWLB5X64js.findNotes; exports.findNotesWithNotation = _chunkEWLB5X64js.findNotesWithNotation; exports.formatLocation = _chunkK7W4FSFVjs.formatLocation; exports.generateId = _chunkK7W4FSFVjs.generateId; exports.generatePlaybackSequence = _chunkEWLB5X64js.generatePlaybackSequence; exports.generatePlaybackTimeline = _chunkEWLB5X64js.generatePlaybackTimeline; exports.getAbsolutePosition = _chunkEWLB5X64js.getAbsolutePosition; exports.getAdjacentNotes = _chunkEWLB5X64js.getAdjacentNotes; exports.getAllNotes = _chunkEWLB5X64js.getAllNotes; exports.getAllPartInfos = _chunkOEX7NVZNjs.getAllPartInfos; exports.getAttributesAtMeasure = _chunkEWLB5X64js.getAttributesAtMeasure; exports.getBeamGroups = _chunkEWLB5X64js.getBeamGroups; exports.getChordProgression = _chunkEWLB5X64js.getChordProgression; exports.getChords = _chunkEWLB5X64js.getChords; exports.getClefChanges = _chunkEWLB5X64js.getClefChanges; exports.getClefForStaff = _chunkEWLB5X64js.getClefForStaff; exports.getDirectionOfKind = _chunkOEX7NVZNjs.getDirectionOfKind; exports.getDirections = _chunkEWLB5X64js.getDirections; exports.getDirectionsAtPosition = _chunkEWLB5X64js.getDirectionsAtPosition; exports.getDirectionsOfKind = _chunkOEX7NVZNjs.getDirectionsOfKind; exports.getDivisions = _chunkEWLB5X64js.getDivisions; exports.getDuration = _chunkEWLB5X64js.getDuration; exports.getDynamics = _chunkEWLB5X64js.getDynamics; exports.getEffectiveStaff = _chunkEWLB5X64js.getEffectiveStaff; exports.getEndings = _chunkEWLB5X64js.getEndings; exports.getEntriesAtPosition = _chunkEWLB5X64js.getEntriesAtPosition; exports.getEntriesForStaff = _chunkEWLB5X64js.getEntriesForStaff; exports.getEntriesInRange = _chunkEWLB5X64js.getEntriesInRange; exports.getHarmonies = _chunkEWLB5X64js.getHarmonies; exports.getHarmonyAtPosition = _chunkEWLB5X64js.getHarmonyAtPosition; exports.getKeyChanges = _chunkEWLB5X64js.getKeyChanges; exports.getLyricText = _chunkEWLB5X64js.getLyricText; exports.getLyrics = _chunkEWLB5X64js.getLyrics; exports.getMeasure = _chunkEWLB5X64js.getMeasure; exports.getMeasureByIndex = _chunkEWLB5X64js.getMeasureByIndex; exports.getMeasureContext = _chunkK7W4FSFVjs.getMeasureContext; exports.getMeasureCount = _chunkEWLB5X64js.getMeasureCount; exports.getMeasureEndPosition = _chunkEWLB5X64js.getMeasureEndPosition; exports.getNextNote = _chunkEWLB5X64js.getNextNote; exports.getNormalizedDuration = _chunkEWLB5X64js.getNormalizedDuration; exports.getNormalizedPosition = _chunkEWLB5X64js.getNormalizedPosition; exports.getNotesAtPosition = _chunkEWLB5X64js.getNotesAtPosition; exports.getNotesForStaff = _chunkEWLB5X64js.getNotesForStaff; exports.getNotesForVoice = _chunkEWLB5X64js.getNotesForVoice; exports.getNotesInRange = _chunkEWLB5X64js.getNotesInRange; exports.getOctaveShifts = _chunkEWLB5X64js.getOctaveShifts; exports.getPartAbbreviation = _chunkOEX7NVZNjs.getPartAbbreviation; exports.getPartById = _chunkEWLB5X64js.getPartById; exports.getPartByIndex = _chunkEWLB5X64js.getPartByIndex; exports.getPartCount = _chunkEWLB5X64js.getPartCount; exports.getPartIds = _chunkEWLB5X64js.getPartIds; exports.getPartIndex = _chunkEWLB5X64js.getPartIndex; exports.getPartInfo = _chunkOEX7NVZNjs.getPartInfo; exports.getPartName = _chunkOEX7NVZNjs.getPartName; exports.getPartNameMap = _chunkOEX7NVZNjs.getPartNameMap; exports.getPedalMarkings = _chunkEWLB5X64js.getPedalMarkings; exports.getPrevNote = _chunkEWLB5X64js.getPrevNote; exports.getRepeatStructure = _chunkEWLB5X64js.getRepeatStructure; exports.getSlurSpans = _chunkEWLB5X64js.getSlurSpans; exports.getSoundDamperPedal = _chunkOEX7NVZNjs.getSoundDamperPedal; exports.getSoundDynamics = _chunkOEX7NVZNjs.getSoundDynamics; exports.getSoundSoftPedal = _chunkOEX7NVZNjs.getSoundSoftPedal; exports.getSoundSostenutoPedal = _chunkOEX7NVZNjs.getSoundSostenutoPedal; exports.getSoundTempo = _chunkOEX7NVZNjs.getSoundTempo; exports.getStaffRange = _chunkEWLB5X64js.getStaffRange; exports.getStaveCount = _chunkEWLB5X64js.getStaveCount; exports.getStaves = _chunkEWLB5X64js.getStaves; exports.getStructuralChanges = _chunkEWLB5X64js.getStructuralChanges; exports.getTempoMarkings = _chunkEWLB5X64js.getTempoMarkings; exports.getTiedNoteGroups = _chunkEWLB5X64js.getTiedNoteGroups; exports.getTimeChanges = _chunkEWLB5X64js.getTimeChanges; exports.getTupletGroups = _chunkEWLB5X64js.getTupletGroups; exports.getVerseCount = _chunkEWLB5X64js.getVerseCount; exports.getVerticalSlice = _chunkEWLB5X64js.getVerticalSlice; exports.getVoiceLine = _chunkEWLB5X64js.getVoiceLine; exports.getVoiceLineInRange = _chunkEWLB5X64js.getVoiceLineInRange; exports.getVoices = _chunkEWLB5X64js.getVoices; exports.getVoicesForStaff = _chunkEWLB5X64js.getVoicesForStaff; exports.getWedges = _chunkEWLB5X64js.getWedges; exports.groupByStaff = _chunkEWLB5X64js.groupByStaff; exports.groupByVoice = _chunkEWLB5X64js.groupByVoice; exports.hasBeam = _chunkOEX7NVZNjs.hasBeam; exports.hasDirectionOfKind = _chunkOEX7NVZNjs.hasDirectionOfKind; exports.hasLyrics = _chunkOEX7NVZNjs.hasLyrics; exports.hasMultipleStaves = _chunkEWLB5X64js.hasMultipleStaves; exports.hasNotations = _chunkOEX7NVZNjs.hasNotations; exports.hasNotes = _chunkEWLB5X64js.hasNotes; exports.hasPlaybackControls = _chunkEWLB5X64js.hasPlaybackControls; exports.hasTie = _chunkOEX7NVZNjs.hasTie; exports.hasTieStart = _chunkOEX7NVZNjs.hasTieStart; exports.hasTieStop = _chunkOEX7NVZNjs.hasTieStop; exports.hasTuplet = _chunkOEX7NVZNjs.hasTuplet; exports.inferStaff = _chunkEWLB5X64js.inferStaff; exports.insertClefChange = _chunkK7W4FSFVjs.insertClefChange; exports.insertMeasure = _chunkK7W4FSFVjs.insertMeasure; exports.insertNote = _chunkK7W4FSFVjs.insertNote; exports.isChordNote = _chunkOEX7NVZNjs.isChordNote; exports.isCompressed = _chunk7UU6IQPMjs.isCompressed; exports.isCueNote = _chunkOEX7NVZNjs.isCueNote; exports.isGraceNote = _chunkOEX7NVZNjs.isGraceNote; exports.isPartInfo = _chunkOEX7NVZNjs.isPartInfo; exports.isPitchedNote = _chunkOEX7NVZNjs.isPitchedNote; exports.isRest = _chunkOEX7NVZNjs.isRest; exports.isRestMeasure = _chunkEWLB5X64js.isRestMeasure; exports.isUnpitchedNote = _chunkOEX7NVZNjs.isUnpitchedNote; exports.isValid = _chunkK7W4FSFVjs.isValid; exports.iterateEntries = _chunkEWLB5X64js.iterateEntries; exports.iterateNotes = _chunkEWLB5X64js.iterateNotes; exports.lowerAccidental = _chunkK7W4FSFVjs.lowerAccidental; exports.measureRoundtrip = _chunkEWLB5X64js.measureRoundtrip; exports.modifyDynamics = _chunkK7W4FSFVjs.modifyDynamics; exports.modifyNoteDuration = _chunkK7W4FSFVjs.modifyNoteDuration; exports.modifyNoteDurationChecked = _chunkK7W4FSFVjs.modifyNoteDurationChecked; exports.modifyNotePitch = _chunkK7W4FSFVjs.modifyNotePitch; exports.modifyNotePitchChecked = _chunkK7W4FSFVjs.modifyNotePitchChecked; exports.modifyTempo = _chunkK7W4FSFVjs.modifyTempo; exports.moveNoteToStaff = _chunkK7W4FSFVjs.moveNoteToStaff; exports.parse = _chunk7UU6IQPMjs.parse; exports.parseAbc = _chunk7UU6IQPMjs.parseAbc; exports.parseAbcTunes = _chunk7UU6IQPMjs.parseAbcTunes; exports.parseAuto = _chunk7UU6IQPMjs.parseAuto; exports.parseCompressed = _chunk7UU6IQPMjs.parseCompressed; exports.pasteNotes = _chunkK7W4FSFVjs.pasteNotes; exports.pasteNotesMultiMeasure = _chunkK7W4FSFVjs.pasteNotesMultiMeasure; exports.pitchToSemitone = _chunkEWLB5X64js.pitchToSemitone; exports.raiseAccidental = _chunkK7W4FSFVjs.raiseAccidental; exports.removeArticulation = _chunkK7W4FSFVjs.removeArticulation; exports.removeBeam = _chunkK7W4FSFVjs.removeBeam; exports.removeBowing = _chunkK7W4FSFVjs.removeBowing; exports.removeBreathMark = _chunkK7W4FSFVjs.removeBreathMark; exports.removeCaesura = _chunkK7W4FSFVjs.removeCaesura; exports.removeChordSymbol = _chunkK7W4FSFVjs.removeChordSymbol; exports.removeDynamics = _chunkK7W4FSFVjs.removeDynamics; exports.removeEnding = _chunkK7W4FSFVjs.removeEnding; exports.removeFermata = _chunkK7W4FSFVjs.removeFermata; exports.removeFingering = _chunkK7W4FSFVjs.removeFingering; exports.removeGraceNote = _chunkK7W4FSFVjs.removeGraceNote; exports.removeHarmony = _chunkK7W4FSFVjs.removeHarmony; exports.removeLyric = _chunkK7W4FSFVjs.removeLyric; exports.removeNote = _chunkK7W4FSFVjs.removeNote; exports.removeOctaveShift = _chunkK7W4FSFVjs.removeOctaveShift; exports.removeOrnament = _chunkK7W4FSFVjs.removeOrnament; exports.removePart = _chunkK7W4FSFVjs.removePart; exports.removePedal = _chunkK7W4FSFVjs.removePedal; exports.removeRepeat = _chunkK7W4FSFVjs.removeRepeat; exports.removeRepeatBarline = _chunkK7W4FSFVjs.removeRepeatBarline; exports.removeSlur = _chunkK7W4FSFVjs.removeSlur; exports.removeStringNumber = _chunkK7W4FSFVjs.removeStringNumber; exports.removeTempo = _chunkK7W4FSFVjs.removeTempo; exports.removeTie = _chunkK7W4FSFVjs.removeTie; exports.removeTuplet = _chunkK7W4FSFVjs.removeTuplet; exports.removeWedge = _chunkK7W4FSFVjs.removeWedge; exports.scoresEqual = _chunkEWLB5X64js.scoresEqual; exports.serialize = _chunk7UU6IQPMjs.serialize; exports.serializeAbc = _chunk7UU6IQPMjs.serializeAbc; exports.serializeAbcTunes = _chunk7UU6IQPMjs.serializeAbcTunes; exports.serializeCompressed = _chunk7UU6IQPMjs.serializeCompressed; exports.setBarline = _chunkK7W4FSFVjs.setBarline; exports.setBeaming = _chunkK7W4FSFVjs.setBeaming; exports.setColor = _chunkK7W4FSFVjs.setColor; exports.setNotePitch = _chunkK7W4FSFVjs.setNotePitch; exports.setNotePitchBySemitone = _chunkK7W4FSFVjs.setNotePitchBySemitone; exports.setStaves = _chunkK7W4FSFVjs.setStaves; exports.shiftNotePitch = _chunkK7W4FSFVjs.shiftNotePitch; exports.stopOctaveShift = _chunkK7W4FSFVjs.stopOctaveShift; exports.transpose = _chunkK7W4FSFVjs.transpose; exports.transposeChecked = _chunkK7W4FSFVjs.transposeChecked; exports.updateChordSymbol = _chunkK7W4FSFVjs.updateChordSymbol; exports.updateHarmony = _chunkK7W4FSFVjs.updateHarmony; exports.updateLyric = _chunkK7W4FSFVjs.updateLyric; exports.validate = _chunkK7W4FSFVjs.validate; exports.validateBackupForward = _chunkK7W4FSFVjs.validateBackupForward; exports.validateBeams = _chunkK7W4FSFVjs.validateBeams; exports.validateDivisions = _chunkK7W4FSFVjs.validateDivisions; exports.validateMeasureDuration = _chunkK7W4FSFVjs.validateMeasureDuration; exports.validateMeasureLocal = _chunkK7W4FSFVjs.validateMeasureLocal; exports.validatePartReferences = _chunkK7W4FSFVjs.validatePartReferences; exports.validatePartStructure = _chunkK7W4FSFVjs.validatePartStructure; exports.validateSlurs = _chunkK7W4FSFVjs.validateSlurs; exports.validateSlursAcrossMeasures = _chunkK7W4FSFVjs.validateSlursAcrossMeasures; exports.validateStaffStructure = _chunkK7W4FSFVjs.validateStaffStructure; exports.validateTies = _chunkK7W4FSFVjs.validateTies; exports.validateTiesAcrossMeasures = _chunkK7W4FSFVjs.validateTiesAcrossMeasures; exports.validateTuplets = _chunkK7W4FSFVjs.validateTuplets; exports.validateVoiceStaff = _chunkK7W4FSFVjs.validateVoiceStaff; exports.withAbsolutePositions = _chunkEWLB5X64js.withAbsolutePositions;
520
+ exports.ALL_COLOR_TARGETS = _chunkK7W4FSFVjs.ALL_COLOR_TARGETS; exports.STEPS = _chunkEWLB5X64js.STEPS; exports.STEP_SEMITONES = _chunkEWLB5X64js.STEP_SEMITONES; exports.ValidationException = _chunkK7W4FSFVjs.ValidationException; exports.addArticulation = _chunkK7W4FSFVjs.addArticulation; exports.addBeam = _chunkK7W4FSFVjs.addBeam; exports.addBowing = _chunkK7W4FSFVjs.addBowing; exports.addBreathMark = _chunkK7W4FSFVjs.addBreathMark; exports.addCaesura = _chunkK7W4FSFVjs.addCaesura; exports.addChord = _chunkK7W4FSFVjs.addChord; exports.addChordNote = _chunkK7W4FSFVjs.addChordNote; exports.addChordNoteChecked = _chunkK7W4FSFVjs.addChordNoteChecked; exports.addChordSymbol = _chunkK7W4FSFVjs.addChordSymbol; exports.addCoda = _chunkK7W4FSFVjs.addCoda; exports.addDaCapo = _chunkK7W4FSFVjs.addDaCapo; exports.addDalSegno = _chunkK7W4FSFVjs.addDalSegno; exports.addDynamics = _chunkK7W4FSFVjs.addDynamics; exports.addEnding = _chunkK7W4FSFVjs.addEnding; exports.addFermata = _chunkK7W4FSFVjs.addFermata; exports.addFine = _chunkK7W4FSFVjs.addFine; exports.addFingering = _chunkK7W4FSFVjs.addFingering; exports.addGraceNote = _chunkK7W4FSFVjs.addGraceNote; exports.addHarmony = _chunkK7W4FSFVjs.addHarmony; exports.addLyric = _chunkK7W4FSFVjs.addLyric; exports.addNote = _chunkK7W4FSFVjs.addNote; exports.addNoteChecked = _chunkK7W4FSFVjs.addNoteChecked; exports.addOctaveShift = _chunkK7W4FSFVjs.addOctaveShift; exports.addOrnament = _chunkK7W4FSFVjs.addOrnament; exports.addPart = _chunkK7W4FSFVjs.addPart; exports.addPedal = _chunkK7W4FSFVjs.addPedal; exports.addRehearsalMark = _chunkK7W4FSFVjs.addRehearsalMark; exports.addRepeat = _chunkK7W4FSFVjs.addRepeat; exports.addRepeatBarline = _chunkK7W4FSFVjs.addRepeatBarline; exports.addSegno = _chunkK7W4FSFVjs.addSegno; exports.addSlur = _chunkK7W4FSFVjs.addSlur; exports.addStringNumber = _chunkK7W4FSFVjs.addStringNumber; exports.addTempo = _chunkK7W4FSFVjs.addTempo; exports.addText = _chunkK7W4FSFVjs.addText; exports.addTextDirection = _chunkK7W4FSFVjs.addTextDirection; exports.addTie = _chunkK7W4FSFVjs.addTie; exports.addToCoda = _chunkK7W4FSFVjs.addToCoda; exports.addVoice = _chunkK7W4FSFVjs.addVoice; exports.addWedge = _chunkK7W4FSFVjs.addWedge; exports.assertMeasureValid = _chunkK7W4FSFVjs.assertMeasureValid; exports.assertValid = _chunkK7W4FSFVjs.assertValid; exports.autoBeam = _chunkK7W4FSFVjs.autoBeam; exports.buildVoiceToStaffMap = _chunkEWLB5X64js.buildVoiceToStaffMap; exports.buildVoiceToStaffMapForPart = _chunkEWLB5X64js.buildVoiceToStaffMapForPart; exports.changeBarline = _chunkK7W4FSFVjs.changeBarline; exports.changeClef = _chunkK7W4FSFVjs.changeClef; exports.changeKey = _chunkK7W4FSFVjs.changeKey; exports.changeNoteDuration = _chunkK7W4FSFVjs.changeNoteDuration; exports.changeTime = _chunkK7W4FSFVjs.changeTime; exports.clearColors = _chunkK7W4FSFVjs.clearColors; exports.convertToGrace = _chunkK7W4FSFVjs.convertToGrace; exports.copyNotes = _chunkK7W4FSFVjs.copyNotes; exports.copyNotesMultiMeasure = _chunkK7W4FSFVjs.copyNotesMultiMeasure; exports.countNotes = _chunkEWLB5X64js.countNotes; exports.createTuplet = _chunkK7W4FSFVjs.createTuplet; exports.cutNotes = _chunkK7W4FSFVjs.cutNotes; exports.deleteMeasure = _chunkK7W4FSFVjs.deleteMeasure; exports.deleteNote = _chunkK7W4FSFVjs.deleteNote; exports.deleteNoteChecked = _chunkK7W4FSFVjs.deleteNoteChecked; exports.duplicatePart = _chunkK7W4FSFVjs.duplicatePart; exports.exportMidi = _chunk7XEY7OWXjs.exportMidi; exports.exportMidiWithTimingMap = _chunk7XEY7OWXjs.exportMidiWithTimingMap; exports.extractPlaybackControls = _chunkEWLB5X64js.extractPlaybackControls; exports.findBarlines = _chunkEWLB5X64js.findBarlines; exports.findDirectionsByType = _chunkEWLB5X64js.findDirectionsByType; exports.findNotes = _chunkEWLB5X64js.findNotes; exports.findNotesWithNotation = _chunkEWLB5X64js.findNotesWithNotation; exports.formatLocation = _chunkK7W4FSFVjs.formatLocation; exports.generateId = _chunkK7W4FSFVjs.generateId; exports.generatePlaybackSequence = _chunkEWLB5X64js.generatePlaybackSequence; exports.generatePlaybackTimeline = _chunkEWLB5X64js.generatePlaybackTimeline; exports.getAbsolutePosition = _chunkEWLB5X64js.getAbsolutePosition; exports.getAdjacentNotes = _chunkEWLB5X64js.getAdjacentNotes; exports.getAllNotes = _chunkEWLB5X64js.getAllNotes; exports.getAllPartInfos = _chunkOEX7NVZNjs.getAllPartInfos; exports.getAttributesAtMeasure = _chunkEWLB5X64js.getAttributesAtMeasure; exports.getBeamGroups = _chunkEWLB5X64js.getBeamGroups; exports.getChordProgression = _chunkEWLB5X64js.getChordProgression; exports.getChords = _chunkEWLB5X64js.getChords; exports.getClefChanges = _chunkEWLB5X64js.getClefChanges; exports.getClefForStaff = _chunkEWLB5X64js.getClefForStaff; exports.getDirectionOfKind = _chunkOEX7NVZNjs.getDirectionOfKind; exports.getDirections = _chunkEWLB5X64js.getDirections; exports.getDirectionsAtPosition = _chunkEWLB5X64js.getDirectionsAtPosition; exports.getDirectionsOfKind = _chunkOEX7NVZNjs.getDirectionsOfKind; exports.getDivisions = _chunkEWLB5X64js.getDivisions; exports.getDuration = _chunkEWLB5X64js.getDuration; exports.getDynamics = _chunkEWLB5X64js.getDynamics; exports.getEffectiveStaff = _chunkEWLB5X64js.getEffectiveStaff; exports.getEndings = _chunkEWLB5X64js.getEndings; exports.getEntriesAtPosition = _chunkEWLB5X64js.getEntriesAtPosition; exports.getEntriesForStaff = _chunkEWLB5X64js.getEntriesForStaff; exports.getEntriesInRange = _chunkEWLB5X64js.getEntriesInRange; exports.getHarmonies = _chunkEWLB5X64js.getHarmonies; exports.getHarmonyAtPosition = _chunkEWLB5X64js.getHarmonyAtPosition; exports.getKeyChanges = _chunkEWLB5X64js.getKeyChanges; exports.getLyricText = _chunkEWLB5X64js.getLyricText; exports.getLyrics = _chunkEWLB5X64js.getLyrics; exports.getMeasure = _chunkEWLB5X64js.getMeasure; exports.getMeasureByIndex = _chunkEWLB5X64js.getMeasureByIndex; exports.getMeasureContext = _chunkK7W4FSFVjs.getMeasureContext; exports.getMeasureCount = _chunkEWLB5X64js.getMeasureCount; exports.getMeasureEndPosition = _chunkEWLB5X64js.getMeasureEndPosition; exports.getNextNote = _chunkEWLB5X64js.getNextNote; exports.getNormalizedDuration = _chunkEWLB5X64js.getNormalizedDuration; exports.getNormalizedPosition = _chunkEWLB5X64js.getNormalizedPosition; exports.getNotesAtPosition = _chunkEWLB5X64js.getNotesAtPosition; exports.getNotesForStaff = _chunkEWLB5X64js.getNotesForStaff; exports.getNotesForVoice = _chunkEWLB5X64js.getNotesForVoice; exports.getNotesInRange = _chunkEWLB5X64js.getNotesInRange; exports.getOctaveShifts = _chunkEWLB5X64js.getOctaveShifts; exports.getPartAbbreviation = _chunkOEX7NVZNjs.getPartAbbreviation; exports.getPartById = _chunkEWLB5X64js.getPartById; exports.getPartByIndex = _chunkEWLB5X64js.getPartByIndex; exports.getPartCount = _chunkEWLB5X64js.getPartCount; exports.getPartIds = _chunkEWLB5X64js.getPartIds; exports.getPartIndex = _chunkEWLB5X64js.getPartIndex; exports.getPartInfo = _chunkOEX7NVZNjs.getPartInfo; exports.getPartName = _chunkOEX7NVZNjs.getPartName; exports.getPartNameMap = _chunkOEX7NVZNjs.getPartNameMap; exports.getPedalMarkings = _chunkEWLB5X64js.getPedalMarkings; exports.getPrevNote = _chunkEWLB5X64js.getPrevNote; exports.getRepeatStructure = _chunkEWLB5X64js.getRepeatStructure; exports.getSlurSpans = _chunkEWLB5X64js.getSlurSpans; exports.getSoundDamperPedal = _chunkOEX7NVZNjs.getSoundDamperPedal; exports.getSoundDynamics = _chunkOEX7NVZNjs.getSoundDynamics; exports.getSoundSoftPedal = _chunkOEX7NVZNjs.getSoundSoftPedal; exports.getSoundSostenutoPedal = _chunkOEX7NVZNjs.getSoundSostenutoPedal; exports.getSoundTempo = _chunkOEX7NVZNjs.getSoundTempo; exports.getStaffRange = _chunkEWLB5X64js.getStaffRange; exports.getStaveCount = _chunkEWLB5X64js.getStaveCount; exports.getStaves = _chunkEWLB5X64js.getStaves; exports.getStructuralChanges = _chunkEWLB5X64js.getStructuralChanges; exports.getTempoMarkings = _chunkEWLB5X64js.getTempoMarkings; exports.getTiedNoteGroups = _chunkEWLB5X64js.getTiedNoteGroups; exports.getTimeChanges = _chunkEWLB5X64js.getTimeChanges; exports.getTupletGroups = _chunkEWLB5X64js.getTupletGroups; exports.getVerseCount = _chunkEWLB5X64js.getVerseCount; exports.getVerticalSlice = _chunkEWLB5X64js.getVerticalSlice; exports.getVoiceLine = _chunkEWLB5X64js.getVoiceLine; exports.getVoiceLineInRange = _chunkEWLB5X64js.getVoiceLineInRange; exports.getVoices = _chunkEWLB5X64js.getVoices; exports.getVoicesForStaff = _chunkEWLB5X64js.getVoicesForStaff; exports.getWedges = _chunkEWLB5X64js.getWedges; exports.groupByStaff = _chunkEWLB5X64js.groupByStaff; exports.groupByVoice = _chunkEWLB5X64js.groupByVoice; exports.hasBeam = _chunkOEX7NVZNjs.hasBeam; exports.hasDirectionOfKind = _chunkOEX7NVZNjs.hasDirectionOfKind; exports.hasLyrics = _chunkOEX7NVZNjs.hasLyrics; exports.hasMultipleStaves = _chunkEWLB5X64js.hasMultipleStaves; exports.hasNotations = _chunkOEX7NVZNjs.hasNotations; exports.hasNotes = _chunkEWLB5X64js.hasNotes; exports.hasPlaybackControls = _chunkEWLB5X64js.hasPlaybackControls; exports.hasTie = _chunkOEX7NVZNjs.hasTie; exports.hasTieStart = _chunkOEX7NVZNjs.hasTieStart; exports.hasTieStop = _chunkOEX7NVZNjs.hasTieStop; exports.hasTuplet = _chunkOEX7NVZNjs.hasTuplet; exports.inferStaff = _chunkEWLB5X64js.inferStaff; exports.insertClefChange = _chunkK7W4FSFVjs.insertClefChange; exports.insertMeasure = _chunkK7W4FSFVjs.insertMeasure; exports.insertNote = _chunkK7W4FSFVjs.insertNote; exports.isChordNote = _chunkOEX7NVZNjs.isChordNote; exports.isCompressed = _chunk7XEY7OWXjs.isCompressed; exports.isCueNote = _chunkOEX7NVZNjs.isCueNote; exports.isGraceNote = _chunkOEX7NVZNjs.isGraceNote; exports.isPartInfo = _chunkOEX7NVZNjs.isPartInfo; exports.isPitchedNote = _chunkOEX7NVZNjs.isPitchedNote; exports.isRest = _chunkOEX7NVZNjs.isRest; exports.isRestMeasure = _chunkEWLB5X64js.isRestMeasure; exports.isUnpitchedNote = _chunkOEX7NVZNjs.isUnpitchedNote; exports.isValid = _chunkK7W4FSFVjs.isValid; exports.iterateEntries = _chunkEWLB5X64js.iterateEntries; exports.iterateNotes = _chunkEWLB5X64js.iterateNotes; exports.lowerAccidental = _chunkK7W4FSFVjs.lowerAccidental; exports.measureRoundtrip = _chunkEWLB5X64js.measureRoundtrip; exports.modifyDynamics = _chunkK7W4FSFVjs.modifyDynamics; exports.modifyNoteDuration = _chunkK7W4FSFVjs.modifyNoteDuration; exports.modifyNoteDurationChecked = _chunkK7W4FSFVjs.modifyNoteDurationChecked; exports.modifyNotePitch = _chunkK7W4FSFVjs.modifyNotePitch; exports.modifyNotePitchChecked = _chunkK7W4FSFVjs.modifyNotePitchChecked; exports.modifyTempo = _chunkK7W4FSFVjs.modifyTempo; exports.moveNoteToStaff = _chunkK7W4FSFVjs.moveNoteToStaff; exports.parse = _chunk7XEY7OWXjs.parse; exports.parseAbc = _chunk7XEY7OWXjs.parseAbc; exports.parseAbcTunes = _chunk7XEY7OWXjs.parseAbcTunes; exports.parseAuto = _chunk7XEY7OWXjs.parseAuto; exports.parseCompressed = _chunk7XEY7OWXjs.parseCompressed; exports.pasteNotes = _chunkK7W4FSFVjs.pasteNotes; exports.pasteNotesMultiMeasure = _chunkK7W4FSFVjs.pasteNotesMultiMeasure; exports.pitchToSemitone = _chunkEWLB5X64js.pitchToSemitone; exports.raiseAccidental = _chunkK7W4FSFVjs.raiseAccidental; exports.removeArticulation = _chunkK7W4FSFVjs.removeArticulation; exports.removeBeam = _chunkK7W4FSFVjs.removeBeam; exports.removeBowing = _chunkK7W4FSFVjs.removeBowing; exports.removeBreathMark = _chunkK7W4FSFVjs.removeBreathMark; exports.removeCaesura = _chunkK7W4FSFVjs.removeCaesura; exports.removeChordSymbol = _chunkK7W4FSFVjs.removeChordSymbol; exports.removeDynamics = _chunkK7W4FSFVjs.removeDynamics; exports.removeEnding = _chunkK7W4FSFVjs.removeEnding; exports.removeFermata = _chunkK7W4FSFVjs.removeFermata; exports.removeFingering = _chunkK7W4FSFVjs.removeFingering; exports.removeGraceNote = _chunkK7W4FSFVjs.removeGraceNote; exports.removeHarmony = _chunkK7W4FSFVjs.removeHarmony; exports.removeLyric = _chunkK7W4FSFVjs.removeLyric; exports.removeNote = _chunkK7W4FSFVjs.removeNote; exports.removeOctaveShift = _chunkK7W4FSFVjs.removeOctaveShift; exports.removeOrnament = _chunkK7W4FSFVjs.removeOrnament; exports.removePart = _chunkK7W4FSFVjs.removePart; exports.removePedal = _chunkK7W4FSFVjs.removePedal; exports.removeRepeat = _chunkK7W4FSFVjs.removeRepeat; exports.removeRepeatBarline = _chunkK7W4FSFVjs.removeRepeatBarline; exports.removeSlur = _chunkK7W4FSFVjs.removeSlur; exports.removeStringNumber = _chunkK7W4FSFVjs.removeStringNumber; exports.removeTempo = _chunkK7W4FSFVjs.removeTempo; exports.removeTie = _chunkK7W4FSFVjs.removeTie; exports.removeTuplet = _chunkK7W4FSFVjs.removeTuplet; exports.removeWedge = _chunkK7W4FSFVjs.removeWedge; exports.scoresEqual = _chunkEWLB5X64js.scoresEqual; exports.serialize = _chunk7XEY7OWXjs.serialize; exports.serializeAbc = _chunk7XEY7OWXjs.serializeAbc; exports.serializeAbcTunes = _chunk7XEY7OWXjs.serializeAbcTunes; exports.serializeCompressed = _chunk7XEY7OWXjs.serializeCompressed; exports.setBarline = _chunkK7W4FSFVjs.setBarline; exports.setBeaming = _chunkK7W4FSFVjs.setBeaming; exports.setColor = _chunkK7W4FSFVjs.setColor; exports.setNotePitch = _chunkK7W4FSFVjs.setNotePitch; exports.setNotePitchBySemitone = _chunkK7W4FSFVjs.setNotePitchBySemitone; exports.setStaves = _chunkK7W4FSFVjs.setStaves; exports.shiftNotePitch = _chunkK7W4FSFVjs.shiftNotePitch; exports.stopOctaveShift = _chunkK7W4FSFVjs.stopOctaveShift; exports.transpose = _chunkK7W4FSFVjs.transpose; exports.transposeChecked = _chunkK7W4FSFVjs.transposeChecked; exports.updateChordSymbol = _chunkK7W4FSFVjs.updateChordSymbol; exports.updateHarmony = _chunkK7W4FSFVjs.updateHarmony; exports.updateLyric = _chunkK7W4FSFVjs.updateLyric; exports.validate = _chunkK7W4FSFVjs.validate; exports.validateBackupForward = _chunkK7W4FSFVjs.validateBackupForward; exports.validateBeams = _chunkK7W4FSFVjs.validateBeams; exports.validateDivisions = _chunkK7W4FSFVjs.validateDivisions; exports.validateMeasureDuration = _chunkK7W4FSFVjs.validateMeasureDuration; exports.validateMeasureLocal = _chunkK7W4FSFVjs.validateMeasureLocal; exports.validatePartReferences = _chunkK7W4FSFVjs.validatePartReferences; exports.validatePartStructure = _chunkK7W4FSFVjs.validatePartStructure; exports.validateSlurs = _chunkK7W4FSFVjs.validateSlurs; exports.validateSlursAcrossMeasures = _chunkK7W4FSFVjs.validateSlursAcrossMeasures; exports.validateStaffStructure = _chunkK7W4FSFVjs.validateStaffStructure; exports.validateTies = _chunkK7W4FSFVjs.validateTies; exports.validateTiesAcrossMeasures = _chunkK7W4FSFVjs.validateTiesAcrossMeasures; exports.validateTuplets = _chunkK7W4FSFVjs.validateTuplets; exports.validateVoiceStaff = _chunkK7W4FSFVjs.validateVoiceStaff; exports.withAbsolutePositions = _chunkEWLB5X64js.withAbsolutePositions;
package/dist/browser.mjs CHANGED
@@ -11,7 +11,7 @@ import {
11
11
  serializeAbc,
12
12
  serializeAbcTunes,
13
13
  serializeCompressed
14
- } from "./chunk-WTKX7XCV.mjs";
14
+ } from "./chunk-FOG4AD6B.mjs";
15
15
  import {
16
16
  getAllPartInfos,
17
17
  getDirectionOfKind,
@@ -4166,6 +4166,12 @@ function buildMeasures(tokens, unitNote, keySignature, timeSignature, measureDur
4166
4166
  let pendingTimeChange = null;
4167
4167
  const lineBreaks = [];
4168
4168
  let pendingMultipleRest = null;
4169
+ let beamBreak = false;
4170
+ const beamBreakBefore = /* @__PURE__ */ new WeakSet();
4171
+ function markBeamBreak(entry) {
4172
+ if (beamBreak) beamBreakBefore.add(entry);
4173
+ beamBreak = false;
4174
+ }
4169
4175
  function flushPendingPreNoteItems() {
4170
4176
  for (const item of pendingPreNoteItems) {
4171
4177
  currentEntries.push(item);
@@ -4184,6 +4190,7 @@ function buildMeasures(tokens, unitNote, keySignature, timeSignature, measureDur
4184
4190
  number: String(measureNumber),
4185
4191
  entries: currentEntries
4186
4192
  };
4193
+ assignAbcBeams(currentEntries, beamBreakBefore);
4187
4194
  if (isFirstMeasure) {
4188
4195
  measure.attributes = {
4189
4196
  _id: _chunkK7W4FSFVjs.generateId.call(void 0, ),
@@ -4291,6 +4298,7 @@ function buildMeasures(tokens, unitNote, keySignature, timeSignature, measureDur
4291
4298
  noteCountForLyrics++;
4292
4299
  }
4293
4300
  if (!inGrace) {
4301
+ markBeamBreak(entry);
4294
4302
  currentEntries.push(entry);
4295
4303
  currentPosition += entry.duration;
4296
4304
  if (tupletState) {
@@ -4379,6 +4387,7 @@ function buildMeasures(tokens, unitNote, keySignature, timeSignature, measureDur
4379
4387
  if (!entry.notations) entry.notations = [];
4380
4388
  entry.notations.push({ type: "tied", tiedType: "start" });
4381
4389
  }
4390
+ if (ci === 0 && !inGrace) markBeamBreak(entry);
4382
4391
  currentEntries.push(entry);
4383
4392
  if (ci === 0) {
4384
4393
  currentPosition += entry.duration;
@@ -4508,6 +4517,7 @@ function buildMeasures(tokens, unitNote, keySignature, timeSignature, measureDur
4508
4517
  }
4509
4518
  }
4510
4519
  pendingBrokenRhythm = token.value;
4520
+ beamBreak = false;
4511
4521
  break;
4512
4522
  }
4513
4523
  case "tuplet":
@@ -4603,8 +4613,10 @@ function buildMeasures(tokens, unitNote, keySignature, timeSignature, measureDur
4603
4613
  break;
4604
4614
  }
4605
4615
  case "space":
4616
+ if (!pendingBrokenRhythm) beamBreak = true;
4606
4617
  break;
4607
4618
  case "line_break": {
4619
+ beamBreak = true;
4608
4620
  flushPendingPreNoteItems();
4609
4621
  if (currentEntries.length > 0) {
4610
4622
  const breakText = token.value === "\\\n" ? "__abc_line_cont__" : "__abc_line_break__";
@@ -4666,6 +4678,65 @@ function applyLyricsToNotes(targetNotes, syllables, verse) {
4666
4678
  note.lyrics.push({ number: verse, text, syllabic });
4667
4679
  }
4668
4680
  }
4681
+ var BEAM_LEVELS = {
4682
+ eighth: 1,
4683
+ "16th": 2,
4684
+ "32nd": 3,
4685
+ "64th": 4,
4686
+ "128th": 5,
4687
+ "256th": 6,
4688
+ "512th": 7,
4689
+ "1024th": 8
4690
+ };
4691
+ function assignAbcBeams(entries, breakBefore) {
4692
+ const groups = [];
4693
+ let group = [];
4694
+ const close = () => {
4695
+ if (group.length >= 2) groups.push(group);
4696
+ group = [];
4697
+ };
4698
+ for (const e of entries) {
4699
+ if (e.type === "backup" || e.type === "forward") {
4700
+ close();
4701
+ continue;
4702
+ }
4703
+ if (e.type !== "note" || e.grace || e.chord) continue;
4704
+ const level = e.rest || !e.noteType ? 0 : _nullishCoalesce(BEAM_LEVELS[e.noteType], () => ( 0));
4705
+ if (level === 0) {
4706
+ close();
4707
+ continue;
4708
+ }
4709
+ if (breakBefore.has(e)) close();
4710
+ group.push(e);
4711
+ }
4712
+ close();
4713
+ for (const g of groups) {
4714
+ const levels = g.map((n) => BEAM_LEVELS[n.noteType]);
4715
+ const beams = g.map(() => []);
4716
+ const maxLevel = Math.max(...levels);
4717
+ for (let lv = 1; lv <= maxLevel; lv++) {
4718
+ for (let i = 0; i < g.length; ) {
4719
+ if (levels[i] < lv) {
4720
+ i++;
4721
+ continue;
4722
+ }
4723
+ let j = i;
4724
+ while (j + 1 < g.length && levels[j + 1] >= lv) j++;
4725
+ if (i === j) {
4726
+ beams[i].push({ number: lv, type: i === g.length - 1 ? "backward hook" : "forward hook" });
4727
+ } else {
4728
+ for (let k = i; k <= j; k++) {
4729
+ beams[k].push({ number: lv, type: k === i ? "begin" : k === j ? "end" : "continue" });
4730
+ }
4731
+ }
4732
+ i = j + 1;
4733
+ }
4734
+ }
4735
+ g.forEach((n, i) => {
4736
+ n.beam = beams[i];
4737
+ });
4738
+ }
4739
+ }
4669
4740
  function applyTieStops(measures) {
4670
4741
  const allNotes = [];
4671
4742
  for (const measure of measures) {
@@ -4708,7 +4779,7 @@ function createNoteEntry(token, unitNote, _hasTieStop, isGrace, tupletState, gra
4708
4779
  duration = Math.round(duration * tupletState.q / tupletState.p);
4709
4780
  }
4710
4781
  }
4711
- const { noteType, dots } = durationToNoteType(isGrace ? lengthToDuration(num, den, unitNote) : duration);
4782
+ const { noteType, dots } = durationToNoteType(lengthToDuration(num, den, unitNote));
4712
4783
  const pitch = token.pitch && octaveShift !== 0 ? { ...token.pitch, octave: token.pitch.octave + octaveShift } : token.pitch;
4713
4784
  const entry = {
4714
4785
  _id: _chunkK7W4FSFVjs.generateId.call(void 0, ),
@@ -4768,7 +4839,7 @@ function createRestEntry(token, unitNote, tupletState, measureDuration) {
4768
4839
  duration = Math.round(duration * tupletState.q / tupletState.p);
4769
4840
  }
4770
4841
  }
4771
- const { noteType, dots } = durationToNoteType(duration);
4842
+ const { noteType, dots } = durationToNoteType(isWholeMeasure ? duration : lengthToDuration(num, den, unitNote));
4772
4843
  const entry = {
4773
4844
  _id: _chunkK7W4FSFVjs.generateId.call(void 0, ),
4774
4845
  type: "note",
@@ -8110,8 +8181,22 @@ function serializeMeasureEntries(measure, divisions, unitNote, opts) {
8110
8181
  let inChord = false;
8111
8182
  let chordHasIndividualDurations = false;
8112
8183
  let tupletRemaining = 0;
8184
+ let prev = null;
8185
+ let prevEnd = 0;
8186
+ const flushChord = () => {
8187
+ parts.push("[" + chordPitches.join("") + "]" + chordDurationStr + chordTieStr + chordSlurEnd);
8188
+ if (prevEnd === -1) prevEnd = parts.length;
8189
+ inChord = false;
8190
+ chordHasIndividualDurations = false;
8191
+ chordPitches = [];
8192
+ chordDurationStr = "";
8193
+ chordTieStr = "";
8194
+ chordSlurStart = "";
8195
+ chordSlurEnd = "";
8196
+ };
8113
8197
  for (let ei = 0; ei < measure.entries.length; ei++) {
8114
8198
  const entry = measure.entries[ei];
8199
+ if (inChord && !(entry.type === "note" && entry.chord && !entry.grace)) flushChord();
8115
8200
  switch (entry.type) {
8116
8201
  case "note": {
8117
8202
  const note = entry;
@@ -8158,16 +8243,8 @@ function serializeMeasureEntries(measure, divisions, unitNote, opts) {
8158
8243
  chordPitches.push(chordNoteStr);
8159
8244
  break;
8160
8245
  }
8161
- if (inChord) {
8162
- parts.push("[" + chordPitches.join("") + "]" + chordDurationStr + chordTieStr + chordSlurEnd);
8163
- inChord = false;
8164
- chordHasIndividualDurations = false;
8165
- chordPitches = [];
8166
- chordDurationStr = "";
8167
- chordTieStr = "";
8168
- chordSlurStart = "";
8169
- chordSlurEnd = "";
8170
- }
8246
+ if (prev && breaksBeam(prev, note)) parts.splice(prevEnd, 0, " ");
8247
+ prev = note;
8171
8248
  if (note.lyrics && note.lyrics.length > 0 && opts.includeLyrics) {
8172
8249
  for (const lyric of note.lyrics) {
8173
8250
  if (!lyric.text) continue;
@@ -8259,10 +8336,12 @@ function serializeMeasureEntries(measure, divisions, unitNote, opts) {
8259
8336
  if (insertIdx < parts.length) {
8260
8337
  parts.splice(insertIdx, 0, chordSlurStart);
8261
8338
  parts.push(tupletPrefix + effectiveSerialized.decorations);
8339
+ prevEnd = -1;
8262
8340
  break;
8263
8341
  }
8264
8342
  }
8265
8343
  parts.push(tupletPrefix + chordSlurStart + effectiveSerialized.decorations);
8344
+ prevEnd = -1;
8266
8345
  break;
8267
8346
  }
8268
8347
  if (effectiveSerialized.slurStart) {
@@ -8279,11 +8358,12 @@ function serializeMeasureEntries(measure, divisions, unitNote, opts) {
8279
8358
  parts.splice(insertIdx, 0, effectiveSerialized.slurStart);
8280
8359
  const noteOnly = effectiveSerialized.decorations + effectiveSerialized.pitch + effectiveSerialized.duration + effectiveSerialized.tieStr + effectiveSerialized.slurEnd;
8281
8360
  parts.push(tupletPrefix + noteOnly);
8361
+ prevEnd = parts.length;
8282
8362
  break;
8283
8363
  }
8284
8364
  }
8285
8365
  const brokenResult = detectBrokenRhythm(measure.entries, ei, note, divisions, currentUnitNote);
8286
- if (brokenResult && !note.chord && !note.grace && !note.timeModification) {
8366
+ if (brokenResult && !note.chord && !note.grace && !note.timeModification && !breaksBeam(note, brokenResult.nextNote)) {
8287
8367
  const baseDurStr1 = formatAbcDuration(brokenResult.baseFrac.num, brokenResult.baseFrac.den);
8288
8368
  const pitchStr1 = effectiveSerialized.pitch;
8289
8369
  const tie1 = effectiveSerialized.tieStr;
@@ -8302,9 +8382,12 @@ function serializeMeasureEntries(measure, divisions, unitNote, opts) {
8302
8382
  }
8303
8383
  parts.push(pitchStr2 + baseDurStr1 + tieStr2 + slurEnd2 + slurE1);
8304
8384
  ei = brokenResult.nextIndex;
8385
+ prev = note2;
8386
+ prevEnd = parts.length;
8305
8387
  break;
8306
8388
  }
8307
8389
  parts.push(tupletPrefix + effectiveSerialized.full);
8390
+ prevEnd = parts.length;
8308
8391
  break;
8309
8392
  }
8310
8393
  case "harmony": {
@@ -8319,16 +8402,19 @@ function serializeMeasureEntries(measure, divisions, unitNote, opts) {
8319
8402
  if (dt.kind !== "words") continue;
8320
8403
  if (dt.text === "__abc_line_cont__") {
8321
8404
  parts.push("\\\n");
8405
+ prev = null;
8322
8406
  handledAsSpecial = true;
8323
8407
  break;
8324
8408
  }
8325
8409
  if (dt.text === "__abc_line_break__") {
8326
8410
  parts.push("\n");
8411
+ prev = null;
8327
8412
  handledAsSpecial = true;
8328
8413
  break;
8329
8414
  }
8330
8415
  if (dt.text.startsWith(ABC_BODY_FIELD_MARKER)) {
8331
8416
  parts.push("\n" + dt.text.slice(ABC_BODY_FIELD_MARKER.length));
8417
+ prev = null;
8332
8418
  handledAsSpecial = true;
8333
8419
  break;
8334
8420
  }
@@ -8356,21 +8442,32 @@ function serializeMeasureEntries(measure, divisions, unitNote, opts) {
8356
8442
  }
8357
8443
  case "backup":
8358
8444
  parts.push(" & ");
8445
+ prev = null;
8359
8446
  break;
8360
8447
  case "forward":
8448
+ prev = null;
8361
8449
  break;
8362
8450
  default:
8363
8451
  break;
8364
8452
  }
8365
8453
  }
8366
- if (inChord && chordPitches.length > 0) {
8367
- parts.push("[" + chordPitches.join("") + "]" + chordDurationStr + chordTieStr + chordSlurEnd);
8368
- }
8454
+ if (inChord && chordPitches.length > 0) flushChord();
8369
8455
  const unitNoteChanged = currentUnitNote.num !== unitNote.num || currentUnitNote.den !== unitNote.den;
8370
8456
  return { noteStr: parts.join(""), lyrics, updatedUnitNote: unitNoteChanged ? currentUnitNote : void 0 };
8371
8457
  }
8458
+ var BEAMABLE_TYPES = /* @__PURE__ */ new Set(["eighth", "16th", "32nd", "64th", "128th", "256th", "512th", "1024th"]);
8459
+ function breaksBeam(prev, cur) {
8460
+ if (prev.rest || cur.rest) return false;
8461
+ const beamable = (n) => n.noteType !== void 0 && BEAMABLE_TYPES.has(n.noteType);
8462
+ const p = _optionalChain([prev, 'access', _292 => _292.beam, 'optionalAccess', _293 => _293.find, 'call', _294 => _294((b) => b.number === 1), 'optionalAccess', _295 => _295.type]);
8463
+ const c = _optionalChain([cur, 'access', _296 => _296.beam, 'optionalAccess', _297 => _297.find, 'call', _298 => _298((b) => b.number === 1), 'optionalAccess', _299 => _299.type]);
8464
+ if (beamable(prev) && beamable(cur)) {
8465
+ return !(p === "begin" || p === "continue" || c === "continue" || c === "end");
8466
+ }
8467
+ return p !== void 0 || c !== void 0;
8468
+ }
8372
8469
  function multipleRestCount(measure) {
8373
- const styles = _optionalChain([measure, 'access', _292 => _292.attributes, 'optionalAccess', _293 => _293.measureStyle]);
8470
+ const styles = _optionalChain([measure, 'access', _300 => _300.attributes, 'optionalAccess', _301 => _301.measureStyle]);
8374
8471
  if (!styles) return 0;
8375
8472
  for (const style of styles) {
8376
8473
  if (style.multipleRest && style.multipleRest > 1) return style.multipleRest;
@@ -8435,14 +8532,14 @@ function detectChordPerNoteTies(entries, startIdx) {
8435
8532
  let totalCount = 1;
8436
8533
  const firstNote = entries[startIdx];
8437
8534
  if (firstNote.type === "note") {
8438
- const hasTieStart2 = _optionalChain([firstNote, 'access', _294 => _294.tie, 'optionalAccess', _295 => _295.type]) === "start" || _optionalChain([firstNote, 'access', _296 => _296.ties, 'optionalAccess', _297 => _297.some, 'call', _298 => _298((t) => t.type === "start")]);
8535
+ const hasTieStart2 = _optionalChain([firstNote, 'access', _302 => _302.tie, 'optionalAccess', _303 => _303.type]) === "start" || _optionalChain([firstNote, 'access', _304 => _304.ties, 'optionalAccess', _305 => _305.some, 'call', _306 => _306((t) => t.type === "start")]);
8439
8536
  if (hasTieStart2) tiedCount++;
8440
8537
  }
8441
8538
  for (let i = startIdx + 1; i < entries.length; i++) {
8442
8539
  const e = entries[i];
8443
8540
  if (e.type !== "note" || !e.chord) break;
8444
8541
  totalCount++;
8445
- const hasTieStart2 = _optionalChain([e, 'access', _299 => _299.tie, 'optionalAccess', _300 => _300.type]) === "start" || _optionalChain([e, 'access', _301 => _301.ties, 'optionalAccess', _302 => _302.some, 'call', _303 => _303((t) => t.type === "start")]);
8542
+ const hasTieStart2 = _optionalChain([e, 'access', _307 => _307.tie, 'optionalAccess', _308 => _308.type]) === "start" || _optionalChain([e, 'access', _309 => _309.ties, 'optionalAccess', _310 => _310.some, 'call', _311 => _311((t) => t.type === "start")]);
8446
8543
  if (hasTieStart2) tiedCount++;
8447
8544
  }
8448
8545
  return tiedCount > 1 || tiedCount > 0 && totalCount > 1;
@@ -8475,17 +8572,17 @@ function serializeNote2(note, divisions, unitNote, _inChord) {
8475
8572
  }
8476
8573
  } else if (note.grace) {
8477
8574
  if (note.pitch) {
8478
- pitchStr = serializePitch2(note.pitch, _optionalChain([note, 'access', _304 => _304.accidental, 'optionalAccess', _305 => _305.value]) === "natural");
8575
+ pitchStr = serializePitch2(note.pitch, _optionalChain([note, 'access', _312 => _312.accidental, 'optionalAccess', _313 => _313.value]) === "natural");
8479
8576
  }
8480
8577
  durationStr = "";
8481
8578
  } else if (note.pitch) {
8482
- pitchStr = serializePitch2(note.pitch, _optionalChain([note, 'access', _306 => _306.accidental, 'optionalAccess', _307 => _307.value]) === "natural");
8579
+ pitchStr = serializePitch2(note.pitch, _optionalChain([note, 'access', _314 => _314.accidental, 'optionalAccess', _315 => _315.value]) === "natural");
8483
8580
  const effectiveDuration = note.duration;
8484
8581
  const { num, den } = durationToAbcFraction(effectiveDuration, divisions, unitNote);
8485
8582
  durationStr = formatAbcDuration(num, den);
8486
8583
  }
8487
8584
  let tieStr = "";
8488
- if (_optionalChain([note, 'access', _308 => _308.tie, 'optionalAccess', _309 => _309.type]) === "start" || _optionalChain([note, 'access', _310 => _310.ties, 'optionalAccess', _311 => _311.some, 'call', _312 => _312((t) => t.type === "start")])) {
8585
+ if (_optionalChain([note, 'access', _316 => _316.tie, 'optionalAccess', _317 => _317.type]) === "start" || _optionalChain([note, 'access', _318 => _318.ties, 'optionalAccess', _319 => _319.some, 'call', _320 => _320((t) => t.type === "start")])) {
8489
8586
  tieStr = "-";
8490
8587
  }
8491
8588
  let slurStart = "";
@@ -8503,8 +8600,8 @@ function serializeNote2(note, divisions, unitNote, _inChord) {
8503
8600
  return { full, pitch: pitchStr, duration: durationStr, slurStart, slurEnd, tieStr, decorations };
8504
8601
  }
8505
8602
  function serializeBarline2(barline) {
8506
- const hasRepeatForward = _optionalChain([barline, 'access', _313 => _313.repeat, 'optionalAccess', _314 => _314.direction]) === "forward";
8507
- const hasRepeatBackward = _optionalChain([barline, 'access', _315 => _315.repeat, 'optionalAccess', _316 => _316.direction]) === "backward";
8603
+ const hasRepeatForward = _optionalChain([barline, 'access', _321 => _321.repeat, 'optionalAccess', _322 => _322.direction]) === "forward";
8604
+ const hasRepeatBackward = _optionalChain([barline, 'access', _323 => _323.repeat, 'optionalAccess', _324 => _324.direction]) === "backward";
8508
8605
  const hasEnding = barline.ending;
8509
8606
  let result = "";
8510
8607
  if (hasRepeatForward) {
@@ -4166,6 +4166,12 @@ function buildMeasures(tokens, unitNote, keySignature, timeSignature, measureDur
4166
4166
  let pendingTimeChange = null;
4167
4167
  const lineBreaks = [];
4168
4168
  let pendingMultipleRest = null;
4169
+ let beamBreak = false;
4170
+ const beamBreakBefore = /* @__PURE__ */ new WeakSet();
4171
+ function markBeamBreak(entry) {
4172
+ if (beamBreak) beamBreakBefore.add(entry);
4173
+ beamBreak = false;
4174
+ }
4169
4175
  function flushPendingPreNoteItems() {
4170
4176
  for (const item of pendingPreNoteItems) {
4171
4177
  currentEntries.push(item);
@@ -4184,6 +4190,7 @@ function buildMeasures(tokens, unitNote, keySignature, timeSignature, measureDur
4184
4190
  number: String(measureNumber),
4185
4191
  entries: currentEntries
4186
4192
  };
4193
+ assignAbcBeams(currentEntries, beamBreakBefore);
4187
4194
  if (isFirstMeasure) {
4188
4195
  measure.attributes = {
4189
4196
  _id: generateId(),
@@ -4291,6 +4298,7 @@ function buildMeasures(tokens, unitNote, keySignature, timeSignature, measureDur
4291
4298
  noteCountForLyrics++;
4292
4299
  }
4293
4300
  if (!inGrace) {
4301
+ markBeamBreak(entry);
4294
4302
  currentEntries.push(entry);
4295
4303
  currentPosition += entry.duration;
4296
4304
  if (tupletState) {
@@ -4379,6 +4387,7 @@ function buildMeasures(tokens, unitNote, keySignature, timeSignature, measureDur
4379
4387
  if (!entry.notations) entry.notations = [];
4380
4388
  entry.notations.push({ type: "tied", tiedType: "start" });
4381
4389
  }
4390
+ if (ci === 0 && !inGrace) markBeamBreak(entry);
4382
4391
  currentEntries.push(entry);
4383
4392
  if (ci === 0) {
4384
4393
  currentPosition += entry.duration;
@@ -4508,6 +4517,7 @@ function buildMeasures(tokens, unitNote, keySignature, timeSignature, measureDur
4508
4517
  }
4509
4518
  }
4510
4519
  pendingBrokenRhythm = token.value;
4520
+ beamBreak = false;
4511
4521
  break;
4512
4522
  }
4513
4523
  case "tuplet":
@@ -4603,8 +4613,10 @@ function buildMeasures(tokens, unitNote, keySignature, timeSignature, measureDur
4603
4613
  break;
4604
4614
  }
4605
4615
  case "space":
4616
+ if (!pendingBrokenRhythm) beamBreak = true;
4606
4617
  break;
4607
4618
  case "line_break": {
4619
+ beamBreak = true;
4608
4620
  flushPendingPreNoteItems();
4609
4621
  if (currentEntries.length > 0) {
4610
4622
  const breakText = token.value === "\\\n" ? "__abc_line_cont__" : "__abc_line_break__";
@@ -4666,6 +4678,65 @@ function applyLyricsToNotes(targetNotes, syllables, verse) {
4666
4678
  note.lyrics.push({ number: verse, text, syllabic });
4667
4679
  }
4668
4680
  }
4681
+ var BEAM_LEVELS = {
4682
+ eighth: 1,
4683
+ "16th": 2,
4684
+ "32nd": 3,
4685
+ "64th": 4,
4686
+ "128th": 5,
4687
+ "256th": 6,
4688
+ "512th": 7,
4689
+ "1024th": 8
4690
+ };
4691
+ function assignAbcBeams(entries, breakBefore) {
4692
+ const groups = [];
4693
+ let group = [];
4694
+ const close = () => {
4695
+ if (group.length >= 2) groups.push(group);
4696
+ group = [];
4697
+ };
4698
+ for (const e of entries) {
4699
+ if (e.type === "backup" || e.type === "forward") {
4700
+ close();
4701
+ continue;
4702
+ }
4703
+ if (e.type !== "note" || e.grace || e.chord) continue;
4704
+ const level = e.rest || !e.noteType ? 0 : BEAM_LEVELS[e.noteType] ?? 0;
4705
+ if (level === 0) {
4706
+ close();
4707
+ continue;
4708
+ }
4709
+ if (breakBefore.has(e)) close();
4710
+ group.push(e);
4711
+ }
4712
+ close();
4713
+ for (const g of groups) {
4714
+ const levels = g.map((n) => BEAM_LEVELS[n.noteType]);
4715
+ const beams = g.map(() => []);
4716
+ const maxLevel = Math.max(...levels);
4717
+ for (let lv = 1; lv <= maxLevel; lv++) {
4718
+ for (let i = 0; i < g.length; ) {
4719
+ if (levels[i] < lv) {
4720
+ i++;
4721
+ continue;
4722
+ }
4723
+ let j = i;
4724
+ while (j + 1 < g.length && levels[j + 1] >= lv) j++;
4725
+ if (i === j) {
4726
+ beams[i].push({ number: lv, type: i === g.length - 1 ? "backward hook" : "forward hook" });
4727
+ } else {
4728
+ for (let k = i; k <= j; k++) {
4729
+ beams[k].push({ number: lv, type: k === i ? "begin" : k === j ? "end" : "continue" });
4730
+ }
4731
+ }
4732
+ i = j + 1;
4733
+ }
4734
+ }
4735
+ g.forEach((n, i) => {
4736
+ n.beam = beams[i];
4737
+ });
4738
+ }
4739
+ }
4669
4740
  function applyTieStops(measures) {
4670
4741
  const allNotes = [];
4671
4742
  for (const measure of measures) {
@@ -4708,7 +4779,7 @@ function createNoteEntry(token, unitNote, _hasTieStop, isGrace, tupletState, gra
4708
4779
  duration = Math.round(duration * tupletState.q / tupletState.p);
4709
4780
  }
4710
4781
  }
4711
- const { noteType, dots } = durationToNoteType(isGrace ? lengthToDuration(num, den, unitNote) : duration);
4782
+ const { noteType, dots } = durationToNoteType(lengthToDuration(num, den, unitNote));
4712
4783
  const pitch = token.pitch && octaveShift !== 0 ? { ...token.pitch, octave: token.pitch.octave + octaveShift } : token.pitch;
4713
4784
  const entry = {
4714
4785
  _id: generateId(),
@@ -4768,7 +4839,7 @@ function createRestEntry(token, unitNote, tupletState, measureDuration) {
4768
4839
  duration = Math.round(duration * tupletState.q / tupletState.p);
4769
4840
  }
4770
4841
  }
4771
- const { noteType, dots } = durationToNoteType(duration);
4842
+ const { noteType, dots } = durationToNoteType(isWholeMeasure ? duration : lengthToDuration(num, den, unitNote));
4772
4843
  const entry = {
4773
4844
  _id: generateId(),
4774
4845
  type: "note",
@@ -8110,8 +8181,22 @@ function serializeMeasureEntries(measure, divisions, unitNote, opts) {
8110
8181
  let inChord = false;
8111
8182
  let chordHasIndividualDurations = false;
8112
8183
  let tupletRemaining = 0;
8184
+ let prev = null;
8185
+ let prevEnd = 0;
8186
+ const flushChord = () => {
8187
+ parts.push("[" + chordPitches.join("") + "]" + chordDurationStr + chordTieStr + chordSlurEnd);
8188
+ if (prevEnd === -1) prevEnd = parts.length;
8189
+ inChord = false;
8190
+ chordHasIndividualDurations = false;
8191
+ chordPitches = [];
8192
+ chordDurationStr = "";
8193
+ chordTieStr = "";
8194
+ chordSlurStart = "";
8195
+ chordSlurEnd = "";
8196
+ };
8113
8197
  for (let ei = 0; ei < measure.entries.length; ei++) {
8114
8198
  const entry = measure.entries[ei];
8199
+ if (inChord && !(entry.type === "note" && entry.chord && !entry.grace)) flushChord();
8115
8200
  switch (entry.type) {
8116
8201
  case "note": {
8117
8202
  const note = entry;
@@ -8158,16 +8243,8 @@ function serializeMeasureEntries(measure, divisions, unitNote, opts) {
8158
8243
  chordPitches.push(chordNoteStr);
8159
8244
  break;
8160
8245
  }
8161
- if (inChord) {
8162
- parts.push("[" + chordPitches.join("") + "]" + chordDurationStr + chordTieStr + chordSlurEnd);
8163
- inChord = false;
8164
- chordHasIndividualDurations = false;
8165
- chordPitches = [];
8166
- chordDurationStr = "";
8167
- chordTieStr = "";
8168
- chordSlurStart = "";
8169
- chordSlurEnd = "";
8170
- }
8246
+ if (prev && breaksBeam(prev, note)) parts.splice(prevEnd, 0, " ");
8247
+ prev = note;
8171
8248
  if (note.lyrics && note.lyrics.length > 0 && opts.includeLyrics) {
8172
8249
  for (const lyric of note.lyrics) {
8173
8250
  if (!lyric.text) continue;
@@ -8259,10 +8336,12 @@ function serializeMeasureEntries(measure, divisions, unitNote, opts) {
8259
8336
  if (insertIdx < parts.length) {
8260
8337
  parts.splice(insertIdx, 0, chordSlurStart);
8261
8338
  parts.push(tupletPrefix + effectiveSerialized.decorations);
8339
+ prevEnd = -1;
8262
8340
  break;
8263
8341
  }
8264
8342
  }
8265
8343
  parts.push(tupletPrefix + chordSlurStart + effectiveSerialized.decorations);
8344
+ prevEnd = -1;
8266
8345
  break;
8267
8346
  }
8268
8347
  if (effectiveSerialized.slurStart) {
@@ -8279,11 +8358,12 @@ function serializeMeasureEntries(measure, divisions, unitNote, opts) {
8279
8358
  parts.splice(insertIdx, 0, effectiveSerialized.slurStart);
8280
8359
  const noteOnly = effectiveSerialized.decorations + effectiveSerialized.pitch + effectiveSerialized.duration + effectiveSerialized.tieStr + effectiveSerialized.slurEnd;
8281
8360
  parts.push(tupletPrefix + noteOnly);
8361
+ prevEnd = parts.length;
8282
8362
  break;
8283
8363
  }
8284
8364
  }
8285
8365
  const brokenResult = detectBrokenRhythm(measure.entries, ei, note, divisions, currentUnitNote);
8286
- if (brokenResult && !note.chord && !note.grace && !note.timeModification) {
8366
+ if (brokenResult && !note.chord && !note.grace && !note.timeModification && !breaksBeam(note, brokenResult.nextNote)) {
8287
8367
  const baseDurStr1 = formatAbcDuration(brokenResult.baseFrac.num, brokenResult.baseFrac.den);
8288
8368
  const pitchStr1 = effectiveSerialized.pitch;
8289
8369
  const tie1 = effectiveSerialized.tieStr;
@@ -8302,9 +8382,12 @@ function serializeMeasureEntries(measure, divisions, unitNote, opts) {
8302
8382
  }
8303
8383
  parts.push(pitchStr2 + baseDurStr1 + tieStr2 + slurEnd2 + slurE1);
8304
8384
  ei = brokenResult.nextIndex;
8385
+ prev = note2;
8386
+ prevEnd = parts.length;
8305
8387
  break;
8306
8388
  }
8307
8389
  parts.push(tupletPrefix + effectiveSerialized.full);
8390
+ prevEnd = parts.length;
8308
8391
  break;
8309
8392
  }
8310
8393
  case "harmony": {
@@ -8319,16 +8402,19 @@ function serializeMeasureEntries(measure, divisions, unitNote, opts) {
8319
8402
  if (dt.kind !== "words") continue;
8320
8403
  if (dt.text === "__abc_line_cont__") {
8321
8404
  parts.push("\\\n");
8405
+ prev = null;
8322
8406
  handledAsSpecial = true;
8323
8407
  break;
8324
8408
  }
8325
8409
  if (dt.text === "__abc_line_break__") {
8326
8410
  parts.push("\n");
8411
+ prev = null;
8327
8412
  handledAsSpecial = true;
8328
8413
  break;
8329
8414
  }
8330
8415
  if (dt.text.startsWith(ABC_BODY_FIELD_MARKER)) {
8331
8416
  parts.push("\n" + dt.text.slice(ABC_BODY_FIELD_MARKER.length));
8417
+ prev = null;
8332
8418
  handledAsSpecial = true;
8333
8419
  break;
8334
8420
  }
@@ -8356,19 +8442,30 @@ function serializeMeasureEntries(measure, divisions, unitNote, opts) {
8356
8442
  }
8357
8443
  case "backup":
8358
8444
  parts.push(" & ");
8445
+ prev = null;
8359
8446
  break;
8360
8447
  case "forward":
8448
+ prev = null;
8361
8449
  break;
8362
8450
  default:
8363
8451
  break;
8364
8452
  }
8365
8453
  }
8366
- if (inChord && chordPitches.length > 0) {
8367
- parts.push("[" + chordPitches.join("") + "]" + chordDurationStr + chordTieStr + chordSlurEnd);
8368
- }
8454
+ if (inChord && chordPitches.length > 0) flushChord();
8369
8455
  const unitNoteChanged = currentUnitNote.num !== unitNote.num || currentUnitNote.den !== unitNote.den;
8370
8456
  return { noteStr: parts.join(""), lyrics, updatedUnitNote: unitNoteChanged ? currentUnitNote : void 0 };
8371
8457
  }
8458
+ var BEAMABLE_TYPES = /* @__PURE__ */ new Set(["eighth", "16th", "32nd", "64th", "128th", "256th", "512th", "1024th"]);
8459
+ function breaksBeam(prev, cur) {
8460
+ if (prev.rest || cur.rest) return false;
8461
+ const beamable = (n) => n.noteType !== void 0 && BEAMABLE_TYPES.has(n.noteType);
8462
+ const p = prev.beam?.find((b) => b.number === 1)?.type;
8463
+ const c = cur.beam?.find((b) => b.number === 1)?.type;
8464
+ if (beamable(prev) && beamable(cur)) {
8465
+ return !(p === "begin" || p === "continue" || c === "continue" || c === "end");
8466
+ }
8467
+ return p !== void 0 || c !== void 0;
8468
+ }
8372
8469
  function multipleRestCount(measure) {
8373
8470
  const styles = measure.attributes?.measureStyle;
8374
8471
  if (!styles) return 0;
package/dist/index.js CHANGED
@@ -11,7 +11,7 @@
11
11
 
12
12
 
13
13
 
14
- var _chunk7UU6IQPMjs = require('./chunk-7UU6IQPM.js');
14
+ var _chunk7XEY7OWXjs = require('./chunk-7XEY7OWX.js');
15
15
 
16
16
 
17
17
 
@@ -268,14 +268,14 @@ async function parseFile(filePath) {
268
268
  const lowerPath = filePath.toLowerCase();
269
269
  if (lowerPath.endsWith(".abc")) {
270
270
  const data2 = await _promises.readFile.call(void 0, filePath, "utf-8");
271
- return _chunk7UU6IQPMjs.parseAbc.call(void 0, data2);
271
+ return _chunk7XEY7OWXjs.parseAbc.call(void 0, data2);
272
272
  }
273
273
  const data = await _promises.readFile.call(void 0, filePath);
274
- if (_chunk7UU6IQPMjs.isCompressed.call(void 0, data)) {
275
- return _chunk7UU6IQPMjs.parseCompressed.call(void 0, data);
274
+ if (_chunk7XEY7OWXjs.isCompressed.call(void 0, data)) {
275
+ return _chunk7XEY7OWXjs.parseCompressed.call(void 0, data);
276
276
  }
277
277
  const xmlString = decodeBuffer(data);
278
- return _chunk7UU6IQPMjs.parse.call(void 0, xmlString);
278
+ return _chunk7XEY7OWXjs.parse.call(void 0, xmlString);
279
279
  }
280
280
  function decodeBuffer(buffer) {
281
281
  if (buffer.length >= 2 && buffer[0] === 254 && buffer[1] === 255) {
@@ -292,16 +292,16 @@ function decodeBuffer(buffer) {
292
292
  async function serializeToFile(score, filePath, options = {}) {
293
293
  const lowerPath = filePath.toLowerCase();
294
294
  if (lowerPath.endsWith(".abc")) {
295
- const abcString = _chunk7UU6IQPMjs.serializeAbc.call(void 0, score);
295
+ const abcString = _chunk7XEY7OWXjs.serializeAbc.call(void 0, score);
296
296
  await _promises.writeFile.call(void 0, filePath, abcString, "utf-8");
297
297
  } else if (lowerPath.endsWith(".mxl")) {
298
- const data = _chunk7UU6IQPMjs.serializeCompressed.call(void 0, score, options);
298
+ const data = _chunk7XEY7OWXjs.serializeCompressed.call(void 0, score, options);
299
299
  await _promises.writeFile.call(void 0, filePath, data);
300
300
  } else if (lowerPath.endsWith(".mid") || lowerPath.endsWith(".midi")) {
301
- const data = _chunk7UU6IQPMjs.exportMidi.call(void 0, score, options);
301
+ const data = _chunk7XEY7OWXjs.exportMidi.call(void 0, score, options);
302
302
  await _promises.writeFile.call(void 0, filePath, data);
303
303
  } else {
304
- const xmlString = _chunk7UU6IQPMjs.serialize.call(void 0, score, options);
304
+ const xmlString = _chunk7XEY7OWXjs.serialize.call(void 0, score, options);
305
305
  await _promises.writeFile.call(void 0, filePath, xmlString, "utf-8");
306
306
  }
307
307
  }
@@ -564,4 +564,4 @@ async function serializeToFile(score, filePath, options = {}) {
564
564
 
565
565
 
566
566
 
567
- exports.ALL_COLOR_TARGETS = _chunkK7W4FSFVjs.ALL_COLOR_TARGETS; exports.STEPS = _chunkEWLB5X64js.STEPS; exports.STEP_SEMITONES = _chunkEWLB5X64js.STEP_SEMITONES; exports.ValidationException = _chunkK7W4FSFVjs.ValidationException; exports.addArticulation = _chunkK7W4FSFVjs.addArticulation; exports.addBeam = _chunkK7W4FSFVjs.addBeam; exports.addBowing = _chunkK7W4FSFVjs.addBowing; exports.addBreathMark = _chunkK7W4FSFVjs.addBreathMark; exports.addCaesura = _chunkK7W4FSFVjs.addCaesura; exports.addChord = _chunkK7W4FSFVjs.addChord; exports.addChordNote = _chunkK7W4FSFVjs.addChordNote; exports.addChordNoteChecked = _chunkK7W4FSFVjs.addChordNoteChecked; exports.addChordSymbol = _chunkK7W4FSFVjs.addChordSymbol; exports.addCoda = _chunkK7W4FSFVjs.addCoda; exports.addDaCapo = _chunkK7W4FSFVjs.addDaCapo; exports.addDalSegno = _chunkK7W4FSFVjs.addDalSegno; exports.addDynamics = _chunkK7W4FSFVjs.addDynamics; exports.addEnding = _chunkK7W4FSFVjs.addEnding; exports.addFermata = _chunkK7W4FSFVjs.addFermata; exports.addFine = _chunkK7W4FSFVjs.addFine; exports.addFingering = _chunkK7W4FSFVjs.addFingering; exports.addGraceNote = _chunkK7W4FSFVjs.addGraceNote; exports.addHarmony = _chunkK7W4FSFVjs.addHarmony; exports.addLyric = _chunkK7W4FSFVjs.addLyric; exports.addNote = _chunkK7W4FSFVjs.addNote; exports.addNoteChecked = _chunkK7W4FSFVjs.addNoteChecked; exports.addOctaveShift = _chunkK7W4FSFVjs.addOctaveShift; exports.addOrnament = _chunkK7W4FSFVjs.addOrnament; exports.addPart = _chunkK7W4FSFVjs.addPart; exports.addPedal = _chunkK7W4FSFVjs.addPedal; exports.addRehearsalMark = _chunkK7W4FSFVjs.addRehearsalMark; exports.addRepeat = _chunkK7W4FSFVjs.addRepeat; exports.addRepeatBarline = _chunkK7W4FSFVjs.addRepeatBarline; exports.addSegno = _chunkK7W4FSFVjs.addSegno; exports.addSlur = _chunkK7W4FSFVjs.addSlur; exports.addStringNumber = _chunkK7W4FSFVjs.addStringNumber; exports.addTempo = _chunkK7W4FSFVjs.addTempo; exports.addText = _chunkK7W4FSFVjs.addText; exports.addTextDirection = _chunkK7W4FSFVjs.addTextDirection; exports.addTie = _chunkK7W4FSFVjs.addTie; exports.addToCoda = _chunkK7W4FSFVjs.addToCoda; exports.addVoice = _chunkK7W4FSFVjs.addVoice; exports.addWedge = _chunkK7W4FSFVjs.addWedge; exports.assertMeasureValid = _chunkK7W4FSFVjs.assertMeasureValid; exports.assertValid = _chunkK7W4FSFVjs.assertValid; exports.autoBeam = _chunkK7W4FSFVjs.autoBeam; exports.buildVoiceToStaffMap = _chunkEWLB5X64js.buildVoiceToStaffMap; exports.buildVoiceToStaffMapForPart = _chunkEWLB5X64js.buildVoiceToStaffMapForPart; exports.changeBarline = _chunkK7W4FSFVjs.changeBarline; exports.changeClef = _chunkK7W4FSFVjs.changeClef; exports.changeKey = _chunkK7W4FSFVjs.changeKey; exports.changeNoteDuration = _chunkK7W4FSFVjs.changeNoteDuration; exports.changeTime = _chunkK7W4FSFVjs.changeTime; exports.clearColors = _chunkK7W4FSFVjs.clearColors; exports.convertToGrace = _chunkK7W4FSFVjs.convertToGrace; exports.copyNotes = _chunkK7W4FSFVjs.copyNotes; exports.copyNotesMultiMeasure = _chunkK7W4FSFVjs.copyNotesMultiMeasure; exports.countNotes = _chunkEWLB5X64js.countNotes; exports.createTuplet = _chunkK7W4FSFVjs.createTuplet; exports.cutNotes = _chunkK7W4FSFVjs.cutNotes; exports.decodeBuffer = decodeBuffer; exports.deleteMeasure = _chunkK7W4FSFVjs.deleteMeasure; exports.deleteNote = _chunkK7W4FSFVjs.deleteNote; exports.deleteNoteChecked = _chunkK7W4FSFVjs.deleteNoteChecked; exports.duplicatePart = _chunkK7W4FSFVjs.duplicatePart; exports.exportMidi = _chunk7UU6IQPMjs.exportMidi; exports.exportMidiWithTimingMap = _chunk7UU6IQPMjs.exportMidiWithTimingMap; exports.extractPlaybackControls = _chunkEWLB5X64js.extractPlaybackControls; exports.findBarlines = _chunkEWLB5X64js.findBarlines; exports.findDirectionsByType = _chunkEWLB5X64js.findDirectionsByType; exports.findNotes = _chunkEWLB5X64js.findNotes; exports.findNotesWithNotation = _chunkEWLB5X64js.findNotesWithNotation; exports.formatLocation = _chunkK7W4FSFVjs.formatLocation; exports.generateId = _chunkK7W4FSFVjs.generateId; exports.generatePlaybackSequence = _chunkEWLB5X64js.generatePlaybackSequence; exports.generatePlaybackTimeline = _chunkEWLB5X64js.generatePlaybackTimeline; exports.getAbsolutePosition = _chunkEWLB5X64js.getAbsolutePosition; exports.getAdjacentNotes = _chunkEWLB5X64js.getAdjacentNotes; exports.getAllNotes = _chunkEWLB5X64js.getAllNotes; exports.getAllPartInfos = _chunkOEX7NVZNjs.getAllPartInfos; exports.getAttributesAtMeasure = _chunkEWLB5X64js.getAttributesAtMeasure; exports.getBeamGroups = _chunkEWLB5X64js.getBeamGroups; exports.getChordProgression = _chunkEWLB5X64js.getChordProgression; exports.getChords = _chunkEWLB5X64js.getChords; exports.getClefChanges = _chunkEWLB5X64js.getClefChanges; exports.getClefForStaff = _chunkEWLB5X64js.getClefForStaff; exports.getDirectionOfKind = _chunkOEX7NVZNjs.getDirectionOfKind; exports.getDirections = _chunkEWLB5X64js.getDirections; exports.getDirectionsAtPosition = _chunkEWLB5X64js.getDirectionsAtPosition; exports.getDirectionsOfKind = _chunkOEX7NVZNjs.getDirectionsOfKind; exports.getDivisions = _chunkEWLB5X64js.getDivisions; exports.getDuration = _chunkEWLB5X64js.getDuration; exports.getDynamics = _chunkEWLB5X64js.getDynamics; exports.getEffectiveStaff = _chunkEWLB5X64js.getEffectiveStaff; exports.getEndings = _chunkEWLB5X64js.getEndings; exports.getEntriesAtPosition = _chunkEWLB5X64js.getEntriesAtPosition; exports.getEntriesForStaff = _chunkEWLB5X64js.getEntriesForStaff; exports.getEntriesInRange = _chunkEWLB5X64js.getEntriesInRange; exports.getHarmonies = _chunkEWLB5X64js.getHarmonies; exports.getHarmonyAtPosition = _chunkEWLB5X64js.getHarmonyAtPosition; exports.getKeyChanges = _chunkEWLB5X64js.getKeyChanges; exports.getLyricText = _chunkEWLB5X64js.getLyricText; exports.getLyrics = _chunkEWLB5X64js.getLyrics; exports.getMeasure = _chunkEWLB5X64js.getMeasure; exports.getMeasureByIndex = _chunkEWLB5X64js.getMeasureByIndex; exports.getMeasureContext = _chunkK7W4FSFVjs.getMeasureContext; exports.getMeasureCount = _chunkEWLB5X64js.getMeasureCount; exports.getMeasureEndPosition = _chunkEWLB5X64js.getMeasureEndPosition; exports.getNextNote = _chunkEWLB5X64js.getNextNote; exports.getNormalizedDuration = _chunkEWLB5X64js.getNormalizedDuration; exports.getNormalizedPosition = _chunkEWLB5X64js.getNormalizedPosition; exports.getNotesAtPosition = _chunkEWLB5X64js.getNotesAtPosition; exports.getNotesForStaff = _chunkEWLB5X64js.getNotesForStaff; exports.getNotesForVoice = _chunkEWLB5X64js.getNotesForVoice; exports.getNotesInRange = _chunkEWLB5X64js.getNotesInRange; exports.getOctaveShifts = _chunkEWLB5X64js.getOctaveShifts; exports.getPartAbbreviation = _chunkOEX7NVZNjs.getPartAbbreviation; exports.getPartById = _chunkEWLB5X64js.getPartById; exports.getPartByIndex = _chunkEWLB5X64js.getPartByIndex; exports.getPartCount = _chunkEWLB5X64js.getPartCount; exports.getPartIds = _chunkEWLB5X64js.getPartIds; exports.getPartIndex = _chunkEWLB5X64js.getPartIndex; exports.getPartInfo = _chunkOEX7NVZNjs.getPartInfo; exports.getPartName = _chunkOEX7NVZNjs.getPartName; exports.getPartNameMap = _chunkOEX7NVZNjs.getPartNameMap; exports.getPedalMarkings = _chunkEWLB5X64js.getPedalMarkings; exports.getPrevNote = _chunkEWLB5X64js.getPrevNote; exports.getRepeatStructure = _chunkEWLB5X64js.getRepeatStructure; exports.getSlurSpans = _chunkEWLB5X64js.getSlurSpans; exports.getSoundDamperPedal = _chunkOEX7NVZNjs.getSoundDamperPedal; exports.getSoundDynamics = _chunkOEX7NVZNjs.getSoundDynamics; exports.getSoundSoftPedal = _chunkOEX7NVZNjs.getSoundSoftPedal; exports.getSoundSostenutoPedal = _chunkOEX7NVZNjs.getSoundSostenutoPedal; exports.getSoundTempo = _chunkOEX7NVZNjs.getSoundTempo; exports.getStaffRange = _chunkEWLB5X64js.getStaffRange; exports.getStaveCount = _chunkEWLB5X64js.getStaveCount; exports.getStaves = _chunkEWLB5X64js.getStaves; exports.getStructuralChanges = _chunkEWLB5X64js.getStructuralChanges; exports.getTempoMarkings = _chunkEWLB5X64js.getTempoMarkings; exports.getTiedNoteGroups = _chunkEWLB5X64js.getTiedNoteGroups; exports.getTimeChanges = _chunkEWLB5X64js.getTimeChanges; exports.getTupletGroups = _chunkEWLB5X64js.getTupletGroups; exports.getVerseCount = _chunkEWLB5X64js.getVerseCount; exports.getVerticalSlice = _chunkEWLB5X64js.getVerticalSlice; exports.getVoiceLine = _chunkEWLB5X64js.getVoiceLine; exports.getVoiceLineInRange = _chunkEWLB5X64js.getVoiceLineInRange; exports.getVoices = _chunkEWLB5X64js.getVoices; exports.getVoicesForStaff = _chunkEWLB5X64js.getVoicesForStaff; exports.getWedges = _chunkEWLB5X64js.getWedges; exports.groupByStaff = _chunkEWLB5X64js.groupByStaff; exports.groupByVoice = _chunkEWLB5X64js.groupByVoice; exports.hasBeam = _chunkOEX7NVZNjs.hasBeam; exports.hasDirectionOfKind = _chunkOEX7NVZNjs.hasDirectionOfKind; exports.hasLyrics = _chunkOEX7NVZNjs.hasLyrics; exports.hasMultipleStaves = _chunkEWLB5X64js.hasMultipleStaves; exports.hasNotations = _chunkOEX7NVZNjs.hasNotations; exports.hasNotes = _chunkEWLB5X64js.hasNotes; exports.hasPlaybackControls = _chunkEWLB5X64js.hasPlaybackControls; exports.hasTie = _chunkOEX7NVZNjs.hasTie; exports.hasTieStart = _chunkOEX7NVZNjs.hasTieStart; exports.hasTieStop = _chunkOEX7NVZNjs.hasTieStop; exports.hasTuplet = _chunkOEX7NVZNjs.hasTuplet; exports.inferStaff = _chunkEWLB5X64js.inferStaff; exports.insertClefChange = _chunkK7W4FSFVjs.insertClefChange; exports.insertMeasure = _chunkK7W4FSFVjs.insertMeasure; exports.insertNote = _chunkK7W4FSFVjs.insertNote; exports.isChordNote = _chunkOEX7NVZNjs.isChordNote; exports.isCompressed = _chunk7UU6IQPMjs.isCompressed; exports.isCueNote = _chunkOEX7NVZNjs.isCueNote; exports.isGraceNote = _chunkOEX7NVZNjs.isGraceNote; exports.isPartInfo = _chunkOEX7NVZNjs.isPartInfo; exports.isPitchedNote = _chunkOEX7NVZNjs.isPitchedNote; exports.isRest = _chunkOEX7NVZNjs.isRest; exports.isRestMeasure = _chunkEWLB5X64js.isRestMeasure; exports.isUnpitchedNote = _chunkOEX7NVZNjs.isUnpitchedNote; exports.isValid = _chunkK7W4FSFVjs.isValid; exports.iterateEntries = _chunkEWLB5X64js.iterateEntries; exports.iterateNotes = _chunkEWLB5X64js.iterateNotes; exports.lowerAccidental = _chunkK7W4FSFVjs.lowerAccidental; exports.measureRoundtrip = _chunkEWLB5X64js.measureRoundtrip; exports.modifyDynamics = _chunkK7W4FSFVjs.modifyDynamics; exports.modifyNoteDuration = _chunkK7W4FSFVjs.modifyNoteDuration; exports.modifyNoteDurationChecked = _chunkK7W4FSFVjs.modifyNoteDurationChecked; exports.modifyNotePitch = _chunkK7W4FSFVjs.modifyNotePitch; exports.modifyNotePitchChecked = _chunkK7W4FSFVjs.modifyNotePitchChecked; exports.modifyTempo = _chunkK7W4FSFVjs.modifyTempo; exports.moveNoteToStaff = _chunkK7W4FSFVjs.moveNoteToStaff; exports.parse = _chunk7UU6IQPMjs.parse; exports.parseAbc = _chunk7UU6IQPMjs.parseAbc; exports.parseAbcTunes = _chunk7UU6IQPMjs.parseAbcTunes; exports.parseAuto = _chunk7UU6IQPMjs.parseAuto; exports.parseCompressed = _chunk7UU6IQPMjs.parseCompressed; exports.parseFile = parseFile; exports.pasteNotes = _chunkK7W4FSFVjs.pasteNotes; exports.pasteNotesMultiMeasure = _chunkK7W4FSFVjs.pasteNotesMultiMeasure; exports.pitchToSemitone = _chunkEWLB5X64js.pitchToSemitone; exports.raiseAccidental = _chunkK7W4FSFVjs.raiseAccidental; exports.removeArticulation = _chunkK7W4FSFVjs.removeArticulation; exports.removeBeam = _chunkK7W4FSFVjs.removeBeam; exports.removeBowing = _chunkK7W4FSFVjs.removeBowing; exports.removeBreathMark = _chunkK7W4FSFVjs.removeBreathMark; exports.removeCaesura = _chunkK7W4FSFVjs.removeCaesura; exports.removeChordSymbol = _chunkK7W4FSFVjs.removeChordSymbol; exports.removeDynamics = _chunkK7W4FSFVjs.removeDynamics; exports.removeEnding = _chunkK7W4FSFVjs.removeEnding; exports.removeFermata = _chunkK7W4FSFVjs.removeFermata; exports.removeFingering = _chunkK7W4FSFVjs.removeFingering; exports.removeGraceNote = _chunkK7W4FSFVjs.removeGraceNote; exports.removeHarmony = _chunkK7W4FSFVjs.removeHarmony; exports.removeLyric = _chunkK7W4FSFVjs.removeLyric; exports.removeNote = _chunkK7W4FSFVjs.removeNote; exports.removeOctaveShift = _chunkK7W4FSFVjs.removeOctaveShift; exports.removeOrnament = _chunkK7W4FSFVjs.removeOrnament; exports.removePart = _chunkK7W4FSFVjs.removePart; exports.removePedal = _chunkK7W4FSFVjs.removePedal; exports.removeRepeat = _chunkK7W4FSFVjs.removeRepeat; exports.removeRepeatBarline = _chunkK7W4FSFVjs.removeRepeatBarline; exports.removeSlur = _chunkK7W4FSFVjs.removeSlur; exports.removeStringNumber = _chunkK7W4FSFVjs.removeStringNumber; exports.removeTempo = _chunkK7W4FSFVjs.removeTempo; exports.removeTie = _chunkK7W4FSFVjs.removeTie; exports.removeTuplet = _chunkK7W4FSFVjs.removeTuplet; exports.removeWedge = _chunkK7W4FSFVjs.removeWedge; exports.scoresEqual = _chunkEWLB5X64js.scoresEqual; exports.serialize = _chunk7UU6IQPMjs.serialize; exports.serializeAbc = _chunk7UU6IQPMjs.serializeAbc; exports.serializeAbcTunes = _chunk7UU6IQPMjs.serializeAbcTunes; exports.serializeCompressed = _chunk7UU6IQPMjs.serializeCompressed; exports.serializeToFile = serializeToFile; exports.setBarline = _chunkK7W4FSFVjs.setBarline; exports.setBeaming = _chunkK7W4FSFVjs.setBeaming; exports.setColor = _chunkK7W4FSFVjs.setColor; exports.setNotePitch = _chunkK7W4FSFVjs.setNotePitch; exports.setNotePitchBySemitone = _chunkK7W4FSFVjs.setNotePitchBySemitone; exports.setStaves = _chunkK7W4FSFVjs.setStaves; exports.shiftNotePitch = _chunkK7W4FSFVjs.shiftNotePitch; exports.stopOctaveShift = _chunkK7W4FSFVjs.stopOctaveShift; exports.transpose = _chunkK7W4FSFVjs.transpose; exports.transposeChecked = _chunkK7W4FSFVjs.transposeChecked; exports.updateChordSymbol = _chunkK7W4FSFVjs.updateChordSymbol; exports.updateHarmony = _chunkK7W4FSFVjs.updateHarmony; exports.updateLyric = _chunkK7W4FSFVjs.updateLyric; exports.validate = _chunkK7W4FSFVjs.validate; exports.validateBackupForward = _chunkK7W4FSFVjs.validateBackupForward; exports.validateBeams = _chunkK7W4FSFVjs.validateBeams; exports.validateDivisions = _chunkK7W4FSFVjs.validateDivisions; exports.validateMeasureDuration = _chunkK7W4FSFVjs.validateMeasureDuration; exports.validateMeasureLocal = _chunkK7W4FSFVjs.validateMeasureLocal; exports.validatePartReferences = _chunkK7W4FSFVjs.validatePartReferences; exports.validatePartStructure = _chunkK7W4FSFVjs.validatePartStructure; exports.validateSlurs = _chunkK7W4FSFVjs.validateSlurs; exports.validateSlursAcrossMeasures = _chunkK7W4FSFVjs.validateSlursAcrossMeasures; exports.validateStaffStructure = _chunkK7W4FSFVjs.validateStaffStructure; exports.validateTies = _chunkK7W4FSFVjs.validateTies; exports.validateTiesAcrossMeasures = _chunkK7W4FSFVjs.validateTiesAcrossMeasures; exports.validateTuplets = _chunkK7W4FSFVjs.validateTuplets; exports.validateVoiceStaff = _chunkK7W4FSFVjs.validateVoiceStaff; exports.withAbsolutePositions = _chunkEWLB5X64js.withAbsolutePositions;
567
+ exports.ALL_COLOR_TARGETS = _chunkK7W4FSFVjs.ALL_COLOR_TARGETS; exports.STEPS = _chunkEWLB5X64js.STEPS; exports.STEP_SEMITONES = _chunkEWLB5X64js.STEP_SEMITONES; exports.ValidationException = _chunkK7W4FSFVjs.ValidationException; exports.addArticulation = _chunkK7W4FSFVjs.addArticulation; exports.addBeam = _chunkK7W4FSFVjs.addBeam; exports.addBowing = _chunkK7W4FSFVjs.addBowing; exports.addBreathMark = _chunkK7W4FSFVjs.addBreathMark; exports.addCaesura = _chunkK7W4FSFVjs.addCaesura; exports.addChord = _chunkK7W4FSFVjs.addChord; exports.addChordNote = _chunkK7W4FSFVjs.addChordNote; exports.addChordNoteChecked = _chunkK7W4FSFVjs.addChordNoteChecked; exports.addChordSymbol = _chunkK7W4FSFVjs.addChordSymbol; exports.addCoda = _chunkK7W4FSFVjs.addCoda; exports.addDaCapo = _chunkK7W4FSFVjs.addDaCapo; exports.addDalSegno = _chunkK7W4FSFVjs.addDalSegno; exports.addDynamics = _chunkK7W4FSFVjs.addDynamics; exports.addEnding = _chunkK7W4FSFVjs.addEnding; exports.addFermata = _chunkK7W4FSFVjs.addFermata; exports.addFine = _chunkK7W4FSFVjs.addFine; exports.addFingering = _chunkK7W4FSFVjs.addFingering; exports.addGraceNote = _chunkK7W4FSFVjs.addGraceNote; exports.addHarmony = _chunkK7W4FSFVjs.addHarmony; exports.addLyric = _chunkK7W4FSFVjs.addLyric; exports.addNote = _chunkK7W4FSFVjs.addNote; exports.addNoteChecked = _chunkK7W4FSFVjs.addNoteChecked; exports.addOctaveShift = _chunkK7W4FSFVjs.addOctaveShift; exports.addOrnament = _chunkK7W4FSFVjs.addOrnament; exports.addPart = _chunkK7W4FSFVjs.addPart; exports.addPedal = _chunkK7W4FSFVjs.addPedal; exports.addRehearsalMark = _chunkK7W4FSFVjs.addRehearsalMark; exports.addRepeat = _chunkK7W4FSFVjs.addRepeat; exports.addRepeatBarline = _chunkK7W4FSFVjs.addRepeatBarline; exports.addSegno = _chunkK7W4FSFVjs.addSegno; exports.addSlur = _chunkK7W4FSFVjs.addSlur; exports.addStringNumber = _chunkK7W4FSFVjs.addStringNumber; exports.addTempo = _chunkK7W4FSFVjs.addTempo; exports.addText = _chunkK7W4FSFVjs.addText; exports.addTextDirection = _chunkK7W4FSFVjs.addTextDirection; exports.addTie = _chunkK7W4FSFVjs.addTie; exports.addToCoda = _chunkK7W4FSFVjs.addToCoda; exports.addVoice = _chunkK7W4FSFVjs.addVoice; exports.addWedge = _chunkK7W4FSFVjs.addWedge; exports.assertMeasureValid = _chunkK7W4FSFVjs.assertMeasureValid; exports.assertValid = _chunkK7W4FSFVjs.assertValid; exports.autoBeam = _chunkK7W4FSFVjs.autoBeam; exports.buildVoiceToStaffMap = _chunkEWLB5X64js.buildVoiceToStaffMap; exports.buildVoiceToStaffMapForPart = _chunkEWLB5X64js.buildVoiceToStaffMapForPart; exports.changeBarline = _chunkK7W4FSFVjs.changeBarline; exports.changeClef = _chunkK7W4FSFVjs.changeClef; exports.changeKey = _chunkK7W4FSFVjs.changeKey; exports.changeNoteDuration = _chunkK7W4FSFVjs.changeNoteDuration; exports.changeTime = _chunkK7W4FSFVjs.changeTime; exports.clearColors = _chunkK7W4FSFVjs.clearColors; exports.convertToGrace = _chunkK7W4FSFVjs.convertToGrace; exports.copyNotes = _chunkK7W4FSFVjs.copyNotes; exports.copyNotesMultiMeasure = _chunkK7W4FSFVjs.copyNotesMultiMeasure; exports.countNotes = _chunkEWLB5X64js.countNotes; exports.createTuplet = _chunkK7W4FSFVjs.createTuplet; exports.cutNotes = _chunkK7W4FSFVjs.cutNotes; exports.decodeBuffer = decodeBuffer; exports.deleteMeasure = _chunkK7W4FSFVjs.deleteMeasure; exports.deleteNote = _chunkK7W4FSFVjs.deleteNote; exports.deleteNoteChecked = _chunkK7W4FSFVjs.deleteNoteChecked; exports.duplicatePart = _chunkK7W4FSFVjs.duplicatePart; exports.exportMidi = _chunk7XEY7OWXjs.exportMidi; exports.exportMidiWithTimingMap = _chunk7XEY7OWXjs.exportMidiWithTimingMap; exports.extractPlaybackControls = _chunkEWLB5X64js.extractPlaybackControls; exports.findBarlines = _chunkEWLB5X64js.findBarlines; exports.findDirectionsByType = _chunkEWLB5X64js.findDirectionsByType; exports.findNotes = _chunkEWLB5X64js.findNotes; exports.findNotesWithNotation = _chunkEWLB5X64js.findNotesWithNotation; exports.formatLocation = _chunkK7W4FSFVjs.formatLocation; exports.generateId = _chunkK7W4FSFVjs.generateId; exports.generatePlaybackSequence = _chunkEWLB5X64js.generatePlaybackSequence; exports.generatePlaybackTimeline = _chunkEWLB5X64js.generatePlaybackTimeline; exports.getAbsolutePosition = _chunkEWLB5X64js.getAbsolutePosition; exports.getAdjacentNotes = _chunkEWLB5X64js.getAdjacentNotes; exports.getAllNotes = _chunkEWLB5X64js.getAllNotes; exports.getAllPartInfos = _chunkOEX7NVZNjs.getAllPartInfos; exports.getAttributesAtMeasure = _chunkEWLB5X64js.getAttributesAtMeasure; exports.getBeamGroups = _chunkEWLB5X64js.getBeamGroups; exports.getChordProgression = _chunkEWLB5X64js.getChordProgression; exports.getChords = _chunkEWLB5X64js.getChords; exports.getClefChanges = _chunkEWLB5X64js.getClefChanges; exports.getClefForStaff = _chunkEWLB5X64js.getClefForStaff; exports.getDirectionOfKind = _chunkOEX7NVZNjs.getDirectionOfKind; exports.getDirections = _chunkEWLB5X64js.getDirections; exports.getDirectionsAtPosition = _chunkEWLB5X64js.getDirectionsAtPosition; exports.getDirectionsOfKind = _chunkOEX7NVZNjs.getDirectionsOfKind; exports.getDivisions = _chunkEWLB5X64js.getDivisions; exports.getDuration = _chunkEWLB5X64js.getDuration; exports.getDynamics = _chunkEWLB5X64js.getDynamics; exports.getEffectiveStaff = _chunkEWLB5X64js.getEffectiveStaff; exports.getEndings = _chunkEWLB5X64js.getEndings; exports.getEntriesAtPosition = _chunkEWLB5X64js.getEntriesAtPosition; exports.getEntriesForStaff = _chunkEWLB5X64js.getEntriesForStaff; exports.getEntriesInRange = _chunkEWLB5X64js.getEntriesInRange; exports.getHarmonies = _chunkEWLB5X64js.getHarmonies; exports.getHarmonyAtPosition = _chunkEWLB5X64js.getHarmonyAtPosition; exports.getKeyChanges = _chunkEWLB5X64js.getKeyChanges; exports.getLyricText = _chunkEWLB5X64js.getLyricText; exports.getLyrics = _chunkEWLB5X64js.getLyrics; exports.getMeasure = _chunkEWLB5X64js.getMeasure; exports.getMeasureByIndex = _chunkEWLB5X64js.getMeasureByIndex; exports.getMeasureContext = _chunkK7W4FSFVjs.getMeasureContext; exports.getMeasureCount = _chunkEWLB5X64js.getMeasureCount; exports.getMeasureEndPosition = _chunkEWLB5X64js.getMeasureEndPosition; exports.getNextNote = _chunkEWLB5X64js.getNextNote; exports.getNormalizedDuration = _chunkEWLB5X64js.getNormalizedDuration; exports.getNormalizedPosition = _chunkEWLB5X64js.getNormalizedPosition; exports.getNotesAtPosition = _chunkEWLB5X64js.getNotesAtPosition; exports.getNotesForStaff = _chunkEWLB5X64js.getNotesForStaff; exports.getNotesForVoice = _chunkEWLB5X64js.getNotesForVoice; exports.getNotesInRange = _chunkEWLB5X64js.getNotesInRange; exports.getOctaveShifts = _chunkEWLB5X64js.getOctaveShifts; exports.getPartAbbreviation = _chunkOEX7NVZNjs.getPartAbbreviation; exports.getPartById = _chunkEWLB5X64js.getPartById; exports.getPartByIndex = _chunkEWLB5X64js.getPartByIndex; exports.getPartCount = _chunkEWLB5X64js.getPartCount; exports.getPartIds = _chunkEWLB5X64js.getPartIds; exports.getPartIndex = _chunkEWLB5X64js.getPartIndex; exports.getPartInfo = _chunkOEX7NVZNjs.getPartInfo; exports.getPartName = _chunkOEX7NVZNjs.getPartName; exports.getPartNameMap = _chunkOEX7NVZNjs.getPartNameMap; exports.getPedalMarkings = _chunkEWLB5X64js.getPedalMarkings; exports.getPrevNote = _chunkEWLB5X64js.getPrevNote; exports.getRepeatStructure = _chunkEWLB5X64js.getRepeatStructure; exports.getSlurSpans = _chunkEWLB5X64js.getSlurSpans; exports.getSoundDamperPedal = _chunkOEX7NVZNjs.getSoundDamperPedal; exports.getSoundDynamics = _chunkOEX7NVZNjs.getSoundDynamics; exports.getSoundSoftPedal = _chunkOEX7NVZNjs.getSoundSoftPedal; exports.getSoundSostenutoPedal = _chunkOEX7NVZNjs.getSoundSostenutoPedal; exports.getSoundTempo = _chunkOEX7NVZNjs.getSoundTempo; exports.getStaffRange = _chunkEWLB5X64js.getStaffRange; exports.getStaveCount = _chunkEWLB5X64js.getStaveCount; exports.getStaves = _chunkEWLB5X64js.getStaves; exports.getStructuralChanges = _chunkEWLB5X64js.getStructuralChanges; exports.getTempoMarkings = _chunkEWLB5X64js.getTempoMarkings; exports.getTiedNoteGroups = _chunkEWLB5X64js.getTiedNoteGroups; exports.getTimeChanges = _chunkEWLB5X64js.getTimeChanges; exports.getTupletGroups = _chunkEWLB5X64js.getTupletGroups; exports.getVerseCount = _chunkEWLB5X64js.getVerseCount; exports.getVerticalSlice = _chunkEWLB5X64js.getVerticalSlice; exports.getVoiceLine = _chunkEWLB5X64js.getVoiceLine; exports.getVoiceLineInRange = _chunkEWLB5X64js.getVoiceLineInRange; exports.getVoices = _chunkEWLB5X64js.getVoices; exports.getVoicesForStaff = _chunkEWLB5X64js.getVoicesForStaff; exports.getWedges = _chunkEWLB5X64js.getWedges; exports.groupByStaff = _chunkEWLB5X64js.groupByStaff; exports.groupByVoice = _chunkEWLB5X64js.groupByVoice; exports.hasBeam = _chunkOEX7NVZNjs.hasBeam; exports.hasDirectionOfKind = _chunkOEX7NVZNjs.hasDirectionOfKind; exports.hasLyrics = _chunkOEX7NVZNjs.hasLyrics; exports.hasMultipleStaves = _chunkEWLB5X64js.hasMultipleStaves; exports.hasNotations = _chunkOEX7NVZNjs.hasNotations; exports.hasNotes = _chunkEWLB5X64js.hasNotes; exports.hasPlaybackControls = _chunkEWLB5X64js.hasPlaybackControls; exports.hasTie = _chunkOEX7NVZNjs.hasTie; exports.hasTieStart = _chunkOEX7NVZNjs.hasTieStart; exports.hasTieStop = _chunkOEX7NVZNjs.hasTieStop; exports.hasTuplet = _chunkOEX7NVZNjs.hasTuplet; exports.inferStaff = _chunkEWLB5X64js.inferStaff; exports.insertClefChange = _chunkK7W4FSFVjs.insertClefChange; exports.insertMeasure = _chunkK7W4FSFVjs.insertMeasure; exports.insertNote = _chunkK7W4FSFVjs.insertNote; exports.isChordNote = _chunkOEX7NVZNjs.isChordNote; exports.isCompressed = _chunk7XEY7OWXjs.isCompressed; exports.isCueNote = _chunkOEX7NVZNjs.isCueNote; exports.isGraceNote = _chunkOEX7NVZNjs.isGraceNote; exports.isPartInfo = _chunkOEX7NVZNjs.isPartInfo; exports.isPitchedNote = _chunkOEX7NVZNjs.isPitchedNote; exports.isRest = _chunkOEX7NVZNjs.isRest; exports.isRestMeasure = _chunkEWLB5X64js.isRestMeasure; exports.isUnpitchedNote = _chunkOEX7NVZNjs.isUnpitchedNote; exports.isValid = _chunkK7W4FSFVjs.isValid; exports.iterateEntries = _chunkEWLB5X64js.iterateEntries; exports.iterateNotes = _chunkEWLB5X64js.iterateNotes; exports.lowerAccidental = _chunkK7W4FSFVjs.lowerAccidental; exports.measureRoundtrip = _chunkEWLB5X64js.measureRoundtrip; exports.modifyDynamics = _chunkK7W4FSFVjs.modifyDynamics; exports.modifyNoteDuration = _chunkK7W4FSFVjs.modifyNoteDuration; exports.modifyNoteDurationChecked = _chunkK7W4FSFVjs.modifyNoteDurationChecked; exports.modifyNotePitch = _chunkK7W4FSFVjs.modifyNotePitch; exports.modifyNotePitchChecked = _chunkK7W4FSFVjs.modifyNotePitchChecked; exports.modifyTempo = _chunkK7W4FSFVjs.modifyTempo; exports.moveNoteToStaff = _chunkK7W4FSFVjs.moveNoteToStaff; exports.parse = _chunk7XEY7OWXjs.parse; exports.parseAbc = _chunk7XEY7OWXjs.parseAbc; exports.parseAbcTunes = _chunk7XEY7OWXjs.parseAbcTunes; exports.parseAuto = _chunk7XEY7OWXjs.parseAuto; exports.parseCompressed = _chunk7XEY7OWXjs.parseCompressed; exports.parseFile = parseFile; exports.pasteNotes = _chunkK7W4FSFVjs.pasteNotes; exports.pasteNotesMultiMeasure = _chunkK7W4FSFVjs.pasteNotesMultiMeasure; exports.pitchToSemitone = _chunkEWLB5X64js.pitchToSemitone; exports.raiseAccidental = _chunkK7W4FSFVjs.raiseAccidental; exports.removeArticulation = _chunkK7W4FSFVjs.removeArticulation; exports.removeBeam = _chunkK7W4FSFVjs.removeBeam; exports.removeBowing = _chunkK7W4FSFVjs.removeBowing; exports.removeBreathMark = _chunkK7W4FSFVjs.removeBreathMark; exports.removeCaesura = _chunkK7W4FSFVjs.removeCaesura; exports.removeChordSymbol = _chunkK7W4FSFVjs.removeChordSymbol; exports.removeDynamics = _chunkK7W4FSFVjs.removeDynamics; exports.removeEnding = _chunkK7W4FSFVjs.removeEnding; exports.removeFermata = _chunkK7W4FSFVjs.removeFermata; exports.removeFingering = _chunkK7W4FSFVjs.removeFingering; exports.removeGraceNote = _chunkK7W4FSFVjs.removeGraceNote; exports.removeHarmony = _chunkK7W4FSFVjs.removeHarmony; exports.removeLyric = _chunkK7W4FSFVjs.removeLyric; exports.removeNote = _chunkK7W4FSFVjs.removeNote; exports.removeOctaveShift = _chunkK7W4FSFVjs.removeOctaveShift; exports.removeOrnament = _chunkK7W4FSFVjs.removeOrnament; exports.removePart = _chunkK7W4FSFVjs.removePart; exports.removePedal = _chunkK7W4FSFVjs.removePedal; exports.removeRepeat = _chunkK7W4FSFVjs.removeRepeat; exports.removeRepeatBarline = _chunkK7W4FSFVjs.removeRepeatBarline; exports.removeSlur = _chunkK7W4FSFVjs.removeSlur; exports.removeStringNumber = _chunkK7W4FSFVjs.removeStringNumber; exports.removeTempo = _chunkK7W4FSFVjs.removeTempo; exports.removeTie = _chunkK7W4FSFVjs.removeTie; exports.removeTuplet = _chunkK7W4FSFVjs.removeTuplet; exports.removeWedge = _chunkK7W4FSFVjs.removeWedge; exports.scoresEqual = _chunkEWLB5X64js.scoresEqual; exports.serialize = _chunk7XEY7OWXjs.serialize; exports.serializeAbc = _chunk7XEY7OWXjs.serializeAbc; exports.serializeAbcTunes = _chunk7XEY7OWXjs.serializeAbcTunes; exports.serializeCompressed = _chunk7XEY7OWXjs.serializeCompressed; exports.serializeToFile = serializeToFile; exports.setBarline = _chunkK7W4FSFVjs.setBarline; exports.setBeaming = _chunkK7W4FSFVjs.setBeaming; exports.setColor = _chunkK7W4FSFVjs.setColor; exports.setNotePitch = _chunkK7W4FSFVjs.setNotePitch; exports.setNotePitchBySemitone = _chunkK7W4FSFVjs.setNotePitchBySemitone; exports.setStaves = _chunkK7W4FSFVjs.setStaves; exports.shiftNotePitch = _chunkK7W4FSFVjs.shiftNotePitch; exports.stopOctaveShift = _chunkK7W4FSFVjs.stopOctaveShift; exports.transpose = _chunkK7W4FSFVjs.transpose; exports.transposeChecked = _chunkK7W4FSFVjs.transposeChecked; exports.updateChordSymbol = _chunkK7W4FSFVjs.updateChordSymbol; exports.updateHarmony = _chunkK7W4FSFVjs.updateHarmony; exports.updateLyric = _chunkK7W4FSFVjs.updateLyric; exports.validate = _chunkK7W4FSFVjs.validate; exports.validateBackupForward = _chunkK7W4FSFVjs.validateBackupForward; exports.validateBeams = _chunkK7W4FSFVjs.validateBeams; exports.validateDivisions = _chunkK7W4FSFVjs.validateDivisions; exports.validateMeasureDuration = _chunkK7W4FSFVjs.validateMeasureDuration; exports.validateMeasureLocal = _chunkK7W4FSFVjs.validateMeasureLocal; exports.validatePartReferences = _chunkK7W4FSFVjs.validatePartReferences; exports.validatePartStructure = _chunkK7W4FSFVjs.validatePartStructure; exports.validateSlurs = _chunkK7W4FSFVjs.validateSlurs; exports.validateSlursAcrossMeasures = _chunkK7W4FSFVjs.validateSlursAcrossMeasures; exports.validateStaffStructure = _chunkK7W4FSFVjs.validateStaffStructure; exports.validateTies = _chunkK7W4FSFVjs.validateTies; exports.validateTiesAcrossMeasures = _chunkK7W4FSFVjs.validateTiesAcrossMeasures; exports.validateTuplets = _chunkK7W4FSFVjs.validateTuplets; exports.validateVoiceStaff = _chunkK7W4FSFVjs.validateVoiceStaff; exports.withAbsolutePositions = _chunkEWLB5X64js.withAbsolutePositions;
package/dist/index.mjs CHANGED
@@ -11,7 +11,7 @@ import {
11
11
  serializeAbc,
12
12
  serializeAbcTunes,
13
13
  serializeCompressed
14
- } from "./chunk-WTKX7XCV.mjs";
14
+ } from "./chunk-FOG4AD6B.mjs";
15
15
  import {
16
16
  getAllPartInfos,
17
17
  getDirectionOfKind,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "musicxml-io",
3
- "version": "0.10.3",
3
+ "version": "0.11.1",
4
4
  "description": "Parse and serialize MusicXML (.xml/.mxl) and ABC notation with high round-trip fidelity",
5
5
  "author": "tan-z-tan",
6
6
  "license": "MIT",