DDMAL / Neon

A web-based MEI neume editor.
https://ddmal.music.mcgill.ca/Neon
MIT License
25 stars 9 forks source link

[Neon staging] Inserting a clef into a toggled syllable causes mayhem #1243

Open JoyfulGen opened 1 month ago

JoyfulGen commented 1 month ago

To reproduce:

  1. Make a long syllable that spans two staves (so the second staff starts with a toggled syllable);
  2. Check the pitches of the neumes after the clef on the second staff--they should be correct;
  3. Select the clef at the beginning of the second staff and insert it into the nearest syllable;
  4. Check the pitches of the neumes again--they should now be a third too low;
  5. Now move that same clef up or down a line--the neumes following should jump down a third;
  6. Try to move those neumes--they will not want to.

Here's a demo, where I created a long syllable to test this. You can see that at the beginning the pitches of the orange podatus are F-A, which is correct. When I insert the clef into the toggled syllable, the neumes don't move, but the pitches become D-F (a third too low). When I move the clef, the neumes all jump down a third and can't be moved anymore.

https://github.com/user-attachments/assets/260779fa-a0bf-4d03-a415-7b4e757411b1

I can think of two solutions to this:

  1. Normally, if a clef is in the middle of a syllable it has to be inserted into that syllable, otherwise the pitches following it will be wrong. However, in this specific instance, because there's a staff break and a toggled syllable, the pitches aren't wrong, so it's not technically necessary to insert that clef into the syllable for MEI reasons. So I suppose a solution would be to prevent the user from doing so, and maybe adding a friendly message saying "Inserting that clef isn't necessary!"
  2. It could also be friendly to let the user insert the clef into the syllable if they want to, in which case I guess the solution is fixing those little bugs.

@yinanazhou what do you think? I guess it'll depend on what the MEI likes best. I'm happy with either solution!