humdrum-tools / verovio-humdrum-viewer

Verovio Humdrum Viewer
http://verovio.humdrum.org
37 stars 9 forks source link

Allow user to toggle red note highlighting #889

Open bel28kent opened 5 months ago

bel28kent commented 5 months ago

The user should be able to toggle on and off the feature that highlights notes red when selected in the editing pane. The user may not want to use the feature at all, or only use it sometimes. I've also noticed that the highlighting has a tendency to "get stuck" and won't stop highlighting unless you reload the data or toggle some other option like hiding the editing pane and then making it visible again.

This is the highlighting I am referring to:

Screen Shot 2024-04-09 at 9 36 04 AM

This is a case where it seems to "get stuck." The cursor is on the rightmost 4en and only line 7 is selected.

Screen Shot 2024-04-09 at 9 42 19 AM
craigsapp commented 5 months ago

For a single note, pressing <esc> key should unselect it (red means it is selected and can be edited in various ways such as change accidentals, adding articulations/slurs as well as navigating vertically (harmonically with the up/down arrow s and melodically with the left/right arrows).

Sometimes pressing <esc> does not unhighlight it, I have searched for the reason for this but not very hard yet. In such cases the highlighting can usually be remove by pressing option-f twice (freeze notation then unfreeze it).

I don't often see the second example of multiple highlighted notes. Can you reproduce this behavior repeatedly (otherwise I think it is related to an uncommon interaction in the VHV webpage). If it is reproduceable, then you can described how to get it to happen and I can study what might be going wrong.

bel28kent commented 5 months ago

For the second example, maybe it is related to being in vim mode. This reproduces the behavior:

  1. Using Beethoven, Sonata 1.
  2. Expand the tabs a bit so the second spine is aligned.
  3. In plain text mode: Position the cursor at line 23, field 2. Use the down arrow to move through the first two measures. Each note in the melody should highlight when passed over.
  4. Move back to the start of the melody at line 23, field 2. Switch to vim mode. Use 'j' to move the cursor down. You should see that all of the notes in the melody highlight and stay that way, even if you use 'k' to move back up.