[CM] some CM sprout/process questions

Larry Troxler lt@westnet.com
Fri, 27 Sep 2002 20:58:47 -0400


My goal is that I would to sprout a short (say three or four) sequence
of csound score events.

I thought that rather than hassle with patterns, it would be simpler and
easier to read, if I can simply write a handfull of sv's and output's
linearly, so to speak.

For example,

(defprocess note ()
  (let (o (new csound-event-subclass ...))
     process repeat 1 do
       (sv o ...)
       (output o)
       (sv o ...)
       (output o)
       (sv o ....)
       (output o)
        wait 4))))

With this process I intend to define a conceptual "note" that is a short
sequence of csound events (in this particular case, using a negative p3
on all but the last event).

In this situation, I want to create an object "o" in the let
initialization and define the values of most of the slots. In the "sv"'s
I will modify only one or two of the slots.

I tried the above method both by setting the time slot in the "sv"
functions, and by providing the optional start-time parameter to the
"output" functions.

The problem is that it seems that the "sv" calls happen all at once, so
what happens is that the second and third outputs both get the final
(third) values of the slots.

I then tried using "copy-object" to use a seperate clone an instance of
the prototype csound object before modifying it for each output, but for
some reason the "copy-object" method ends up being undefined for my
csound event subclass.

Questions:

1. Is there a better idiom for this type of thing? In particular, it
seems awkward to have to define a process using "repeat 1" for this.

2. What doesn't the default copy-object method work? Do I really need to
define one for every csound subclass? I would think that copy-object by
default would simply copy all the slots, but is this not the case?


Regards

Larry