Dear LilyPonders,
A while ago I stumbled upon a question of displaying LilyPond code in the
LilyPond Log for certain commands.
For example, when I code the following:
% begin %
{ \displayLilyMusic \retrograde { c'2 e'4 g’4 } }
% end %
The code compiles the retrograde of { c'2 e'4 g’4 }, and accordingly in the
LilyPond Log, it shows:
{ g'4 e'4 c'2 }
However, when I code the following:
% begin %
\new Voice \with { \remove Note_heads_engraver
\consists Completion_heads_engraver
\remove Rest_engraver
\consists Completion_rest_engraver}
{ \displayLilyMusic {c'4 c'2 c'2 c'2 c’4} }
% end %
LilyPond compiles the following as expected (though it blew my mind when I
first discovered it):
But in the LilyPond log, it shows:
{ c'4 c'2 c'2 c'2 c'4 }
…whereas I was hoping it would show:
{ c'4 c'2 c'4 ~ | c'4 c'2 c'4 }
The question is if there is a way to show the “corrected” LilyPond code as
processed by Completion_heads_engraver and Completion_rest_engraver, just like
in the first example where LilyPond Log can display a retrograded passage.
Being able to do that will help in the situation where I need to do some
further editing (e.g. adding articulations and dynamics on a note that has been
carried forward, or to change the rhythm altogether inspired by the appearance
of the processed passage).
…Of course, I admit that not realizing these “Completion” engravers existed and
exercising mental calculation to make sure LilyPond does not give bar check
errors has been good for my brain (haha).
Any insights would be cordially appreciated!
Best regards,
Yoshi
-- -- --
Yoshiaki Onishi
https://github.com/yoshiakionishi/lilypond-snippets