@coderline/alphatab 1.7.0-alpha.1524 → 1.7.0-alpha.1527
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/alphaTab.core.min.mjs +2 -2
- package/dist/alphaTab.core.mjs +81 -83
- package/dist/alphaTab.js +81 -83
- package/dist/alphaTab.min.js +2 -2
- package/dist/alphaTab.min.mjs +1 -1
- package/dist/alphaTab.mjs +1 -1
- package/dist/alphaTab.vite.js +1 -1
- package/dist/alphaTab.vite.mjs +1 -1
- package/dist/alphaTab.webpack.js +1 -1
- package/dist/alphaTab.webpack.mjs +1 -1
- package/dist/alphaTab.worker.min.mjs +1 -1
- package/dist/alphaTab.worker.mjs +1 -1
- package/dist/alphaTab.worklet.min.mjs +1 -1
- package/dist/alphaTab.worklet.mjs +1 -1
- package/package.json +20 -20
package/dist/alphaTab.core.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* alphaTab v1.7.0-alpha.
|
|
2
|
+
* alphaTab v1.7.0-alpha.1527 (develop, build 1527)
|
|
3
3
|
*
|
|
4
4
|
* Copyright © 2025, Daniel Kuschny and Contributors, All rights reserved.
|
|
5
5
|
*
|
|
@@ -197,9 +197,9 @@ class VersionInfo {
|
|
|
197
197
|
print(`build date: ${VersionInfo.date}`);
|
|
198
198
|
}
|
|
199
199
|
}
|
|
200
|
-
VersionInfo.version = '1.7.0-alpha.
|
|
201
|
-
VersionInfo.date = '2025-08-
|
|
202
|
-
VersionInfo.commit = '
|
|
200
|
+
VersionInfo.version = '1.7.0-alpha.1527';
|
|
201
|
+
VersionInfo.date = '2025-08-29T02:00:51.139Z';
|
|
202
|
+
VersionInfo.commit = 'fb7020e4a8b90820f267c8d99ccaa18c43057db8';
|
|
203
203
|
|
|
204
204
|
/**
|
|
205
205
|
* This public class provides names for all general midi instruments.
|
|
@@ -3524,7 +3524,7 @@ class ModelUtils {
|
|
|
3524
3524
|
return null;
|
|
3525
3525
|
}
|
|
3526
3526
|
const result = new TuningParseResult();
|
|
3527
|
-
result.octave = Number.parseInt(octave) + 1;
|
|
3527
|
+
result.octave = Number.parseInt(octave, 10) + 1;
|
|
3528
3528
|
result.note = note.toLowerCase();
|
|
3529
3529
|
result.tone = ModelUtils.getToneForText(result.note);
|
|
3530
3530
|
// if tone.noteValue is negative (eg. on Cb note)
|
|
@@ -3973,7 +3973,7 @@ class ModelUtils {
|
|
|
3973
3973
|
for (const keySignatureText of transpose) {
|
|
3974
3974
|
const keySignature =
|
|
3975
3975
|
// digit
|
|
3976
|
-
(Number.parseInt(keySignatureText.charAt(0)) *
|
|
3976
|
+
(Number.parseInt(keySignatureText.charAt(0), 10) *
|
|
3977
3977
|
// b -> negative, # positive
|
|
3978
3978
|
(keySignatureText.charAt(1) === 'b' ? -1 : 1));
|
|
3979
3979
|
transposeValues.push(keySignature);
|
|
@@ -8132,10 +8132,10 @@ class Color {
|
|
|
8132
8132
|
}
|
|
8133
8133
|
const numbers = json.substring(start + 1, end).split(',');
|
|
8134
8134
|
if (numbers.length === 3) {
|
|
8135
|
-
return new Color(Number.parseInt(numbers[0]), Number.parseInt(numbers[1]), Number.parseInt(numbers[2]));
|
|
8135
|
+
return new Color(Number.parseInt(numbers[0], 10), Number.parseInt(numbers[1], 10), Number.parseInt(numbers[2], 10));
|
|
8136
8136
|
}
|
|
8137
8137
|
if (numbers.length === 4) {
|
|
8138
|
-
return new Color(Number.parseInt(numbers[0]), Number.parseInt(numbers[1]), Number.parseInt(numbers[2]), Number.parseFloat(numbers[3]) * 255);
|
|
8138
|
+
return new Color(Number.parseInt(numbers[0], 10), Number.parseInt(numbers[1], 10), Number.parseInt(numbers[2], 10), Number.parseFloat(numbers[3]) * 255);
|
|
8139
8139
|
}
|
|
8140
8140
|
}
|
|
8141
8141
|
return null;
|
|
@@ -9453,7 +9453,7 @@ class AlphaTexLexer {
|
|
|
9453
9453
|
this.syData = str;
|
|
9454
9454
|
}
|
|
9455
9455
|
else {
|
|
9456
|
-
this.syData = allowFloat ? Number.parseFloat(str) : Number.parseInt(str);
|
|
9456
|
+
this.syData = allowFloat ? Number.parseFloat(str) : Number.parseInt(str, 10);
|
|
9457
9457
|
}
|
|
9458
9458
|
return;
|
|
9459
9459
|
}
|
|
@@ -13642,8 +13642,8 @@ class XmlParser {
|
|
|
13642
13642
|
const s = str.substr(start, p - start);
|
|
13643
13643
|
if (s.charCodeAt(0) === XmlParser.CharCodeSharp) {
|
|
13644
13644
|
const code = s.charCodeAt(1) === XmlParser.CharCodeLowerX
|
|
13645
|
-
? Number.parseInt(`0${s.substr(1, s.length - 1)}
|
|
13646
|
-
: Number.parseInt(s.substr(1, s.length - 1));
|
|
13645
|
+
? Number.parseInt(`0${s.substr(1, s.length - 1)}`, 10)
|
|
13646
|
+
: Number.parseInt(s.substr(1, s.length - 1), 10);
|
|
13647
13647
|
buf += String.fromCharCode(code);
|
|
13648
13648
|
}
|
|
13649
13649
|
else if (XmlParser.Escapes.has(s)) {
|
|
@@ -14159,8 +14159,8 @@ class CapellaParser {
|
|
|
14159
14159
|
}
|
|
14160
14160
|
parseBracket(element) {
|
|
14161
14161
|
const bracket = new Bracket();
|
|
14162
|
-
bracket.from = Number.parseInt(element.getAttribute('from'));
|
|
14163
|
-
bracket.to = Number.parseInt(element.getAttribute('to'));
|
|
14162
|
+
bracket.from = Number.parseInt(element.getAttribute('from'), 10);
|
|
14163
|
+
bracket.to = Number.parseInt(element.getAttribute('to'), 10);
|
|
14164
14164
|
if (element.attributes.has('curly')) {
|
|
14165
14165
|
bracket.curly = element.attributes.get('curly') === 'true';
|
|
14166
14166
|
}
|
|
@@ -14190,13 +14190,13 @@ class CapellaParser {
|
|
|
14190
14190
|
layout.percussion = c.attributes.get('percussion') === 'true';
|
|
14191
14191
|
}
|
|
14192
14192
|
if (c.attributes.has('instr')) {
|
|
14193
|
-
layout.instrument = Number.parseInt(c.attributes.get('instr'));
|
|
14193
|
+
layout.instrument = Number.parseInt(c.attributes.get('instr'), 10);
|
|
14194
14194
|
}
|
|
14195
14195
|
if (c.attributes.has('volume')) {
|
|
14196
|
-
layout.volume = Number.parseInt(c.attributes.get('volume'));
|
|
14196
|
+
layout.volume = Number.parseInt(c.attributes.get('volume'), 10);
|
|
14197
14197
|
}
|
|
14198
14198
|
if (c.attributes.has('transpose')) {
|
|
14199
|
-
layout.transpose = Number.parseInt(c.attributes.get('transpose'));
|
|
14199
|
+
layout.transpose = Number.parseInt(c.attributes.get('transpose'), 10);
|
|
14200
14200
|
}
|
|
14201
14201
|
break;
|
|
14202
14202
|
}
|
|
@@ -14239,7 +14239,7 @@ class CapellaParser {
|
|
|
14239
14239
|
parseSystem(element) {
|
|
14240
14240
|
if (element.attributes.has('tempo')) {
|
|
14241
14241
|
if (this.score.masterBars.length === 0) {
|
|
14242
|
-
this.score.tempo = Number.parseInt(element.attributes.get('tempo'));
|
|
14242
|
+
this.score.tempo = Number.parseInt(element.attributes.get('tempo'), 10);
|
|
14243
14243
|
}
|
|
14244
14244
|
}
|
|
14245
14245
|
if (element.getAttribute('beamGrouping') === '0') {
|
|
@@ -14302,8 +14302,8 @@ class CapellaParser {
|
|
|
14302
14302
|
default:
|
|
14303
14303
|
if (value.indexOf('/') > 0) {
|
|
14304
14304
|
const parts = value.split('/');
|
|
14305
|
-
this._timeSignature.timeSignatureNumerator = Number.parseInt(parts[0]);
|
|
14306
|
-
this._timeSignature.timeSignatureDenominator = Number.parseInt(parts[1]);
|
|
14305
|
+
this._timeSignature.timeSignatureNumerator = Number.parseInt(parts[0], 10);
|
|
14306
|
+
this._timeSignature.timeSignatureDenominator = Number.parseInt(parts[1], 10);
|
|
14307
14307
|
this._timeSignature.timeSignatureCommon = false;
|
|
14308
14308
|
}
|
|
14309
14309
|
break;
|
|
@@ -14398,7 +14398,7 @@ class CapellaParser {
|
|
|
14398
14398
|
const automation = new Automation();
|
|
14399
14399
|
automation.isLinear = true;
|
|
14400
14400
|
automation.type = AutomationType.Tempo;
|
|
14401
|
-
automation.value = Number.parseInt(systemElement.attributes.get('tempo'));
|
|
14401
|
+
automation.value = Number.parseInt(systemElement.attributes.get('tempo'), 10);
|
|
14402
14402
|
automation.ratioPosition =
|
|
14403
14403
|
this._currentVoiceState.currentPosition / this._currentVoiceState.currentBarDuration;
|
|
14404
14404
|
this._currentBar.masterBar.tempoAutomations.push(automation);
|
|
@@ -14414,7 +14414,7 @@ class CapellaParser {
|
|
|
14414
14414
|
this._currentBar.clefOttava = this.parseClefOttava(c.getAttribute('clef'));
|
|
14415
14415
|
break;
|
|
14416
14416
|
case 'keySign':
|
|
14417
|
-
this._currentBar.keySignature = Number.parseInt(c.getAttribute('fifths'));
|
|
14417
|
+
this._currentBar.keySignature = Number.parseInt(c.getAttribute('fifths'), 10);
|
|
14418
14418
|
break;
|
|
14419
14419
|
case 'timeSign':
|
|
14420
14420
|
this.parseTime(c.getAttribute('time'));
|
|
@@ -14615,7 +14615,7 @@ class CapellaParser {
|
|
|
14615
14615
|
switch (c.localName) {
|
|
14616
14616
|
case 'alter':
|
|
14617
14617
|
if (c.attributes.has('step')) {
|
|
14618
|
-
note.tone += Number.parseInt(c.attributes.get('step'));
|
|
14618
|
+
note.tone += Number.parseInt(c.attributes.get('step'), 10);
|
|
14619
14619
|
}
|
|
14620
14620
|
break;
|
|
14621
14621
|
case 'tie':
|
|
@@ -14768,7 +14768,7 @@ class CapellaParser {
|
|
|
14768
14768
|
return restBeat;
|
|
14769
14769
|
}
|
|
14770
14770
|
// for
|
|
14771
|
-
const fullBars = Number.parseInt(durationBase);
|
|
14771
|
+
const fullBars = Number.parseInt(durationBase, 10);
|
|
14772
14772
|
if (fullBars === 1) {
|
|
14773
14773
|
const restBeat = new Beat();
|
|
14774
14774
|
restBeat.beamingMode = this._beamingMode;
|
|
@@ -14808,11 +14808,11 @@ class CapellaParser {
|
|
|
14808
14808
|
const durationBase = element.getAttribute('base');
|
|
14809
14809
|
beat.duration = this.parseDurationValue(durationBase);
|
|
14810
14810
|
if (element.attributes.has('dots')) {
|
|
14811
|
-
beat.dots = Number.parseInt(element.attributes.get('dots'));
|
|
14811
|
+
beat.dots = Number.parseInt(element.attributes.get('dots'), 10);
|
|
14812
14812
|
}
|
|
14813
14813
|
const tuplet = element.findChildElement('tuplet');
|
|
14814
14814
|
if (tuplet) {
|
|
14815
|
-
beat.tupletNumerator = Number.parseInt(tuplet.getAttribute('count'));
|
|
14815
|
+
beat.tupletNumerator = Number.parseInt(tuplet.getAttribute('count'), 10);
|
|
14816
14816
|
const tripartiteMultiplicator = tuplet.getAttribute('tripartite') === 'true' ? 3 : 1;
|
|
14817
14817
|
const prolongDiff = tuplet.getAttribute('prolong') === 'true' ? 0 : 1;
|
|
14818
14818
|
let power = 0;
|
|
@@ -14896,7 +14896,7 @@ class CapellaParser {
|
|
|
14896
14896
|
break;
|
|
14897
14897
|
case 'basic':
|
|
14898
14898
|
if (c.attributes.has('noteRange')) {
|
|
14899
|
-
noteRange = Number.parseInt(c.attributes.get('noteRange'));
|
|
14899
|
+
noteRange = Number.parseInt(c.attributes.get('noteRange'), 10);
|
|
14900
14900
|
}
|
|
14901
14901
|
break;
|
|
14902
14902
|
}
|
|
@@ -14913,7 +14913,7 @@ class CapellaParser {
|
|
|
14913
14913
|
parseOctaveClef(element) {
|
|
14914
14914
|
const obj = new OctaveClefDrawObject();
|
|
14915
14915
|
if (element.attributes.has('octave')) {
|
|
14916
|
-
obj.octave = Number.parseInt(element.attributes.get('octave'));
|
|
14916
|
+
obj.octave = Number.parseInt(element.attributes.get('octave'), 10);
|
|
14917
14917
|
}
|
|
14918
14918
|
return obj;
|
|
14919
14919
|
}
|
|
@@ -14921,10 +14921,10 @@ class CapellaParser {
|
|
|
14921
14921
|
const obj = new VoltaDrawObject();
|
|
14922
14922
|
obj.allNumbers = element.attributes.get('allNumbers') === 'true';
|
|
14923
14923
|
if (element.attributes.has('firstNumber')) {
|
|
14924
|
-
obj.firstNumber = Number.parseInt(element.attributes.get('firstNumber'));
|
|
14924
|
+
obj.firstNumber = Number.parseInt(element.attributes.get('firstNumber'), 10);
|
|
14925
14925
|
}
|
|
14926
14926
|
if (element.attributes.has('lastNumber')) {
|
|
14927
|
-
obj.lastNumber = Number.parseInt(element.attributes.get('lastNumber'));
|
|
14927
|
+
obj.lastNumber = Number.parseInt(element.attributes.get('lastNumber'), 10);
|
|
14928
14928
|
}
|
|
14929
14929
|
return obj;
|
|
14930
14930
|
}
|
|
@@ -14936,7 +14936,7 @@ class CapellaParser {
|
|
|
14936
14936
|
parseTupletBracket(element) {
|
|
14937
14937
|
const obj = new TupletBracketDrawObject();
|
|
14938
14938
|
if (element.attributes.has('number')) {
|
|
14939
|
-
obj.number = Number.parseInt(element.attributes.get('number'));
|
|
14939
|
+
obj.number = Number.parseInt(element.attributes.get('number'), 10);
|
|
14940
14940
|
}
|
|
14941
14941
|
return obj;
|
|
14942
14942
|
}
|
|
@@ -14956,7 +14956,7 @@ class CapellaParser {
|
|
|
14956
14956
|
obj.chord.strings.push(0);
|
|
14957
14957
|
}
|
|
14958
14958
|
else {
|
|
14959
|
-
obj.chord.strings.push(Number.parseInt(strings.charAt(i)));
|
|
14959
|
+
obj.chord.strings.push(Number.parseInt(strings.charAt(i), 10));
|
|
14960
14960
|
}
|
|
14961
14961
|
}
|
|
14962
14962
|
return obj;
|
|
@@ -15000,10 +15000,10 @@ class CapellaParser {
|
|
|
15000
15000
|
case 'font':
|
|
15001
15001
|
obj.fontFace = c.getAttribute('face');
|
|
15002
15002
|
if (c.attributes.has('weight')) {
|
|
15003
|
-
obj.weight = Number.parseInt(c.attributes.get('weight'));
|
|
15003
|
+
obj.weight = Number.parseInt(c.attributes.get('weight'), 10);
|
|
15004
15004
|
}
|
|
15005
15005
|
if (c.attributes.has('height')) {
|
|
15006
|
-
obj.height = Number.parseInt(c.attributes.get('height'));
|
|
15006
|
+
obj.height = Number.parseInt(c.attributes.get('height'), 10);
|
|
15007
15007
|
}
|
|
15008
15008
|
break;
|
|
15009
15009
|
case 'content':
|
|
@@ -15205,7 +15205,7 @@ class Gp3To5Importer extends ScoreImporter {
|
|
|
15205
15205
|
}
|
|
15206
15206
|
version = version.substr(Gp3To5Importer.VersionString.length + 1);
|
|
15207
15207
|
const dot = version.indexOf(String.fromCharCode(46));
|
|
15208
|
-
this._versionNumber = 100 * Number.parseInt(version.substr(0, dot)) + Number.parseInt(version.substr(dot + 1));
|
|
15208
|
+
this._versionNumber = 100 * Number.parseInt(version.substr(0, dot), 10) + Number.parseInt(version.substr(dot + 1), 10);
|
|
15209
15209
|
Logger.debug(this.name, `Guitar Pro version ${version} detected`);
|
|
15210
15210
|
}
|
|
15211
15211
|
readScoreInformation() {
|
|
@@ -17233,7 +17233,7 @@ class GpifParser {
|
|
|
17233
17233
|
if (!text) {
|
|
17234
17234
|
return fallback;
|
|
17235
17235
|
}
|
|
17236
|
-
const i = Number.parseInt(text);
|
|
17236
|
+
const i = Number.parseInt(text, 10);
|
|
17237
17237
|
if (!Number.isNaN(i)) {
|
|
17238
17238
|
return i;
|
|
17239
17239
|
}
|
|
@@ -21075,17 +21075,17 @@ class MusicXmlImporter extends ScoreImporter {
|
|
|
21075
21075
|
for (const c of element.childElements()) {
|
|
21076
21076
|
switch (c.localName) {
|
|
21077
21077
|
case 'midi-channel':
|
|
21078
|
-
articulation.outputMidiChannel = Number.parseInt(c.innerText) - 1;
|
|
21078
|
+
articulation.outputMidiChannel = Number.parseInt(c.innerText, 10) - 1;
|
|
21079
21079
|
break;
|
|
21080
21080
|
// case 'midi-name': Ignored
|
|
21081
21081
|
case 'midi-bank':
|
|
21082
|
-
articulation.outputMidiBank = Number.parseInt(c.innerText) - 1;
|
|
21082
|
+
articulation.outputMidiBank = Number.parseInt(c.innerText, 10) - 1;
|
|
21083
21083
|
break;
|
|
21084
21084
|
case 'midi-program':
|
|
21085
|
-
articulation.outputMidiProgram = Number.parseInt(c.innerText) - 1;
|
|
21085
|
+
articulation.outputMidiProgram = Number.parseInt(c.innerText, 10) - 1;
|
|
21086
21086
|
break;
|
|
21087
21087
|
case 'midi-unpitched':
|
|
21088
|
-
articulation.outputMidiNumber = Number.parseInt(c.innerText) - 1;
|
|
21088
|
+
articulation.outputMidiNumber = Number.parseInt(c.innerText, 10) - 1;
|
|
21089
21089
|
break;
|
|
21090
21090
|
case 'volume':
|
|
21091
21091
|
articulation.outputVolume = MusicXmlImporter.interpolatePercent(Number.parseFloat(c.innerText));
|
|
@@ -21416,7 +21416,7 @@ class MusicXmlImporter extends ScoreImporter {
|
|
|
21416
21416
|
}
|
|
21417
21417
|
parseRepeat(element, masterBar) {
|
|
21418
21418
|
const direction = element.getAttribute('direction');
|
|
21419
|
-
let times = Number.parseInt(element.getAttribute('times'));
|
|
21419
|
+
let times = Number.parseInt(element.getAttribute('times'), 10);
|
|
21420
21420
|
if (times < 0 || Number.isNaN(times)) {
|
|
21421
21421
|
times = 2;
|
|
21422
21422
|
}
|
|
@@ -21431,7 +21431,7 @@ class MusicXmlImporter extends ScoreImporter {
|
|
|
21431
21431
|
const numbers = element
|
|
21432
21432
|
.getAttribute('number')
|
|
21433
21433
|
.split(',')
|
|
21434
|
-
.map(v => Number.parseInt(v));
|
|
21434
|
+
.map(v => Number.parseInt(v, 10));
|
|
21435
21435
|
let flags = 0;
|
|
21436
21436
|
for (const num of numbers) {
|
|
21437
21437
|
flags = flags | ((0x01 << (num - 1)) & 0xff);
|
|
@@ -21566,10 +21566,10 @@ class MusicXmlImporter extends ScoreImporter {
|
|
|
21566
21566
|
masterBar.tripletFeel = TripletFeel.NoTripletFeel;
|
|
21567
21567
|
return;
|
|
21568
21568
|
case 'first':
|
|
21569
|
-
first = Number.parseInt(c.innerText);
|
|
21569
|
+
first = Number.parseInt(c.innerText, 10);
|
|
21570
21570
|
break;
|
|
21571
21571
|
case 'second':
|
|
21572
|
-
second = Number.parseInt(c.innerText);
|
|
21572
|
+
second = Number.parseInt(c.innerText, 10);
|
|
21573
21573
|
break;
|
|
21574
21574
|
case 'swing-type':
|
|
21575
21575
|
swingType = this.parseBeatDuration(c);
|
|
@@ -21616,7 +21616,7 @@ class MusicXmlImporter extends ScoreImporter {
|
|
|
21616
21616
|
}
|
|
21617
21617
|
automation = new Automation();
|
|
21618
21618
|
automation.type = AutomationType.Bank;
|
|
21619
|
-
automation.value = Number.parseInt(c.innerText) - 1;
|
|
21619
|
+
automation.value = Number.parseInt(c.innerText, 10) - 1;
|
|
21620
21620
|
this._nextBeatAutomations.push(automation);
|
|
21621
21621
|
break;
|
|
21622
21622
|
case 'midi-program':
|
|
@@ -21625,7 +21625,7 @@ class MusicXmlImporter extends ScoreImporter {
|
|
|
21625
21625
|
}
|
|
21626
21626
|
automation = new Automation();
|
|
21627
21627
|
automation.type = AutomationType.Instrument;
|
|
21628
|
-
automation.value = Number.parseInt(c.innerText) - 1;
|
|
21628
|
+
automation.value = Number.parseInt(c.innerText, 10) - 1;
|
|
21629
21629
|
this._nextBeatAutomations.push(automation);
|
|
21630
21630
|
break;
|
|
21631
21631
|
// case 'midi-unpitched': Ignored
|
|
@@ -21850,7 +21850,7 @@ class MusicXmlImporter extends ScoreImporter {
|
|
|
21850
21850
|
for (const frameChild of xmlNode.childElements()) {
|
|
21851
21851
|
switch (frameChild.localName) {
|
|
21852
21852
|
case 'frame-strings':
|
|
21853
|
-
const stringsCount = Number.parseInt(frameChild.innerText);
|
|
21853
|
+
const stringsCount = Number.parseInt(frameChild.innerText, 10);
|
|
21854
21854
|
chord.strings = new Array(stringsCount);
|
|
21855
21855
|
for (let i = 0; i < stringsCount; i++) {
|
|
21856
21856
|
// set strings unplayed as default
|
|
@@ -21858,7 +21858,7 @@ class MusicXmlImporter extends ScoreImporter {
|
|
|
21858
21858
|
}
|
|
21859
21859
|
break;
|
|
21860
21860
|
case 'first-fret':
|
|
21861
|
-
chord.firstFret = Number.parseInt(frameChild.innerText);
|
|
21861
|
+
chord.firstFret = Number.parseInt(frameChild.innerText, 10);
|
|
21862
21862
|
break;
|
|
21863
21863
|
case 'frame-note':
|
|
21864
21864
|
let stringNo = null;
|
|
@@ -21866,10 +21866,10 @@ class MusicXmlImporter extends ScoreImporter {
|
|
|
21866
21866
|
for (const noteChild of frameChild.childElements()) {
|
|
21867
21867
|
switch (noteChild.localName) {
|
|
21868
21868
|
case 'string':
|
|
21869
|
-
stringNo = Number.parseInt(noteChild.innerText);
|
|
21869
|
+
stringNo = Number.parseInt(noteChild.innerText, 10);
|
|
21870
21870
|
break;
|
|
21871
21871
|
case 'fret':
|
|
21872
|
-
fretNo = Number.parseInt(noteChild.innerText);
|
|
21872
|
+
fretNo = Number.parseInt(noteChild.innerText, 10);
|
|
21873
21873
|
if (stringNo && fretNo >= 0) {
|
|
21874
21874
|
chord.strings[stringNo - 1] = fretNo;
|
|
21875
21875
|
}
|
|
@@ -21906,18 +21906,18 @@ class MusicXmlImporter extends ScoreImporter {
|
|
|
21906
21906
|
break;
|
|
21907
21907
|
case 'staves':
|
|
21908
21908
|
// will create staves
|
|
21909
|
-
track.ensureStaveCount(Number.parseInt(c.innerText));
|
|
21909
|
+
track.ensureStaveCount(Number.parseInt(c.innerText, 10));
|
|
21910
21910
|
break;
|
|
21911
21911
|
// case 'part-symbol': Ignored (https://github.com/CoderLine/alphaTab/issues/1989)
|
|
21912
21912
|
// case 'instruments': Ignored, auto-detected via `note/instrument` and handled via instrument articulations
|
|
21913
21913
|
case 'clef':
|
|
21914
|
-
staffIndex = Number.parseInt(c.getAttribute('number', '1')) - 1;
|
|
21914
|
+
staffIndex = Number.parseInt(c.getAttribute('number', '1'), 10) - 1;
|
|
21915
21915
|
staff = this.getOrCreateStaff(track, staffIndex);
|
|
21916
21916
|
bar = this.getOrCreateBar(staff, masterBar);
|
|
21917
21917
|
this.parseClef(c, bar);
|
|
21918
21918
|
break;
|
|
21919
21919
|
case 'staff-details':
|
|
21920
|
-
staffIndex = Number.parseInt(c.getAttribute('number', '1')) - 1;
|
|
21920
|
+
staffIndex = Number.parseInt(c.getAttribute('number', '1'), 10) - 1;
|
|
21921
21921
|
staff = this.getOrCreateStaff(track, staffIndex);
|
|
21922
21922
|
this.parseStaffDetails(c, staff);
|
|
21923
21923
|
break;
|
|
@@ -21967,7 +21967,7 @@ class MusicXmlImporter extends ScoreImporter {
|
|
|
21967
21967
|
let simileMark = null;
|
|
21968
21968
|
switch (c.getAttribute('type')) {
|
|
21969
21969
|
case 'start':
|
|
21970
|
-
switch (Number.parseInt(c.getAttribute('slashes', '1'))) {
|
|
21970
|
+
switch (Number.parseInt(c.getAttribute('slashes', '1'), 10)) {
|
|
21971
21971
|
case 1:
|
|
21972
21972
|
simileMark = SimileMark.Simple;
|
|
21973
21973
|
break;
|
|
@@ -21982,7 +21982,7 @@ class MusicXmlImporter extends ScoreImporter {
|
|
|
21982
21982
|
}
|
|
21983
21983
|
if (element.attributes.has('number')) {
|
|
21984
21984
|
this._simileMarkPerStaff = this._simileMarkPerStaff ?? new Map();
|
|
21985
|
-
const staff = Number.parseInt(element.attributes.get('number')) - 1;
|
|
21985
|
+
const staff = Number.parseInt(element.attributes.get('number'), 10) - 1;
|
|
21986
21986
|
if (simileMark == null) {
|
|
21987
21987
|
this._simileMarkPerStaff.delete(staff);
|
|
21988
21988
|
}
|
|
@@ -22025,7 +22025,7 @@ class MusicXmlImporter extends ScoreImporter {
|
|
|
22025
22025
|
}
|
|
22026
22026
|
}
|
|
22027
22027
|
if (element.attributes.has('number')) {
|
|
22028
|
-
const staff = this.getOrCreateStaff(track, Number.parseInt(element.attributes.get('number')) - 1);
|
|
22028
|
+
const staff = this.getOrCreateStaff(track, Number.parseInt(element.attributes.get('number'), 10) - 1);
|
|
22029
22029
|
this.getStaffContext(staff).transpose = semitones;
|
|
22030
22030
|
staff.displayTranspositionPitch = semitones;
|
|
22031
22031
|
}
|
|
@@ -22041,14 +22041,14 @@ class MusicXmlImporter extends ScoreImporter {
|
|
|
22041
22041
|
switch (c.localName) {
|
|
22042
22042
|
// case 'staff-type': Ignored
|
|
22043
22043
|
case 'staff-lines':
|
|
22044
|
-
staff.standardNotationLineCount = Number.parseInt(c.innerText);
|
|
22044
|
+
staff.standardNotationLineCount = Number.parseInt(c.innerText, 10);
|
|
22045
22045
|
break;
|
|
22046
22046
|
// case 'line-detail': Not supported
|
|
22047
22047
|
case 'staff-tuning':
|
|
22048
22048
|
this.parseStaffTuning(c, staff);
|
|
22049
22049
|
break;
|
|
22050
22050
|
case 'capo':
|
|
22051
|
-
staff.capo = Number.parseInt(c.innerText);
|
|
22051
|
+
staff.capo = Number.parseInt(c.innerText, 10);
|
|
22052
22052
|
break;
|
|
22053
22053
|
// case 'staff-size': Not supported
|
|
22054
22054
|
}
|
|
@@ -22060,7 +22060,7 @@ class MusicXmlImporter extends ScoreImporter {
|
|
|
22060
22060
|
staff.showStandardNotation = false;
|
|
22061
22061
|
staff.stringTuning.tunings = new Array(staff.standardNotationLineCount).fill(0);
|
|
22062
22062
|
}
|
|
22063
|
-
const line = Number.parseInt(element.getAttribute('line'));
|
|
22063
|
+
const line = Number.parseInt(element.getAttribute('line'), 10);
|
|
22064
22064
|
let tuningStep = 'C';
|
|
22065
22065
|
let tuningOctave = '';
|
|
22066
22066
|
let tuningAlter = 0;
|
|
@@ -22089,10 +22089,10 @@ class MusicXmlImporter extends ScoreImporter {
|
|
|
22089
22089
|
sign = c.innerText.toLowerCase();
|
|
22090
22090
|
break;
|
|
22091
22091
|
case 'line':
|
|
22092
|
-
line = Number.parseInt(c.innerText);
|
|
22092
|
+
line = Number.parseInt(c.innerText, 10);
|
|
22093
22093
|
break;
|
|
22094
22094
|
case 'clef-octave-change':
|
|
22095
|
-
switch (Number.parseInt(c.innerText)) {
|
|
22095
|
+
switch (Number.parseInt(c.innerText, 10)) {
|
|
22096
22096
|
case -2:
|
|
22097
22097
|
bar.clefOttava = Ottavia._15mb;
|
|
22098
22098
|
break;
|
|
@@ -22146,12 +22146,12 @@ class MusicXmlImporter extends ScoreImporter {
|
|
|
22146
22146
|
case 'beats':
|
|
22147
22147
|
if (!beatsParsed) {
|
|
22148
22148
|
if (v.indexOf('+') === -1) {
|
|
22149
|
-
masterBar.timeSignatureNumerator = Number.parseInt(v);
|
|
22149
|
+
masterBar.timeSignatureNumerator = Number.parseInt(v, 10);
|
|
22150
22150
|
}
|
|
22151
22151
|
else {
|
|
22152
22152
|
masterBar.timeSignatureNumerator = v
|
|
22153
22153
|
.split('+')
|
|
22154
|
-
.map(v => Number.parseInt(v))
|
|
22154
|
+
.map(v => Number.parseInt(v, 10))
|
|
22155
22155
|
.reduce((sum, v) => v + sum, 0);
|
|
22156
22156
|
}
|
|
22157
22157
|
beatsParsed = true;
|
|
@@ -22160,12 +22160,12 @@ class MusicXmlImporter extends ScoreImporter {
|
|
|
22160
22160
|
case 'beat-type':
|
|
22161
22161
|
if (!beatTypeParsed) {
|
|
22162
22162
|
if (v.indexOf('+') === -1) {
|
|
22163
|
-
masterBar.timeSignatureDenominator = Number.parseInt(v);
|
|
22163
|
+
masterBar.timeSignatureDenominator = Number.parseInt(v, 10);
|
|
22164
22164
|
}
|
|
22165
22165
|
else {
|
|
22166
22166
|
masterBar.timeSignatureDenominator = v
|
|
22167
22167
|
.split('+')
|
|
22168
|
-
.map(v => Number.parseInt(v))
|
|
22168
|
+
.map(v => Number.parseInt(v, 10))
|
|
22169
22169
|
.reduce((sum, v) => v + sum, 0);
|
|
22170
22170
|
}
|
|
22171
22171
|
beatTypeParsed = true;
|
|
@@ -22193,7 +22193,7 @@ class MusicXmlImporter extends ScoreImporter {
|
|
|
22193
22193
|
switch (c.localName) {
|
|
22194
22194
|
// case 'cancel': not supported
|
|
22195
22195
|
case 'fifths':
|
|
22196
|
-
fifths = Number.parseInt(c.innerText);
|
|
22196
|
+
fifths = Number.parseInt(c.innerText, 10);
|
|
22197
22197
|
break;
|
|
22198
22198
|
case 'mode':
|
|
22199
22199
|
mode = c.innerText;
|
|
@@ -22219,7 +22219,7 @@ class MusicXmlImporter extends ScoreImporter {
|
|
|
22219
22219
|
keySignatureType = KeySignatureType.Major;
|
|
22220
22220
|
}
|
|
22221
22221
|
if (element.attributes.has('number')) {
|
|
22222
|
-
const staff = this.getOrCreateStaff(track, Number.parseInt(element.attributes.get('number')) - 1);
|
|
22222
|
+
const staff = this.getOrCreateStaff(track, Number.parseInt(element.attributes.get('number'), 10) - 1);
|
|
22223
22223
|
const bar = this.getOrCreateBar(staff, masterBar);
|
|
22224
22224
|
bar.keySignature = keySignature;
|
|
22225
22225
|
bar.keySignatureType = keySignatureType;
|
|
@@ -22260,7 +22260,7 @@ class MusicXmlImporter extends ScoreImporter {
|
|
|
22260
22260
|
// voiceIndex = parseInt(c.innerText) - 1;
|
|
22261
22261
|
break;
|
|
22262
22262
|
case 'staff':
|
|
22263
|
-
staffIndex = Number.parseInt(c.innerText) - 1;
|
|
22263
|
+
staffIndex = Number.parseInt(c.innerText, 10) - 1;
|
|
22264
22264
|
break;
|
|
22265
22265
|
case 'sound':
|
|
22266
22266
|
if (c.attributes.has('tempo')) {
|
|
@@ -22390,7 +22390,7 @@ class MusicXmlImporter extends ScoreImporter {
|
|
|
22390
22390
|
}
|
|
22391
22391
|
parseOctaveShift(element) {
|
|
22392
22392
|
const type = element.getAttribute('type');
|
|
22393
|
-
const size = Number.parseInt(element.getAttribute('size', '8'));
|
|
22393
|
+
const size = Number.parseInt(element.getAttribute('size', '8'), 10);
|
|
22394
22394
|
switch (size) {
|
|
22395
22395
|
case 15:
|
|
22396
22396
|
switch (type) {
|
|
@@ -22815,7 +22815,7 @@ class MusicXmlImporter extends ScoreImporter {
|
|
|
22815
22815
|
// case 'footnote': Ignored
|
|
22816
22816
|
// case 'level': Ignored
|
|
22817
22817
|
case 'voice':
|
|
22818
|
-
voiceIndex = Number.parseInt(c.innerText);
|
|
22818
|
+
voiceIndex = Number.parseInt(c.innerText, 10);
|
|
22819
22819
|
if (Number.isNaN(voiceIndex)) {
|
|
22820
22820
|
Logger.warning('MusicXML', 'Voices need to be specified as numbers');
|
|
22821
22821
|
voiceIndex = 0;
|
|
@@ -22842,10 +22842,10 @@ class MusicXmlImporter extends ScoreImporter {
|
|
|
22842
22842
|
for (const tmc of c.childElements()) {
|
|
22843
22843
|
switch (tmc.localName) {
|
|
22844
22844
|
case 'actual-notes':
|
|
22845
|
-
tupletNumerator = Number.parseInt(tmc.innerText);
|
|
22845
|
+
tupletNumerator = Number.parseInt(tmc.innerText, 10);
|
|
22846
22846
|
break;
|
|
22847
22847
|
case 'normal-notes':
|
|
22848
|
-
tupletDenominator = Number.parseInt(tmc.innerText);
|
|
22848
|
+
tupletDenominator = Number.parseInt(tmc.innerText, 10);
|
|
22849
22849
|
break;
|
|
22850
22850
|
// case 'normal-type': not supported
|
|
22851
22851
|
// case 'normal-dot': not supported
|
|
@@ -22865,7 +22865,7 @@ class MusicXmlImporter extends ScoreImporter {
|
|
|
22865
22865
|
break;
|
|
22866
22866
|
// case 'notehead-text': Not supported
|
|
22867
22867
|
case 'staff':
|
|
22868
|
-
staffIndex = Number.parseInt(c.innerText) - 1;
|
|
22868
|
+
staffIndex = Number.parseInt(c.innerText, 10) - 1;
|
|
22869
22869
|
break;
|
|
22870
22870
|
case 'beam':
|
|
22871
22871
|
// use the first beam as indicator whether to beam or split
|
|
@@ -23355,12 +23355,12 @@ class MusicXmlImporter extends ScoreImporter {
|
|
|
23355
23355
|
// case 'snap-pizzicato': Not supported
|
|
23356
23356
|
case 'fret':
|
|
23357
23357
|
if (note) {
|
|
23358
|
-
note.fret = Number.parseInt(c.innerText);
|
|
23358
|
+
note.fret = Number.parseInt(c.innerText, 10);
|
|
23359
23359
|
}
|
|
23360
23360
|
break;
|
|
23361
23361
|
case 'string':
|
|
23362
23362
|
if (note) {
|
|
23363
|
-
note.string = beat.voice.bar.staff.tuning.length - Number.parseInt(c.innerText) + 1;
|
|
23363
|
+
note.string = beat.voice.bar.staff.tuning.length - Number.parseInt(c.innerText, 10) + 1;
|
|
23364
23364
|
}
|
|
23365
23365
|
break;
|
|
23366
23366
|
case 'hammer-on':
|
|
@@ -23478,7 +23478,7 @@ class MusicXmlImporter extends ScoreImporter {
|
|
|
23478
23478
|
for (const c of element.childElements()) {
|
|
23479
23479
|
switch (c.localName) {
|
|
23480
23480
|
case 'trill-mark':
|
|
23481
|
-
currentTrillStep = Number.parseInt(c.getAttribute('trill-step', '2'));
|
|
23481
|
+
currentTrillStep = Number.parseInt(c.getAttribute('trill-step', '2'), 10);
|
|
23482
23482
|
if (note.isStringed) {
|
|
23483
23483
|
note.trillValue = note.stringTuning + currentTrillStep;
|
|
23484
23484
|
}
|
|
@@ -23693,7 +23693,7 @@ class MusicXmlImporter extends ScoreImporter {
|
|
|
23693
23693
|
break;
|
|
23694
23694
|
case 'display-octave':
|
|
23695
23695
|
// 0-9, 4 for middle C
|
|
23696
|
-
octave = Number.parseInt(c.innerText) + 1;
|
|
23696
|
+
octave = Number.parseInt(c.innerText, 10) + 1;
|
|
23697
23697
|
break;
|
|
23698
23698
|
}
|
|
23699
23699
|
}
|
|
@@ -23727,7 +23727,7 @@ class MusicXmlImporter extends ScoreImporter {
|
|
|
23727
23727
|
break;
|
|
23728
23728
|
case 'octave':
|
|
23729
23729
|
// 0-9, 4 for middle C
|
|
23730
|
-
octave = Number.parseInt(c.innerText) + 1;
|
|
23730
|
+
octave = Number.parseInt(c.innerText, 10) + 1;
|
|
23731
23731
|
break;
|
|
23732
23732
|
}
|
|
23733
23733
|
}
|
|
@@ -31600,7 +31600,7 @@ class JsonHelper {
|
|
|
31600
31600
|
static parseEnum(s, enumType) {
|
|
31601
31601
|
switch (typeof s) {
|
|
31602
31602
|
case 'string':
|
|
31603
|
-
const num = Number.parseInt(s);
|
|
31603
|
+
const num = Number.parseInt(s, 10);
|
|
31604
31604
|
return Number.isNaN(num)
|
|
31605
31605
|
? enumType[Object.keys(enumType).find(k => k.toLowerCase() === s.toLowerCase())]
|
|
31606
31606
|
: num;
|
|
@@ -49473,7 +49473,7 @@ class BrowserUiFacade {
|
|
|
49473
49473
|
value = item.index;
|
|
49474
49474
|
}
|
|
49475
49475
|
else {
|
|
49476
|
-
value = Number.parseInt(item.toString());
|
|
49476
|
+
value = Number.parseInt(item.toString(), 10);
|
|
49477
49477
|
}
|
|
49478
49478
|
if (value >= 0 || value === -1) {
|
|
49479
49479
|
tracks.push(value);
|
|
@@ -65671,7 +65671,6 @@ class Environment {
|
|
|
65671
65671
|
// <script type="module">
|
|
65672
65672
|
// import * as alphaTab from 'dist/alphaTab.js';
|
|
65673
65673
|
try {
|
|
65674
|
-
// @ts-ignore
|
|
65675
65674
|
const importUrl = import.meta.url;
|
|
65676
65675
|
// avoid using file:// urls in case of
|
|
65677
65676
|
// bundlers like webpack
|
|
@@ -66040,7 +66039,7 @@ class Environment {
|
|
|
66040
66039
|
*/
|
|
66041
66040
|
static detectWebPack() {
|
|
66042
66041
|
try {
|
|
66043
|
-
// @ts-
|
|
66042
|
+
// @ts-expect-error
|
|
66044
66043
|
if (typeof __webpack_require__ === 'function') {
|
|
66045
66044
|
return true;
|
|
66046
66045
|
}
|
|
@@ -66054,7 +66053,7 @@ class Environment {
|
|
|
66054
66053
|
*/
|
|
66055
66054
|
static detectVite() {
|
|
66056
66055
|
try {
|
|
66057
|
-
// @ts-
|
|
66056
|
+
// @ts-expect-error
|
|
66058
66057
|
if (typeof __BASE__ === 'string') {
|
|
66059
66058
|
return true;
|
|
66060
66059
|
}
|
|
@@ -66090,7 +66089,6 @@ class Environment {
|
|
|
66090
66089
|
}
|
|
66091
66090
|
}
|
|
66092
66091
|
try {
|
|
66093
|
-
// @ts-ignore
|
|
66094
66092
|
const url = import.meta.url;
|
|
66095
66093
|
if (url && typeof url === 'string' && !url.startsWith('file://')) {
|
|
66096
66094
|
return WebPlatform.BrowserModule;
|