From 72a5eb845fe07a24723a0852e909e73dec1c316d Mon Sep 17 00:00:00 2001 From: "Ron B. Yeh" Date: Fri, 5 Nov 2021 20:10:26 -0700 Subject: [PATCH] Migrate VexTab to VexFlow 4.0.0. --- src/artist.coffee | 2 +- src/vextab.coffee | 2 +- tests/tests.coffee | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/artist.coffee b/src/artist.coffee index 942c446..e248569 100644 --- a/src/artist.coffee +++ b/src/artist.coffee @@ -625,7 +625,7 @@ class Artist fingerings = @makeFingering(annotations[i]) if fingerings? try - (note.addModifier(fingering.num, fingering.modifier) for fingering in fingerings) + (note.addModifier(fingering.modifier, fingering.num) for fingering in fingerings) catch e throw new Vex.RERR("ArtistError", "Bad note number in fingering: #{annotations[i]}") diff --git a/src/vextab.coffee b/src/vextab.coffee index 8ab25c6..54d112a 100644 --- a/src/vextab.coffee +++ b/src/vextab.coffee @@ -44,7 +44,7 @@ class VexTab notation_option = option throw error("'#{option.key}' must be 'true' or 'false'") if option.value not in ["true", "false"] when "key" - throw error("Invalid key signature '#{option.value}'") unless _.has(Vex.Flow.keySignature.keySpecs, option.value) + throw error("Invalid key signature '#{option.value}'") unless Vex.Flow.hasKeySignature(option.value) when "clef" clefs = ["treble", "bass", "tenor", "alto", "percussion", "none"] throw error("'clef' must be one of #{clefs.join(', ')}") if option.value not in clefs diff --git a/tests/tests.coffee b/tests/tests.coffee index b064313..3113ded 100644 --- a/tests/tests.coffee +++ b/tests/tests.coffee @@ -197,7 +197,7 @@ class VexTabTests # KEY SIGNATURE TESTS - for key of Vex.Flow.keySignature.keySpecs + for key of Vex.Flow.getKeySignatures() assert.notEqual null, tab.parse("tabstave key=" + key) assert.notEqual null, tab.parse("tabstave notation=true key=" + key) assert.notEqual null, tab.parse("tabstave notation=true tablature=true key=" + key)