Skip to content

Mark_tracking_translator

Dan Eble requested to merge dev/eble/mark-tracking into master

Mark_tracking_translator is a new translator that handles marks in Timing context similar to how Repeat_acknowledge_engraver handles bar lines. Mark_tracking_translator listens for mark events, warns about conflicts, chooses an event, and sets the currentMarkEvent context property.

This implementation continues to allow only one mark at a given timestep. There are reasons to consider relaxing this restriction, but there are also workarounds, and it would be a hard change to take back.

Mark_engraver continues to engrave a mark for the chosen event, but it now reads the currentMarkEvent property rather than listening to mark events itself.

The snippet "Printing marks on every staff" works just as before. It could be changed to demonstrate that LilyPond no longer needs a \mark command in every staff.


Planned follow-up includes adding segno marks, skip-to-coda marks, and section labels (e.g. CODA). These will each have their own grob type so that they can be styled independently, but they will all be handled by Mark_tracking_translator and Mark_engraver very much like rehearsal marks.

Merge request reports