On Fri, Sep 11, 2009 at 11:26 AM, René Brandenburger
<[email protected]> wrote:
> hi,
>
> have a look at
> http://lilypond.org/doc/v2.13/input/lsr/lilypond-snippets/Pitches#Coloring-notes-depending-on-their-pitch
>

Don't forget to modify the pitch-equals? function to check for octave
also (since it sounds like that really what you want):
#(define (pitch-equals? p1 p2)
  (and
    (= (ly:pitch-alteration p1) (ly:pitch-alteration p2))
    (= (ly:pitch-octave p1) (ly:pitch-octave p2))
    (= (ly:pitch-notename p1) (ly:pitch-notename p2))))

And look at the ly:make-pitch function to figure out how it works:
<http://lilypond.org/doc/v2.13/Documentation/user/lilypond/Scheme-functions#Scheme-functions>.

Also the snippet should work fine in or out of a \relative section.

-----Jay


_______________________________________________
lilypond-user mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to