lilypond-user
[Top][All Lists]
Advanced

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

setting duration


From: Scott Webber
Subject: setting duration
Date: Sat, 03 Jul 2004 12:12:34 -0400
User-agent: Mozilla Thunderbird 0.7.1 (Windows/20040626)

Hey, can someone tell me why this doesn't work:
---------------------------------------------------------------------------------------------------

#(define (eighths note)
(set! (ly:music-property note 'duration) (ly:make-duration 3 0)) note)

eight = #(ly:make-music-function (list ly:music?)
           (lambda (location note) (eighths note)))

\notes \relative c' {
 c'16 \eight c c c c c4 c4
}

----------------------------------------------------------------------------------------------------
No errors, it just doesn't do anything.  Lilypond 2.3.5 from cvs.

What I'm really trying to do is make a \flam thing that sets up a grace note that is always an eighth:

----------------------------------------------------------------------------------------------------
startFlamMusic = \notes {
   \context Voice \applycontext #set-start-grace-properties
   \override Stem #'stroke-style = #"grace"
   \override Stem #'direction = #'()
}

stopFlamMusic = \notes {
   \revert Stem #'stroke-style
   \context Voice \applycontext #set-stop-grace-properties
}

#(define (eighths note)
(set! (ly:music-property note 'duration) (ly:make-duration 3 0)) note)

#(defmacro-public def-flam-function (start stop)
 `(def-music-function (location music) (ly:music?)
    (make-music 'GraceMusic
                'origin location
                'element (make-music 'SequentialMusic
'elements (list (ly:music-deep-copy ,start)
>>>>>>>>>>>                                   (eighths music)
(ly:music-deep-copy ,stop))))))

----------------------------------------------------------------------------------------------------

Thanks,
Scott




reply via email to

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