[Impromptu] problem using two metres
Michele Pasin
michele.pasin at kcl.ac.uk
Thu Mar 12 23:11:11 GMT 2009
btw the function below doesn't work like that, you need to use 'fmod'
instead of 'modulo'.
(mind that I haven't applied Glen's patches yet - nor had a chance to
try to understand the various floating point related issues - so
again, I might have left out something important here!)
thanks, impromptu rocks!
m
On 12 Mar 2009, at 00:29, Andrew Sorensen wrote:
> ;; using modulo directly
> (define loop
> (lambda (beat)
> (case (modulo beat 8)
> ((0)
> (play piano 60 120 1)
> (play piano 36 120 1))
> ((1 2 3)
> (play piano 36 120 1))
> ((4 5 6 7)
> (play piano 40 120 1)))
> (callback (*metro* (+ beat (* .5 1/2))) 'loop (+ beat 1/2))))
>
> (loop (*metro* 'get-beat 4))
____________________________
Dr. Michele Pasin
Centre for Computing in the Humanities
King's College, London
http://staff.cch.kcl.ac.uk/~mpasin/
More information about the Impromptu
mailing list