2015-11-22 16:41 GMT+01:00 Leszek Wroński <elw...@gmail.com>: > I was delighted to learn that Lilypond allows one to use custodes. I was > wondering how they really work, namely, how one can, upon a linebreak, check > what the next pitch is. I have limited Scheme experience. I first tried the > code for the first example from here: > http://www.lilypond.org/doc/v2.19/Documentation/notation/typesetting-mensural-music > and enclosed it (that is, the part inside "\score { } ") in "\displayMusic{ > }" . But this, while enlightening in some respects, didn't really tell me > what's going on when the custos is to be displayed. So I downloaded the > source code, and after grepping found two files of interest: custos.cc and > custos-engraver.cc . In the latter I found an expression headed by > > "void > Custos_engraver::acknowledge_note_head (Grob_info info)" > > (line 83). Could anyone tell me if I'm on the right track? My problem is > that, while I'm willing to learn, I have a very limited experience with C++ > and with any object programming whatsoever (having spent much time decades > ago with Turbo Pascal 5 :-)). I'd be very grateful for any pointers > regarding what happens during a linebreak (and, in general, how one should > learn such things). > > Best regards, > > Leszek Wronski. >
Hi Leszek, not sure what you want to achieve. However, the following may be of some help, see comments inline: \layout { \context { \Staff \consists "Custos_engraver" \override Custos.color = #red \override Custos.style = ##f %% The following will result in some errors of kind: %% programming error: No spacing entry from Item to `custos' %% Although resolveable, ignore them. This override demonstrates that %% custos is always (apart from first note) created, if forced. \override Custos.break-visibility = ##(#t #t #t) %% As a breakable item, it will be printed only at line-end, if the correct %% value for `break-visibility' is set. %% Which is the default, see: /scm/define-grobs.scm } } \relative { \repeat unfold 3 { c'1 d e f g a b c } } Cheers, Harm _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user