-
Notifications
You must be signed in to change notification settings - Fork 662
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
Bug: Key signatures don't update with Stave Clef changes #727
Comments
I've tried simulating what the Stave would do internally on clef change, (calling // --- on clef change:
stave.setClef(clefSelector.value);
// because of issue #728, I have to do this manually
const keySignatures = stave.getModifiers();
keySignatures
.filter(key => key.category === KeySignature.CATEGORY)
.forEach(key => {
key.setKeySig(keySelector.value)
// also tried key.format() here
}) I also tried editing the source
|
@mix3d is this still an issue or was it closed with the feature above? |
@0xfe do you know if this is still an issue? |
I'll try to get my project running this weekend and try again. I lost steam when the library wasn't as out-of-the-box as I'd hoped, and now that I'm taking a hiatus from my choir due to covid, I have even less pressure to make my project happen. |
@mix3d What is the name of your project? |
I'm trying to make a simple selector for a user to set the Clef and Key, but I'm noticing I get the same results with both clefs, that the key isn't considering the set clef.
url: https://music-helper.netlify.com
code: https://github.com/mix3d/music-helper
I'm listening for changes in the dropdown, then calling
setClef()
orsetKeySignature()
on the staff, and thencontext.clear();
andstave.draw();
If I set the keySignature again after setting the clef, it draws correctly, so this is an order of operations issue (but no API docs sooo... #530 ). I would expect the Staff to update the keySignature correctly when it's Clef changes.
Example:
The text was updated successfully, but these errors were encountered: