[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: trill & midi
From: |
peter |
Subject: |
Re: trill & midi |
Date: |
Wed, 07 Feb 2018 09:09:21 +1100 |
User-agent: |
Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM/1.14.9 (Gojō) APEL/10.8 EasyPG/1.0.0 Emacs/24.5 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) |
>>>>> "peter" == peter <address@hidden> 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