; Create a little (3-note) trill, dividing the current note into a ; triplet with total length equal to the current note length. ; Could also be used for a mordent (turn). ; ; Hint: if using in a phrase that you'll give swing quantization to, ; apply the swing first. That way, the note on which the trill ; (probably) appears will be lengthened by the swing amount. ; ; Hint: for a trill on a held note, make the note short, apply the ; trill, then lengthen the final note. ; ; by Bob Crispen ; revbob@crispen.org ; 7 October 1997 (do (int newDur 1) ; new note duration (int step 2) ; step size to 2nd note (getInt step "Step size (+ve=2nd note above this one)?" -127 127) (forEachEvent (if (== Event.Kind NOTE) (do (= newDur (/ Note.Dur 3)) (= Note.Dur newDur) (insert (+ Event.Time newDur) Event.Chan NOTE (+ Note.Key step) Note.Vel newDur ) (insert (+ Event.Time (* 2 newDur)) Event.Chan NOTE Note.Key Note.Vel newDur ) ) ) ) )