lilypond-user
[Top][All Lists]
Advanced

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

Re: Newbie question about variable durations


From: Rune Zedeler
Subject: Re: Newbie question about variable durations
Date: Fri, 09 Nov 2007 22:42:12 +0100
User-agent: Thunderbird 2.0.0.6 (X11/20071022)

(going back on list)

Ben Fagin skrev:
I've revised my implementation to set up
variables using the make-pitch function instead of variables and it
works now. Thank you!

Now that I think about it, you do not have to use make-pitch. You can extract the pitch information from a note, like this:

%%% BEGIN %%%
\version "2.10.0"

#(define (getpitch mus)
  (ly:music-property
   (car (ly:music-property
         (car (ly:music-property mus 'elements))
         'elements))
   'pitch))

myPitchnames = #`(
        (myowndeepceses . ,(getpitch #{ ceses, #} ))
        (myownf . ,(getpitch #{ f' #}))
)

pitchnames = #(append pitchnames myPitchnames)
#(ly:parser-set-note-names parser pitchnames)

{
  c' d' e' f' myowndeepceses2 g'4 a' myownf1
}
%%% END %%%

-Rune





reply via email to

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