-
Notifications
You must be signed in to change notification settings - Fork 117
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migrate VexTab to VexFlow 4.0.0. #137
base: master
Are you sure you want to change the base?
Conversation
@@ -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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Possible bug fix? Or did an old version of VexFlow have the arguments reversed? Anyways, it was throwing an exception so I switched the two arguments.
@@ -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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seemed cleaner to have a method called hasKeySignature(), so I added it to VexFlow.
@@ -197,7 +197,7 @@ class VexTabTests | |||
|
|||
# KEY SIGNATURE TESTS | |||
|
|||
for key of Vex.Flow.keySignature.keySpecs | |||
for key of Vex.Flow.getKeySignatures() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similarly, I added a getter here instead of allowing client code to reach into the internals of VexFlow.
This is the commit that added some backwards compatibility and some new methods to VexFlow, to support this migration. |
This patch makes VexTab compatible with the VexFlow 4.0.0-alpha at:
https://github.com/ronyeh/vexflow/tree/4.0.0-alpha