; DELAY ; by Lars Ahlz‚n (do (dword currtime 0) (dword newtime 0) (word del 0) (word minskn 0) (word num 0) (word i 0) (word v 0) (getInt del "Delay time in ticks (120 ppq)" 1 10000) (getInt minskn "Volume factor (10=0, 5=0.5, 1=0.1)" 1 20) (getInt num "Number of delays" 1 20) (forEachEvent (do (if (== Event.Kind NOTE) (do (= currtime Event.Time) (= i num) (= v Note.Vel) (while (!= i 0) (do (= v (* v minskn)) (= v (/ v 10)) (= currtime (makeTime (meas currtime) (beat currtime) (+ (tick currtime) del))) (insert currtime Event.Chan NOTE Note.Key v Note.Dur) (-- i) ) ) ) ) ) ) )