[CM] Sequencing Functions again....
Ken
renueden@earthlink.net
Wed, 2 Apr 2003 09:15:02 -0800
>From the beloved book:
(define (ttone1 reps row key beat amp)
(process with len = (length row)
repeat reps
for i from 0
for p = (mod i len)
for pc = (list-ref row p) ; i mod 12
for k = (+ key pc)
output (new pluck
:time (now)
:duration (* beat 4)
:pitch (hertz k)
:amplitude amp)
wait beat))
(events (progn
(ttone1 36 row1 60 .2 .5)
(ttone1 36 row4 48 .2 .5))
"ttone1.sco"
:header "#include 'master_score.sco'"
:options "-d -b1344"
:orchestra "/csound/system/master_score.orc"
:output "dac"
)
When I do the above only the second call is written to score, with list they
both are called at the same time unless I give a list of start times. With
some processes its impossible to figure out the end time, so I'm trying to
figure out how to tell events to play the first process, THEN the second and
so on...
I remember in an older CM, there was a way to do this.
Thanks again,
Ken
----- Original Message -----
From: <rm@fabula.de>
To: "Ken" <renueden@earthlink.net>
Cc: "CM List" <cmdist@ccrma.Stanford.EDU>
Sent: Wednesday, April 02, 2003 4:10 AM
Subject: Re: [CM] Sequencing Functions
> On Tue, Apr 01, 2003 at 10:40:46PM -0800, Ken wrote:
> > I'm brain dead but can't figure out how to run functions in sequence.
> > (func 1)
> > then
> > (func 2)
> >
> > (events ......????)
>
> The sequencing syntax in Scheme is:
>
> (begin
> (func 1)
> (func 2)
> ...)
>
> In LISP the same is:
>
> (progn
> (func 1)
> (func 2)
> ...)
>
> Both will evaluate to whatever the last s-expression in
> the body evaluates to.
>
> hth Ralf Mattes
>
> > Thanks,
> > Ken Locarnini
> >
> >
> >
> >
> > _______________________________________________
> > Cmdist mailing list
> > Cmdist@ccrma.stanford.edu
> > http://ccrma-mail.stanford.edu/mailman/listinfo/cmdist
>