[CM] Grace: Process in a Process
Heinrich Taube
taube at uiuc.edu
Tue May 20 06:16:23 PDT 2008
hi, calling (one-note ...) just creates a process, it doesnt start
running it. when you want to start a process running you have to
actually sprout it. so your main process would look like this
(untested):
(define-process (ritim n tempo)
(run with
pat = (make-cycle '(.2 .1 .2 .1 .1)) and
rate = (/ (/ 60 tempo) 4)
repeat n
do
(send "cs:i" 1 0 (next pat))
(sprout (one-note (next pat)) )
(wait rate)))
see:
http://pinhead.music.uiuc.edu/~hkt/grace/doc/cm.html#sprout
On May 20, 2008, at 1:59 AM, Uğur Güney wrote:
> # Hi,
> # 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!
> -ugur-
>
> merdivenler.lisp:
> (define-process (ritim n tempo)
> (run with
> pat = (make-cycle '(.2 .1 .2 .1 .1)) and
> rate = (/ (/ 60 tempo) 4)
> repeat n
> do
> (send "cs:i" 1 0 (next pat))
> ;(one-note (next pat))
> (wait rate)))
>
> (sprout (ritim 10 120))
>
> (define-process (one-note dur)
> (run repeat 1
> do
> (send "cs:i" 1 0 dur)))
>
> (define-process (two-notes dur rate)
> (run repeat 2
> do
> (send "cs:i" 1 0 dur)
> (wait (/ rate 2))))
>
>
> ritm.orc
> sr=44100
> ksmps=1
> nchnls=1
> 0dbfs = 1.0
>
> instr 1 ;untitled
> idur init p3
> aenv linseg 0, idur*.1, 1, idur*.9, 0
>
> anoise noise 1, 0
>
> out anoise*(aenv)^4
> endin
>
> _______________________________________________
> Cmdist mailing list
> Cmdist at ccrma.stanford.edu
> http://ccrma-mail.stanford.edu/mailman/listinfo/cmdist
More information about the Cmdist
mailing list