Hi Valentin,
Am 01.09.23 um 00:41 schrieb Valentin Petzel:
I don’t think this is a particularly good idea. Lilypond conceptually first
creates data for the sementic meaning of the music (or the actual content) and
have engravers turn this into graphical content.
Mapping pitches to other pitches is not a layout option, but a musical
transformation and should thus be done on the music level, not the layout
level. Using an engraver will mean it is hard to combine this with other
musical transformations, and it will also cause order issues as soon as you
have an engraver that depends on the pitch property.
I agree about the possible problems, and to be honest, I wasn't aware
that a music function solution like yours can deal with \transpose and
\relative gracefully (since the assignment of actual pitches is complete
when the music function is applied on the outside).
What I don't necessarily agree with is the philosophical notion of
engravers being tied to the layout level (which is admittedly suggested
by their name): As long as I work with listeners (as opposed to
acknowledgers), I see no problem in using them for "semantic"
transformations that need the music sorted by timestep (which
nevertheless is not the case in the current situation).
Lukas