> I would like to change the trill speed in the midi output. I tried to
> change the "#(define..." like in the following code but without success.
> Any suggestion?

> \version "2.19.81"
> \include "articulate.ly"
> #(define ac:maxTwiddleTime (ly:make-moment 1/240))

> \score {
>   \articulate {\time 2/4 c'2 \trill}
>   \layout {}
>   \midi {}
> }

When I was writing the trill code, lily tended to crash when trying to
compress music so that the trill took the same length as the original
note. I worked around it by fixing a trill's note length as a
demisemiquaver in the current tempo.

You can try:


#(define ac:maxTwiddleTime (ly:make-moment 1/120))
#(define (ac:twiddletime music)
  (let* ((tr (filter (lambda (x)
                     (and (eq? 'ArticulationEvent (ly:music-property x 'name))
                      (string= "trill" (ly:music-property x 
'articulation-type))))
              (ly:music-property music 'elements)))
         (ac:targetTwiddleTime ac:maxTwiddleTime)
         (pre-t (if (pair? tr) (ly:music-property (car tr) 'twiddle)
                 '()))
         (hemisemimom ac:targetTwiddleTime))
   (if (ly:moment? pre-t)
    pre-t
    hemisemimom)))

but you may find durations incorrect.

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

Reply via email to