[CM] Grace: Process in a Process
ugurguney at gmail.com
Mon May 19 23:59:31 PDT 2008
# I'm trying to make a real-time drummer for using on performances
with my band, but stuck somewhere.
# I want to call a process in a process. The outer process will select
one of the inner processes. ie. "if a random variable is higher than
something than call this one, else call other one."
# There is a working example for this: "gestures.sal" but I can not
translate it to scheme language. The code below is what I have tried.
Using (one-note (next pat)) instead of (send "cs:i"...) did not
worked. What should I do?
# Have a nice day!
(define-process (ritim n tempo)
pat = (make-cycle '(.2 .1 .2 .1 .1)) and
rate = (/ (/ 60 tempo) 4)
(send "cs:i" 1 0 (next pat))
;(one-note (next pat))
(sprout (ritim 10 120))
(define-process (one-note dur)
(run repeat 1
(send "cs:i" 1 0 dur)))
(define-process (two-notes dur rate)
(run repeat 2
(send "cs:i" 1 0 dur)
(wait (/ rate 2))))
0dbfs = 1.0
instr 1 ;untitled
idur init p3
aenv linseg 0, idur*.1, 1, idur*.9, 0
anoise noise 1, 0
More information about the Cmdist