@@ -281,8 +281,8 @@ export class CapellaParser {
281281
282282 private parseBracket ( element : XmlNode ) {
283283 const bracket = new Bracket ( ) ;
284- bracket . from = Number . parseInt ( element . getAttribute ( 'from' ) ) ;
285- bracket . to = Number . parseInt ( element . getAttribute ( 'to' ) ) ;
284+ bracket . from = Number . parseInt ( element . getAttribute ( 'from' ) , 10 ) ;
285+ bracket . to = Number . parseInt ( element . getAttribute ( 'to' ) , 10 ) ;
286286 if ( element . attributes . has ( 'curly' ) ) {
287287 bracket . curly = element . attributes . get ( 'curly' ) === 'true' ;
288288 }
@@ -319,13 +319,13 @@ export class CapellaParser {
319319 layout . percussion = c . attributes . get ( 'percussion' ) === 'true' ;
320320 }
321321 if ( c . attributes . has ( 'instr' ) ) {
322- layout . instrument = Number . parseInt ( c . attributes . get ( 'instr' ) ! ) ;
322+ layout . instrument = Number . parseInt ( c . attributes . get ( 'instr' ) ! , 10 ) ;
323323 }
324324 if ( c . attributes . has ( 'volume' ) ) {
325- layout . volume = Number . parseInt ( c . attributes . get ( 'volume' ) ! ) ;
325+ layout . volume = Number . parseInt ( c . attributes . get ( 'volume' ) ! , 10 ) ;
326326 }
327327 if ( c . attributes . has ( 'transpose' ) ) {
328- layout . transpose = Number . parseInt ( c . attributes . get ( 'transpose' ) ! ) ;
328+ layout . transpose = Number . parseInt ( c . attributes . get ( 'transpose' ) ! , 10 ) ;
329329 }
330330 break ;
331331 }
@@ -374,7 +374,7 @@ export class CapellaParser {
374374 private parseSystem ( element : XmlNode ) {
375375 if ( element . attributes . has ( 'tempo' ) ) {
376376 if ( this . score . masterBars . length === 0 ) {
377- this . score . tempo = Number . parseInt ( element . attributes . get ( 'tempo' ) ! ) ;
377+ this . score . tempo = Number . parseInt ( element . attributes . get ( 'tempo' ) ! , 10 ) ;
378378 }
379379 }
380380
@@ -448,8 +448,8 @@ export class CapellaParser {
448448 default :
449449 if ( value . indexOf ( '/' ) > 0 ) {
450450 const parts = value . split ( '/' ) ;
451- this . _timeSignature . timeSignatureNumerator = Number . parseInt ( parts [ 0 ] ) ;
452- this . _timeSignature . timeSignatureDenominator = Number . parseInt ( parts [ 1 ] ) ;
451+ this . _timeSignature . timeSignatureNumerator = Number . parseInt ( parts [ 0 ] , 10 ) ;
452+ this . _timeSignature . timeSignatureDenominator = Number . parseInt ( parts [ 1 ] , 10 ) ;
453453 this . _timeSignature . timeSignatureCommon = false ;
454454 }
455455 break ;
@@ -570,7 +570,7 @@ export class CapellaParser {
570570 const automation = new Automation ( ) ;
571571 automation . isLinear = true ;
572572 automation . type = AutomationType . Tempo ;
573- automation . value = Number . parseInt ( systemElement . attributes . get ( 'tempo' ) ! ) ;
573+ automation . value = Number . parseInt ( systemElement . attributes . get ( 'tempo' ) ! , 10 ) ;
574574 automation . ratioPosition =
575575 this . _currentVoiceState . currentPosition / this . _currentVoiceState . currentBarDuration ;
576576 this . _currentBar . masterBar . tempoAutomations . push ( automation ) ;
@@ -589,7 +589,7 @@ export class CapellaParser {
589589 break ;
590590 case 'keySign' :
591591 this . _currentBar . keySignature = Number . parseInt (
592- c . getAttribute ( 'fifths' )
592+ c . getAttribute ( 'fifths' ) , 10
593593 ) as KeySignature ;
594594 break ;
595595 case 'timeSign' :
@@ -812,7 +812,7 @@ export class CapellaParser {
812812 switch ( c . localName ) {
813813 case 'alter' :
814814 if ( c . attributes . has ( 'step' ) ) {
815- note . tone += Number . parseInt ( c . attributes . get ( 'step' ) ! ) ;
815+ note . tone += Number . parseInt ( c . attributes . get ( 'step' ) ! , 10 ) ;
816816 }
817817 break ;
818818 case 'tie' :
@@ -969,7 +969,7 @@ export class CapellaParser {
969969 }
970970
971971 // for
972- const fullBars = Number . parseInt ( durationBase ) ;
972+ const fullBars = Number . parseInt ( durationBase , 10 ) ;
973973 if ( fullBars === 1 ) {
974974 const restBeat = new Beat ( ) ;
975975 restBeat . beamingMode = this . _beamingMode ;
@@ -1012,12 +1012,12 @@ export class CapellaParser {
10121012 beat . duration = this . parseDurationValue ( durationBase ) ;
10131013
10141014 if ( element . attributes . has ( 'dots' ) ) {
1015- beat . dots = Number . parseInt ( element . attributes . get ( 'dots' ) ! ) ;
1015+ beat . dots = Number . parseInt ( element . attributes . get ( 'dots' ) ! , 10 ) ;
10161016 }
10171017
10181018 const tuplet = element . findChildElement ( 'tuplet' ) ;
10191019 if ( tuplet ) {
1020- beat . tupletNumerator = Number . parseInt ( tuplet . getAttribute ( 'count' ) ) ;
1020+ beat . tupletNumerator = Number . parseInt ( tuplet . getAttribute ( 'count' ) , 10 ) ;
10211021 const tripartiteMultiplicator = tuplet . getAttribute ( 'tripartite' ) === 'true' ? 3 : 1 ;
10221022 const prolongDiff = tuplet . getAttribute ( 'prolong' ) === 'true' ? 0 : 1 ;
10231023
@@ -1107,7 +1107,7 @@ export class CapellaParser {
11071107 break ;
11081108 case 'basic' :
11091109 if ( c . attributes . has ( 'noteRange' ) ) {
1110- noteRange = Number . parseInt ( c . attributes . get ( 'noteRange' ) ! ) ;
1110+ noteRange = Number . parseInt ( c . attributes . get ( 'noteRange' ) ! , 10 ) ;
11111111 }
11121112 break ;
11131113 }
@@ -1129,7 +1129,7 @@ export class CapellaParser {
11291129 const obj = new OctaveClefDrawObject ( ) ;
11301130
11311131 if ( element . attributes . has ( 'octave' ) ) {
1132- obj . octave = Number . parseInt ( element . attributes . get ( 'octave' ) ! ) ;
1132+ obj . octave = Number . parseInt ( element . attributes . get ( 'octave' ) ! , 10 ) ;
11331133 }
11341134
11351135 return obj ;
@@ -1140,10 +1140,10 @@ export class CapellaParser {
11401140
11411141 obj . allNumbers = element . attributes . get ( 'allNumbers' ) === 'true' ;
11421142 if ( element . attributes . has ( 'firstNumber' ) ) {
1143- obj . firstNumber = Number . parseInt ( element . attributes . get ( 'firstNumber' ) ! ) ;
1143+ obj . firstNumber = Number . parseInt ( element . attributes . get ( 'firstNumber' ) ! , 10 ) ;
11441144 }
11451145 if ( element . attributes . has ( 'lastNumber' ) ) {
1146- obj . lastNumber = Number . parseInt ( element . attributes . get ( 'lastNumber' ) ! ) ;
1146+ obj . lastNumber = Number . parseInt ( element . attributes . get ( 'lastNumber' ) ! , 10 ) ;
11471147 }
11481148
11491149 return obj ;
@@ -1161,7 +1161,7 @@ export class CapellaParser {
11611161 const obj = new TupletBracketDrawObject ( ) ;
11621162
11631163 if ( element . attributes . has ( 'number' ) ) {
1164- obj . number = Number . parseInt ( element . attributes . get ( 'number' ) ! ) ;
1164+ obj . number = Number . parseInt ( element . attributes . get ( 'number' ) ! , 10 ) ;
11651165 }
11661166
11671167 return obj ;
@@ -1186,7 +1186,7 @@ export class CapellaParser {
11861186 if ( strings . charAt ( i ) === '/' ) {
11871187 obj . chord . strings . push ( 0 ) ;
11881188 } else {
1189- obj . chord . strings . push ( Number . parseInt ( strings . charAt ( i ) ) ) ;
1189+ obj . chord . strings . push ( Number . parseInt ( strings . charAt ( i ) , 10 ) ) ;
11901190 }
11911191 }
11921192
@@ -1237,11 +1237,11 @@ export class CapellaParser {
12371237 obj . fontFace = c . getAttribute ( 'face' ) ;
12381238
12391239 if ( c . attributes . has ( 'weight' ) ) {
1240- obj . weight = Number . parseInt ( c . attributes . get ( 'weight' ) ! ) ;
1240+ obj . weight = Number . parseInt ( c . attributes . get ( 'weight' ) ! , 10 ) ;
12411241 }
12421242
12431243 if ( c . attributes . has ( 'height' ) ) {
1244- obj . height = Number . parseInt ( c . attributes . get ( 'height' ) ! ) ;
1244+ obj . height = Number . parseInt ( c . attributes . get ( 'height' ) ! , 10 ) ;
12451245 }
12461246
12471247 break ;
0 commit comments