[CM] sequence help

Rick Taube taube@uiuc.edu
Fri, 4 Jul 2003 15:21:46 -0500

you can use the 'finally' option to chain processes together like so:

(define (doit )
   (process repeat (random 300)
            output (new ...)
            wait (whatever)
            finally (sprout (doit) (now))))

that is, the last thing the current process does is to sprout a new 
process that starts at its current time.  a more genereal solution 
would be for me to reimpleent the functionality of the old 'thread' 
container. this is actually on my 'todo' list, unfortunately that list 
is very long!

On Friday, Jul 4, 2003, at 14:48 America/Chicago, Carl Edwards wrote:

> This is basic and probably trivial, but for some reason I'm having a 
> tough
> time figuring it out. Maybe one of ya'll can point out the error of my
> ways...
> I'd like to be able to take a few simple processes and sequence them 
> into a
> single midi file. The problem is that I don't know the amount of time 
> that
> the first process will take up and I'd like the second process to 
> begin on
> the next beat. I guess it's just not clear to me how to feed the events
> function a list of things to do one-after-another.
> Should I (is it possible to...) have each process write it's last 
> "now" to a
> global variable?
> I'm probably missing something very obvious. Any help would be 
> appreciated.
> Carl Edwards
> _______________________________________________
> Cmdist mailing list
> Cmdist@ccrma.stanford.edu
> http://ccrma-mail.stanford.edu/mailman/listinfo/cmdist