[CM] Multiple processes at one time - revisited

Landspeedrecord landspeedrecord@gmail.com
Tue, 1 May 2007 20:56:22 -0400


Hi,

I wrote a function that randomly grabs other functions. I am trying to
have it loop in a call to events...

(events (loop repeat 8
         APPEND (random-function-caller 4 5 .2)
       "random-functions.mid"
       '(0 5 10 15 20 25 30 35))

The problem I am having is that the functions don't play nice with
'events' because some return multiple objects and others don't.  In
addition, since the function is randomly grabbing other functions
there is no way to have the time offsets properly match in a one to
one correspondance with the object(s) returned by the functions that
are returned by the random-function-caller.

Is this an abnormal problem?  That is... am I going about things wrong
headed conceptually by embedding function inside of functions or am I
just trying to do something unusual?

The only work around I can think of is to force all the functions to
return only one object... Which I don't know how to do.  Many of the
functions I have written are running multiple processes and even if I
do an (append (list process1 process2)) the functions still return the
2 processes as two seperate objects.

So... do I adjust my whole approach and if not what solutions do I
have besides forcing 2 objects into 1?