lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: lilypond-user Digest, Vol 113, Issue 99


From: MING TSANG
Subject: Re: lilypond-user Digest, Vol 113, Issue 99
Date: Mon, 30 Apr 2012 14:53:34 -0700 (PDT)

Hi, David,  I asked the wrong question.  The right one: Can I just print the multiple of fifth's (or 10's) only - the in between nar number should be blank?
 
Blessing in+,
Ming.

From: David Nalesnik <address@hidden>
To: MING TSANG <address@hidden>
Cc: "address@hidden" <address@hidden>
Sent: Monday, April 30, 2012 10:59:29 AM
Subject: Re: lilypond-user Digest, Vol 113, Issue 99

Hi Ming,

On Mon, Apr 30, 2012 at 11:23 AM, MING TSANG <address@hidden> wrote:
Thank you, David.   Is it possible not to print other numbers other than the multiple of five's?

To to this, you only need to change one line of Harm's function (see below):
 

 \relative c'' {

       \override Score.BarNumber #'break-visibility = #'#(#f #t #t)
       \override Score.BarNumber #'stencil =
                 #(lambda (grob)
                   (let* ((stil (ly:text-interface::print grob))
                          (text (ly:grob-property grob 'text))
                          (nmbr (string->number (markup->string text))))
          ;; if you change 5 to 3 in the line below, you'll get a bar line every three bars; if you change it to 10, every ten     
          ;; bars; etc.
  
                   (if (= (remainder nmbr 5) 0)
                      (ly:grob-set-property! grob 'color red)
                      (ly:grob-set-property! grob 'color black))
                   stil))

       \repeat unfold 41 { c1 }
}
Hope this helps!
David 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]