CCRMA

The Lisp World on OSX

Bruno Ruviaro has been kind enough to create this small tutorial on how to use the CM/CLM/CMN Common Lisp based world on a PPC machine running OSX. Here it is for all to enjoy! Thanks to Bruno for taking the time to write this!

HOW TO GET CM-CLM-CMN WORKING ON OSX (Panther)

Step-by-step tutorial by Bruno Ruviaro, January 15th 2005

Emacs

Download the latest version (21.3.50, as of today) at:

Then just drag the application to your Applications folder. Don't put it any subfolder, since CM-CLM-CMN will look for it precisely under the main Applications. The Emacs that comes with your Panther is old and doesn't have a GUI, so you must download this one. You may also want to check regularly for newer versions at:

Getting gcc

CLM needs to find this compiler in your system in order to work. Once you have it there, you don't have to worry about it anymore. You can download the full Xcode package (which includes GCC) from Apple for free using the link below. You will have to register as a developer (just fill out a form and that's it). The file you want to download is XcodeTools1.5__CD.dmg, or any later version.

You can just do the full install (Easy Install), which takes up about 1 Gb of hard disk space. If you really need to save hard disk space AND you don't plan to develop new software under OSX (in other words, if your a composer who just wants to use CM-CLM-CMN), you may try a custom install and uncheck some options like documentation/examples (huge library of stuff only useful for those who intend to go deeper into software development). If you are not sure about what to install or not, just do the Easy Install.

CCRMA users: Xcode is also useful to connect to CCRMA machines from your Mac and have access to all Linux software with the capability of seeing their actual windows (GUIs). Using an xterm, the command line is something like

ssh -X username@cmn30

where -X activates the work-with-windows option, and of course cmn30 can be any other ccrma machine.

Getting CM-CLM-CMN

Download this one single file that contains everything at:

After decompressing, just drag it to your Applications folder. The icon is only "CM", but you have all three software included (CM-CLM-CMN). This is not the latest version, but it works just fine, and if you are a beginner you will not see much difference anyway.

After this step, all you have to do is to double-click on it and you should see Emacs being launched and Common Music 2.4.2 automatically starting up with it.


A few things to be aware of:

Virtual folders exist "inside" the package CM.app. Files like "v.ins" (a violin instrument) live in there, and you access them using a virtual path name within CM. For example, to compile v.ins you will use:
(compile-file "mus:clm;v.ins")

where the portion "mus:clm" means actually the following place:

/Applications/CM.app/Contents/MacOS/clm-2/

You can "see" this folder structure using the Finder, in order to understand it. With CM running, just select the icon CM.app in the Applications folder, ctrl-click it, select "Show Package Contents" from the menu, and you will see everything that exists in there. So whatever you need to do within CM that requires the location of a file living in those folders, use this "mus:xxx" as a path name (see the CM README for more information). Whenever you want to open any of these files in Emacs (using C-x C-f) to actually read or modify it, use the regular path name. In the case of the violin instrument, that would be:

/Applications/CM.app/Contents/MacOS/clm-2/v.ins

There is no SLIME in this set up. So we don't have utilities like quickly seeing list of required parameters for a given instrument etc.

If you work with your Macintosh built-in audio, you will see that sounds are automatically played back after being generated in CLM. However, if you use some external audio interface, you may experience a hard crash when CLM tries to do this automatic playback after rendering (that happens with my M-Audio Firewire 410). In this case, all you have to do is to tell CLM to SKIP the automatic playback. Two ways of accomplishing this:

If you find anything that doesn't work in this tutorial, or any useful thing that might be added to it, let me know.

Thanks to Fernando Lopez-Lezcano, Rodrigo Segnini and Matt Wright for many of the solutions and hints explained in this tutorial.

Bruno Ruviaro

ruviaro at stanford dot edu