I'm trying to clarify the docs on the (unclear) topic of
changing the notation font size. While experimenting with
ideas, I typesetted the opening of Chopin's Prelude op.28
no.8, which combines multiple notation sizes on one staff.
There is no flexible, user-friendly way of doing that
(setting fontSize alone doesn't address beams/stems), so I
came up with \magnifyMusic, which takes a magnification
factor and does the dirty work behind the scenes (similar to
the CueVoice definition in engraver-init.ly).
I have found at least two problems with my approach:
1) when different sized note heads merge, the smaller
voice's stem ends up in the wrong place.
2) when different sized accidentals "merge", both get
printed (the smaller one should be suppressed)
Is there an elegant way to solve either of these problems,
out of sight from the user, without the need for so many
Okay, so I was able to suppress the smaller accidentals with
some scheme code, now all I need to do is figure out how to
align the stems properly:
Currently, merged note heads with different stem-directions
are left-aligned with each other, even if they have
different font-sizes. However, when the note head sizes
differ, if the smaller note head is stemmed up, it should be
*right-aligned* with the larger note head. Conversely, if
the smaller note head is stemmed down, it should be
*left-aligned* with the larger note head.
How can I get LilyPond to align the stems this way without
needing a new tweak every time there's a merge? If there is
a way to access one NoteHead grob from another NoteHead grob
that it is merged with, I could probably do it myself in
scheme; but is there a way? Here's the code for the
attached merge-alignment.png file:
I think it would be great to offer the \magnifyMusic
feature, since this type of notation is fairly common (at
least in the mid- to late-Romantic piano repertoire) but the
stem alignment needs to be solved first.