Skip to content

Clef Dragging

jacob-hutnyk edited this page Jul 18, 2019 · 2 revisions

When dragging clefs in Neon, the neumes stay in the same position on the staves, even if that means changing their pitches. The reason for this is that Neon is primarily an editor for correcting OMR output. When the computer is recognizing neumes it recognizes them by their position on the page, not their position relative to clefs or their pitch. So the ground truth for the neumes in most MEI files in Neon is in their position, so it doesn't make sense to change their position unless a user is explicitly trying to do so.

To this end, the pitch of neumes needs to change when clefs are being dragged. There are two main cases for clef dragging, both depicted below.

  • Case 1: The clef that is being dragged stays between the same two clefs. In this case some elements may need to change pitch since they are now associated with a different clef, while others may need to have their pitch changed because the line of the clef being dragged can change.
  • Case 2: A clef is dragged across another clef. In this case elements may need to have their pitch changed, since their association may have changed to or from the clef being dragged.

In the depiction below, Circles represent clefs, with the line of the clef being the subscript number. Neumes are represented by the squares.

Clef dragging cases

A more detailed description of the cases and the algorithm to change pitches is included in a comment in the editortoolkit_neume.cpp file in DDMAL/Verovio, in the drag function