musicxml-io 0.7.1 → 0.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-F6GPX6VW.js → chunk-CHMV7XWY.js} +259 -83
- package/dist/{chunk-67F7TX3I.mjs → chunk-IM3FS32Q.mjs} +1 -1
- package/dist/{chunk-HQEOMBJX.js → chunk-S5MWUJU2.js} +23 -23
- package/dist/{chunk-MA2TPIIG.mjs → chunk-VQUFSGB5.mjs} +191 -15
- package/dist/index.d.mts +7 -4
- package/dist/index.d.ts +7 -4
- package/dist/index.js +160 -156
- package/dist/index.mjs +42 -38
- package/dist/operations/index.js +3 -3
- package/dist/operations/index.mjs +2 -2
- package/dist/query/index.d.mts +53 -2
- package/dist/query/index.d.ts +53 -2
- package/dist/query/index.js +2 -2
- package/dist/query/index.mjs +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -127,7 +127,7 @@
|
|
|
127
127
|
|
|
128
128
|
|
|
129
129
|
|
|
130
|
-
var
|
|
130
|
+
var _chunkS5MWUJU2js = require('./chunk-S5MWUJU2.js');
|
|
131
131
|
|
|
132
132
|
|
|
133
133
|
|
|
@@ -217,7 +217,8 @@ var _chunkHQEOMBJXjs = require('./chunk-HQEOMBJX.js');
|
|
|
217
217
|
|
|
218
218
|
|
|
219
219
|
|
|
220
|
-
|
|
220
|
+
|
|
221
|
+
var _chunkCHMV7XWYjs = require('./chunk-CHMV7XWY.js');
|
|
221
222
|
|
|
222
223
|
// src/importers/musicxml.ts
|
|
223
224
|
var _txml = require('txml');
|
|
@@ -359,7 +360,7 @@ function parseScorePartwise(elements) {
|
|
|
359
360
|
const defaults = parseDefaults(elements);
|
|
360
361
|
const credits = parseCredits(elements);
|
|
361
362
|
return {
|
|
362
|
-
_id:
|
|
363
|
+
_id: _chunkS5MWUJU2js.generateId.call(void 0, ),
|
|
363
364
|
metadata,
|
|
364
365
|
partList,
|
|
365
366
|
parts,
|
|
@@ -616,7 +617,7 @@ function parseSystemLayout(elements) {
|
|
|
616
617
|
}
|
|
617
618
|
function parseCredits(elements) {
|
|
618
619
|
const credits = collectElements(elements, "credit", (content, attrs) => {
|
|
619
|
-
const credit = { _id:
|
|
620
|
+
const credit = { _id: _chunkS5MWUJU2js.generateId.call(void 0, ) };
|
|
620
621
|
if (attrs["page"]) credit.page = parseInt(attrs["page"], 10);
|
|
621
622
|
const types = collectElements(content, "credit-type", (c) => extractText(c));
|
|
622
623
|
const words = collectElements(content, "credit-words", (c, a) => {
|
|
@@ -660,7 +661,7 @@ function parsePartList(elements) {
|
|
|
660
661
|
const attrs = el.attributes;
|
|
661
662
|
const content = el.children;
|
|
662
663
|
const partInfo = {
|
|
663
|
-
_id:
|
|
664
|
+
_id: _chunkS5MWUJU2js.generateId.call(void 0, ),
|
|
664
665
|
type: "score-part",
|
|
665
666
|
id: attrs["id"] || ""
|
|
666
667
|
};
|
|
@@ -759,7 +760,7 @@ function parsePartList(elements) {
|
|
|
759
760
|
const attrs = el.attributes;
|
|
760
761
|
const content = el.children;
|
|
761
762
|
const group = {
|
|
762
|
-
_id:
|
|
763
|
+
_id: _chunkS5MWUJU2js.generateId.call(void 0, ),
|
|
763
764
|
type: "part-group",
|
|
764
765
|
groupType: attrs["type"] === "stop" ? "stop" : "start"
|
|
765
766
|
};
|
|
@@ -796,7 +797,7 @@ function parseParts(elements) {
|
|
|
796
797
|
const attrs = el.attributes;
|
|
797
798
|
const content = el.children;
|
|
798
799
|
const part = {
|
|
799
|
-
_id:
|
|
800
|
+
_id: _chunkS5MWUJU2js.generateId.call(void 0, ),
|
|
800
801
|
id: attrs["id"] || "",
|
|
801
802
|
measures: []
|
|
802
803
|
};
|
|
@@ -815,7 +816,7 @@ function parseParts(elements) {
|
|
|
815
816
|
}
|
|
816
817
|
function parseMeasure(elements, attrs) {
|
|
817
818
|
const measure = {
|
|
818
|
-
_id:
|
|
819
|
+
_id: _chunkS5MWUJU2js.generateId.call(void 0, ),
|
|
819
820
|
number: attrs["number"] || "0",
|
|
820
821
|
// Keep as string per MusicXML spec (token type)
|
|
821
822
|
entries: []
|
|
@@ -832,7 +833,7 @@ function parseMeasure(elements, attrs) {
|
|
|
832
833
|
measure.attributes = parsedAttrs;
|
|
833
834
|
} else {
|
|
834
835
|
const attrEntry = {
|
|
835
|
-
_id:
|
|
836
|
+
_id: _chunkS5MWUJU2js.generateId.call(void 0, ),
|
|
836
837
|
type: "attributes",
|
|
837
838
|
attributes: parsedAttrs
|
|
838
839
|
};
|
|
@@ -860,7 +861,7 @@ function parseMeasure(elements, attrs) {
|
|
|
860
861
|
} else if (el.tagName === "grouping") {
|
|
861
862
|
const grpAttrs = el.attributes;
|
|
862
863
|
const grouping = {
|
|
863
|
-
_id:
|
|
864
|
+
_id: _chunkS5MWUJU2js.generateId.call(void 0, ),
|
|
864
865
|
type: "grouping",
|
|
865
866
|
groupingType: grpAttrs["type"] || "start"
|
|
866
867
|
};
|
|
@@ -914,7 +915,7 @@ function parsePrint(elements, attrs) {
|
|
|
914
915
|
return print;
|
|
915
916
|
}
|
|
916
917
|
function parseAttributes(elements) {
|
|
917
|
-
const attrs = { _id:
|
|
918
|
+
const attrs = { _id: _chunkS5MWUJU2js.generateId.call(void 0, ) };
|
|
918
919
|
const divisions = getElementTextAsInt(elements, "divisions");
|
|
919
920
|
if (divisions !== void 0) attrs.divisions = divisions;
|
|
920
921
|
const staves = getElementTextAsInt(elements, "staves");
|
|
@@ -1080,7 +1081,7 @@ function parseTranspose(elements) {
|
|
|
1080
1081
|
}
|
|
1081
1082
|
function parseNote(elements, attrs) {
|
|
1082
1083
|
const note = {
|
|
1083
|
-
_id:
|
|
1084
|
+
_id: _chunkS5MWUJU2js.generateId.call(void 0, ),
|
|
1084
1085
|
type: "note",
|
|
1085
1086
|
duration: 0
|
|
1086
1087
|
};
|
|
@@ -1826,14 +1827,14 @@ function parseLyric(elements, attrs) {
|
|
|
1826
1827
|
}
|
|
1827
1828
|
function parseBackup(elements) {
|
|
1828
1829
|
return {
|
|
1829
|
-
_id:
|
|
1830
|
+
_id: _chunkS5MWUJU2js.generateId.call(void 0, ),
|
|
1830
1831
|
type: "backup",
|
|
1831
1832
|
duration: parseInt(getElementText(elements, "duration") || "0", 10)
|
|
1832
1833
|
};
|
|
1833
1834
|
}
|
|
1834
1835
|
function parseForward(elements) {
|
|
1835
1836
|
const forward = {
|
|
1836
|
-
_id:
|
|
1837
|
+
_id: _chunkS5MWUJU2js.generateId.call(void 0, ),
|
|
1837
1838
|
type: "forward",
|
|
1838
1839
|
duration: parseInt(getElementText(elements, "duration") || "0", 10)
|
|
1839
1840
|
};
|
|
@@ -1845,7 +1846,7 @@ function parseForward(elements) {
|
|
|
1845
1846
|
}
|
|
1846
1847
|
function parseDirection(elements, attrs) {
|
|
1847
1848
|
const direction = {
|
|
1848
|
-
_id:
|
|
1849
|
+
_id: _chunkS5MWUJU2js.generateId.call(void 0, ),
|
|
1849
1850
|
type: "direction",
|
|
1850
1851
|
directionTypes: []
|
|
1851
1852
|
};
|
|
@@ -2270,7 +2271,7 @@ function parseDirectionTypes(elements) {
|
|
|
2270
2271
|
}
|
|
2271
2272
|
function parseBarline(elements, attrs) {
|
|
2272
2273
|
const location = attrs["location"] || "right";
|
|
2273
|
-
const barline = { _id:
|
|
2274
|
+
const barline = { _id: _chunkS5MWUJU2js.generateId.call(void 0, ), location };
|
|
2274
2275
|
const barStyle = getElementText(elements, "bar-style");
|
|
2275
2276
|
if (barStyle && isValidBarStyle(barStyle)) {
|
|
2276
2277
|
barline.barStyle = barStyle;
|
|
@@ -2502,7 +2503,7 @@ function parseMeasureStyle(elements, attrs) {
|
|
|
2502
2503
|
}
|
|
2503
2504
|
function parseHarmony(elements, attrs) {
|
|
2504
2505
|
const harmony = {
|
|
2505
|
-
_id:
|
|
2506
|
+
_id: _chunkS5MWUJU2js.generateId.call(void 0, ),
|
|
2506
2507
|
type: "harmony",
|
|
2507
2508
|
root: { rootStep: "C" },
|
|
2508
2509
|
kind: "major"
|
|
@@ -2642,7 +2643,7 @@ function parseHarmony(elements, attrs) {
|
|
|
2642
2643
|
}
|
|
2643
2644
|
function parseFiguredBass(elements, attrs) {
|
|
2644
2645
|
const fb = {
|
|
2645
|
-
_id:
|
|
2646
|
+
_id: _chunkS5MWUJU2js.generateId.call(void 0, ),
|
|
2646
2647
|
type: "figured-bass",
|
|
2647
2648
|
figures: []
|
|
2648
2649
|
};
|
|
@@ -2691,7 +2692,7 @@ function parseFiguredBass(elements, attrs) {
|
|
|
2691
2692
|
}
|
|
2692
2693
|
function parseSound(elements, attrs) {
|
|
2693
2694
|
const sound = {
|
|
2694
|
-
_id:
|
|
2695
|
+
_id: _chunkS5MWUJU2js.generateId.call(void 0, ),
|
|
2695
2696
|
type: "sound"
|
|
2696
2697
|
};
|
|
2697
2698
|
if (attrs["tempo"]) sound.tempo = parseFloat(attrs["tempo"]);
|
|
@@ -3732,7 +3733,7 @@ function buildScore(header, voiceTokensList, voiceIds, headerFieldOrder, inlineV
|
|
|
3732
3733
|
const headerVoice = _optionalChain([header, 'access', _2 => _2.voices, 'optionalAccess', _3 => _3.find, 'call', _4 => _4((v) => v.id === voiceId)]) || header.voices && header.voices[voiceIndex];
|
|
3733
3734
|
const voiceName = headerVoice ? headerVoice.name || `Voice ${voiceIndex + 1}` : voiceTokensList.length > 1 ? `Voice ${voiceIndex + 1}` : "Music";
|
|
3734
3735
|
partListEntries.push({
|
|
3735
|
-
_id:
|
|
3736
|
+
_id: _chunkS5MWUJU2js.generateId.call(void 0, ),
|
|
3736
3737
|
type: "score-part",
|
|
3737
3738
|
id: partId,
|
|
3738
3739
|
name: voiceName
|
|
@@ -3740,7 +3741,7 @@ function buildScore(header, voiceTokensList, voiceIds, headerFieldOrder, inlineV
|
|
|
3740
3741
|
const voiceClef = headerVoice ? abcClefToMusicXml(headerVoice.clef) : void 0;
|
|
3741
3742
|
const buildResult = buildMeasures(tokens, unitNote, keySignature, timeSignature, measureDuration, voiceClef);
|
|
3742
3743
|
parts.push({
|
|
3743
|
-
_id:
|
|
3744
|
+
_id: _chunkS5MWUJU2js.generateId.call(void 0, ),
|
|
3744
3745
|
id: partId,
|
|
3745
3746
|
measures: buildResult.measures
|
|
3746
3747
|
});
|
|
@@ -3793,7 +3794,7 @@ function buildScore(header, voiceTokensList, voiceIds, headerFieldOrder, inlineV
|
|
|
3793
3794
|
encoding.encoder = encoderValues;
|
|
3794
3795
|
}
|
|
3795
3796
|
return {
|
|
3796
|
-
_id:
|
|
3797
|
+
_id: _chunkS5MWUJU2js.generateId.call(void 0, ),
|
|
3797
3798
|
metadata: {
|
|
3798
3799
|
movementTitle: header.title,
|
|
3799
3800
|
creators: creators.length > 0 ? creators : void 0,
|
|
@@ -3819,7 +3820,7 @@ function parseTempoToDirection(tempoStr) {
|
|
|
3819
3820
|
if (found) beatUnit = found;
|
|
3820
3821
|
}
|
|
3821
3822
|
return {
|
|
3822
|
-
_id:
|
|
3823
|
+
_id: _chunkS5MWUJU2js.generateId.call(void 0, ),
|
|
3823
3824
|
type: "direction",
|
|
3824
3825
|
directionTypes: [{ kind: "metronome", beatUnit, perMinute }],
|
|
3825
3826
|
placement: "above",
|
|
@@ -3875,7 +3876,7 @@ function buildMeasures(tokens, unitNote, keySignature, timeSignature, measureDur
|
|
|
3875
3876
|
if (dynDir) currentEntries.push(dynDir);
|
|
3876
3877
|
} else if (item.kind === "decoration") {
|
|
3877
3878
|
const decoDir = {
|
|
3878
|
-
_id:
|
|
3879
|
+
_id: _chunkS5MWUJU2js.generateId.call(void 0, ),
|
|
3879
3880
|
type: "direction",
|
|
3880
3881
|
directionTypes: [{ kind: "words", text: item.value }]
|
|
3881
3882
|
};
|
|
@@ -3886,13 +3887,13 @@ function buildMeasures(tokens, unitNote, keySignature, timeSignature, measureDur
|
|
|
3886
3887
|
}
|
|
3887
3888
|
function finalizeMeasure(endBarType) {
|
|
3888
3889
|
const measure = {
|
|
3889
|
-
_id:
|
|
3890
|
+
_id: _chunkS5MWUJU2js.generateId.call(void 0, ),
|
|
3890
3891
|
number: String(measureNumber),
|
|
3891
3892
|
entries: currentEntries
|
|
3892
3893
|
};
|
|
3893
3894
|
if (isFirstMeasure) {
|
|
3894
3895
|
measure.attributes = {
|
|
3895
|
-
_id:
|
|
3896
|
+
_id: _chunkS5MWUJU2js.generateId.call(void 0, ),
|
|
3896
3897
|
divisions: DIVISIONS,
|
|
3897
3898
|
time: timeSignature,
|
|
3898
3899
|
key: keySignature,
|
|
@@ -3902,7 +3903,7 @@ function buildMeasures(tokens, unitNote, keySignature, timeSignature, measureDur
|
|
|
3902
3903
|
}
|
|
3903
3904
|
if (pendingKeyChange) {
|
|
3904
3905
|
if (!measure.attributes) {
|
|
3905
|
-
measure.attributes = { _id:
|
|
3906
|
+
measure.attributes = { _id: _chunkS5MWUJU2js.generateId.call(void 0, ) };
|
|
3906
3907
|
}
|
|
3907
3908
|
const kValue = pendingKeyChange.replace(/^K:\s*/, "");
|
|
3908
3909
|
measure.attributes.key = parseKeySignature2(kValue);
|
|
@@ -4105,7 +4106,7 @@ function buildMeasures(tokens, unitNote, keySignature, timeSignature, measureDur
|
|
|
4105
4106
|
const rightBl = _optionalChain([lastMeasure, 'access', _9 => _9.barlines, 'optionalAccess', _10 => _10.find, 'call', _11 => _11((b) => b.location === "right")]);
|
|
4106
4107
|
if (rightBl) {
|
|
4107
4108
|
const endingBarline2 = {
|
|
4108
|
-
_id:
|
|
4109
|
+
_id: _chunkS5MWUJU2js.generateId.call(void 0, ),
|
|
4109
4110
|
location: "left",
|
|
4110
4111
|
barStyle: rightBl.barStyle,
|
|
4111
4112
|
repeat: rightBl.repeat,
|
|
@@ -4117,7 +4118,7 @@ function buildMeasures(tokens, unitNote, keySignature, timeSignature, measureDur
|
|
|
4117
4118
|
}
|
|
4118
4119
|
}
|
|
4119
4120
|
const endingBarline = {
|
|
4120
|
-
_id:
|
|
4121
|
+
_id: _chunkS5MWUJU2js.generateId.call(void 0, ),
|
|
4121
4122
|
location: "left",
|
|
4122
4123
|
ending: {
|
|
4123
4124
|
number: token.value,
|
|
@@ -4220,7 +4221,7 @@ function buildMeasures(tokens, unitNote, keySignature, timeSignature, measureDur
|
|
|
4220
4221
|
case "overlay": {
|
|
4221
4222
|
if (currentPosition > 0) {
|
|
4222
4223
|
const backupEntry = {
|
|
4223
|
-
_id:
|
|
4224
|
+
_id: _chunkS5MWUJU2js.generateId.call(void 0, ),
|
|
4224
4225
|
type: "backup",
|
|
4225
4226
|
duration: currentPosition
|
|
4226
4227
|
};
|
|
@@ -4234,7 +4235,7 @@ function buildMeasures(tokens, unitNote, keySignature, timeSignature, measureDur
|
|
|
4234
4235
|
if (lMatch) {
|
|
4235
4236
|
currentUnitNote = { num: parseInt(lMatch[1], 10), den: parseInt(lMatch[2], 10) };
|
|
4236
4237
|
const inlineEntry = {
|
|
4237
|
-
_id:
|
|
4238
|
+
_id: _chunkS5MWUJU2js.generateId.call(void 0, ),
|
|
4238
4239
|
type: "direction",
|
|
4239
4240
|
directionTypes: [{ kind: "words", text: `[L:${lMatch[1]}/${lMatch[2]}]` }]
|
|
4240
4241
|
};
|
|
@@ -4253,7 +4254,7 @@ function buildMeasures(tokens, unitNote, keySignature, timeSignature, measureDur
|
|
|
4253
4254
|
if (currentEntries.length > 0) {
|
|
4254
4255
|
const breakText = token.value === "\\\n" ? "__abc_line_cont__" : "__abc_line_break__";
|
|
4255
4256
|
const lineBreakDir = {
|
|
4256
|
-
_id:
|
|
4257
|
+
_id: _chunkS5MWUJU2js.generateId.call(void 0, ),
|
|
4257
4258
|
type: "direction",
|
|
4258
4259
|
directionTypes: [{ kind: "words", text: breakText }]
|
|
4259
4260
|
};
|
|
@@ -4357,7 +4358,7 @@ function createNoteEntry(token, unitNote, _hasTieStop, isGrace, tupletState) {
|
|
|
4357
4358
|
}
|
|
4358
4359
|
const { noteType, dots } = durationToNoteType(isGrace ? lengthToDuration(num, den, unitNote) : duration);
|
|
4359
4360
|
const entry = {
|
|
4360
|
-
_id:
|
|
4361
|
+
_id: _chunkS5MWUJU2js.generateId.call(void 0, ),
|
|
4361
4362
|
type: "note",
|
|
4362
4363
|
pitch: token.pitch,
|
|
4363
4364
|
duration,
|
|
@@ -4411,7 +4412,7 @@ function createRestEntry(token, unitNote, tupletState, measureDuration) {
|
|
|
4411
4412
|
}
|
|
4412
4413
|
const { noteType, dots } = durationToNoteType(duration);
|
|
4413
4414
|
const entry = {
|
|
4414
|
-
_id:
|
|
4415
|
+
_id: _chunkS5MWUJU2js.generateId.call(void 0, ),
|
|
4415
4416
|
type: "note",
|
|
4416
4417
|
rest: isWholeMeasure ? { measure: true } : {},
|
|
4417
4418
|
duration,
|
|
@@ -4426,7 +4427,7 @@ function createRestEntry(token, unitNote, tupletState, measureDuration) {
|
|
|
4426
4427
|
}
|
|
4427
4428
|
function createBarline(barType, location, endingNumber) {
|
|
4428
4429
|
const barline = {
|
|
4429
|
-
_id:
|
|
4430
|
+
_id: _chunkS5MWUJU2js.generateId.call(void 0, ),
|
|
4430
4431
|
location
|
|
4431
4432
|
};
|
|
4432
4433
|
switch (barType) {
|
|
@@ -4517,7 +4518,7 @@ function createHarmonyEntry(chordStr) {
|
|
|
4517
4518
|
break;
|
|
4518
4519
|
}
|
|
4519
4520
|
const entry = {
|
|
4520
|
-
_id:
|
|
4521
|
+
_id: _chunkS5MWUJU2js.generateId.call(void 0, ),
|
|
4521
4522
|
type: "harmony",
|
|
4522
4523
|
root: { rootStep, rootAlter: rootAlter !== void 0 ? rootAlter : void 0 },
|
|
4523
4524
|
kind
|
|
@@ -4536,7 +4537,7 @@ function createHarmonyEntry(chordStr) {
|
|
|
4536
4537
|
function createDynamicsDirection(dynamic) {
|
|
4537
4538
|
if (!DYNAMICS_VALUES.has(dynamic)) return null;
|
|
4538
4539
|
return {
|
|
4539
|
-
_id:
|
|
4540
|
+
_id: _chunkS5MWUJU2js.generateId.call(void 0, ),
|
|
4540
4541
|
type: "direction",
|
|
4541
4542
|
directionTypes: [{
|
|
4542
4543
|
kind: "dynamics",
|
|
@@ -4565,13 +4566,13 @@ function serialize(score, options = {}) {
|
|
|
4565
4566
|
const version = options.version || score.version || "4.0";
|
|
4566
4567
|
const indent = _nullishCoalesce(options.indent, () => ( " "));
|
|
4567
4568
|
if (options.validate) {
|
|
4568
|
-
const result =
|
|
4569
|
+
const result = _chunkS5MWUJU2js.validate.call(void 0, score, options.validateOptions);
|
|
4569
4570
|
if (options.onValidation) {
|
|
4570
4571
|
options.onValidation(result);
|
|
4571
4572
|
}
|
|
4572
4573
|
if (!result.valid && options.throwOnValidationError) {
|
|
4573
4574
|
const errorMessages = result.errors.map((e) => `[${e.code}] ${e.message}`).join("\n");
|
|
4574
|
-
throw new (0,
|
|
4575
|
+
throw new (0, _chunkS5MWUJU2js.ValidationException)(result.errors, `Score validation failed:
|
|
4575
4576
|
${errorMessages}`);
|
|
4576
4577
|
}
|
|
4577
4578
|
}
|
|
@@ -6500,7 +6501,7 @@ function exportMidiWithTimingMap(score, options = {}) {
|
|
|
6500
6501
|
const { tracks, ticksPerQuarterNote, defaultTempo, grid } = buildMidiTracks(score, options);
|
|
6501
6502
|
return {
|
|
6502
6503
|
midi: buildMidiFile(tracks, ticksPerQuarterNote),
|
|
6503
|
-
sidecar:
|
|
6504
|
+
sidecar: _chunkCHMV7XWYjs.buildTimingSidecar.call(void 0, grid, defaultTempo, ticksPerQuarterNote)
|
|
6504
6505
|
};
|
|
6505
6506
|
}
|
|
6506
6507
|
function buildMidiTracks(score, options) {
|
|
@@ -6508,9 +6509,15 @@ function buildMidiTracks(score, options) {
|
|
|
6508
6509
|
const defaultTempo = _nullishCoalesce(options.defaultTempo, () => ( 120));
|
|
6509
6510
|
const defaultVelocity = _nullishCoalesce(options.defaultVelocity, () => ( 80));
|
|
6510
6511
|
const tracks = [];
|
|
6511
|
-
const sequence =
|
|
6512
|
+
const sequence = _chunkCHMV7XWYjs.generatePlaybackSequence.call(void 0, score);
|
|
6512
6513
|
const measureOrder = sequence.map((m) => m.measureIndex);
|
|
6513
|
-
const grid =
|
|
6514
|
+
const grid = _chunkCHMV7XWYjs.buildGridTimeline.call(void 0, score, ticksPerQuarterNote, sequence, {
|
|
6515
|
+
defaultTempo,
|
|
6516
|
+
fermataHoldMultiplier: options.fermataHoldMultiplier,
|
|
6517
|
+
caesuraSeconds: options.caesuraSeconds,
|
|
6518
|
+
breathSeconds: options.breathSeconds,
|
|
6519
|
+
tempoRampSteps: options.tempoRampSteps
|
|
6520
|
+
});
|
|
6514
6521
|
tracks.push(createConductorTrack(score, defaultTempo, grid));
|
|
6515
6522
|
const scoreParts = score.partList.filter((entry) => entry.type === "score-part");
|
|
6516
6523
|
for (let partIndex = 0; partIndex < score.parts.length; partIndex++) {
|
|
@@ -6550,48 +6557,45 @@ function pitchToMidiNote(pitch, chromaticTranspose = 0) {
|
|
|
6550
6557
|
return baseMidi + chromaticTranspose;
|
|
6551
6558
|
}
|
|
6552
6559
|
function createConductorTrack(score, defaultTempo, grid) {
|
|
6553
|
-
const
|
|
6554
|
-
const
|
|
6555
|
-
|
|
6556
|
-
|
|
6557
|
-
const pushTempo = (deltaTick, bpm) => {
|
|
6558
|
-
const usPerQuarter = Math.round(6e7 / bpm);
|
|
6559
|
-
events.push(
|
|
6560
|
-
...writeVariableLength(deltaTick),
|
|
6561
|
-
255,
|
|
6562
|
-
81,
|
|
6563
|
-
3,
|
|
6564
|
-
usPerQuarter >> 16 & 255,
|
|
6565
|
-
usPerQuarter >> 8 & 255,
|
|
6566
|
-
usPerQuarter & 255
|
|
6567
|
-
);
|
|
6560
|
+
const metaEvents = [];
|
|
6561
|
+
const tempoBytes = (bpm) => {
|
|
6562
|
+
const us = _chunkCHMV7XWYjs.bpmToUsPerQuarter.call(void 0, bpm);
|
|
6563
|
+
return [255, 81, 3, us >> 16 & 255, us >> 8 & 255, us & 255];
|
|
6568
6564
|
};
|
|
6569
|
-
|
|
6570
|
-
|
|
6571
|
-
|
|
6572
|
-
|
|
6565
|
+
const tempoEvents = [...grid.tempoEvents].sort((a, b) => a.tick - b.tick);
|
|
6566
|
+
const startBpm = tempoEvents.length > 0 && tempoEvents[0].tick === 0 ? tempoEvents[0].bpm : defaultTempo;
|
|
6567
|
+
metaEvents.push({ tick: 0, order: 0, bytes: tempoBytes(startBpm) });
|
|
6568
|
+
let lastBpm = startBpm;
|
|
6569
|
+
for (const ev of tempoEvents) {
|
|
6570
|
+
if (ev.tick === 0) continue;
|
|
6571
|
+
if (ev.bpm === lastBpm) continue;
|
|
6572
|
+
metaEvents.push({ tick: ev.tick, order: 0, bytes: tempoBytes(ev.bpm) });
|
|
6573
|
+
lastBpm = ev.bpm;
|
|
6574
|
+
}
|
|
6575
|
+
const part = score.parts.length > 0 ? score.parts[0] : void 0;
|
|
6576
|
+
if (part) {
|
|
6577
|
+
let lastSig = null;
|
|
6578
|
+
for (const m of grid.measures) {
|
|
6579
|
+
const time = _optionalChain([part, 'access', _42 => _42.measures, 'access', _43 => _43[m.measureIndex], 'optionalAccess', _44 => _44.attributes, 'optionalAccess', _45 => _45.time]);
|
|
6580
|
+
if (!time) continue;
|
|
6573
6581
|
const numerator = parseInt(time.beats, 10) || 4;
|
|
6574
6582
|
const denominator = Math.log2(time.beatType);
|
|
6575
|
-
|
|
6576
|
-
|
|
6577
|
-
|
|
6578
|
-
|
|
6579
|
-
|
|
6580
|
-
|
|
6581
|
-
denominator,
|
|
6582
|
-
|
|
6583
|
-
8
|
|
6584
|
-
);
|
|
6583
|
+
const sig = `${numerator}/${denominator}`;
|
|
6584
|
+
if (sig === lastSig) continue;
|
|
6585
|
+
lastSig = sig;
|
|
6586
|
+
metaEvents.push({
|
|
6587
|
+
tick: m.startTick,
|
|
6588
|
+
order: 1,
|
|
6589
|
+
bytes: [255, 88, 4, numerator, denominator, 24, 8]
|
|
6590
|
+
});
|
|
6585
6591
|
}
|
|
6586
6592
|
}
|
|
6593
|
+
metaEvents.sort((a, b) => a.tick - b.tick || a.order - b.order);
|
|
6594
|
+
const events = [];
|
|
6587
6595
|
let lastTick = 0;
|
|
6588
|
-
|
|
6589
|
-
|
|
6590
|
-
if (ev.tick === 0) continue;
|
|
6591
|
-
if (ev.bpm === lastBpm) continue;
|
|
6592
|
-
pushTempo(ev.tick - lastTick, ev.bpm);
|
|
6596
|
+
for (const ev of metaEvents) {
|
|
6597
|
+
events.push(...writeVariableLength(ev.tick - lastTick), ...ev.bytes);
|
|
6593
6598
|
lastTick = ev.tick;
|
|
6594
|
-
lastBpm = ev.bpm;
|
|
6595
6599
|
}
|
|
6596
6600
|
events.push(...writeVariableLength(0), 255, 47, 0);
|
|
6597
6601
|
return new Uint8Array(events);
|
|
@@ -6615,10 +6619,10 @@ function createPartTrack(part, _score, channel, program, ticksPerQuarterNote, de
|
|
|
6615
6619
|
for (const measureIndex of measureOrder) {
|
|
6616
6620
|
const measure = part.measures[measureIndex];
|
|
6617
6621
|
if (!measure) continue;
|
|
6618
|
-
if (_optionalChain([measure, 'access',
|
|
6622
|
+
if (_optionalChain([measure, 'access', _46 => _46.attributes, 'optionalAccess', _47 => _47.divisions])) {
|
|
6619
6623
|
divisions = measure.attributes.divisions;
|
|
6620
6624
|
}
|
|
6621
|
-
if (_optionalChain([measure, 'access',
|
|
6625
|
+
if (_optionalChain([measure, 'access', _48 => _48.attributes, 'optionalAccess', _49 => _49.transpose])) {
|
|
6622
6626
|
chromaticTranspose = measure.attributes.transpose.chromatic;
|
|
6623
6627
|
}
|
|
6624
6628
|
const measureStartTick = currentTick;
|
|
@@ -6689,7 +6693,7 @@ function createPartTrack(part, _score, channel, program, ticksPerQuarterNote, de
|
|
|
6689
6693
|
}
|
|
6690
6694
|
}
|
|
6691
6695
|
}
|
|
6692
|
-
currentTick =
|
|
6696
|
+
currentTick = _chunkCHMV7XWYjs.measureEndTick.call(void 0,
|
|
6693
6697
|
measure,
|
|
6694
6698
|
part,
|
|
6695
6699
|
divisions,
|
|
@@ -6908,8 +6912,8 @@ function serializeTimeSignature(time) {
|
|
|
6908
6912
|
return `${time.beats}/${time.beatType}`;
|
|
6909
6913
|
}
|
|
6910
6914
|
function computeUnitNoteLength(score) {
|
|
6911
|
-
const firstMeasure = _optionalChain([score, 'access',
|
|
6912
|
-
const time = _optionalChain([firstMeasure, 'optionalAccess',
|
|
6915
|
+
const firstMeasure = _optionalChain([score, 'access', _50 => _50.parts, 'access', _51 => _51[0], 'optionalAccess', _52 => _52.measures, 'access', _53 => _53[0]]);
|
|
6916
|
+
const time = _optionalChain([firstMeasure, 'optionalAccess', _54 => _54.attributes, 'optionalAccess', _55 => _55.time]);
|
|
6913
6917
|
if (time) {
|
|
6914
6918
|
const beats = parseInt(time.beats, 10);
|
|
6915
6919
|
const beatType = time.beatType;
|
|
@@ -7052,15 +7056,15 @@ function serializeTempo(direction) {
|
|
|
7052
7056
|
}
|
|
7053
7057
|
function serializeAbc(score, options) {
|
|
7054
7058
|
const opts = {
|
|
7055
|
-
referenceNumber: _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
7056
|
-
notesPerLine: _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
7057
|
-
includeChordSymbols: _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
7058
|
-
includeDynamics: _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
7059
|
-
includeLyrics: _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
7059
|
+
referenceNumber: _nullishCoalesce(_optionalChain([options, 'optionalAccess', _56 => _56.referenceNumber]), () => ( 1)),
|
|
7060
|
+
notesPerLine: _nullishCoalesce(_optionalChain([options, 'optionalAccess', _57 => _57.notesPerLine]), () => ( 0)),
|
|
7061
|
+
includeChordSymbols: _nullishCoalesce(_optionalChain([options, 'optionalAccess', _58 => _58.includeChordSymbols]), () => ( true)),
|
|
7062
|
+
includeDynamics: _nullishCoalesce(_optionalChain([options, 'optionalAccess', _59 => _59.includeDynamics]), () => ( true)),
|
|
7063
|
+
includeLyrics: _nullishCoalesce(_optionalChain([options, 'optionalAccess', _60 => _60.includeLyrics]), () => ( true))
|
|
7060
7064
|
};
|
|
7061
|
-
useExplicitHalf = _optionalChain([score, 'access',
|
|
7062
|
-
useIndividualChordDurations = _nullishCoalesce(_optionalChain([score, 'access',
|
|
7063
|
-
const storedUnitNote = _optionalChain([score, 'access',
|
|
7065
|
+
useExplicitHalf = _optionalChain([score, 'access', _61 => _61.metadata, 'access', _62 => _62.miscellaneous, 'optionalAccess', _63 => _63.find, 'call', _64 => _64((m) => m.name === "abc-explicit-half"), 'optionalAccess', _65 => _65.value]) === "true";
|
|
7066
|
+
useIndividualChordDurations = _nullishCoalesce(_optionalChain([score, 'access', _66 => _66.metadata, 'access', _67 => _67.miscellaneous, 'optionalAccess', _68 => _68.some, 'call', _69 => _69((m) => m.name === "abc-chord-individual-durations" && m.value === "true")]), () => ( false));
|
|
7067
|
+
const storedUnitNote = _optionalChain([score, 'access', _70 => _70.metadata, 'access', _71 => _71.miscellaneous, 'optionalAccess', _72 => _72.find, 'call', _73 => _73((m) => m.name === "abc-unit-note-length"), 'optionalAccess', _74 => _74.value]);
|
|
7064
7068
|
let unitNote;
|
|
7065
7069
|
if (storedUnitNote) {
|
|
7066
7070
|
const match = storedUnitNote.match(/^(\d+)\/(\d+)$/);
|
|
@@ -7074,56 +7078,56 @@ function serializeAbc(score, options) {
|
|
|
7074
7078
|
}
|
|
7075
7079
|
const lines = [];
|
|
7076
7080
|
const firstPart = score.parts[0];
|
|
7077
|
-
const firstMeasure = _optionalChain([firstPart, 'optionalAccess',
|
|
7078
|
-
const attrs = _optionalChain([firstMeasure, 'optionalAccess',
|
|
7079
|
-
const storedHeaderOrder = _optionalChain([score, 'access',
|
|
7081
|
+
const firstMeasure = _optionalChain([firstPart, 'optionalAccess', _75 => _75.measures, 'access', _76 => _76[0]]);
|
|
7082
|
+
const attrs = _optionalChain([firstMeasure, 'optionalAccess', _77 => _77.attributes]);
|
|
7083
|
+
const storedHeaderOrder = _optionalChain([score, 'access', _78 => _78.metadata, 'access', _79 => _79.miscellaneous, 'optionalAccess', _80 => _80.find, 'call', _81 => _81((m) => m.name === "abc-header-order"), 'optionalAccess', _82 => _82.value]);
|
|
7080
7084
|
if (storedHeaderOrder) {
|
|
7081
7085
|
const headerOrder = JSON.parse(storedHeaderOrder);
|
|
7082
7086
|
for (const field of headerOrder) {
|
|
7083
7087
|
lines.push(field);
|
|
7084
7088
|
}
|
|
7085
7089
|
} else {
|
|
7086
|
-
const storedRefNum = _optionalChain([score, 'access',
|
|
7090
|
+
const storedRefNum = _optionalChain([score, 'access', _83 => _83.metadata, 'access', _84 => _84.miscellaneous, 'optionalAccess', _85 => _85.find, 'call', _86 => _86((m) => m.name === "abc-reference-number"), 'optionalAccess', _87 => _87.value]);
|
|
7087
7091
|
const refNum = storedRefNum ? parseInt(storedRefNum, 10) : opts.referenceNumber;
|
|
7088
7092
|
lines.push(`X:${refNum}`);
|
|
7089
7093
|
if (score.metadata.movementTitle) {
|
|
7090
7094
|
lines.push(`T:${score.metadata.movementTitle}`);
|
|
7091
7095
|
}
|
|
7092
|
-
const composer = _optionalChain([score, 'access',
|
|
7096
|
+
const composer = _optionalChain([score, 'access', _88 => _88.metadata, 'access', _89 => _89.creators, 'optionalAccess', _90 => _90.find, 'call', _91 => _91((c) => c.type === "composer")]);
|
|
7093
7097
|
if (composer) {
|
|
7094
7098
|
lines.push(`C:${composer.value}`);
|
|
7095
7099
|
}
|
|
7096
|
-
const rhythmFields = _optionalChain([score, 'access',
|
|
7100
|
+
const rhythmFields = _optionalChain([score, 'access', _92 => _92.metadata, 'access', _93 => _93.miscellaneous, 'optionalAccess', _94 => _94.filter, 'call', _95 => _95((m) => m.name === "abc-R")]);
|
|
7097
7101
|
if (rhythmFields) {
|
|
7098
7102
|
for (const rf of rhythmFields) lines.push(`R:${rf.value}`);
|
|
7099
7103
|
}
|
|
7100
|
-
const originCreators = _optionalChain([score, 'access',
|
|
7104
|
+
const originCreators = _optionalChain([score, 'access', _96 => _96.metadata, 'access', _97 => _97.creators, 'optionalAccess', _98 => _98.filter, 'call', _99 => _99((c) => c.type === "origin")]);
|
|
7101
7105
|
if (originCreators) {
|
|
7102
7106
|
for (const oc of originCreators) lines.push(`O:${oc.value}`);
|
|
7103
7107
|
}
|
|
7104
7108
|
if (score.metadata.source) {
|
|
7105
7109
|
lines.push(`S:${score.metadata.source}`);
|
|
7106
7110
|
}
|
|
7107
|
-
const noteFields = _optionalChain([score, 'access',
|
|
7111
|
+
const noteFields = _optionalChain([score, 'access', _100 => _100.metadata, 'access', _101 => _101.miscellaneous, 'optionalAccess', _102 => _102.filter, 'call', _103 => _103((m) => m.name === "abc-N")]);
|
|
7108
7112
|
if (noteFields) {
|
|
7109
7113
|
for (const nf of noteFields) lines.push(`N:${nf.value}`);
|
|
7110
7114
|
}
|
|
7111
|
-
if (_optionalChain([score, 'access',
|
|
7115
|
+
if (_optionalChain([score, 'access', _104 => _104.metadata, 'access', _105 => _105.encoding, 'optionalAccess', _106 => _106.encoder])) {
|
|
7112
7116
|
for (const enc of score.metadata.encoding.encoder) lines.push(`Z:${enc}`);
|
|
7113
7117
|
}
|
|
7114
|
-
const instrFields = _optionalChain([score, 'access',
|
|
7118
|
+
const instrFields = _optionalChain([score, 'access', _107 => _107.metadata, 'access', _108 => _108.miscellaneous, 'optionalAccess', _109 => _109.filter, 'call', _110 => _110((m) => m.name === "abc-I")]);
|
|
7115
7119
|
if (instrFields) {
|
|
7116
7120
|
for (const inf of instrFields) lines.push(`I:${inf.value}`);
|
|
7117
7121
|
}
|
|
7118
|
-
const fileFields = _optionalChain([score, 'access',
|
|
7122
|
+
const fileFields = _optionalChain([score, 'access', _111 => _111.metadata, 'access', _112 => _112.miscellaneous, 'optionalAccess', _113 => _113.filter, 'call', _114 => _114((m) => m.name === "abc-F")]);
|
|
7119
7123
|
if (fileFields) {
|
|
7120
7124
|
for (const ff of fileFields) lines.push(`F:${ff.value}`);
|
|
7121
7125
|
}
|
|
7122
|
-
if (_optionalChain([attrs, 'optionalAccess',
|
|
7126
|
+
if (_optionalChain([attrs, 'optionalAccess', _115 => _115.time])) {
|
|
7123
7127
|
lines.push(`M:${serializeTimeSignature(attrs.time)}`);
|
|
7124
7128
|
}
|
|
7125
7129
|
lines.push(`L:${unitNote.num}/${unitNote.den}`);
|
|
7126
|
-
const storedTempo = _optionalChain([score, 'access',
|
|
7130
|
+
const storedTempo = _optionalChain([score, 'access', _116 => _116.metadata, 'access', _117 => _117.miscellaneous, 'optionalAccess', _118 => _118.find, 'call', _119 => _119((m) => m.name === "abc-tempo"), 'optionalAccess', _120 => _120.value]);
|
|
7127
7131
|
if (storedTempo) {
|
|
7128
7132
|
lines.push(`Q:${storedTempo}`);
|
|
7129
7133
|
} else {
|
|
@@ -7132,24 +7136,24 @@ function serializeAbc(score, options) {
|
|
|
7132
7136
|
lines.push(`Q:${tempoStr}`);
|
|
7133
7137
|
}
|
|
7134
7138
|
}
|
|
7135
|
-
if (_optionalChain([attrs, 'optionalAccess',
|
|
7139
|
+
if (_optionalChain([attrs, 'optionalAccess', _121 => _121.key])) {
|
|
7136
7140
|
lines.push(`K:${serializeKey2(attrs.key)}`);
|
|
7137
7141
|
} else {
|
|
7138
7142
|
lines.push("K:C");
|
|
7139
7143
|
}
|
|
7140
7144
|
}
|
|
7141
|
-
const lineBreaksStr = _optionalChain([score, 'access',
|
|
7145
|
+
const lineBreaksStr = _optionalChain([score, 'access', _122 => _122.metadata, 'access', _123 => _123.miscellaneous, 'optionalAccess', _124 => _124.find, 'call', _125 => _125((m) => m.name === "abc-line-breaks"), 'optionalAccess', _126 => _126.value]);
|
|
7142
7146
|
const lineBreaks = lineBreaksStr ? JSON.parse(lineBreaksStr) : [];
|
|
7143
|
-
const storedVoiceIdsStr = _optionalChain([score, 'access',
|
|
7147
|
+
const storedVoiceIdsStr = _optionalChain([score, 'access', _127 => _127.metadata, 'access', _128 => _128.miscellaneous, 'optionalAccess', _129 => _129.find, 'call', _130 => _130((m) => m.name === "abc-voice-ids"), 'optionalAccess', _131 => _131.value]);
|
|
7144
7148
|
const storedVoiceIds = storedVoiceIdsStr ? JSON.parse(storedVoiceIdsStr) : [];
|
|
7145
|
-
const lyricsAfterAll = _optionalChain([score, 'access',
|
|
7146
|
-
const lyricsLineCountsStr = _optionalChain([score, 'access',
|
|
7149
|
+
const lyricsAfterAll = _optionalChain([score, 'access', _132 => _132.metadata, 'access', _133 => _133.miscellaneous, 'optionalAccess', _134 => _134.find, 'call', _135 => _135((m) => m.name === "abc-lyrics-after-all"), 'optionalAccess', _136 => _136.value]) === "true";
|
|
7150
|
+
const lyricsLineCountsStr = _optionalChain([score, 'access', _137 => _137.metadata, 'access', _138 => _138.miscellaneous, 'optionalAccess', _139 => _139.find, 'call', _140 => _140((m) => m.name === "abc-lyrics-line-counts"), 'optionalAccess', _141 => _141.value]);
|
|
7147
7151
|
const lyricsLineCounts = lyricsLineCountsStr ? JSON.parse(lyricsLineCountsStr) : [];
|
|
7148
|
-
const inlineVoiceMarkersStr = _optionalChain([score, 'access',
|
|
7152
|
+
const inlineVoiceMarkersStr = _optionalChain([score, 'access', _142 => _142.metadata, 'access', _143 => _143.miscellaneous, 'optionalAccess', _144 => _144.find, 'call', _145 => _145((m) => m.name === "abc-inline-voice-markers"), 'optionalAccess', _146 => _146.value]);
|
|
7149
7153
|
const inlineVoiceMarkers = inlineVoiceMarkersStr ? JSON.parse(inlineVoiceMarkersStr) : {};
|
|
7150
7154
|
const useInlineVoiceMarkers = Object.keys(inlineVoiceMarkers).length > 0;
|
|
7151
7155
|
if (useInlineVoiceMarkers) {
|
|
7152
|
-
const voiceDeclStr = _optionalChain([score, 'access',
|
|
7156
|
+
const voiceDeclStr = _optionalChain([score, 'access', _147 => _147.metadata, 'access', _148 => _148.miscellaneous, 'optionalAccess', _149 => _149.find, 'call', _150 => _150((m) => m.name === "abc-voice-declaration-lines"), 'optionalAccess', _151 => _151.value]);
|
|
7153
7157
|
if (voiceDeclStr) {
|
|
7154
7158
|
const voiceDeclLines = JSON.parse(voiceDeclStr);
|
|
7155
7159
|
for (const vl of voiceDeclLines) {
|
|
@@ -7157,23 +7161,23 @@ function serializeAbc(score, options) {
|
|
|
7157
7161
|
}
|
|
7158
7162
|
}
|
|
7159
7163
|
}
|
|
7160
|
-
const bodyCommentsStr = _optionalChain([score, 'access',
|
|
7164
|
+
const bodyCommentsStr = _optionalChain([score, 'access', _152 => _152.metadata, 'access', _153 => _153.miscellaneous, 'optionalAccess', _154 => _154.find, 'call', _155 => _155((m) => m.name === "abc-body-comments"), 'optionalAccess', _156 => _156.value]);
|
|
7161
7165
|
const bodyComments = bodyCommentsStr ? JSON.parse(bodyCommentsStr) : [];
|
|
7162
|
-
const bodyDirectivesStr = _optionalChain([score, 'access',
|
|
7166
|
+
const bodyDirectivesStr = _optionalChain([score, 'access', _157 => _157.metadata, 'access', _158 => _158.miscellaneous, 'optionalAccess', _159 => _159.find, 'call', _160 => _160((m) => m.name === "abc-body-directives"), 'optionalAccess', _161 => _161.value]);
|
|
7163
7167
|
const bodyDirectives = bodyDirectivesStr ? JSON.parse(bodyDirectivesStr) : [];
|
|
7164
|
-
const wFieldsStr = _optionalChain([score, 'access',
|
|
7168
|
+
const wFieldsStr = _optionalChain([score, 'access', _162 => _162.metadata, 'access', _163 => _163.miscellaneous, 'optionalAccess', _164 => _164.find, 'call', _165 => _165((m) => m.name === "abc-w-fields"), 'optionalAccess', _166 => _166.value]);
|
|
7165
7169
|
const wFieldsList = wFieldsStr ? JSON.parse(wFieldsStr) : [];
|
|
7166
|
-
const voiceInterleaveStr = _optionalChain([score, 'access',
|
|
7170
|
+
const voiceInterleaveStr = _optionalChain([score, 'access', _167 => _167.metadata, 'access', _168 => _168.miscellaneous, 'optionalAccess', _169 => _169.find, 'call', _170 => _170((m) => m.name === "abc-voice-interleave"), 'optionalAccess', _171 => _171.value]);
|
|
7167
7171
|
const voiceInterleavePattern = voiceInterleaveStr ? JSON.parse(voiceInterleaveStr) : [];
|
|
7168
|
-
const groupBarCountsStr = _optionalChain([score, 'access',
|
|
7172
|
+
const groupBarCountsStr = _optionalChain([score, 'access', _172 => _172.metadata, 'access', _173 => _173.miscellaneous, 'optionalAccess', _174 => _174.find, 'call', _175 => _175((m) => m.name === "abc-group-bar-counts"), 'optionalAccess', _176 => _176.value]);
|
|
7169
7173
|
const groupBarCounts = groupBarCountsStr ? JSON.parse(groupBarCountsStr) : [];
|
|
7170
|
-
const bodyVoiceLinesStr = _optionalChain([score, 'access',
|
|
7174
|
+
const bodyVoiceLinesStr = _optionalChain([score, 'access', _177 => _177.metadata, 'access', _178 => _178.miscellaneous, 'optionalAccess', _179 => _179.find, 'call', _180 => _180((m) => m.name === "abc-body-voice-lines"), 'optionalAccess', _181 => _181.value]);
|
|
7171
7175
|
const bodyVoiceLines = bodyVoiceLinesStr ? JSON.parse(bodyVoiceLinesStr) : [];
|
|
7172
|
-
const voiceFullLinesStr = _optionalChain([score, 'access',
|
|
7176
|
+
const voiceFullLinesStr = _optionalChain([score, 'access', _182 => _182.metadata, 'access', _183 => _183.miscellaneous, 'optionalAccess', _184 => _184.find, 'call', _185 => _185((m) => m.name === "abc-voice-full-lines"), 'optionalAccess', _186 => _186.value]);
|
|
7173
7177
|
const voiceFullLines = voiceFullLinesStr ? JSON.parse(voiceFullLinesStr) : {};
|
|
7174
|
-
const voiceCommentsStr = _optionalChain([score, 'access',
|
|
7178
|
+
const voiceCommentsStr = _optionalChain([score, 'access', _187 => _187.metadata, 'access', _188 => _188.miscellaneous, 'optionalAccess', _189 => _189.find, 'call', _190 => _190((m) => m.name === "abc-voice-comments"), 'optionalAccess', _191 => _191.value]);
|
|
7175
7179
|
const voiceCommentsData = voiceCommentsStr ? JSON.parse(voiceCommentsStr) : {};
|
|
7176
|
-
const preVoiceCommentsStr = _optionalChain([score, 'access',
|
|
7180
|
+
const preVoiceCommentsStr = _optionalChain([score, 'access', _192 => _192.metadata, 'access', _193 => _193.miscellaneous, 'optionalAccess', _194 => _194.find, 'call', _195 => _195((m) => m.name === "abc-pre-voice-comments"), 'optionalAccess', _196 => _196.value]);
|
|
7177
7181
|
const preVoiceComments = preVoiceCommentsStr ? JSON.parse(preVoiceCommentsStr) : [];
|
|
7178
7182
|
const multiVoice = score.parts.length > 1;
|
|
7179
7183
|
const partMeasureStrings = [];
|
|
@@ -7184,38 +7188,38 @@ function serializeAbc(score, options) {
|
|
|
7184
7188
|
partDivisions.push(divisions);
|
|
7185
7189
|
const measStrings = [];
|
|
7186
7190
|
let currentUnitNote = { ...unitNote };
|
|
7187
|
-
let currentKey = _optionalChain([part, 'access',
|
|
7191
|
+
let currentKey = _optionalChain([part, 'access', _197 => _197.measures, 'access', _198 => _198[0], 'optionalAccess', _199 => _199.attributes, 'optionalAccess', _200 => _200.key]);
|
|
7188
7192
|
for (let mi = 0; mi < part.measures.length; mi++) {
|
|
7189
7193
|
const measure = part.measures[mi];
|
|
7190
|
-
const measDivisions = _nullishCoalesce(_optionalChain([measure, 'access',
|
|
7194
|
+
const measDivisions = _nullishCoalesce(_optionalChain([measure, 'access', _201 => _201.attributes, 'optionalAccess', _202 => _202.divisions]), () => ( divisions));
|
|
7191
7195
|
let measureStr = "";
|
|
7192
|
-
if (mi > 0 && _optionalChain([measure, 'access',
|
|
7196
|
+
if (mi > 0 && _optionalChain([measure, 'access', _203 => _203.attributes, 'optionalAccess', _204 => _204.key])) {
|
|
7193
7197
|
const newKey = measure.attributes.key;
|
|
7194
7198
|
if (currentKey === void 0 || newKey.fifths !== currentKey.fifths || (newKey.mode || "major") !== (currentKey.mode || "major")) {
|
|
7195
7199
|
measureStr += "\nK:" + serializeKey2(newKey) + "\n";
|
|
7196
7200
|
currentKey = newKey;
|
|
7197
7201
|
}
|
|
7198
7202
|
}
|
|
7199
|
-
const leftBarline = _optionalChain([measure, 'access',
|
|
7203
|
+
const leftBarline = _optionalChain([measure, 'access', _205 => _205.barlines, 'optionalAccess', _206 => _206.find, 'call', _207 => _207((b) => b.location === "left")]);
|
|
7200
7204
|
if (leftBarline) {
|
|
7201
7205
|
measureStr += serializeBarline2(leftBarline);
|
|
7202
7206
|
}
|
|
7203
7207
|
const { noteStr, updatedUnitNote } = serializeMeasureEntries(measure, measDivisions, currentUnitNote, opts);
|
|
7204
7208
|
if (updatedUnitNote) currentUnitNote = updatedUnitNote;
|
|
7205
7209
|
measureStr += noteStr;
|
|
7206
|
-
const rightBarline = _optionalChain([measure, 'access',
|
|
7210
|
+
const rightBarline = _optionalChain([measure, 'access', _208 => _208.barlines, 'optionalAccess', _209 => _209.find, 'call', _210 => _210((b) => b.location === "right")]);
|
|
7207
7211
|
if (rightBarline) {
|
|
7208
7212
|
measureStr += serializeBarline2(rightBarline);
|
|
7209
7213
|
} else if (mi < part.measures.length - 1) {
|
|
7210
7214
|
const nextMeasure = part.measures[mi + 1];
|
|
7211
|
-
const nextLeftBarline = _optionalChain([nextMeasure, 'optionalAccess',
|
|
7215
|
+
const nextLeftBarline = _optionalChain([nextMeasure, 'optionalAccess', _211 => _211.barlines, 'optionalAccess', _212 => _212.find, 'call', _213 => _213((b) => b.location === "left" && (b.barStyle || b.repeat))]);
|
|
7212
7216
|
if (!nextLeftBarline) {
|
|
7213
7217
|
measureStr += "|";
|
|
7214
7218
|
}
|
|
7215
7219
|
} else {
|
|
7216
7220
|
const prevMeas = mi > 0 ? part.measures[mi - 1] : null;
|
|
7217
|
-
const prevRightBl = _optionalChain([prevMeas, 'optionalAccess',
|
|
7218
|
-
const prevWasFinal = _optionalChain([prevRightBl, 'optionalAccess',
|
|
7221
|
+
const prevRightBl = _optionalChain([prevMeas, 'optionalAccess', _214 => _214.barlines, 'optionalAccess', _215 => _215.find, 'call', _216 => _216((b) => b.location === "right")]);
|
|
7222
|
+
const prevWasFinal = _optionalChain([prevRightBl, 'optionalAccess', _217 => _217.barStyle]) === "light-heavy" && !prevRightBl.repeat;
|
|
7219
7223
|
if (!prevWasFinal) {
|
|
7220
7224
|
measureStr += "|";
|
|
7221
7225
|
}
|
|
@@ -7257,7 +7261,7 @@ function serializeAbc(score, options) {
|
|
|
7257
7261
|
} else if (voiceFullLines[voiceId]) {
|
|
7258
7262
|
} else {
|
|
7259
7263
|
let voiceLine = `V:${voiceId}`;
|
|
7260
|
-
const partClef = _optionalChain([score, 'access',
|
|
7264
|
+
const partClef = _optionalChain([score, 'access', _218 => _218.parts, 'access', _219 => _219[partIdx], 'optionalAccess', _220 => _220.measures, 'access', _221 => _221[0], 'optionalAccess', _222 => _222.attributes, 'optionalAccess', _223 => _223.clef, 'optionalAccess', _224 => _224[0]]);
|
|
7261
7265
|
if (partClef) {
|
|
7262
7266
|
const clefName = musicXmlClefToAbc(partClef);
|
|
7263
7267
|
if (clefName && clefName !== "treble") {
|
|
@@ -7267,11 +7271,11 @@ function serializeAbc(score, options) {
|
|
|
7267
7271
|
lines.push(voiceLine);
|
|
7268
7272
|
}
|
|
7269
7273
|
const voiceIdxInGroup = group.indexOf(voiceId);
|
|
7270
|
-
const barCount = _nullishCoalesce(_optionalChain([groupBarCounts, 'access',
|
|
7271
|
-
const measuresInGroup = barCount > 0 ? barCount : Math.ceil((_optionalChain([partMeasureStrings, 'access',
|
|
7274
|
+
const barCount = _nullishCoalesce(_optionalChain([groupBarCounts, 'access', _225 => _225[gi], 'optionalAccess', _226 => _226[voiceIdxInGroup]]), () => ( 0));
|
|
7275
|
+
const measuresInGroup = barCount > 0 ? barCount : Math.ceil((_optionalChain([partMeasureStrings, 'access', _227 => _227[0], 'optionalAccess', _228 => _228.length]) || 0) / voiceInterleavePattern.length);
|
|
7272
7276
|
const startMeasure = voiceMeasureCursor[voiceId] || 0;
|
|
7273
7277
|
const endMeasure = Math.min(startMeasure + measuresInGroup, measStrings.length);
|
|
7274
|
-
const voiceLineBreaksStr = _optionalChain([score, 'access',
|
|
7278
|
+
const voiceLineBreaksStr = _optionalChain([score, 'access', _229 => _229.metadata, 'access', _230 => _230.miscellaneous, 'optionalAccess', _231 => _231.find, 'call', _232 => _232((m) => m.name === `abc-line-breaks-${partIdx}`), 'optionalAccess', _233 => _233.value]);
|
|
7275
7279
|
const voiceLineBreaks = voiceLineBreaksStr ? JSON.parse(voiceLineBreaksStr) : lineBreaks;
|
|
7276
7280
|
const voiceLineBreakSet = new Set(voiceLineBreaks.map((v) => Math.abs(v)));
|
|
7277
7281
|
const voiceLineContinuationSet = new Set(voiceLineBreaks.filter((v) => v < 0).map((v) => Math.abs(v)));
|
|
@@ -7310,7 +7314,7 @@ function serializeAbc(score, options) {
|
|
|
7310
7314
|
lines.push(voiceFullLines[voiceId]);
|
|
7311
7315
|
} else {
|
|
7312
7316
|
let voiceLine = `V:${voiceId}`;
|
|
7313
|
-
const partClef = _optionalChain([part, 'access',
|
|
7317
|
+
const partClef = _optionalChain([part, 'access', _234 => _234.measures, 'access', _235 => _235[0], 'optionalAccess', _236 => _236.attributes, 'optionalAccess', _237 => _237.clef, 'optionalAccess', _238 => _238[0]]);
|
|
7314
7318
|
if (partClef) {
|
|
7315
7319
|
const clefName = musicXmlClefToAbc(partClef);
|
|
7316
7320
|
if (clefName && clefName !== "treble") {
|
|
@@ -7340,7 +7344,7 @@ function serializeAbc(score, options) {
|
|
|
7340
7344
|
for (const wField of wFieldsList) {
|
|
7341
7345
|
lines.push(wField);
|
|
7342
7346
|
}
|
|
7343
|
-
const trailingCommentsStr = _optionalChain([score, 'access',
|
|
7347
|
+
const trailingCommentsStr = _optionalChain([score, 'access', _239 => _239.metadata, 'access', _240 => _240.miscellaneous, 'optionalAccess', _241 => _241.find, 'call', _242 => _242((m) => m.name === "abc-trailing-comments"), 'optionalAccess', _243 => _243.value]);
|
|
7344
7348
|
const trailingComments = trailingCommentsStr ? JSON.parse(trailingCommentsStr) : [];
|
|
7345
7349
|
for (const comment of trailingComments) {
|
|
7346
7350
|
lines.push(comment);
|
|
@@ -7359,7 +7363,7 @@ function findTempoInMeasure(measure) {
|
|
|
7359
7363
|
}
|
|
7360
7364
|
function getPartDivisions(part) {
|
|
7361
7365
|
for (const measure of part.measures) {
|
|
7362
|
-
if (_optionalChain([measure, 'access',
|
|
7366
|
+
if (_optionalChain([measure, 'access', _244 => _244.attributes, 'optionalAccess', _245 => _245.divisions])) {
|
|
7363
7367
|
return measure.attributes.divisions;
|
|
7364
7368
|
}
|
|
7365
7369
|
for (const entry of measure.entries) {
|
|
@@ -7374,18 +7378,18 @@ function serializePartBody(part, divisions, initialUnitNote, opts, lineBreaks =
|
|
|
7374
7378
|
let unitNote = { ...initialUnitNote };
|
|
7375
7379
|
const musicParts = [];
|
|
7376
7380
|
const allLyrics = /* @__PURE__ */ new Map();
|
|
7377
|
-
let currentKey = _optionalChain([part, 'access',
|
|
7381
|
+
let currentKey = _optionalChain([part, 'access', _246 => _246.measures, 'access', _247 => _247[0], 'optionalAccess', _248 => _248.attributes, 'optionalAccess', _249 => _249.key]);
|
|
7378
7382
|
for (let mi = 0; mi < part.measures.length; mi++) {
|
|
7379
7383
|
const measure = part.measures[mi];
|
|
7380
|
-
const measDivisions = _nullishCoalesce(_optionalChain([measure, 'access',
|
|
7381
|
-
if (mi > 0 && _optionalChain([measure, 'access',
|
|
7384
|
+
const measDivisions = _nullishCoalesce(_optionalChain([measure, 'access', _250 => _250.attributes, 'optionalAccess', _251 => _251.divisions]), () => ( divisions));
|
|
7385
|
+
if (mi > 0 && _optionalChain([measure, 'access', _252 => _252.attributes, 'optionalAccess', _253 => _253.key])) {
|
|
7382
7386
|
const newKey = measure.attributes.key;
|
|
7383
7387
|
if (currentKey === void 0 || newKey.fifths !== currentKey.fifths || (newKey.mode || "major") !== (currentKey.mode || "major")) {
|
|
7384
7388
|
musicParts.push("\nK:" + serializeKey2(newKey) + "\n");
|
|
7385
7389
|
currentKey = newKey;
|
|
7386
7390
|
}
|
|
7387
7391
|
}
|
|
7388
|
-
const leftBarline = _optionalChain([measure, 'access',
|
|
7392
|
+
const leftBarline = _optionalChain([measure, 'access', _254 => _254.barlines, 'optionalAccess', _255 => _255.find, 'call', _256 => _256((b) => b.location === "left")]);
|
|
7389
7393
|
if (leftBarline) {
|
|
7390
7394
|
musicParts.push(serializeBarline2(leftBarline));
|
|
7391
7395
|
}
|
|
@@ -7402,19 +7406,19 @@ function serializePartBody(part, divisions, initialUnitNote, opts, lineBreaks =
|
|
|
7402
7406
|
if (lyrics.length > 0) {
|
|
7403
7407
|
allLyrics.set(mi, lyrics);
|
|
7404
7408
|
}
|
|
7405
|
-
const rightBarline = _optionalChain([measure, 'access',
|
|
7409
|
+
const rightBarline = _optionalChain([measure, 'access', _257 => _257.barlines, 'optionalAccess', _258 => _258.find, 'call', _259 => _259((b) => b.location === "right")]);
|
|
7406
7410
|
if (rightBarline) {
|
|
7407
7411
|
musicParts.push(serializeBarline2(rightBarline));
|
|
7408
7412
|
} else if (mi < part.measures.length - 1) {
|
|
7409
7413
|
const nextMeas = part.measures[mi + 1];
|
|
7410
|
-
const nextLeftBar = _optionalChain([nextMeas, 'optionalAccess',
|
|
7414
|
+
const nextLeftBar = _optionalChain([nextMeas, 'optionalAccess', _260 => _260.barlines, 'optionalAccess', _261 => _261.find, 'call', _262 => _262((b) => b.location === "left" && (b.barStyle || b.repeat))]);
|
|
7411
7415
|
if (!nextLeftBar) {
|
|
7412
7416
|
musicParts.push("|");
|
|
7413
7417
|
}
|
|
7414
7418
|
} else {
|
|
7415
7419
|
const prevMeas = mi > 0 ? part.measures[mi - 1] : null;
|
|
7416
|
-
const prevRightBl = _optionalChain([prevMeas, 'optionalAccess',
|
|
7417
|
-
const prevWasFinal = _optionalChain([prevRightBl, 'optionalAccess',
|
|
7420
|
+
const prevRightBl = _optionalChain([prevMeas, 'optionalAccess', _263 => _263.barlines, 'optionalAccess', _264 => _264.find, 'call', _265 => _265((b) => b.location === "right")]);
|
|
7421
|
+
const prevWasFinal = _optionalChain([prevRightBl, 'optionalAccess', _266 => _266.barStyle]) === "light-heavy" && !prevRightBl.repeat;
|
|
7418
7422
|
if (!prevWasFinal) {
|
|
7419
7423
|
musicParts.push("|");
|
|
7420
7424
|
}
|
|
@@ -7553,7 +7557,7 @@ function serializeMeasureEntries(measure, divisions, unitNote, opts) {
|
|
|
7553
7557
|
if (chordHasIndividualDurations) {
|
|
7554
7558
|
chordNoteStr += serialized.duration;
|
|
7555
7559
|
}
|
|
7556
|
-
if (_optionalChain([note, 'access',
|
|
7560
|
+
if (_optionalChain([note, 'access', _267 => _267.tie, 'optionalAccess', _268 => _268.type]) === "start" || _optionalChain([note, 'access', _269 => _269.ties, 'optionalAccess', _270 => _270.some, 'call', _271 => _271((t) => t.type === "start")])) {
|
|
7557
7561
|
chordNoteStr += "-";
|
|
7558
7562
|
}
|
|
7559
7563
|
chordPitches.push(chordNoteStr);
|
|
@@ -7591,9 +7595,9 @@ function serializeMeasureEntries(measure, divisions, unitNote, opts) {
|
|
|
7591
7595
|
const baseDuration = Math.round(note.duration * note.timeModification.actualNotes / note.timeModification.normalNotes);
|
|
7592
7596
|
const { num, den } = durationToAbcFraction(baseDuration, divisions, currentUnitNote);
|
|
7593
7597
|
const baseDurationStr = formatAbcDuration(num, den);
|
|
7594
|
-
const pitchStr = serializePitch2(note.pitch, _optionalChain([note, 'access',
|
|
7598
|
+
const pitchStr = serializePitch2(note.pitch, _optionalChain([note, 'access', _272 => _272.accidental, 'optionalAccess', _273 => _273.value]) === "natural");
|
|
7595
7599
|
let tieStr = "";
|
|
7596
|
-
if (_optionalChain([note, 'access',
|
|
7600
|
+
if (_optionalChain([note, 'access', _274 => _274.tie, 'optionalAccess', _275 => _275.type]) === "start" || _optionalChain([note, 'access', _276 => _276.ties, 'optionalAccess', _277 => _277.some, 'call', _278 => _278((t) => t.type === "start")])) {
|
|
7597
7601
|
tieStr = "-";
|
|
7598
7602
|
}
|
|
7599
7603
|
let slurStart = "";
|
|
@@ -7621,7 +7625,7 @@ function serializeMeasureEntries(measure, divisions, unitNote, opts) {
|
|
|
7621
7625
|
const hasIndividualDur = detectChordIndividualDurations(measure.entries, ei);
|
|
7622
7626
|
chordHasIndividualDurations = hasIndividualDur;
|
|
7623
7627
|
const hasPerNoteTies = detectChordPerNoteTies(measure.entries, ei);
|
|
7624
|
-
const firstNoteTie = _optionalChain([note, 'access',
|
|
7628
|
+
const firstNoteTie = _optionalChain([note, 'access', _279 => _279.tie, 'optionalAccess', _280 => _280.type]) === "start" || _optionalChain([note, 'access', _281 => _281.ties, 'optionalAccess', _282 => _282.some, 'call', _283 => _283((t) => t.type === "start")]);
|
|
7625
7629
|
let firstNoteStr = hasIndividualDur ? effectiveSerialized.pitch + effectiveSerialized.duration : effectiveSerialized.pitch;
|
|
7626
7630
|
if (hasPerNoteTies && firstNoteTie) {
|
|
7627
7631
|
firstNoteStr += "-";
|
|
@@ -7687,9 +7691,9 @@ function serializeMeasureEntries(measure, divisions, unitNote, opts) {
|
|
|
7687
7691
|
const slurE1 = effectiveSerialized.slurEnd;
|
|
7688
7692
|
parts.push(tupletPrefix + slurS1 + pitchStr1 + baseDurStr1 + tie1 + brokenResult.marker);
|
|
7689
7693
|
const note2 = brokenResult.nextNote;
|
|
7690
|
-
const pitchStr2 = serializePitch2(note2.pitch, _optionalChain([note2, 'access',
|
|
7694
|
+
const pitchStr2 = serializePitch2(note2.pitch, _optionalChain([note2, 'access', _284 => _284.accidental, 'optionalAccess', _285 => _285.value]) === "natural");
|
|
7691
7695
|
let tieStr2 = "";
|
|
7692
|
-
if (_optionalChain([note2, 'access',
|
|
7696
|
+
if (_optionalChain([note2, 'access', _286 => _286.tie, 'optionalAccess', _287 => _287.type]) === "start" || _optionalChain([note2, 'access', _288 => _288.ties, 'optionalAccess', _289 => _289.some, 'call', _290 => _290((t) => t.type === "start")])) tieStr2 = "-";
|
|
7693
7697
|
let slurEnd2 = "";
|
|
7694
7698
|
if (note2.notations) {
|
|
7695
7699
|
for (const notation of note2.notations) {
|
|
@@ -7810,14 +7814,14 @@ function detectChordPerNoteTies(entries, startIdx) {
|
|
|
7810
7814
|
let totalCount = 1;
|
|
7811
7815
|
const firstNote = entries[startIdx];
|
|
7812
7816
|
if (firstNote.type === "note") {
|
|
7813
|
-
const hasTieStart2 = _optionalChain([firstNote, 'access',
|
|
7817
|
+
const hasTieStart2 = _optionalChain([firstNote, 'access', _291 => _291.tie, 'optionalAccess', _292 => _292.type]) === "start" || _optionalChain([firstNote, 'access', _293 => _293.ties, 'optionalAccess', _294 => _294.some, 'call', _295 => _295((t) => t.type === "start")]);
|
|
7814
7818
|
if (hasTieStart2) tiedCount++;
|
|
7815
7819
|
}
|
|
7816
7820
|
for (let i = startIdx + 1; i < entries.length; i++) {
|
|
7817
7821
|
const e = entries[i];
|
|
7818
7822
|
if (e.type !== "note" || !e.chord) break;
|
|
7819
7823
|
totalCount++;
|
|
7820
|
-
const hasTieStart2 = _optionalChain([e, 'access',
|
|
7824
|
+
const hasTieStart2 = _optionalChain([e, 'access', _296 => _296.tie, 'optionalAccess', _297 => _297.type]) === "start" || _optionalChain([e, 'access', _298 => _298.ties, 'optionalAccess', _299 => _299.some, 'call', _300 => _300((t) => t.type === "start")]);
|
|
7821
7825
|
if (hasTieStart2) tiedCount++;
|
|
7822
7826
|
}
|
|
7823
7827
|
return tiedCount > 1 || tiedCount > 0 && totalCount > 1;
|
|
@@ -7850,17 +7854,17 @@ function serializeNote2(note, divisions, unitNote, _inChord) {
|
|
|
7850
7854
|
}
|
|
7851
7855
|
} else if (note.grace) {
|
|
7852
7856
|
if (note.pitch) {
|
|
7853
|
-
pitchStr = serializePitch2(note.pitch, _optionalChain([note, 'access',
|
|
7857
|
+
pitchStr = serializePitch2(note.pitch, _optionalChain([note, 'access', _301 => _301.accidental, 'optionalAccess', _302 => _302.value]) === "natural");
|
|
7854
7858
|
}
|
|
7855
7859
|
durationStr = "";
|
|
7856
7860
|
} else if (note.pitch) {
|
|
7857
|
-
pitchStr = serializePitch2(note.pitch, _optionalChain([note, 'access',
|
|
7861
|
+
pitchStr = serializePitch2(note.pitch, _optionalChain([note, 'access', _303 => _303.accidental, 'optionalAccess', _304 => _304.value]) === "natural");
|
|
7858
7862
|
const effectiveDuration = note.duration;
|
|
7859
7863
|
const { num, den } = durationToAbcFraction(effectiveDuration, divisions, unitNote);
|
|
7860
7864
|
durationStr = formatAbcDuration(num, den);
|
|
7861
7865
|
}
|
|
7862
7866
|
let tieStr = "";
|
|
7863
|
-
if (_optionalChain([note, 'access',
|
|
7867
|
+
if (_optionalChain([note, 'access', _305 => _305.tie, 'optionalAccess', _306 => _306.type]) === "start" || _optionalChain([note, 'access', _307 => _307.ties, 'optionalAccess', _308 => _308.some, 'call', _309 => _309((t) => t.type === "start")])) {
|
|
7864
7868
|
tieStr = "-";
|
|
7865
7869
|
}
|
|
7866
7870
|
let slurStart = "";
|
|
@@ -7877,8 +7881,8 @@ function serializeNote2(note, divisions, unitNote, _inChord) {
|
|
|
7877
7881
|
return { full, pitch: pitchStr, duration: durationStr, slurStart, slurEnd, tieStr };
|
|
7878
7882
|
}
|
|
7879
7883
|
function serializeBarline2(barline) {
|
|
7880
|
-
const hasRepeatForward = _optionalChain([barline, 'access',
|
|
7881
|
-
const hasRepeatBackward = _optionalChain([barline, 'access',
|
|
7884
|
+
const hasRepeatForward = _optionalChain([barline, 'access', _310 => _310.repeat, 'optionalAccess', _311 => _311.direction]) === "forward";
|
|
7885
|
+
const hasRepeatBackward = _optionalChain([barline, 'access', _312 => _312.repeat, 'optionalAccess', _313 => _313.direction]) === "backward";
|
|
7882
7886
|
const hasEnding = barline.ending;
|
|
7883
7887
|
let result = "";
|
|
7884
7888
|
if (hasRepeatForward) {
|
|
@@ -8209,4 +8213,4 @@ async function serializeToFile(score, filePath, options = {}) {
|
|
|
8209
8213
|
|
|
8210
8214
|
|
|
8211
8215
|
|
|
8212
|
-
exports.STEPS = _chunkF6GPX6VWjs.STEPS; exports.STEP_SEMITONES = _chunkF6GPX6VWjs.STEP_SEMITONES; exports.ValidationException = _chunkHQEOMBJXjs.ValidationException; exports.addArticulation = _chunkHQEOMBJXjs.addArticulation; exports.addBeam = _chunkHQEOMBJXjs.addBeam; exports.addBowing = _chunkHQEOMBJXjs.addBowing; exports.addBreathMark = _chunkHQEOMBJXjs.addBreathMark; exports.addCaesura = _chunkHQEOMBJXjs.addCaesura; exports.addChord = _chunkHQEOMBJXjs.addChord; exports.addChordNote = _chunkHQEOMBJXjs.addChordNote; exports.addChordNoteChecked = _chunkHQEOMBJXjs.addChordNoteChecked; exports.addChordSymbol = _chunkHQEOMBJXjs.addChordSymbol; exports.addCoda = _chunkHQEOMBJXjs.addCoda; exports.addDaCapo = _chunkHQEOMBJXjs.addDaCapo; exports.addDalSegno = _chunkHQEOMBJXjs.addDalSegno; exports.addDynamics = _chunkHQEOMBJXjs.addDynamics; exports.addEnding = _chunkHQEOMBJXjs.addEnding; exports.addFermata = _chunkHQEOMBJXjs.addFermata; exports.addFine = _chunkHQEOMBJXjs.addFine; exports.addFingering = _chunkHQEOMBJXjs.addFingering; exports.addGraceNote = _chunkHQEOMBJXjs.addGraceNote; exports.addHarmony = _chunkHQEOMBJXjs.addHarmony; exports.addLyric = _chunkHQEOMBJXjs.addLyric; exports.addNote = _chunkHQEOMBJXjs.addNote; exports.addNoteChecked = _chunkHQEOMBJXjs.addNoteChecked; exports.addOctaveShift = _chunkHQEOMBJXjs.addOctaveShift; exports.addOrnament = _chunkHQEOMBJXjs.addOrnament; exports.addPart = _chunkHQEOMBJXjs.addPart; exports.addPedal = _chunkHQEOMBJXjs.addPedal; exports.addRehearsalMark = _chunkHQEOMBJXjs.addRehearsalMark; exports.addRepeat = _chunkHQEOMBJXjs.addRepeat; exports.addRepeatBarline = _chunkHQEOMBJXjs.addRepeatBarline; exports.addSegno = _chunkHQEOMBJXjs.addSegno; exports.addSlur = _chunkHQEOMBJXjs.addSlur; exports.addStringNumber = _chunkHQEOMBJXjs.addStringNumber; exports.addTempo = _chunkHQEOMBJXjs.addTempo; exports.addText = _chunkHQEOMBJXjs.addText; exports.addTextDirection = _chunkHQEOMBJXjs.addTextDirection; exports.addTie = _chunkHQEOMBJXjs.addTie; exports.addToCoda = _chunkHQEOMBJXjs.addToCoda; exports.addVoice = _chunkHQEOMBJXjs.addVoice; exports.addWedge = _chunkHQEOMBJXjs.addWedge; exports.assertMeasureValid = _chunkHQEOMBJXjs.assertMeasureValid; exports.assertValid = _chunkHQEOMBJXjs.assertValid; exports.autoBeam = _chunkHQEOMBJXjs.autoBeam; exports.buildVoiceToStaffMap = _chunkF6GPX6VWjs.buildVoiceToStaffMap; exports.buildVoiceToStaffMapForPart = _chunkF6GPX6VWjs.buildVoiceToStaffMapForPart; exports.changeBarline = _chunkHQEOMBJXjs.changeBarline; exports.changeClef = _chunkHQEOMBJXjs.changeClef; exports.changeKey = _chunkHQEOMBJXjs.changeKey; exports.changeNoteDuration = _chunkHQEOMBJXjs.changeNoteDuration; exports.changeTime = _chunkHQEOMBJXjs.changeTime; exports.convertToGrace = _chunkHQEOMBJXjs.convertToGrace; exports.copyNotes = _chunkHQEOMBJXjs.copyNotes; exports.copyNotesMultiMeasure = _chunkHQEOMBJXjs.copyNotesMultiMeasure; exports.countNotes = _chunkF6GPX6VWjs.countNotes; exports.createTuplet = _chunkHQEOMBJXjs.createTuplet; exports.cutNotes = _chunkHQEOMBJXjs.cutNotes; exports.decodeBuffer = decodeBuffer; exports.deleteMeasure = _chunkHQEOMBJXjs.deleteMeasure; exports.deleteNote = _chunkHQEOMBJXjs.deleteNote; exports.deleteNoteChecked = _chunkHQEOMBJXjs.deleteNoteChecked; exports.duplicatePart = _chunkHQEOMBJXjs.duplicatePart; exports.exportMidi = exportMidi; exports.exportMidiWithTimingMap = exportMidiWithTimingMap; exports.extractPlaybackControls = _chunkF6GPX6VWjs.extractPlaybackControls; exports.findBarlines = _chunkF6GPX6VWjs.findBarlines; exports.findDirectionsByType = _chunkF6GPX6VWjs.findDirectionsByType; exports.findNotes = _chunkF6GPX6VWjs.findNotes; exports.findNotesWithNotation = _chunkF6GPX6VWjs.findNotesWithNotation; exports.formatLocation = _chunkHQEOMBJXjs.formatLocation; exports.generateId = _chunkHQEOMBJXjs.generateId; exports.generatePlaybackSequence = _chunkF6GPX6VWjs.generatePlaybackSequence; exports.generatePlaybackTimeline = _chunkF6GPX6VWjs.generatePlaybackTimeline; exports.getAbsolutePosition = _chunkF6GPX6VWjs.getAbsolutePosition; exports.getAdjacentNotes = _chunkF6GPX6VWjs.getAdjacentNotes; exports.getAllNotes = _chunkF6GPX6VWjs.getAllNotes; exports.getAllPartInfos = getAllPartInfos; exports.getAttributesAtMeasure = _chunkF6GPX6VWjs.getAttributesAtMeasure; exports.getBeamGroups = _chunkF6GPX6VWjs.getBeamGroups; exports.getChordProgression = _chunkF6GPX6VWjs.getChordProgression; exports.getChords = _chunkF6GPX6VWjs.getChords; exports.getClefChanges = _chunkF6GPX6VWjs.getClefChanges; exports.getClefForStaff = _chunkF6GPX6VWjs.getClefForStaff; exports.getDirectionOfKind = getDirectionOfKind; exports.getDirections = _chunkF6GPX6VWjs.getDirections; exports.getDirectionsAtPosition = _chunkF6GPX6VWjs.getDirectionsAtPosition; exports.getDirectionsOfKind = getDirectionsOfKind; exports.getDivisions = _chunkF6GPX6VWjs.getDivisions; exports.getDuration = _chunkF6GPX6VWjs.getDuration; exports.getDynamics = _chunkF6GPX6VWjs.getDynamics; exports.getEffectiveStaff = _chunkF6GPX6VWjs.getEffectiveStaff; exports.getEndings = _chunkF6GPX6VWjs.getEndings; exports.getEntriesAtPosition = _chunkF6GPX6VWjs.getEntriesAtPosition; exports.getEntriesForStaff = _chunkF6GPX6VWjs.getEntriesForStaff; exports.getEntriesInRange = _chunkF6GPX6VWjs.getEntriesInRange; exports.getHarmonies = _chunkF6GPX6VWjs.getHarmonies; exports.getHarmonyAtPosition = _chunkF6GPX6VWjs.getHarmonyAtPosition; exports.getKeyChanges = _chunkF6GPX6VWjs.getKeyChanges; exports.getLyricText = _chunkF6GPX6VWjs.getLyricText; exports.getLyrics = _chunkF6GPX6VWjs.getLyrics; exports.getMeasure = _chunkF6GPX6VWjs.getMeasure; exports.getMeasureByIndex = _chunkF6GPX6VWjs.getMeasureByIndex; exports.getMeasureContext = _chunkHQEOMBJXjs.getMeasureContext; exports.getMeasureCount = _chunkF6GPX6VWjs.getMeasureCount; exports.getMeasureEndPosition = _chunkF6GPX6VWjs.getMeasureEndPosition; exports.getNextNote = _chunkF6GPX6VWjs.getNextNote; exports.getNormalizedDuration = _chunkF6GPX6VWjs.getNormalizedDuration; exports.getNormalizedPosition = _chunkF6GPX6VWjs.getNormalizedPosition; exports.getNotesAtPosition = _chunkF6GPX6VWjs.getNotesAtPosition; exports.getNotesForStaff = _chunkF6GPX6VWjs.getNotesForStaff; exports.getNotesForVoice = _chunkF6GPX6VWjs.getNotesForVoice; exports.getNotesInRange = _chunkF6GPX6VWjs.getNotesInRange; exports.getOctaveShifts = _chunkF6GPX6VWjs.getOctaveShifts; exports.getPartAbbreviation = getPartAbbreviation; exports.getPartById = _chunkF6GPX6VWjs.getPartById; exports.getPartByIndex = _chunkF6GPX6VWjs.getPartByIndex; exports.getPartCount = _chunkF6GPX6VWjs.getPartCount; exports.getPartIds = _chunkF6GPX6VWjs.getPartIds; exports.getPartIndex = _chunkF6GPX6VWjs.getPartIndex; exports.getPartInfo = getPartInfo; exports.getPartName = getPartName; exports.getPartNameMap = getPartNameMap; exports.getPedalMarkings = _chunkF6GPX6VWjs.getPedalMarkings; exports.getPrevNote = _chunkF6GPX6VWjs.getPrevNote; exports.getRepeatStructure = _chunkF6GPX6VWjs.getRepeatStructure; exports.getSlurSpans = _chunkF6GPX6VWjs.getSlurSpans; exports.getSoundDamperPedal = getSoundDamperPedal; exports.getSoundDynamics = getSoundDynamics; exports.getSoundSoftPedal = getSoundSoftPedal; exports.getSoundSostenutoPedal = getSoundSostenutoPedal; exports.getSoundTempo = getSoundTempo; exports.getStaffRange = _chunkF6GPX6VWjs.getStaffRange; exports.getStaveCount = _chunkF6GPX6VWjs.getStaveCount; exports.getStaves = _chunkF6GPX6VWjs.getStaves; exports.getStructuralChanges = _chunkF6GPX6VWjs.getStructuralChanges; exports.getTempoMarkings = _chunkF6GPX6VWjs.getTempoMarkings; exports.getTiedNoteGroups = _chunkF6GPX6VWjs.getTiedNoteGroups; exports.getTimeChanges = _chunkF6GPX6VWjs.getTimeChanges; exports.getTupletGroups = _chunkF6GPX6VWjs.getTupletGroups; exports.getVerseCount = _chunkF6GPX6VWjs.getVerseCount; exports.getVerticalSlice = _chunkF6GPX6VWjs.getVerticalSlice; exports.getVoiceLine = _chunkF6GPX6VWjs.getVoiceLine; exports.getVoiceLineInRange = _chunkF6GPX6VWjs.getVoiceLineInRange; exports.getVoices = _chunkF6GPX6VWjs.getVoices; exports.getVoicesForStaff = _chunkF6GPX6VWjs.getVoicesForStaff; exports.getWedges = _chunkF6GPX6VWjs.getWedges; exports.groupByStaff = _chunkF6GPX6VWjs.groupByStaff; exports.groupByVoice = _chunkF6GPX6VWjs.groupByVoice; exports.hasBeam = hasBeam; exports.hasDirectionOfKind = hasDirectionOfKind; exports.hasLyrics = hasLyrics; exports.hasMultipleStaves = _chunkF6GPX6VWjs.hasMultipleStaves; exports.hasNotations = hasNotations; exports.hasNotes = _chunkF6GPX6VWjs.hasNotes; exports.hasPlaybackControls = _chunkF6GPX6VWjs.hasPlaybackControls; exports.hasTie = hasTie; exports.hasTieStart = hasTieStart; exports.hasTieStop = hasTieStop; exports.hasTuplet = hasTuplet; exports.inferStaff = _chunkF6GPX6VWjs.inferStaff; exports.insertClefChange = _chunkHQEOMBJXjs.insertClefChange; exports.insertMeasure = _chunkHQEOMBJXjs.insertMeasure; exports.insertNote = _chunkHQEOMBJXjs.insertNote; exports.isChordNote = isChordNote; exports.isCompressed = isCompressed; exports.isCueNote = isCueNote; exports.isGraceNote = isGraceNote; exports.isPartInfo = isPartInfo; exports.isPitchedNote = isPitchedNote; exports.isRest = isRest; exports.isRestMeasure = _chunkF6GPX6VWjs.isRestMeasure; exports.isUnpitchedNote = isUnpitchedNote; exports.isValid = _chunkHQEOMBJXjs.isValid; exports.iterateEntries = _chunkF6GPX6VWjs.iterateEntries; exports.iterateNotes = _chunkF6GPX6VWjs.iterateNotes; exports.lowerAccidental = _chunkHQEOMBJXjs.lowerAccidental; exports.measureRoundtrip = _chunkF6GPX6VWjs.measureRoundtrip; exports.modifyDynamics = _chunkHQEOMBJXjs.modifyDynamics; exports.modifyNoteDuration = _chunkHQEOMBJXjs.modifyNoteDuration; exports.modifyNoteDurationChecked = _chunkHQEOMBJXjs.modifyNoteDurationChecked; exports.modifyNotePitch = _chunkHQEOMBJXjs.modifyNotePitch; exports.modifyNotePitchChecked = _chunkHQEOMBJXjs.modifyNotePitchChecked; exports.modifyTempo = _chunkHQEOMBJXjs.modifyTempo; exports.moveNoteToStaff = _chunkHQEOMBJXjs.moveNoteToStaff; exports.parse = parse; exports.parseAbc = parseAbc; exports.parseAuto = parseAuto; exports.parseCompressed = parseCompressed; exports.parseFile = parseFile; exports.pasteNotes = _chunkHQEOMBJXjs.pasteNotes; exports.pasteNotesMultiMeasure = _chunkHQEOMBJXjs.pasteNotesMultiMeasure; exports.pitchToSemitone = _chunkF6GPX6VWjs.pitchToSemitone; exports.raiseAccidental = _chunkHQEOMBJXjs.raiseAccidental; exports.removeArticulation = _chunkHQEOMBJXjs.removeArticulation; exports.removeBeam = _chunkHQEOMBJXjs.removeBeam; exports.removeBowing = _chunkHQEOMBJXjs.removeBowing; exports.removeBreathMark = _chunkHQEOMBJXjs.removeBreathMark; exports.removeCaesura = _chunkHQEOMBJXjs.removeCaesura; exports.removeChordSymbol = _chunkHQEOMBJXjs.removeChordSymbol; exports.removeDynamics = _chunkHQEOMBJXjs.removeDynamics; exports.removeEnding = _chunkHQEOMBJXjs.removeEnding; exports.removeFermata = _chunkHQEOMBJXjs.removeFermata; exports.removeFingering = _chunkHQEOMBJXjs.removeFingering; exports.removeGraceNote = _chunkHQEOMBJXjs.removeGraceNote; exports.removeHarmony = _chunkHQEOMBJXjs.removeHarmony; exports.removeLyric = _chunkHQEOMBJXjs.removeLyric; exports.removeNote = _chunkHQEOMBJXjs.removeNote; exports.removeOctaveShift = _chunkHQEOMBJXjs.removeOctaveShift; exports.removeOrnament = _chunkHQEOMBJXjs.removeOrnament; exports.removePart = _chunkHQEOMBJXjs.removePart; exports.removePedal = _chunkHQEOMBJXjs.removePedal; exports.removeRepeat = _chunkHQEOMBJXjs.removeRepeat; exports.removeRepeatBarline = _chunkHQEOMBJXjs.removeRepeatBarline; exports.removeSlur = _chunkHQEOMBJXjs.removeSlur; exports.removeStringNumber = _chunkHQEOMBJXjs.removeStringNumber; exports.removeTempo = _chunkHQEOMBJXjs.removeTempo; exports.removeTie = _chunkHQEOMBJXjs.removeTie; exports.removeTuplet = _chunkHQEOMBJXjs.removeTuplet; exports.removeWedge = _chunkHQEOMBJXjs.removeWedge; exports.scoresEqual = _chunkF6GPX6VWjs.scoresEqual; exports.serialize = serialize; exports.serializeAbc = serializeAbc; exports.serializeCompressed = serializeCompressed; exports.serializeToFile = serializeToFile; exports.setBarline = _chunkHQEOMBJXjs.setBarline; exports.setBeaming = _chunkHQEOMBJXjs.setBeaming; exports.setNotePitch = _chunkHQEOMBJXjs.setNotePitch; exports.setNotePitchBySemitone = _chunkHQEOMBJXjs.setNotePitchBySemitone; exports.setStaves = _chunkHQEOMBJXjs.setStaves; exports.shiftNotePitch = _chunkHQEOMBJXjs.shiftNotePitch; exports.stopOctaveShift = _chunkHQEOMBJXjs.stopOctaveShift; exports.transpose = _chunkHQEOMBJXjs.transpose; exports.transposeChecked = _chunkHQEOMBJXjs.transposeChecked; exports.updateChordSymbol = _chunkHQEOMBJXjs.updateChordSymbol; exports.updateHarmony = _chunkHQEOMBJXjs.updateHarmony; exports.updateLyric = _chunkHQEOMBJXjs.updateLyric; exports.validate = _chunkHQEOMBJXjs.validate; exports.validateBackupForward = _chunkHQEOMBJXjs.validateBackupForward; exports.validateBeams = _chunkHQEOMBJXjs.validateBeams; exports.validateDivisions = _chunkHQEOMBJXjs.validateDivisions; exports.validateMeasureDuration = _chunkHQEOMBJXjs.validateMeasureDuration; exports.validateMeasureLocal = _chunkHQEOMBJXjs.validateMeasureLocal; exports.validatePartReferences = _chunkHQEOMBJXjs.validatePartReferences; exports.validatePartStructure = _chunkHQEOMBJXjs.validatePartStructure; exports.validateSlurs = _chunkHQEOMBJXjs.validateSlurs; exports.validateSlursAcrossMeasures = _chunkHQEOMBJXjs.validateSlursAcrossMeasures; exports.validateStaffStructure = _chunkHQEOMBJXjs.validateStaffStructure; exports.validateTies = _chunkHQEOMBJXjs.validateTies; exports.validateTiesAcrossMeasures = _chunkHQEOMBJXjs.validateTiesAcrossMeasures; exports.validateTuplets = _chunkHQEOMBJXjs.validateTuplets; exports.validateVoiceStaff = _chunkHQEOMBJXjs.validateVoiceStaff; exports.withAbsolutePositions = _chunkF6GPX6VWjs.withAbsolutePositions;
|
|
8216
|
+
exports.STEPS = _chunkCHMV7XWYjs.STEPS; exports.STEP_SEMITONES = _chunkCHMV7XWYjs.STEP_SEMITONES; exports.ValidationException = _chunkS5MWUJU2js.ValidationException; exports.addArticulation = _chunkS5MWUJU2js.addArticulation; exports.addBeam = _chunkS5MWUJU2js.addBeam; exports.addBowing = _chunkS5MWUJU2js.addBowing; exports.addBreathMark = _chunkS5MWUJU2js.addBreathMark; exports.addCaesura = _chunkS5MWUJU2js.addCaesura; exports.addChord = _chunkS5MWUJU2js.addChord; exports.addChordNote = _chunkS5MWUJU2js.addChordNote; exports.addChordNoteChecked = _chunkS5MWUJU2js.addChordNoteChecked; exports.addChordSymbol = _chunkS5MWUJU2js.addChordSymbol; exports.addCoda = _chunkS5MWUJU2js.addCoda; exports.addDaCapo = _chunkS5MWUJU2js.addDaCapo; exports.addDalSegno = _chunkS5MWUJU2js.addDalSegno; exports.addDynamics = _chunkS5MWUJU2js.addDynamics; exports.addEnding = _chunkS5MWUJU2js.addEnding; exports.addFermata = _chunkS5MWUJU2js.addFermata; exports.addFine = _chunkS5MWUJU2js.addFine; exports.addFingering = _chunkS5MWUJU2js.addFingering; exports.addGraceNote = _chunkS5MWUJU2js.addGraceNote; exports.addHarmony = _chunkS5MWUJU2js.addHarmony; exports.addLyric = _chunkS5MWUJU2js.addLyric; exports.addNote = _chunkS5MWUJU2js.addNote; exports.addNoteChecked = _chunkS5MWUJU2js.addNoteChecked; exports.addOctaveShift = _chunkS5MWUJU2js.addOctaveShift; exports.addOrnament = _chunkS5MWUJU2js.addOrnament; exports.addPart = _chunkS5MWUJU2js.addPart; exports.addPedal = _chunkS5MWUJU2js.addPedal; exports.addRehearsalMark = _chunkS5MWUJU2js.addRehearsalMark; exports.addRepeat = _chunkS5MWUJU2js.addRepeat; exports.addRepeatBarline = _chunkS5MWUJU2js.addRepeatBarline; exports.addSegno = _chunkS5MWUJU2js.addSegno; exports.addSlur = _chunkS5MWUJU2js.addSlur; exports.addStringNumber = _chunkS5MWUJU2js.addStringNumber; exports.addTempo = _chunkS5MWUJU2js.addTempo; exports.addText = _chunkS5MWUJU2js.addText; exports.addTextDirection = _chunkS5MWUJU2js.addTextDirection; exports.addTie = _chunkS5MWUJU2js.addTie; exports.addToCoda = _chunkS5MWUJU2js.addToCoda; exports.addVoice = _chunkS5MWUJU2js.addVoice; exports.addWedge = _chunkS5MWUJU2js.addWedge; exports.assertMeasureValid = _chunkS5MWUJU2js.assertMeasureValid; exports.assertValid = _chunkS5MWUJU2js.assertValid; exports.autoBeam = _chunkS5MWUJU2js.autoBeam; exports.buildVoiceToStaffMap = _chunkCHMV7XWYjs.buildVoiceToStaffMap; exports.buildVoiceToStaffMapForPart = _chunkCHMV7XWYjs.buildVoiceToStaffMapForPart; exports.changeBarline = _chunkS5MWUJU2js.changeBarline; exports.changeClef = _chunkS5MWUJU2js.changeClef; exports.changeKey = _chunkS5MWUJU2js.changeKey; exports.changeNoteDuration = _chunkS5MWUJU2js.changeNoteDuration; exports.changeTime = _chunkS5MWUJU2js.changeTime; exports.convertToGrace = _chunkS5MWUJU2js.convertToGrace; exports.copyNotes = _chunkS5MWUJU2js.copyNotes; exports.copyNotesMultiMeasure = _chunkS5MWUJU2js.copyNotesMultiMeasure; exports.countNotes = _chunkCHMV7XWYjs.countNotes; exports.createTuplet = _chunkS5MWUJU2js.createTuplet; exports.cutNotes = _chunkS5MWUJU2js.cutNotes; exports.decodeBuffer = decodeBuffer; exports.deleteMeasure = _chunkS5MWUJU2js.deleteMeasure; exports.deleteNote = _chunkS5MWUJU2js.deleteNote; exports.deleteNoteChecked = _chunkS5MWUJU2js.deleteNoteChecked; exports.duplicatePart = _chunkS5MWUJU2js.duplicatePart; exports.exportMidi = exportMidi; exports.exportMidiWithTimingMap = exportMidiWithTimingMap; exports.extractPlaybackControls = _chunkCHMV7XWYjs.extractPlaybackControls; exports.findBarlines = _chunkCHMV7XWYjs.findBarlines; exports.findDirectionsByType = _chunkCHMV7XWYjs.findDirectionsByType; exports.findNotes = _chunkCHMV7XWYjs.findNotes; exports.findNotesWithNotation = _chunkCHMV7XWYjs.findNotesWithNotation; exports.formatLocation = _chunkS5MWUJU2js.formatLocation; exports.generateId = _chunkS5MWUJU2js.generateId; exports.generatePlaybackSequence = _chunkCHMV7XWYjs.generatePlaybackSequence; exports.generatePlaybackTimeline = _chunkCHMV7XWYjs.generatePlaybackTimeline; exports.getAbsolutePosition = _chunkCHMV7XWYjs.getAbsolutePosition; exports.getAdjacentNotes = _chunkCHMV7XWYjs.getAdjacentNotes; exports.getAllNotes = _chunkCHMV7XWYjs.getAllNotes; exports.getAllPartInfos = getAllPartInfos; exports.getAttributesAtMeasure = _chunkCHMV7XWYjs.getAttributesAtMeasure; exports.getBeamGroups = _chunkCHMV7XWYjs.getBeamGroups; exports.getChordProgression = _chunkCHMV7XWYjs.getChordProgression; exports.getChords = _chunkCHMV7XWYjs.getChords; exports.getClefChanges = _chunkCHMV7XWYjs.getClefChanges; exports.getClefForStaff = _chunkCHMV7XWYjs.getClefForStaff; exports.getDirectionOfKind = getDirectionOfKind; exports.getDirections = _chunkCHMV7XWYjs.getDirections; exports.getDirectionsAtPosition = _chunkCHMV7XWYjs.getDirectionsAtPosition; exports.getDirectionsOfKind = getDirectionsOfKind; exports.getDivisions = _chunkCHMV7XWYjs.getDivisions; exports.getDuration = _chunkCHMV7XWYjs.getDuration; exports.getDynamics = _chunkCHMV7XWYjs.getDynamics; exports.getEffectiveStaff = _chunkCHMV7XWYjs.getEffectiveStaff; exports.getEndings = _chunkCHMV7XWYjs.getEndings; exports.getEntriesAtPosition = _chunkCHMV7XWYjs.getEntriesAtPosition; exports.getEntriesForStaff = _chunkCHMV7XWYjs.getEntriesForStaff; exports.getEntriesInRange = _chunkCHMV7XWYjs.getEntriesInRange; exports.getHarmonies = _chunkCHMV7XWYjs.getHarmonies; exports.getHarmonyAtPosition = _chunkCHMV7XWYjs.getHarmonyAtPosition; exports.getKeyChanges = _chunkCHMV7XWYjs.getKeyChanges; exports.getLyricText = _chunkCHMV7XWYjs.getLyricText; exports.getLyrics = _chunkCHMV7XWYjs.getLyrics; exports.getMeasure = _chunkCHMV7XWYjs.getMeasure; exports.getMeasureByIndex = _chunkCHMV7XWYjs.getMeasureByIndex; exports.getMeasureContext = _chunkS5MWUJU2js.getMeasureContext; exports.getMeasureCount = _chunkCHMV7XWYjs.getMeasureCount; exports.getMeasureEndPosition = _chunkCHMV7XWYjs.getMeasureEndPosition; exports.getNextNote = _chunkCHMV7XWYjs.getNextNote; exports.getNormalizedDuration = _chunkCHMV7XWYjs.getNormalizedDuration; exports.getNormalizedPosition = _chunkCHMV7XWYjs.getNormalizedPosition; exports.getNotesAtPosition = _chunkCHMV7XWYjs.getNotesAtPosition; exports.getNotesForStaff = _chunkCHMV7XWYjs.getNotesForStaff; exports.getNotesForVoice = _chunkCHMV7XWYjs.getNotesForVoice; exports.getNotesInRange = _chunkCHMV7XWYjs.getNotesInRange; exports.getOctaveShifts = _chunkCHMV7XWYjs.getOctaveShifts; exports.getPartAbbreviation = getPartAbbreviation; exports.getPartById = _chunkCHMV7XWYjs.getPartById; exports.getPartByIndex = _chunkCHMV7XWYjs.getPartByIndex; exports.getPartCount = _chunkCHMV7XWYjs.getPartCount; exports.getPartIds = _chunkCHMV7XWYjs.getPartIds; exports.getPartIndex = _chunkCHMV7XWYjs.getPartIndex; exports.getPartInfo = getPartInfo; exports.getPartName = getPartName; exports.getPartNameMap = getPartNameMap; exports.getPedalMarkings = _chunkCHMV7XWYjs.getPedalMarkings; exports.getPrevNote = _chunkCHMV7XWYjs.getPrevNote; exports.getRepeatStructure = _chunkCHMV7XWYjs.getRepeatStructure; exports.getSlurSpans = _chunkCHMV7XWYjs.getSlurSpans; exports.getSoundDamperPedal = getSoundDamperPedal; exports.getSoundDynamics = getSoundDynamics; exports.getSoundSoftPedal = getSoundSoftPedal; exports.getSoundSostenutoPedal = getSoundSostenutoPedal; exports.getSoundTempo = getSoundTempo; exports.getStaffRange = _chunkCHMV7XWYjs.getStaffRange; exports.getStaveCount = _chunkCHMV7XWYjs.getStaveCount; exports.getStaves = _chunkCHMV7XWYjs.getStaves; exports.getStructuralChanges = _chunkCHMV7XWYjs.getStructuralChanges; exports.getTempoMarkings = _chunkCHMV7XWYjs.getTempoMarkings; exports.getTiedNoteGroups = _chunkCHMV7XWYjs.getTiedNoteGroups; exports.getTimeChanges = _chunkCHMV7XWYjs.getTimeChanges; exports.getTupletGroups = _chunkCHMV7XWYjs.getTupletGroups; exports.getVerseCount = _chunkCHMV7XWYjs.getVerseCount; exports.getVerticalSlice = _chunkCHMV7XWYjs.getVerticalSlice; exports.getVoiceLine = _chunkCHMV7XWYjs.getVoiceLine; exports.getVoiceLineInRange = _chunkCHMV7XWYjs.getVoiceLineInRange; exports.getVoices = _chunkCHMV7XWYjs.getVoices; exports.getVoicesForStaff = _chunkCHMV7XWYjs.getVoicesForStaff; exports.getWedges = _chunkCHMV7XWYjs.getWedges; exports.groupByStaff = _chunkCHMV7XWYjs.groupByStaff; exports.groupByVoice = _chunkCHMV7XWYjs.groupByVoice; exports.hasBeam = hasBeam; exports.hasDirectionOfKind = hasDirectionOfKind; exports.hasLyrics = hasLyrics; exports.hasMultipleStaves = _chunkCHMV7XWYjs.hasMultipleStaves; exports.hasNotations = hasNotations; exports.hasNotes = _chunkCHMV7XWYjs.hasNotes; exports.hasPlaybackControls = _chunkCHMV7XWYjs.hasPlaybackControls; exports.hasTie = hasTie; exports.hasTieStart = hasTieStart; exports.hasTieStop = hasTieStop; exports.hasTuplet = hasTuplet; exports.inferStaff = _chunkCHMV7XWYjs.inferStaff; exports.insertClefChange = _chunkS5MWUJU2js.insertClefChange; exports.insertMeasure = _chunkS5MWUJU2js.insertMeasure; exports.insertNote = _chunkS5MWUJU2js.insertNote; exports.isChordNote = isChordNote; exports.isCompressed = isCompressed; exports.isCueNote = isCueNote; exports.isGraceNote = isGraceNote; exports.isPartInfo = isPartInfo; exports.isPitchedNote = isPitchedNote; exports.isRest = isRest; exports.isRestMeasure = _chunkCHMV7XWYjs.isRestMeasure; exports.isUnpitchedNote = isUnpitchedNote; exports.isValid = _chunkS5MWUJU2js.isValid; exports.iterateEntries = _chunkCHMV7XWYjs.iterateEntries; exports.iterateNotes = _chunkCHMV7XWYjs.iterateNotes; exports.lowerAccidental = _chunkS5MWUJU2js.lowerAccidental; exports.measureRoundtrip = _chunkCHMV7XWYjs.measureRoundtrip; exports.modifyDynamics = _chunkS5MWUJU2js.modifyDynamics; exports.modifyNoteDuration = _chunkS5MWUJU2js.modifyNoteDuration; exports.modifyNoteDurationChecked = _chunkS5MWUJU2js.modifyNoteDurationChecked; exports.modifyNotePitch = _chunkS5MWUJU2js.modifyNotePitch; exports.modifyNotePitchChecked = _chunkS5MWUJU2js.modifyNotePitchChecked; exports.modifyTempo = _chunkS5MWUJU2js.modifyTempo; exports.moveNoteToStaff = _chunkS5MWUJU2js.moveNoteToStaff; exports.parse = parse; exports.parseAbc = parseAbc; exports.parseAuto = parseAuto; exports.parseCompressed = parseCompressed; exports.parseFile = parseFile; exports.pasteNotes = _chunkS5MWUJU2js.pasteNotes; exports.pasteNotesMultiMeasure = _chunkS5MWUJU2js.pasteNotesMultiMeasure; exports.pitchToSemitone = _chunkCHMV7XWYjs.pitchToSemitone; exports.raiseAccidental = _chunkS5MWUJU2js.raiseAccidental; exports.removeArticulation = _chunkS5MWUJU2js.removeArticulation; exports.removeBeam = _chunkS5MWUJU2js.removeBeam; exports.removeBowing = _chunkS5MWUJU2js.removeBowing; exports.removeBreathMark = _chunkS5MWUJU2js.removeBreathMark; exports.removeCaesura = _chunkS5MWUJU2js.removeCaesura; exports.removeChordSymbol = _chunkS5MWUJU2js.removeChordSymbol; exports.removeDynamics = _chunkS5MWUJU2js.removeDynamics; exports.removeEnding = _chunkS5MWUJU2js.removeEnding; exports.removeFermata = _chunkS5MWUJU2js.removeFermata; exports.removeFingering = _chunkS5MWUJU2js.removeFingering; exports.removeGraceNote = _chunkS5MWUJU2js.removeGraceNote; exports.removeHarmony = _chunkS5MWUJU2js.removeHarmony; exports.removeLyric = _chunkS5MWUJU2js.removeLyric; exports.removeNote = _chunkS5MWUJU2js.removeNote; exports.removeOctaveShift = _chunkS5MWUJU2js.removeOctaveShift; exports.removeOrnament = _chunkS5MWUJU2js.removeOrnament; exports.removePart = _chunkS5MWUJU2js.removePart; exports.removePedal = _chunkS5MWUJU2js.removePedal; exports.removeRepeat = _chunkS5MWUJU2js.removeRepeat; exports.removeRepeatBarline = _chunkS5MWUJU2js.removeRepeatBarline; exports.removeSlur = _chunkS5MWUJU2js.removeSlur; exports.removeStringNumber = _chunkS5MWUJU2js.removeStringNumber; exports.removeTempo = _chunkS5MWUJU2js.removeTempo; exports.removeTie = _chunkS5MWUJU2js.removeTie; exports.removeTuplet = _chunkS5MWUJU2js.removeTuplet; exports.removeWedge = _chunkS5MWUJU2js.removeWedge; exports.scoresEqual = _chunkCHMV7XWYjs.scoresEqual; exports.serialize = serialize; exports.serializeAbc = serializeAbc; exports.serializeCompressed = serializeCompressed; exports.serializeToFile = serializeToFile; exports.setBarline = _chunkS5MWUJU2js.setBarline; exports.setBeaming = _chunkS5MWUJU2js.setBeaming; exports.setNotePitch = _chunkS5MWUJU2js.setNotePitch; exports.setNotePitchBySemitone = _chunkS5MWUJU2js.setNotePitchBySemitone; exports.setStaves = _chunkS5MWUJU2js.setStaves; exports.shiftNotePitch = _chunkS5MWUJU2js.shiftNotePitch; exports.stopOctaveShift = _chunkS5MWUJU2js.stopOctaveShift; exports.transpose = _chunkS5MWUJU2js.transpose; exports.transposeChecked = _chunkS5MWUJU2js.transposeChecked; exports.updateChordSymbol = _chunkS5MWUJU2js.updateChordSymbol; exports.updateHarmony = _chunkS5MWUJU2js.updateHarmony; exports.updateLyric = _chunkS5MWUJU2js.updateLyric; exports.validate = _chunkS5MWUJU2js.validate; exports.validateBackupForward = _chunkS5MWUJU2js.validateBackupForward; exports.validateBeams = _chunkS5MWUJU2js.validateBeams; exports.validateDivisions = _chunkS5MWUJU2js.validateDivisions; exports.validateMeasureDuration = _chunkS5MWUJU2js.validateMeasureDuration; exports.validateMeasureLocal = _chunkS5MWUJU2js.validateMeasureLocal; exports.validatePartReferences = _chunkS5MWUJU2js.validatePartReferences; exports.validatePartStructure = _chunkS5MWUJU2js.validatePartStructure; exports.validateSlurs = _chunkS5MWUJU2js.validateSlurs; exports.validateSlursAcrossMeasures = _chunkS5MWUJU2js.validateSlursAcrossMeasures; exports.validateStaffStructure = _chunkS5MWUJU2js.validateStaffStructure; exports.validateTies = _chunkS5MWUJU2js.validateTies; exports.validateTiesAcrossMeasures = _chunkS5MWUJU2js.validateTiesAcrossMeasures; exports.validateTuplets = _chunkS5MWUJU2js.validateTuplets; exports.validateVoiceStaff = _chunkS5MWUJU2js.validateVoiceStaff; exports.withAbsolutePositions = _chunkCHMV7XWYjs.withAbsolutePositions;
|