musicxml-io 0.8.1 → 0.8.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/README.md +19 -3
- package/dist/accessors/index.d.mts +185 -0
- package/dist/accessors/index.d.ts +185 -0
- package/dist/accessors/index.js +58 -0
- package/dist/accessors/index.mjs +58 -0
- package/dist/browser.d.mts +171 -0
- package/dist/browser.d.ts +171 -0
- package/dist/browser.js +510 -0
- package/dist/browser.mjs +510 -0
- package/dist/chunk-53J57HX6.mjs +7645 -0
- package/dist/{chunk-KJXV3TD4.js → chunk-BQKGH2LT.js} +22 -3
- package/dist/chunk-C6ZNOTY2.js +7645 -0
- package/dist/{chunk-D5NOEHYN.mjs → chunk-CLONJVWZ.mjs} +22 -3
- package/dist/chunk-OEX7NVZN.js +120 -0
- package/dist/chunk-R6JMBTUB.mjs +120 -0
- package/dist/{index-_2RxeLOf.d.mts → index-BGUfI7Li.d.mts} +2 -2
- package/dist/{index-rtFmAs-i.d.ts → index-se1B-IZl.d.ts} +2 -2
- package/dist/index.d.mts +8 -350
- package/dist/index.d.ts +8 -350
- package/dist/index.js +45 -7715
- package/dist/index.mjs +42 -7712
- package/dist/operations/index.d.mts +2 -2
- package/dist/operations/index.d.ts +2 -2
- package/dist/operations/index.js +2 -2
- package/dist/operations/index.mjs +1 -1
- package/dist/query/index.d.mts +1 -1
- package/dist/query/index.d.ts +1 -1
- package/dist/{types-CzsW5TLm.d.mts → types-B_6pqTfs.d.mts} +1 -1
- package/dist/{types-CzsW5TLm.d.ts → types-B_6pqTfs.d.ts} +1 -1
- package/package.json +12 -2
|
@@ -11,11 +11,30 @@ import {
|
|
|
11
11
|
} from "./chunk-UMEH3ENQ.mjs";
|
|
12
12
|
|
|
13
13
|
// src/id.ts
|
|
14
|
-
import { customAlphabet } from "nanoid";
|
|
15
14
|
var ALPHABET = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_-";
|
|
16
|
-
var
|
|
15
|
+
var ID_LENGTH = 10;
|
|
16
|
+
var POOL_SIZE = ID_LENGTH * 128;
|
|
17
|
+
var pool;
|
|
18
|
+
var poolOffset = 0;
|
|
19
|
+
function randomBytes() {
|
|
20
|
+
if (pool === void 0 || poolOffset + ID_LENGTH > POOL_SIZE) {
|
|
21
|
+
if (pool === void 0) {
|
|
22
|
+
pool = new Uint8Array(POOL_SIZE);
|
|
23
|
+
}
|
|
24
|
+
globalThis.crypto.getRandomValues(pool);
|
|
25
|
+
poolOffset = 0;
|
|
26
|
+
}
|
|
27
|
+
const bytes = pool.subarray(poolOffset, poolOffset + ID_LENGTH);
|
|
28
|
+
poolOffset += ID_LENGTH;
|
|
29
|
+
return bytes;
|
|
30
|
+
}
|
|
17
31
|
function generateId() {
|
|
18
|
-
|
|
32
|
+
const bytes = randomBytes();
|
|
33
|
+
let id = "i";
|
|
34
|
+
for (let i = 0; i < ID_LENGTH; i++) {
|
|
35
|
+
id += ALPHABET[bytes[i] & 63];
|
|
36
|
+
}
|
|
37
|
+
return id;
|
|
19
38
|
}
|
|
20
39
|
|
|
21
40
|
// src/validator/index.ts
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }// src/entry-accessors.ts
|
|
2
|
+
function getDirectionOfKind(entry, kind) {
|
|
3
|
+
return entry.directionTypes.find((d) => d.kind === kind);
|
|
4
|
+
}
|
|
5
|
+
function getDirectionsOfKind(entry, kind) {
|
|
6
|
+
return entry.directionTypes.filter((d) => d.kind === kind);
|
|
7
|
+
}
|
|
8
|
+
function hasDirectionOfKind(entry, kind) {
|
|
9
|
+
return entry.directionTypes.some((d) => d.kind === kind);
|
|
10
|
+
}
|
|
11
|
+
function getSoundTempo(entry) {
|
|
12
|
+
return _optionalChain([entry, 'access', _ => _.sound, 'optionalAccess', _2 => _2.tempo]);
|
|
13
|
+
}
|
|
14
|
+
function getSoundDynamics(entry) {
|
|
15
|
+
return _optionalChain([entry, 'access', _3 => _3.sound, 'optionalAccess', _4 => _4.dynamics]);
|
|
16
|
+
}
|
|
17
|
+
function getSoundDamperPedal(entry) {
|
|
18
|
+
return _optionalChain([entry, 'access', _5 => _5.sound, 'optionalAccess', _6 => _6.damperPedal]);
|
|
19
|
+
}
|
|
20
|
+
function getSoundSoftPedal(entry) {
|
|
21
|
+
return _optionalChain([entry, 'access', _7 => _7.sound, 'optionalAccess', _8 => _8.softPedal]);
|
|
22
|
+
}
|
|
23
|
+
function getSoundSostenutoPedal(entry) {
|
|
24
|
+
return _optionalChain([entry, 'access', _9 => _9.sound, 'optionalAccess', _10 => _10.sostenutoPedal]);
|
|
25
|
+
}
|
|
26
|
+
function isRest(entry) {
|
|
27
|
+
return entry.rest !== void 0 || !entry.pitch && !entry.unpitched;
|
|
28
|
+
}
|
|
29
|
+
function isPitchedNote(entry) {
|
|
30
|
+
return entry.pitch !== void 0;
|
|
31
|
+
}
|
|
32
|
+
function isUnpitchedNote(entry) {
|
|
33
|
+
return entry.unpitched !== void 0;
|
|
34
|
+
}
|
|
35
|
+
function isChordNote(entry) {
|
|
36
|
+
return entry.chord === true;
|
|
37
|
+
}
|
|
38
|
+
function isGraceNote(entry) {
|
|
39
|
+
return entry.grace !== void 0;
|
|
40
|
+
}
|
|
41
|
+
function hasTie(entry) {
|
|
42
|
+
return entry.tie !== void 0 || entry.ties !== void 0 && entry.ties.length > 0;
|
|
43
|
+
}
|
|
44
|
+
function hasTieStart(entry) {
|
|
45
|
+
if (_optionalChain([entry, 'access', _11 => _11.tie, 'optionalAccess', _12 => _12.type]) === "start") return true;
|
|
46
|
+
return _nullishCoalesce(_optionalChain([entry, 'access', _13 => _13.ties, 'optionalAccess', _14 => _14.some, 'call', _15 => _15((t) => t.type === "start")]), () => ( false));
|
|
47
|
+
}
|
|
48
|
+
function hasTieStop(entry) {
|
|
49
|
+
if (_optionalChain([entry, 'access', _16 => _16.tie, 'optionalAccess', _17 => _17.type]) === "stop") return true;
|
|
50
|
+
return _nullishCoalesce(_optionalChain([entry, 'access', _18 => _18.ties, 'optionalAccess', _19 => _19.some, 'call', _20 => _20((t) => t.type === "stop")]), () => ( false));
|
|
51
|
+
}
|
|
52
|
+
function isCueNote(entry) {
|
|
53
|
+
return entry.cue === true;
|
|
54
|
+
}
|
|
55
|
+
function hasBeam(entry) {
|
|
56
|
+
return entry.beam !== void 0 && entry.beam.length > 0;
|
|
57
|
+
}
|
|
58
|
+
function hasLyrics(entry) {
|
|
59
|
+
return entry.lyrics !== void 0 && entry.lyrics.length > 0;
|
|
60
|
+
}
|
|
61
|
+
function hasNotations(entry) {
|
|
62
|
+
return entry.notations !== void 0 && entry.notations.length > 0;
|
|
63
|
+
}
|
|
64
|
+
function hasTuplet(entry) {
|
|
65
|
+
return entry.timeModification !== void 0;
|
|
66
|
+
}
|
|
67
|
+
function isPartInfo(entry) {
|
|
68
|
+
return entry.type === "score-part";
|
|
69
|
+
}
|
|
70
|
+
function getPartInfo(score, partId) {
|
|
71
|
+
return score.partList.find((entry) => {
|
|
72
|
+
return entry.type === "score-part" && entry.id === partId;
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
function getPartName(score, partId) {
|
|
76
|
+
return _optionalChain([getPartInfo, 'call', _21 => _21(score, partId), 'optionalAccess', _22 => _22.name]);
|
|
77
|
+
}
|
|
78
|
+
function getPartAbbreviation(score, partId) {
|
|
79
|
+
return _optionalChain([getPartInfo, 'call', _23 => _23(score, partId), 'optionalAccess', _24 => _24.abbreviation]);
|
|
80
|
+
}
|
|
81
|
+
function getAllPartInfos(score) {
|
|
82
|
+
return score.partList.filter(isPartInfo);
|
|
83
|
+
}
|
|
84
|
+
function getPartNameMap(score) {
|
|
85
|
+
const map = {};
|
|
86
|
+
for (const part of getAllPartInfos(score)) {
|
|
87
|
+
map[part.id] = part.name;
|
|
88
|
+
}
|
|
89
|
+
return map;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
exports.getDirectionOfKind = getDirectionOfKind; exports.getDirectionsOfKind = getDirectionsOfKind; exports.hasDirectionOfKind = hasDirectionOfKind; exports.getSoundTempo = getSoundTempo; exports.getSoundDynamics = getSoundDynamics; exports.getSoundDamperPedal = getSoundDamperPedal; exports.getSoundSoftPedal = getSoundSoftPedal; exports.getSoundSostenutoPedal = getSoundSostenutoPedal; exports.isRest = isRest; exports.isPitchedNote = isPitchedNote; exports.isUnpitchedNote = isUnpitchedNote; exports.isChordNote = isChordNote; exports.isGraceNote = isGraceNote; exports.hasTie = hasTie; exports.hasTieStart = hasTieStart; exports.hasTieStop = hasTieStop; exports.isCueNote = isCueNote; exports.hasBeam = hasBeam; exports.hasLyrics = hasLyrics; exports.hasNotations = hasNotations; exports.hasTuplet = hasTuplet; exports.isPartInfo = isPartInfo; exports.getPartInfo = getPartInfo; exports.getPartName = getPartName; exports.getPartAbbreviation = getPartAbbreviation; exports.getAllPartInfos = getAllPartInfos; exports.getPartNameMap = getPartNameMap;
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
// src/entry-accessors.ts
|
|
2
|
+
function getDirectionOfKind(entry, kind) {
|
|
3
|
+
return entry.directionTypes.find((d) => d.kind === kind);
|
|
4
|
+
}
|
|
5
|
+
function getDirectionsOfKind(entry, kind) {
|
|
6
|
+
return entry.directionTypes.filter((d) => d.kind === kind);
|
|
7
|
+
}
|
|
8
|
+
function hasDirectionOfKind(entry, kind) {
|
|
9
|
+
return entry.directionTypes.some((d) => d.kind === kind);
|
|
10
|
+
}
|
|
11
|
+
function getSoundTempo(entry) {
|
|
12
|
+
return entry.sound?.tempo;
|
|
13
|
+
}
|
|
14
|
+
function getSoundDynamics(entry) {
|
|
15
|
+
return entry.sound?.dynamics;
|
|
16
|
+
}
|
|
17
|
+
function getSoundDamperPedal(entry) {
|
|
18
|
+
return entry.sound?.damperPedal;
|
|
19
|
+
}
|
|
20
|
+
function getSoundSoftPedal(entry) {
|
|
21
|
+
return entry.sound?.softPedal;
|
|
22
|
+
}
|
|
23
|
+
function getSoundSostenutoPedal(entry) {
|
|
24
|
+
return entry.sound?.sostenutoPedal;
|
|
25
|
+
}
|
|
26
|
+
function isRest(entry) {
|
|
27
|
+
return entry.rest !== void 0 || !entry.pitch && !entry.unpitched;
|
|
28
|
+
}
|
|
29
|
+
function isPitchedNote(entry) {
|
|
30
|
+
return entry.pitch !== void 0;
|
|
31
|
+
}
|
|
32
|
+
function isUnpitchedNote(entry) {
|
|
33
|
+
return entry.unpitched !== void 0;
|
|
34
|
+
}
|
|
35
|
+
function isChordNote(entry) {
|
|
36
|
+
return entry.chord === true;
|
|
37
|
+
}
|
|
38
|
+
function isGraceNote(entry) {
|
|
39
|
+
return entry.grace !== void 0;
|
|
40
|
+
}
|
|
41
|
+
function hasTie(entry) {
|
|
42
|
+
return entry.tie !== void 0 || entry.ties !== void 0 && entry.ties.length > 0;
|
|
43
|
+
}
|
|
44
|
+
function hasTieStart(entry) {
|
|
45
|
+
if (entry.tie?.type === "start") return true;
|
|
46
|
+
return entry.ties?.some((t) => t.type === "start") ?? false;
|
|
47
|
+
}
|
|
48
|
+
function hasTieStop(entry) {
|
|
49
|
+
if (entry.tie?.type === "stop") return true;
|
|
50
|
+
return entry.ties?.some((t) => t.type === "stop") ?? false;
|
|
51
|
+
}
|
|
52
|
+
function isCueNote(entry) {
|
|
53
|
+
return entry.cue === true;
|
|
54
|
+
}
|
|
55
|
+
function hasBeam(entry) {
|
|
56
|
+
return entry.beam !== void 0 && entry.beam.length > 0;
|
|
57
|
+
}
|
|
58
|
+
function hasLyrics(entry) {
|
|
59
|
+
return entry.lyrics !== void 0 && entry.lyrics.length > 0;
|
|
60
|
+
}
|
|
61
|
+
function hasNotations(entry) {
|
|
62
|
+
return entry.notations !== void 0 && entry.notations.length > 0;
|
|
63
|
+
}
|
|
64
|
+
function hasTuplet(entry) {
|
|
65
|
+
return entry.timeModification !== void 0;
|
|
66
|
+
}
|
|
67
|
+
function isPartInfo(entry) {
|
|
68
|
+
return entry.type === "score-part";
|
|
69
|
+
}
|
|
70
|
+
function getPartInfo(score, partId) {
|
|
71
|
+
return score.partList.find((entry) => {
|
|
72
|
+
return entry.type === "score-part" && entry.id === partId;
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
function getPartName(score, partId) {
|
|
76
|
+
return getPartInfo(score, partId)?.name;
|
|
77
|
+
}
|
|
78
|
+
function getPartAbbreviation(score, partId) {
|
|
79
|
+
return getPartInfo(score, partId)?.abbreviation;
|
|
80
|
+
}
|
|
81
|
+
function getAllPartInfos(score) {
|
|
82
|
+
return score.partList.filter(isPartInfo);
|
|
83
|
+
}
|
|
84
|
+
function getPartNameMap(score) {
|
|
85
|
+
const map = {};
|
|
86
|
+
for (const part of getAllPartInfos(score)) {
|
|
87
|
+
map[part.id] = part.name;
|
|
88
|
+
}
|
|
89
|
+
return map;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export {
|
|
93
|
+
getDirectionOfKind,
|
|
94
|
+
getDirectionsOfKind,
|
|
95
|
+
hasDirectionOfKind,
|
|
96
|
+
getSoundTempo,
|
|
97
|
+
getSoundDynamics,
|
|
98
|
+
getSoundDamperPedal,
|
|
99
|
+
getSoundSoftPedal,
|
|
100
|
+
getSoundSostenutoPedal,
|
|
101
|
+
isRest,
|
|
102
|
+
isPitchedNote,
|
|
103
|
+
isUnpitchedNote,
|
|
104
|
+
isChordNote,
|
|
105
|
+
isGraceNote,
|
|
106
|
+
hasTie,
|
|
107
|
+
hasTieStart,
|
|
108
|
+
hasTieStop,
|
|
109
|
+
isCueNote,
|
|
110
|
+
hasBeam,
|
|
111
|
+
hasLyrics,
|
|
112
|
+
hasNotations,
|
|
113
|
+
hasTuplet,
|
|
114
|
+
isPartInfo,
|
|
115
|
+
getPartInfo,
|
|
116
|
+
getPartName,
|
|
117
|
+
getPartAbbreviation,
|
|
118
|
+
getAllPartInfos,
|
|
119
|
+
getPartNameMap
|
|
120
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { S as Score, M as Measure, n as TimeSignature,
|
|
1
|
+
import { S as Score, M as Measure, n as TimeSignature, d as Part, g as Pitch, N as NoteEntry, K as KeySignature, C as Clef, ac as ArticulationType, m as DynamicsValue, ad as OrnamentType, h as NoteType } from './types-B_6pqTfs.mjs';
|
|
2
2
|
|
|
3
3
|
type ValidationErrorCode = 'MISSING_DIVISIONS' | 'INVALID_DIVISIONS' | 'MEASURE_DURATION_MISMATCH' | 'MEASURE_DURATION_OVERFLOW' | 'MEASURE_DURATION_UNDERFLOW' | 'VOICE_INCOMPLETE' | 'VOICE_GAP' | 'NEGATIVE_POSITION' | 'BACKUP_EXCEEDS_POSITION' | 'TIE_START_WITHOUT_STOP' | 'TIE_STOP_WITHOUT_START' | 'TIE_PITCH_MISMATCH' | 'BEAM_BEGIN_WITHOUT_END' | 'BEAM_END_WITHOUT_BEGIN' | 'SLUR_START_WITHOUT_STOP' | 'SLUR_STOP_WITHOUT_START' | 'TUPLET_START_WITHOUT_STOP' | 'TUPLET_STOP_WITHOUT_START' | 'PART_ID_NOT_IN_PART_LIST' | 'PART_LIST_ID_NOT_IN_PARTS' | 'PART_MEASURE_COUNT_MISMATCH' | 'PART_MEASURE_NUMBER_MISMATCH' | 'PART_GROUP_START_WITHOUT_STOP' | 'PART_GROUP_STOP_WITHOUT_START' | 'DUPLICATE_PART_ID' | 'INVALID_VOICE_NUMBER' | 'INVALID_STAFF_NUMBER' | 'STAFF_EXCEEDS_STAVES' | 'MISSING_STAVES_DECLARATION' | 'STAVES_DECLARATION_MISMATCH' | 'MISSING_CLEF_FOR_STAFF' | 'CLEF_STAFF_EXCEEDS_STAVES' | 'INVALID_DURATION' | 'EMPTY_MEASURE';
|
|
4
4
|
type ValidationLevel = 'error' | 'warning' | 'info';
|
|
@@ -1352,4 +1352,4 @@ type AddRepeatOptions = AddRepeatBarlineOptions;
|
|
|
1352
1352
|
declare const removeRepeat: typeof removeRepeatBarline;
|
|
1353
1353
|
type RemoveRepeatOptions = RemoveRepeatBarlineOptions;
|
|
1354
1354
|
|
|
1355
|
-
export {
|
|
1355
|
+
export { addTempo as $, moveNoteToStaff as A, changeKey as B, changeTime as C, insertMeasure as D, deleteMeasure as E, addTie as F, removeTie as G, addSlur as H, removeSlur as I, addArticulation as J, removeArticulation as K, addDynamics as L, removeDynamics as M, modifyDynamics as N, insertClefChange as O, changeClef as P, createTuplet as Q, removeTuplet as R, addBeam as S, removeBeam as T, autoBeam as U, setBeaming as V, copyNotes as W, pasteNotes as X, cutNotes as Y, copyNotesMultiMeasure as Z, pasteNotesMultiMeasure as _, addChord as a, type AddVoiceOptions as a$, removeTempo as a0, modifyTempo as a1, addWedge as a2, removeWedge as a3, addFermata as a4, removeFermata as a5, addOrnament as a6, removeOrnament as a7, addPedal as a8, removePedal as a9, addChordSymbol as aA, removeChordSymbol as aB, updateChordSymbol as aC, addFingering as aD, removeFingering as aE, addBowing as aF, removeBowing as aG, addStringNumber as aH, removeStringNumber as aI, addOctaveShift as aJ, stopOctaveShift as aK, removeOctaveShift as aL, addBreathMark as aM, removeBreathMark as aN, addCaesura as aO, removeCaesura as aP, type OperationResult as aQ, type OperationErrorCode as aR, type InsertNoteOptions as aS, type RemoveNoteOptions as aT, type AddChordOptions as aU, type ChangeNoteDurationOptions as aV, type SetNotePitchOptions as aW, type SetNotePitchBySemitoneOptions as aX, type ShiftNotePitchOptions as aY, type RaiseAccidentalOptions as aZ, type LowerAccidentalOptions as a_, addTextDirection as aa, addText as ab, addRehearsalMark as ac, addRepeatBarline as ad, removeRepeatBarline as ae, addRepeat as af, removeRepeat as ag, addEnding as ah, removeEnding as ai, changeBarline as aj, setBarline as ak, addSegno as al, addCoda as am, addDaCapo as an, addDalSegno as ao, addFine as ap, addToCoda as aq, addGraceNote as ar, removeGraceNote as as, convertToGrace as at, addLyric as au, removeLyric as av, updateLyric as aw, addHarmony as ax, removeHarmony as ay, updateHarmony as az, setNotePitchBySemitone as b, type UpdateHarmonyOptions as b$, type AddPartOptions as b0, type DuplicatePartOptions as b1, type SetStavesOptions as b2, type MoveNoteToStaffOptions as b3, type AddTieOptions as b4, type RemoveTieOptions as b5, type AddSlurOptions as b6, type RemoveSlurOptions as b7, type AddArticulationOptions as b8, type RemoveArticulationOptions as b9, type RemoveOrnamentOptions as bA, type AddPedalOptions as bB, type RemovePedalOptions as bC, type AddTextDirectionOptions as bD, type AddTextOptions as bE, type AddRehearsalMarkOptions as bF, type AddRepeatBarlineOptions as bG, type RemoveRepeatBarlineOptions as bH, type AddRepeatOptions as bI, type RemoveRepeatOptions as bJ, type AddEndingOptions as bK, type RemoveEndingOptions as bL, type ChangeBarlineOptions as bM, type SetBarlineOptions as bN, type BarStyle as bO, type AddSegnoOptions as bP, type AddCodaOptions as bQ, type AddNavigationOptions as bR, type AddGraceNoteOptions as bS, type RemoveGraceNoteOptions as bT, type ConvertToGraceOptions as bU, type AddLyricOptions as bV, type RemoveLyricOptions as bW, type UpdateLyricOptions as bX, type HarmonyKind as bY, type AddHarmonyOptions as bZ, type RemoveHarmonyOptions as b_, type AddDynamicsOptions as ba, type RemoveDynamicsOptions as bb, type ModifyDynamicsOptions as bc, type InsertClefChangeOptions as bd, type ChangeClefOptions as be, type CreateTupletOptions as bf, type RemoveTupletOptions as bg, type AddBeamOptions as bh, type RemoveBeamOptions as bi, type AutoBeamOptions as bj, type SetBeamingOptions as bk, type NoteSelection as bl, type CopyNotesOptions as bm, type PasteNotesOptions as bn, type CutNotesOptions as bo, type CopyNotesMultiMeasureOptions as bp, type MultiMeasureSelection as bq, type PasteNotesMultiMeasureOptions as br, type AddTempoOptions as bs, type RemoveTempoOptions as bt, type ModifyTempoOptions as bu, type AddWedgeOptions as bv, type RemoveWedgeOptions as bw, type AddFermataOptions as bx, type RemoveFermataOptions as by, type AddOrnamentOptions as bz, shiftNotePitch as c, type AddChordSymbolOptions as c0, type RemoveChordSymbolOptions as c1, type UpdateChordSymbolOptions as c2, type AddFingeringOptions as c3, type RemoveFingeringOptions as c4, type BowingType as c5, type AddBowingOptions as c6, type RemoveBowingOptions as c7, type AddStringNumberOptions as c8, type RemoveStringNumberOptions as c9, formatLocation as cA, ValidationException as cB, validateMeasureLocal as cC, getMeasureContext as cD, assertMeasureValid as cE, type ValidationError as cF, type ValidationResult as cG, type ValidationLocation as cH, type ValidationErrorCode as cI, type ValidationLevel as cJ, type ValidateOptions as cK, type MeasureValidationContext as cL, type LocalValidateOptions as cM, type OctaveShiftType as ca, type AddOctaveShiftOptions as cb, type StopOctaveShiftOptions as cc, type RemoveOctaveShiftOptions as cd, type BreathMarkValue as ce, type AddBreathMarkOptions as cf, type RemoveBreathMarkOptions as cg, type CaesuraValue as ch, type AddCaesuraOptions as ci, type RemoveCaesuraOptions as cj, validate as ck, isValid as cl, assertValid as cm, validateDivisions as cn, validateMeasureDuration as co, validateBackupForward as cp, validateTies as cq, validateBeams as cr, validateSlurs as cs, validateTuplets as ct, validatePartReferences as cu, validatePartStructure as cv, validateStaffStructure as cw, validateVoiceStaff as cx, validateTiesAcrossMeasures as cy, validateSlursAcrossMeasures as cz, changeNoteDuration as d, raiseAccidental as e, addNote as f, deleteNote as g, addChordNote as h, insertNote as i, modifyNoteDuration as j, addNoteChecked as k, lowerAccidental as l, modifyNotePitch as m, deleteNoteChecked as n, addChordNoteChecked as o, modifyNotePitchChecked as p, modifyNoteDurationChecked as q, removeNote as r, setNotePitch as s, transpose as t, transposeChecked as u, addVoice as v, addPart as w, removePart as x, duplicatePart as y, setStaves as z };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { S as Score, M as Measure, n as TimeSignature,
|
|
1
|
+
import { S as Score, M as Measure, n as TimeSignature, d as Part, g as Pitch, N as NoteEntry, K as KeySignature, C as Clef, ac as ArticulationType, m as DynamicsValue, ad as OrnamentType, h as NoteType } from './types-B_6pqTfs.js';
|
|
2
2
|
|
|
3
3
|
type ValidationErrorCode = 'MISSING_DIVISIONS' | 'INVALID_DIVISIONS' | 'MEASURE_DURATION_MISMATCH' | 'MEASURE_DURATION_OVERFLOW' | 'MEASURE_DURATION_UNDERFLOW' | 'VOICE_INCOMPLETE' | 'VOICE_GAP' | 'NEGATIVE_POSITION' | 'BACKUP_EXCEEDS_POSITION' | 'TIE_START_WITHOUT_STOP' | 'TIE_STOP_WITHOUT_START' | 'TIE_PITCH_MISMATCH' | 'BEAM_BEGIN_WITHOUT_END' | 'BEAM_END_WITHOUT_BEGIN' | 'SLUR_START_WITHOUT_STOP' | 'SLUR_STOP_WITHOUT_START' | 'TUPLET_START_WITHOUT_STOP' | 'TUPLET_STOP_WITHOUT_START' | 'PART_ID_NOT_IN_PART_LIST' | 'PART_LIST_ID_NOT_IN_PARTS' | 'PART_MEASURE_COUNT_MISMATCH' | 'PART_MEASURE_NUMBER_MISMATCH' | 'PART_GROUP_START_WITHOUT_STOP' | 'PART_GROUP_STOP_WITHOUT_START' | 'DUPLICATE_PART_ID' | 'INVALID_VOICE_NUMBER' | 'INVALID_STAFF_NUMBER' | 'STAFF_EXCEEDS_STAVES' | 'MISSING_STAVES_DECLARATION' | 'STAVES_DECLARATION_MISMATCH' | 'MISSING_CLEF_FOR_STAFF' | 'CLEF_STAFF_EXCEEDS_STAVES' | 'INVALID_DURATION' | 'EMPTY_MEASURE';
|
|
4
4
|
type ValidationLevel = 'error' | 'warning' | 'info';
|
|
@@ -1352,4 +1352,4 @@ type AddRepeatOptions = AddRepeatBarlineOptions;
|
|
|
1352
1352
|
declare const removeRepeat: typeof removeRepeatBarline;
|
|
1353
1353
|
type RemoveRepeatOptions = RemoveRepeatBarlineOptions;
|
|
1354
1354
|
|
|
1355
|
-
export {
|
|
1355
|
+
export { addTempo as $, moveNoteToStaff as A, changeKey as B, changeTime as C, insertMeasure as D, deleteMeasure as E, addTie as F, removeTie as G, addSlur as H, removeSlur as I, addArticulation as J, removeArticulation as K, addDynamics as L, removeDynamics as M, modifyDynamics as N, insertClefChange as O, changeClef as P, createTuplet as Q, removeTuplet as R, addBeam as S, removeBeam as T, autoBeam as U, setBeaming as V, copyNotes as W, pasteNotes as X, cutNotes as Y, copyNotesMultiMeasure as Z, pasteNotesMultiMeasure as _, addChord as a, type AddVoiceOptions as a$, removeTempo as a0, modifyTempo as a1, addWedge as a2, removeWedge as a3, addFermata as a4, removeFermata as a5, addOrnament as a6, removeOrnament as a7, addPedal as a8, removePedal as a9, addChordSymbol as aA, removeChordSymbol as aB, updateChordSymbol as aC, addFingering as aD, removeFingering as aE, addBowing as aF, removeBowing as aG, addStringNumber as aH, removeStringNumber as aI, addOctaveShift as aJ, stopOctaveShift as aK, removeOctaveShift as aL, addBreathMark as aM, removeBreathMark as aN, addCaesura as aO, removeCaesura as aP, type OperationResult as aQ, type OperationErrorCode as aR, type InsertNoteOptions as aS, type RemoveNoteOptions as aT, type AddChordOptions as aU, type ChangeNoteDurationOptions as aV, type SetNotePitchOptions as aW, type SetNotePitchBySemitoneOptions as aX, type ShiftNotePitchOptions as aY, type RaiseAccidentalOptions as aZ, type LowerAccidentalOptions as a_, addTextDirection as aa, addText as ab, addRehearsalMark as ac, addRepeatBarline as ad, removeRepeatBarline as ae, addRepeat as af, removeRepeat as ag, addEnding as ah, removeEnding as ai, changeBarline as aj, setBarline as ak, addSegno as al, addCoda as am, addDaCapo as an, addDalSegno as ao, addFine as ap, addToCoda as aq, addGraceNote as ar, removeGraceNote as as, convertToGrace as at, addLyric as au, removeLyric as av, updateLyric as aw, addHarmony as ax, removeHarmony as ay, updateHarmony as az, setNotePitchBySemitone as b, type UpdateHarmonyOptions as b$, type AddPartOptions as b0, type DuplicatePartOptions as b1, type SetStavesOptions as b2, type MoveNoteToStaffOptions as b3, type AddTieOptions as b4, type RemoveTieOptions as b5, type AddSlurOptions as b6, type RemoveSlurOptions as b7, type AddArticulationOptions as b8, type RemoveArticulationOptions as b9, type RemoveOrnamentOptions as bA, type AddPedalOptions as bB, type RemovePedalOptions as bC, type AddTextDirectionOptions as bD, type AddTextOptions as bE, type AddRehearsalMarkOptions as bF, type AddRepeatBarlineOptions as bG, type RemoveRepeatBarlineOptions as bH, type AddRepeatOptions as bI, type RemoveRepeatOptions as bJ, type AddEndingOptions as bK, type RemoveEndingOptions as bL, type ChangeBarlineOptions as bM, type SetBarlineOptions as bN, type BarStyle as bO, type AddSegnoOptions as bP, type AddCodaOptions as bQ, type AddNavigationOptions as bR, type AddGraceNoteOptions as bS, type RemoveGraceNoteOptions as bT, type ConvertToGraceOptions as bU, type AddLyricOptions as bV, type RemoveLyricOptions as bW, type UpdateLyricOptions as bX, type HarmonyKind as bY, type AddHarmonyOptions as bZ, type RemoveHarmonyOptions as b_, type AddDynamicsOptions as ba, type RemoveDynamicsOptions as bb, type ModifyDynamicsOptions as bc, type InsertClefChangeOptions as bd, type ChangeClefOptions as be, type CreateTupletOptions as bf, type RemoveTupletOptions as bg, type AddBeamOptions as bh, type RemoveBeamOptions as bi, type AutoBeamOptions as bj, type SetBeamingOptions as bk, type NoteSelection as bl, type CopyNotesOptions as bm, type PasteNotesOptions as bn, type CutNotesOptions as bo, type CopyNotesMultiMeasureOptions as bp, type MultiMeasureSelection as bq, type PasteNotesMultiMeasureOptions as br, type AddTempoOptions as bs, type RemoveTempoOptions as bt, type ModifyTempoOptions as bu, type AddWedgeOptions as bv, type RemoveWedgeOptions as bw, type AddFermataOptions as bx, type RemoveFermataOptions as by, type AddOrnamentOptions as bz, shiftNotePitch as c, type AddChordSymbolOptions as c0, type RemoveChordSymbolOptions as c1, type UpdateChordSymbolOptions as c2, type AddFingeringOptions as c3, type RemoveFingeringOptions as c4, type BowingType as c5, type AddBowingOptions as c6, type RemoveBowingOptions as c7, type AddStringNumberOptions as c8, type RemoveStringNumberOptions as c9, formatLocation as cA, ValidationException as cB, validateMeasureLocal as cC, getMeasureContext as cD, assertMeasureValid as cE, type ValidationError as cF, type ValidationResult as cG, type ValidationLocation as cH, type ValidationErrorCode as cI, type ValidationLevel as cJ, type ValidateOptions as cK, type MeasureValidationContext as cL, type LocalValidateOptions as cM, type OctaveShiftType as ca, type AddOctaveShiftOptions as cb, type StopOctaveShiftOptions as cc, type RemoveOctaveShiftOptions as cd, type BreathMarkValue as ce, type AddBreathMarkOptions as cf, type RemoveBreathMarkOptions as cg, type CaesuraValue as ch, type AddCaesuraOptions as ci, type RemoveCaesuraOptions as cj, validate as ck, isValid as cl, assertValid as cm, validateDivisions as cn, validateMeasureDuration as co, validateBackupForward as cp, validateTies as cq, validateBeams as cr, validateSlurs as cs, validateTuplets as ct, validatePartReferences as cu, validatePartStructure as cv, validateStaffStructure as cw, validateVoiceStaff as cx, validateTiesAcrossMeasures as cy, validateSlursAcrossMeasures as cz, changeNoteDuration as d, raiseAccidental as e, addNote as f, deleteNote as g, addChordNote as h, insertNote as i, modifyNoteDuration as j, addNoteChecked as k, lowerAccidental as l, modifyNotePitch as m, deleteNoteChecked as n, addChordNoteChecked as o, modifyNotePitchChecked as p, modifyNoteDurationChecked as q, removeNote as r, setNotePitch as s, transpose as t, transposeChecked as u, addVoice as v, addPart as w, removePart as x, duplicatePart as y, setStaves as z };
|