[CM] CM 2.9.1 + RTS 2.0 released

Rick Taube taube@uiuc.edu
Sun, 14 May 2006 16:35:44 -0500

we have released the final design of the C based RTS scheduler as rts 


It requires CM 2.9.1 and Portmidi 2.0.0, also just released as tarballs 
on the same page.

We switched the scheduler from using cond_timedwait to a timing loop 
with nanosleep to yield as precise timings as possible. Testing results 
over a ten minute interval shows the scheduler performing very well 
indeed; I think I'm finally convinced now that CM can be used in 
real-time concert situations. But you can see for yourself, we've 
posted timings and consing/speed statistics here:


scheduling cpu% averaged around 7-8% even under heavy usage -- way, way 
under the eariler lisp-based rts. (you can adjust cpu using the 
:priority and :resolution args to rts.)

As testing results show, it does make a difference if you cons or not. 
for non-concert work consing is not important, but if you really try to 
do an interactive piece you will probably want to use the millisecond 
:time-format and avoid allocating lots of clos objects and doing 
floating point math. So to help with this -- and without becoming 
overly obsessive about it I hope -- we have implemented some 
non-consing replacements for a handful of the most common CM runtime 
functions: rts:between rts:interp rts:rescale rts:odds etc. these all 
have restricted behavior (they return only ints for example). see the 
new tools documentation on the updated RTS topic page:


Other new RTS features:

  * error handlers are now installed under the callback, error modes are:
     :continue - offending process is dropped; rts continues running
     :stop - rts aborts error and stops.
     :debug - rts signals error break.
  * rts-hush, rts-pause, rts-continue now work.
  * user hooks can be set on rts, rts-pause, rts-continue, rts-stop
  * object start times are ignored on output; your code can still do 
:time (now) but it has no effect.
  * rts runs in Gauche but we still have to figure out how to handle GC. 
gauche rts should perform better on Linux than Darwin since apparently 
ephemeral gc is possible there but i havent tried.

Currently RTS can only be used with portmidi, and you need to install 
both RTS and the latest Portmidi system by doing ./configure and 
./make. see the updated install.html for info about installing the C 
based RTS and Portmidi.


The Midishare and OSC systems will be added soon. Note that the 
receiving API has changed slightly (its easier to use) but we have not 
documented this yet so you will have to figure it out by looking at 
testing files for now.

btw the graphs on the testing page were made with a gnuplot interface 
that Todd wrote, if some gnuplot guru out there would like to make it a 
real event stream in CM that would be great. right now you can get it 
by checking out the cmt testing module 'cvs checkout cmt'