vibe-editor 0.0.1 → 0.0.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 +5 -0
- package/package.json +3 -3
- package/src/scripts/js/Core.js +14 -14
- package/src/scripts/js/VIBE.js +3 -1
- package/src/scripts/js/assets/mei_template.js +2 -2
- package/src/scripts/js/datastructures/ScoreGraph copy.js +432 -0
- package/src/scripts/js/datastructures/ScoreGraph.js +92 -47
- package/src/scripts/js/datastructures/ScoreGraph_deprecated.js +432 -0
- package/src/scripts/js/datastructures/ScoreNode.js +4 -0
- package/src/scripts/js/entry.js +2 -2
- package/src/scripts/js/gui/Annotations.js +4 -3
- package/src/scripts/js/gui/HarmonyLabel.js +1 -1
- package/src/scripts/js/gui/ScoreManipulator.js +7 -7
- package/src/scripts/js/gui/Tabbar.js +9 -8
- package/src/scripts/js/gui/TempoLabel.js +1 -1
- package/src/scripts/js/gui/Toolbar.js +1 -1
- package/src/scripts/js/handlers/AnnotationChangeHandler.js +3 -3
- package/src/scripts/js/handlers/ClickModeHandler.js +10 -3
- package/src/scripts/js/handlers/CustomAnnotationShapeDrawer.js +2 -2
- package/src/scripts/js/handlers/CustomToolbarHandler.js +4 -4
- package/src/scripts/js/handlers/InsertModeHandler.js +7 -4
- package/src/scripts/js/handlers/KeyModeHandler.js +40 -17
- package/src/scripts/js/handlers/LabelHandler.js +3 -2
- package/src/scripts/js/handlers/NoteDragHandler.js +1 -1
- package/src/scripts/js/handlers/ScoreManipulatorHandler.js +11 -0
- package/src/scripts/js/handlers/SideBarHandler.js +1 -1
- package/src/scripts/js/handlers/TooltipHandler.js +1 -1
- package/src/scripts/js/utils/MEIOperations.js +28 -25
- package/src/scripts/js/utils/Mouse2SVG.js +10 -8
- package/src/scripts/js/utils/ReactWrapper.js +1 -1
- package/src/scripts/js/utils/SVGEditor.js +15 -5
- package/src/scripts/js/utils/mappings.js +17 -14
@@ -172,15 +172,18 @@ function addToMEI(newSound, currentMEI, replace = false, scoreGraph = null) {
|
|
172
172
|
newElem = currentMEI.createElement("note");
|
173
173
|
newElem.setAttribute("pname", newNote.pname);
|
174
174
|
newElem.setAttribute("oct", newNote.oct);
|
175
|
-
if (newNote.accid
|
175
|
+
if (newNote.accid) {
|
176
176
|
newElem.setAttribute("accid.ges", newNote.accid);
|
177
177
|
}
|
178
|
+
if (newNote.artic) {
|
179
|
+
newElem.setAttribute("artic", newNote.artic);
|
180
|
+
}
|
178
181
|
}
|
179
182
|
newElem.setAttribute("dur", newNote.dur);
|
180
|
-
if (newNote.dots
|
183
|
+
if (newNote.dots) {
|
181
184
|
newElem.setAttribute("dots", newNote.dots);
|
182
185
|
}
|
183
|
-
if (newNote.id
|
186
|
+
if (newNote.id) {
|
184
187
|
newElem.setAttribute("id", newNote.id);
|
185
188
|
}
|
186
189
|
//break up an cache beams for easier processing
|
@@ -203,7 +206,7 @@ function addToMEI(newSound, currentMEI, replace = false, scoreGraph = null) {
|
|
203
206
|
}
|
204
207
|
else {
|
205
208
|
chord = document.createElement("chord");
|
206
|
-
chord.setAttribute("id", random_1.uuidv4());
|
209
|
+
chord.setAttribute("id", (0, random_1.uuidv4)());
|
207
210
|
chord.setAttribute("dur", meiChordEl.getAttribute("dur"));
|
208
211
|
if (meiChordEl.getAttribute("dots") !== null) {
|
209
212
|
chord.setAttribute("dots", meiChordEl.getAttribute("dots"));
|
@@ -221,7 +224,7 @@ function addToMEI(newSound, currentMEI, replace = false, scoreGraph = null) {
|
|
221
224
|
if (Array.from(chord.querySelectorAll("note")).some(n => t.getAttribute("startid") === "#" + n.id)) {
|
222
225
|
if (!currentMEI.querySelector("tie[startid='#" + newNote.id + "']")) { // just make the tie once (since this can be called twice in recursion)
|
223
226
|
var addToChord = Object.assign({}, newNote);
|
224
|
-
addToChord.id = random_1.uuidv4();
|
227
|
+
addToChord.id = (0, random_1.uuidv4)();
|
225
228
|
var tieEnd = currentMEI.querySelector(t.getAttribute("endid"));
|
226
229
|
tieEnd = tieEnd.closest("chord") || tieEnd;
|
227
230
|
addToChord.chordElement = tieEnd;
|
@@ -405,7 +408,7 @@ function tieToNextMeasure(currentMEI, newElem, currMeiClone, replace, newSound)
|
|
405
408
|
changeDur(lastElement, newRatio);
|
406
409
|
// create new Element and if needed, new measure
|
407
410
|
var splittedElement = lastElement.tagName === "note" ? convertToNewNote(lastElement) : convertToNewChord(lastElement);
|
408
|
-
splittedElement.id = random_1.uuidv4();
|
411
|
+
splittedElement.id = (0, random_1.uuidv4)();
|
409
412
|
var newDur = ratioToDur(measureOverhead);
|
410
413
|
splittedElement.dur = newDur[0].toString();
|
411
414
|
splittedElement.dots = newDur[1].toString();
|
@@ -491,7 +494,7 @@ function doShiftRight(arr, meterRatio, currentLayer) {
|
|
491
494
|
}
|
492
495
|
else {
|
493
496
|
targetLayer = document.createElement("layer");
|
494
|
-
targetLayer.setAttribute("id", "layer-" + random_1.uuidv4());
|
497
|
+
targetLayer.setAttribute("id", "layer-" + (0, random_1.uuidv4)());
|
495
498
|
targetLayer.setAttribute("n", layerLevel);
|
496
499
|
targetStaff.appendChild(targetLayer);
|
497
500
|
}
|
@@ -509,7 +512,7 @@ function doShiftRight(arr, meterRatio, currentLayer) {
|
|
509
512
|
if (Number.isInteger(1 / chunkDurLeft) && Number.isInteger(1 / chunkDurRight)) {
|
510
513
|
element.removeAttribute("dots");
|
511
514
|
var splitRightElement = element.cloneNode(true);
|
512
|
-
splitRightElement.setAttribute("id", random_1.uuidv4());
|
515
|
+
splitRightElement.setAttribute("id", (0, random_1.uuidv4)());
|
513
516
|
splitRightElement.setAttribute("dur", (Math.abs(1 / chunkDurRight)).toString());
|
514
517
|
var beforeElement = elementIdx === 0 ? targetLayer.firstChild : targetLayer.children.item(elementIdx);
|
515
518
|
targetLayer.insertBefore(splitRightElement, beforeElement);
|
@@ -521,10 +524,10 @@ function doShiftRight(arr, meterRatio, currentLayer) {
|
|
521
524
|
dottedElements.left.forEach(lel => currentLayer.appendChild(lel));
|
522
525
|
var beforeElement = elementIdx === 0 ? targetLayer.firstChild : targetLayer.children.item(elementIdx);
|
523
526
|
dottedElements.right.forEach(rel => {
|
524
|
-
rel.setAttribute("id", random_1.uuidv4());
|
527
|
+
rel.setAttribute("id", (0, random_1.uuidv4)());
|
525
528
|
if (rel.tagName === "chord") {
|
526
529
|
rel.querySelectorAll("note").forEach(rl => {
|
527
|
-
rl.setAttribute("id", random_1.uuidv4());
|
530
|
+
rl.setAttribute("id", (0, random_1.uuidv4)());
|
528
531
|
});
|
529
532
|
}
|
530
533
|
targetLayer.insertBefore(rel, beforeElement);
|
@@ -545,10 +548,10 @@ function createEmptyCopy(element) {
|
|
545
548
|
child.parentNode.removeChild(child);
|
546
549
|
});
|
547
550
|
//set new ids for everything
|
548
|
-
copy.setAttribute("id", random_1.uuidv4());
|
551
|
+
copy.setAttribute("id", (0, random_1.uuidv4)());
|
549
552
|
copy.setAttribute("n", (parseInt(element.getAttribute("n")) + 1).toString());
|
550
553
|
let allElements = copy.querySelectorAll("*");
|
551
|
-
allElements.forEach(e => e.setAttribute("id", random_1.uuidv4()));
|
554
|
+
allElements.forEach(e => e.setAttribute("id", (0, random_1.uuidv4)()));
|
552
555
|
return copy;
|
553
556
|
}
|
554
557
|
function connectNotes(left, right, connectionShape) {
|
@@ -576,7 +579,7 @@ function connectNotes(left, right, connectionShape) {
|
|
576
579
|
var tieElement = currentMEI.createElementNS(constants_1.constants._MEINS_, connectionShape);
|
577
580
|
tieElement.setAttribute("startid", "#" + left.id);
|
578
581
|
tieElement.setAttribute("endid", "#" + right.id);
|
579
|
-
tieElement.setAttribute("id", random_1.uuidv4());
|
582
|
+
tieElement.setAttribute("id", (0, random_1.uuidv4)());
|
580
583
|
currentMEI.getElementById(left.id).closest("measure").append(tieElement);
|
581
584
|
}
|
582
585
|
}
|
@@ -646,7 +649,7 @@ function doShiftLeft(arr, meterRatio) {
|
|
646
649
|
if (Number.isInteger(1 / chunkDurLeft) && Number.isInteger(1 / chunkDurRight)) {
|
647
650
|
element.removeAttribute("dots");
|
648
651
|
var splitLeftElement = element.cloneNode(true);
|
649
|
-
splitLeftElement.setAttribute("id", random_1.uuidv4());
|
652
|
+
splitLeftElement.setAttribute("id", (0, random_1.uuidv4)());
|
650
653
|
splitLeftElement.setAttribute("dur", (Math.abs(1 / chunkDurLeft)).toString());
|
651
654
|
targetLayer.appendChild(splitLeftElement);
|
652
655
|
//change already existing element
|
@@ -655,10 +658,10 @@ function doShiftLeft(arr, meterRatio) {
|
|
655
658
|
else {
|
656
659
|
var elements = splitDottedNote(element, chunkDurLeft, chunkDurRight);
|
657
660
|
elements.left.forEach(lel => {
|
658
|
-
lel.setAttribute("id", random_1.uuidv4());
|
661
|
+
lel.setAttribute("id", (0, random_1.uuidv4)());
|
659
662
|
if (lel.tagName === "chord") {
|
660
663
|
lel.querySelectorAll("note").forEach(ll => {
|
661
|
-
ll.setAttribute("id", random_1.uuidv4());
|
664
|
+
ll.setAttribute("id", (0, random_1.uuidv4)());
|
662
665
|
});
|
663
666
|
}
|
664
667
|
targetLayer.appendChild(lel);
|
@@ -1394,7 +1397,7 @@ function reorganizeBeams(currentMEI) {
|
|
1394
1397
|
}
|
1395
1398
|
else { // else make new beam
|
1396
1399
|
var newBeam = currentMEI.createElementNS(constants_1.constants._MEINS_, "beam");
|
1397
|
-
newBeam.setAttribute("id", random_1.uuidv4());
|
1400
|
+
newBeam.setAttribute("id", (0, random_1.uuidv4)());
|
1398
1401
|
n.parentElement.insertBefore(newBeam, n);
|
1399
1402
|
newBeam.append(n);
|
1400
1403
|
}
|
@@ -1551,10 +1554,10 @@ function addMeasure(currentMEI) {
|
|
1551
1554
|
m.setAttribute("n", i.toString());
|
1552
1555
|
i++;
|
1553
1556
|
});
|
1554
|
-
newMeasure.setAttribute("id", random_1.uuidv4());
|
1557
|
+
newMeasure.setAttribute("id", (0, random_1.uuidv4)());
|
1555
1558
|
newMeasure.querySelectorAll("*").forEach(el => {
|
1556
1559
|
if (el.id === null || el.id === "") {
|
1557
|
-
el.setAttribute("id", random_1.uuidv4());
|
1560
|
+
el.setAttribute("id", (0, random_1.uuidv4)());
|
1558
1561
|
}
|
1559
1562
|
});
|
1560
1563
|
cleanUp(currentMEI);
|
@@ -1705,7 +1708,7 @@ function createTuplet(meiElements, currentMEI) {
|
|
1705
1708
|
if (ratio < 1) {
|
1706
1709
|
if (durRest > 0) {
|
1707
1710
|
var rest = currentMEI.createElement("rest");
|
1708
|
-
rest.setAttribute("id", random_1.uuidv4());
|
1711
|
+
rest.setAttribute("id", (0, random_1.uuidv4)());
|
1709
1712
|
rest.setAttribute("dur", durRest.toString());
|
1710
1713
|
if (dotsRest > 0) {
|
1711
1714
|
rest.setAttribute("dots", dotsRest.toString());
|
@@ -1737,7 +1740,7 @@ function paste(ids, pastePosition, currentMEI) {
|
|
1737
1740
|
meiElements[num] = new Array();
|
1738
1741
|
}
|
1739
1742
|
var cel = el.cloneNode(true);
|
1740
|
-
cel.setAttribute("id", random_1.uuidv4());
|
1743
|
+
cel.setAttribute("id", (0, random_1.uuidv4)());
|
1741
1744
|
meiElements[num].push(cel);
|
1742
1745
|
}
|
1743
1746
|
}
|
@@ -1850,7 +1853,7 @@ function insertClef(target, newClef, currentMEI) {
|
|
1850
1853
|
}
|
1851
1854
|
var disPlace = newClef.includes("OctDown") ? "below" : newClef.includes("OctUp") ? "above" : null;
|
1852
1855
|
var clefElement = currentMEI.createElement("clef");
|
1853
|
-
clefElement.setAttribute("id", random_1.uuidv4());
|
1856
|
+
clefElement.setAttribute("id", (0, random_1.uuidv4)());
|
1854
1857
|
clefElement.setAttribute("shape", shape);
|
1855
1858
|
clefElement.setAttribute("line", line);
|
1856
1859
|
if (disPlace) {
|
@@ -2051,7 +2054,7 @@ exports.setArticulation = setArticulation;
|
|
2051
2054
|
//PRIVATE
|
2052
2055
|
function convertToNewNote(element) {
|
2053
2056
|
var newNote = {
|
2054
|
-
id: random_1.uuidv4(),
|
2057
|
+
id: (0, random_1.uuidv4)(),
|
2055
2058
|
pname: element.getAttribute("pname"),
|
2056
2059
|
dur: element.getAttribute("dur"),
|
2057
2060
|
dots: element.getAttribute("dots"),
|
@@ -2088,7 +2091,7 @@ function convertToNewChord(element) {
|
|
2088
2091
|
return convertToNewNote(n);
|
2089
2092
|
});
|
2090
2093
|
var newChord = {
|
2091
|
-
id: random_1.uuidv4(),
|
2094
|
+
id: (0, random_1.uuidv4)(),
|
2092
2095
|
dur: element.getAttribute("dur"),
|
2093
2096
|
dots: element.getAttribute("dots"),
|
2094
2097
|
noteElements: newNotes
|
@@ -2100,6 +2103,6 @@ function createNewRestElement(dur, dots = undefined) {
|
|
2100
2103
|
newElem.setAttribute("dur", dur.toString());
|
2101
2104
|
if (dots != undefined)
|
2102
2105
|
newElem.setAttribute("dots", dots.toString());
|
2103
|
-
newElem.setAttribute("id", random_1.uuidv4());
|
2106
|
+
newElem.setAttribute("id", (0, random_1.uuidv4)());
|
2104
2107
|
return newElem;
|
2105
2108
|
}
|
@@ -169,7 +169,7 @@ class Mouse2SVG {
|
|
169
169
|
const clefDisplacement = this.measureMatrix.get(idxParentMeasure, idxStaff).clefdisplacement;
|
170
170
|
Array.from(g).forEach((staffLine, idx) => {
|
171
171
|
if (staffLine.id === "") {
|
172
|
-
staffLine.id = random_1.uuidv4();
|
172
|
+
staffLine.id = (0, random_1.uuidv4)();
|
173
173
|
}
|
174
174
|
staffLine.classList.add("staffLine");
|
175
175
|
staffLine.classList.add("Clef" + clefShape + clefline + clefDisplacement);
|
@@ -273,7 +273,7 @@ class Mouse2SVG {
|
|
273
273
|
* @param y client Coordinate
|
274
274
|
*/
|
275
275
|
defineNote(x, y, options) {
|
276
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
276
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
277
277
|
let staffIsEmpty = true;
|
278
278
|
let isLeftOfNote;
|
279
279
|
//let isRightOfNote: Boolean
|
@@ -560,7 +560,7 @@ class Mouse2SVG {
|
|
560
560
|
try {
|
561
561
|
pitch = cq.getInteractOverlay(this.containerId).querySelector("#" + options.staffLineId).getAttribute("class").split(" ");
|
562
562
|
}
|
563
|
-
catch (
|
563
|
+
catch (_r) {
|
564
564
|
return;
|
565
565
|
}
|
566
566
|
let p = pitch.filter(function (obj) {
|
@@ -589,7 +589,7 @@ class Mouse2SVG {
|
|
589
589
|
var keysig = this.measureMatrix.get(closestMeasureIdx, closestStaffIdx).keysig;
|
590
590
|
var accid;
|
591
591
|
if (this.container.querySelector(".alterBtn.selected") !== null) {
|
592
|
-
accid = mappings_1.
|
592
|
+
accid = mappings_1.accidButtonToAttr.get(this.container.querySelector(".alterBtn.selected").id);
|
593
593
|
}
|
594
594
|
else if (keysig != undefined) {
|
595
595
|
accid = mappings_1.keysigToNotes.get(keysig);
|
@@ -598,20 +598,22 @@ class Mouse2SVG {
|
|
598
598
|
accid = keysig.charAt(1);
|
599
599
|
}
|
600
600
|
}
|
601
|
+
var artic = mappings_1.articButtonToAttr.get((_l = this.container.querySelector("#articGroup > .selected")) === null || _l === void 0 ? void 0 : _l.id);
|
601
602
|
var newNote = {
|
602
|
-
id: random_1.uuidv4(),
|
603
|
+
id: (0, random_1.uuidv4)(),
|
603
604
|
pname: pname,
|
604
605
|
dur: this.getDurationNewNote(),
|
605
606
|
dots: this.getDotsNewNote(),
|
606
607
|
oct: oct,
|
607
608
|
keysig: keysig,
|
608
609
|
accid: accid,
|
610
|
+
artic: artic,
|
609
611
|
nearestNoteId: nearestNoteId,
|
610
612
|
relPosX: leftRightPos,
|
611
|
-
staffId: (
|
612
|
-
layerId: (
|
613
|
+
staffId: (_m = this.lastStaffMouseEnter) === null || _m === void 0 ? void 0 : _m.getAttribute("refId"),
|
614
|
+
layerId: (_p = this.container.querySelector(`#${(_o = this.lastStaffMouseEnter) === null || _o === void 0 ? void 0 : _o.getAttribute("refId")} .activeLayer`)) === null || _p === void 0 ? void 0 : _p.id,
|
613
615
|
chordElement: options.targetChord,
|
614
|
-
rest: (
|
616
|
+
rest: (_q = this.container.querySelector("#pauseNote")) === null || _q === void 0 ? void 0 : _q.classList.contains("selected")
|
615
617
|
};
|
616
618
|
this.newNote = newNote;
|
617
619
|
}
|
@@ -8,7 +8,7 @@ const buttonStyleDarkOutline = "btn btn-outline-dark btn-md";
|
|
8
8
|
function createColorPicker(id, onColorChange) {
|
9
9
|
const domNode = document.createElement("div");
|
10
10
|
domNode.setAttribute("id", id);
|
11
|
-
const root = client_1.createRoot(domNode);
|
11
|
+
const root = (0, client_1.createRoot)(domNode);
|
12
12
|
root.render(React.createElement(ColorPickerWrapper, { onColorChange: onColorChange }));
|
13
13
|
return domNode;
|
14
14
|
}
|
@@ -45,14 +45,24 @@ class SVGEditor {
|
|
45
45
|
cacheClasses() {
|
46
46
|
//var svg = document.querySelector("#"+this.containerId + " #vrvSVG")
|
47
47
|
var svg = document.querySelector("#" + this.containerId);
|
48
|
-
if (svg
|
48
|
+
if (!svg)
|
49
49
|
return this;
|
50
|
-
}
|
51
50
|
this.classListMap = new Map();
|
51
|
+
var hasLastAdded = !!svg.querySelector(".lastAdded");
|
52
52
|
svg.querySelectorAll("*").forEach(el => {
|
53
53
|
var _a;
|
54
54
|
//if(el.tagName.toLowerCase() === "g" && el.getAttribute("id") !== null){
|
55
|
-
if (el.
|
55
|
+
if (el.tagName.toLocaleLowerCase() !== "g" && !el.getAttribute("id"))
|
56
|
+
return;
|
57
|
+
if (hasLastAdded) {
|
58
|
+
if (el.classList.contains("marked")) {
|
59
|
+
el.classList.remove("marked");
|
60
|
+
}
|
61
|
+
// if(el.classList.contains("lastAdded")){
|
62
|
+
// el.classList.replace("lastAdded", "marked")
|
63
|
+
// }
|
64
|
+
}
|
65
|
+
if (el.getAttribute("id") && !el.classList.contains("lastAdded")) {
|
56
66
|
if (!this.classListMap.has(el.id)) {
|
57
67
|
this.classListMap.set(el.id, new Array());
|
58
68
|
}
|
@@ -326,7 +336,7 @@ class SVGEditor {
|
|
326
336
|
var barLine = measureSVG.querySelector(".barLine");
|
327
337
|
var coordinates = coords.getDOMMatrixCoordinates(barLine, barLine.closest("g"));
|
328
338
|
var textGroup = document.createElementNS(constants_1.constants._SVGNS_, "g");
|
329
|
-
textGroup.setAttribute("id", random_1.uuidv4());
|
339
|
+
textGroup.setAttribute("id", (0, random_1.uuidv4)());
|
330
340
|
textGroup.setAttribute("targetId", barLine.id);
|
331
341
|
var text = document.createElementNS(constants_1.constants._SVGNS_, "svg");
|
332
342
|
var textForeignObject = document.createElementNS(constants_1.constants._SVGNS_, "foreignObject");
|
@@ -409,7 +419,7 @@ class SVGEditor {
|
|
409
419
|
else {
|
410
420
|
Array.from(element.querySelectorAll("*")).forEach(el => {
|
411
421
|
if (el.id === "") {
|
412
|
-
el.setAttribute("id", random_1.uuidv4());
|
422
|
+
el.setAttribute("id", (0, random_1.uuidv4)());
|
413
423
|
}
|
414
424
|
});
|
415
425
|
}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.
|
4
|
-
exports.enharmonicToCross = exports.enharmonicToB = exports.midiToNote = exports.keyToUnicode = void 0;
|
3
|
+
exports.clefToLine = exports.octToNum = exports.articButtonToAttr = exports.attrToArticButtonId = exports.accidButtonToAttr = exports.attrToAccidButtonId = exports.numToDotButtonId = exports.NoteButtonIdToNum = exports.numToNoteButtonId = exports.keyIdToSig = exports.keysigToNotes = exports.nextStepUp = exports.nextStepDown = exports.noteToB = exports.noteToCross = exports.idToClef = exports.keyCodeNoteMap = exports.idxNotePhantomMapBelowCBariton = exports.idxNotePhantomMapAboveCBariton = exports.idxNoteMapCClefBariton = exports.idxNotePhantomMapBelowCTenor = exports.idxNotePhantomMapAboveCTenor = exports.idxNoteMapCClefTenor = exports.idxNotePhantomMapBelowCMezzo = exports.idxNotePhantomMapAboveCMezzo = exports.idxNoteMapCClefMezzo = exports.idxNotePhantomMapBelowCSoprano = exports.idxNotePhantomMapAboveCSoprano = exports.idxNoteMapCClefSoprano = exports.idxNotePhantomMapBelowCAlto = exports.idxNotePhantomMapAboveCAlto = exports.idxNoteMapCClefAlto = exports.idxNotePhantomMapBelowFOctDown = exports.idxNotePhantomMapBelowFOctUp = exports.idxNotePhantomMapBelowF = exports.idxNotePhantomMapAboveFOctDown = exports.idxNotePhantomMapAboveFOctUp = exports.idxNotePhantomMapAboveF = exports.idxNotePhantomMapBelowGOctDown = exports.idxNotePhantomMapBelowGOctUp = exports.idxNotePhantomMapBelowG = exports.idxNotePhantomMapAboveGOctDown = exports.idxNotePhantomMapAboveGOctUp = exports.idxNotePhantomMapAboveG = exports.idxNoteMapFClefOctDown = exports.idxNoteMapFClefOctUp = exports.idxNoteMapFClef = exports.idxNoteMapGClefOctDown = exports.idxNoteMapGClefOctUp = exports.idxNoteMapGClef = void 0;
|
4
|
+
exports.enharmonicToCross = exports.enharmonicToB = exports.midiToNote = exports.keyToUnicode = exports.unicodeToKey = exports.unicodeToTimesig = void 0;
|
5
5
|
/**
|
6
6
|
* Pitch to Clef Mapping
|
7
7
|
*/
|
@@ -512,18 +512,21 @@ exports.NoteButtonIdToNum.set("thirtysecondNote", 32);
|
|
512
512
|
exports.numToDotButtonId = new Map;
|
513
513
|
exports.numToDotButtonId.set("1", "oneDot");
|
514
514
|
exports.numToDotButtonId.set("2", "twoDot");
|
515
|
-
exports.
|
516
|
-
exports.
|
517
|
-
exports.
|
518
|
-
exports.
|
519
|
-
exports.
|
520
|
-
exports.
|
521
|
-
exports.
|
522
|
-
exports.
|
523
|
-
exports.
|
524
|
-
exports.
|
525
|
-
exports.
|
526
|
-
exports.
|
515
|
+
exports.attrToAccidButtonId = new Map;
|
516
|
+
exports.attrToAccidButtonId.set("s", "alterUp");
|
517
|
+
exports.attrToAccidButtonId.set("f", "alterDown");
|
518
|
+
exports.attrToAccidButtonId.set("n", "alterNeutral");
|
519
|
+
exports.attrToAccidButtonId.set("ff", "alterDDown");
|
520
|
+
exports.attrToAccidButtonId.set("ss", "alterDUp");
|
521
|
+
exports.accidButtonToAttr = new Map;
|
522
|
+
exports.attrToAccidButtonId.forEach((v, k) => exports.accidButtonToAttr.set(v, k));
|
523
|
+
exports.attrToArticButtonId = new Map;
|
524
|
+
exports.attrToArticButtonId.set("acc", "accentBtn");
|
525
|
+
exports.attrToArticButtonId.set("ten", "tenutoBtn");
|
526
|
+
exports.attrToArticButtonId.set("marc", "marcatoBtn");
|
527
|
+
exports.attrToArticButtonId.set("stacc", "staccatoBtn");
|
528
|
+
exports.articButtonToAttr = new Map;
|
529
|
+
exports.attrToArticButtonId.forEach((v, k) => exports.articButtonToAttr.set(v, k));
|
527
530
|
exports.octToNum = new Map;
|
528
531
|
exports.octToNum.set("subkontraOct", "0");
|
529
532
|
exports.octToNum.set("kontraOct", "1");
|