Hello Leszek,

Here is an example from this list.

JM



\version "2.18.1"

\layout {
  indent = 0
  ragged-right = ##t
  \context {
    \Staff
    \consists "Custos_engraver"
    %      \override Staff.Custos.stencil = ##f
    %      \override Staff.Custos.style = ##f
  }
}


\relative c' {
  d1

  \once\override Staff.Custos.style = #ly:custos::print
  \break

  a'1

  \once\override Staff.Custos.stencil = ##f
  %\revert Staff.Custos.stencil
  %\revert Staff.Custos.style
  \break

  a'1

  \break

  g1

  \once\override Staff.Custos.style = #ly:custos::print
  \break

  f1

  \break

  e1
}


\relative c' {
  d1
  b1
  % \revert Staff.Custos.stencil
%  \revert Staff.Custos.style
  \once\override Staff.Custos.style = #ly:custos::print
%  \override Staff.Custos.style = #ly:custos::print
  \break
  a'1
%  \override Staff.Custos.stencil = ##f
  \once\override Staff.Custos.stencil = ##f
  \break
  f'1
  \break
  d1
  \once\override Staff.Custos.style = #ly:custos::print
  \break
  c1
  \break
  b1
}


> Le 22 nov. 2015 à 16:41, Leszek Wroński <elw...@gmail.com> a écrit :
> 
> 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
>  
> <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.
> 
> 
> _______________________________________________
> lilypond-user mailing list
> lilypond-user@gnu.org
> https://lists.gnu.org/mailman/listinfo/lilypond-user

_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to