>>>>> "peter" == peter  <pe...@chubb.wattle.id.au> writes:

>> 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?


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

Sorry, forgot the scaling to current tempo.


#(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:abs->mom ac:maxTwiddleTime))
         (pre-t (if (pair? tr) (ly:music-property (car tr) 'twiddle)
                 '()))
         (hemisemimom ac:targetTwiddleTime))
   (if (ly:moment? pre-t)
    pre-t
    hemisemimom)))


Peter C

_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to