Hi all,

One of the longstanding workflow limitations of LilyPond is the difficulty
of inserting or removing measures, stemming from an inability to navigate
"vertically" through a score's music input code (i.e. cycling through the
same rhythmic position in different parts). I've been working with mild
obsession for a few weeks on building and iterating on a design for this
feature.

My current implementation provides:
1. A format specification for export/import of data mapping input locations
to rhythmic metadata.
2. A library that editors can inject via -dinclude-settings, that generates
and exports navigation data without requiring any modification of user
code. It should "just work" even with multi-file projects, custom contexts,
and polyrhythmic scores.
3. An outline of the strategy an editor can use to implement vertical
navigation.
4. A simple hook to extend navigation metadata to include arbitrary context
properties. This could potentially be used for rhythm-aware editing
features even beyond navigation, such as indentation of mid-measure line
breaks, or even automatic insertion of measures.

You can find it here: https://github.com/shevvek/ly-navigation-tables. I'm
hoping this is of interest in particular to developers of Frescobaldi and
other editors.

A working implementation of vertical navigation is part of the alpha of
Emacs lilypond-ts-mode: https://github.com/shevvek/lilypond-ts-mode.

I would love for this to be upstreamed (the code is already well commented
and basically MR ready), but it seemed to me to make more sense to first
release it independently, because an editor distributing this library would
be able to provide the feature without requiring users to upgrade their
LilyPond version. I haven't tested it yet, but I see no reason it couldn't
be backwards compatible through at least the last few LilyPond stable
releases.

I welcome feedback and discussion regarding the design approach.

Saul

Reply via email to