[CM] Realtime CM on OSX/Linux

Rick Taube taube@uiuc.edu
Fri, 29 Jul 2005 15:37:48 -0500


CM now supports "real time" scheduling and receiving on OSX and
Linux. This is a major new feature and it would not have been possible
without Todd Ingalls, who has invested considerable time and energy
over the past weeks in designing and implementning the new
functionality along with me.  I also want to thank Immanuell Litzroth
for his help getting CM's Portmidi code working on Linux.

The new realtime features should work in OpenMCL/OSX, SBCL 0.9.0/Linux,
CMUCL/Linux but the implementations are not equally good (see below),
and there are still some issues and bugs that have not been resolved.
A Gauche implementation is definately planned.

The main entry points into the new realtime code are documented here:

http://commonmusic.sf.net/doc/dict/rts-fn.html
http://commonmusic.sf.net/doc/dict/set-receiver-fn.html
http://commonmusic.sf.net/doc/dict/portmidi-topic.html

We have been testing mainly on OSX using Max via Portmidi. Real time
Supercollier is also now possible (although not yet complete or
documented.) A lowlevel OSC stream is in the works for supporting
realtime with other OSC aware program such as CSound, Max, and PD.

The bottom line:

   OSX: Things seem to work quite well in OpenMCL. Todd's tests
   shoveled tons of data between Max and CM and timing was generally
   accurate to within a millisecond or two. Things can crap out, but it
   seems you have to push and pull a lot of data before that
   happens. At more reasonable data rates his tests ran for 15 minutes
   without problems.

   Linux: SBCL 0.9.0 has native threads and so it is probably a better
   choice than CMUCL to try the rt code out in. Ive only "lightly"
   tested the new features on Linux (I confirmed that the examples
   basically work). Someone who knows PD and how to route MIDI between
   apps on Linux could help us determine how good/useable the current
   realtime code actually is. Given my current time constraints and
   limited knowledge of linux audio/midi routing I won't invest much
   more time into the Linux side until someone more knoweldegable than
   I am is willing to help us improve it.

---

In unrelated news, the CM homepage (commonmusic.sf.net) now reflects
the current source tree rather than the last stable release, so I will
be using Pinhead much less in the future. A crontab entry syncs the
home tree to CVS every four hours and also saves a nightly snapshot
tarball linked to the download section on the new homepage.