File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2393,26 +2393,26 @@ export class GpifParser {
23932393 case 'HarmonicType' :
23942394 const htype = c . findChildElement ( 'HType' ) ;
23952395 if ( htype ) {
2396- switch ( htype . innerText ) {
2397- case 'NoHarmonic ' :
2396+ switch ( htype . innerText . toLowerCase ( ) ) {
2397+ case 'noharmonic ' :
23982398 note . harmonicType = HarmonicType . None ;
23992399 break ;
2400- case 'Natural ' :
2400+ case 'natural ' :
24012401 note . harmonicType = HarmonicType . Natural ;
24022402 break ;
2403- case 'Artificial ' :
2403+ case 'artificial ' :
24042404 note . harmonicType = HarmonicType . Artificial ;
24052405 break ;
2406- case 'Pinch ' :
2406+ case 'pinch ' :
24072407 note . harmonicType = HarmonicType . Pinch ;
24082408 break ;
2409- case 'Tap ' :
2409+ case 'tap ' :
24102410 note . harmonicType = HarmonicType . Tap ;
24112411 break ;
2412- case 'Semi ' :
2412+ case 'semi ' :
24132413 note . harmonicType = HarmonicType . Semi ;
24142414 break ;
2415- case 'Feedback ' :
2415+ case 'feedback ' :
24162416 note . harmonicType = HarmonicType . Feedback ;
24172417 break ;
24182418 }
Original file line number Diff line number Diff line change @@ -504,4 +504,10 @@ describe('Gp8ImporterTest', () => {
504504 expect ( score . masterBars [ 5 ] . beamingRules ! . groups . has ( Duration . Eighth ) ) . to . be . true ;
505505 expect ( score . masterBars [ 5 ] . beamingRules ! . groups . get ( Duration . Eighth ) ! . join ( ',' ) ) . to . be . equal ( '4,4' ) ;
506506 } ) ;
507+
508+ it ( 'harmonics-lowercase' , async ( ) => {
509+ const reader = await prepareImporterWithFile ( 'guitarpro8/harmonics-lowercase.gp' ) ;
510+ const score : Score = reader . readScore ( ) ;
511+ GpImporterTestHelper . checkHarmonics ( score ) ;
512+ } ) ;
507513} ) ;
You can’t perform that action at this time.
0 commit comments