;; any client can send tempo/cycle changes
(define test
(lambda (beat dur)
(if (and (= (modulo beat 4) 0)
(> (random) 0.8))
(topclock-bpm (*metro* beat) (random 20 280) beat (random '(6 5 4 3))))
(println 'beat: (rational->n beat) 'pos: (*metro* 'pos beat) 'clock: (clock:clock))
(if (= (*metro* 'pos beat) 0)
(play metrosynth (random '(63 65 67 70 72)) 80 .1)
(play metrosynth 60 80 .1))
(callback (*metro* (+ beat (* .5 dur))) 'test (+ beat dur) dur)))