Thoughtlets, Music, and Code from Noah Thorp

Bay Area Computer Music Technology Group

Posted: September 10th, by Noah

Announcing a new group in the SF Bay Area for making and using Computer Music Technology. The group’s objective is to meet other computer music technology experts and enthusiasts for presentations of computer music techniques and technologies (all music genre outputs are welcome).

Presentations and discussion will revolve around the use of Max/MSP, Csound, PD, ChucK, CLM, Live, Reaktor, Kyma, JMSL, SuperCollider as well as other computer music synthesis, composition, or live performance software. Attend to learn new techniques, better the code base, find collaborators, and find out what others are doing in studios, labs, and live work spaces around the Bay Area.

If you would like to present a project or technology that you are working on please contact me. Also, if you have a venue that we can host events in (one or more times) let me know.

You can join the group at: http://electronicmusic.meetup.com/152/?gj=sj2

Standalone Generative Music Platforms

Posted: August 31st, by Noah

Here is a quick summary of some research I just engaged in. I have been searching to find a suitable generative music development environment with the following attributes:

  • Ability to make standalone applications with no dependencies (e.g. does not require a separate installation of a script, a generative music platform, and scripting virtual machine).
  • Scripting in a widely used language (Java, Python, or Ruby) for multi-environment code reuse.
  • An open source licensing arrangement (GPL, MIT-X, LGPL, etc) or widely available and extensible commercial platform (like Max/MSP)
  • Easy GUI development
  • Good documentation
  • Multiple OS support

Here is a summary of my findings. Please note that there may be some errors in this chart, and that I don’t mean to harsh on anyone’s dev environment.
Tool Language Standalone License Easy GUI Reusable Scripting Good Docs Win Mac Linux Notes
ChucK ChucK No GPL No No Yes Yes Yes Yes
CLM Lisp No BSD No No No Yes Yes Yes
Csound Python Maybe LGPL No Yes Yes Yes Yes Yes
Rtcmix C/C++ Yes GPL No Yes Yes Yes Yes Yes Win through Max

Python Maybe GPL No Yes Yes ? Yes Yes Win python supported?
PD Python, Ruby No GPL Yes Yes No Yes Yes Yes
JMSL Java Yes Commercial – No OSS Yes Yes Yes Yes Yes Yes
Max/Msp Javascript Yes Commercial Yes No Yes Yes Yes No

Java Yes, with JRE Commercial Yes Yes Yes Yes Yes No Bundle with JRE

Python No Commercial – GPL (py/pyext) Yes Yes Yes Yes Yes
Need py/pyext patch

Jython Yes – Jython Commercial Yes Yes Yes Yes Yes No Through MXJ

Jruby Yes – Jruby Commercial Yes Yes Yes Yes Yes No Through MXJ

Examining this chart the Max/MSP platform satisfies the greatest number of these criteria. Some notes on Max/MSP:

  • Developing standalone applications in Max with Java requires that the JRE is bundled with the application to avoid dependency on a preexisting JRE. As of this writing, a new version of the MXJ external may be necessary to get this working.
  • Py/Pyext supports python. However a standalone application with Py/Pyext would require that python was also installed. This could be discouraging to the non-technical and/or busy user.
  • Jython and Jruby seem quite possible through MXJ. More testing is necessary to verify that they do indeed function properly. I have found no first hand reports.
  • Max/MSP heavily supports javascript. The issue with javascript is it does not appear that many other generative music platforms also support it directly (e.g. not directly supported by ChucK, Csound, RtcMix; I’m not sure about PD.). The most desirable scripting language support would be Python as it is supported by Max/MSP, ChucK, Csound, Rtcmix, and PD. Although, for the record I would love to see more support for Ruby in these environments.

Csound on Ubuntu (Environmental Variables, etc.)

Posted: August 28th, by Noah

Environmental Variables

After compiling csound 5.06.0 on Ubuntu 7.0.4 I ran into the following informative message when running csound from the command line:

$ csound -odac -iadc test.orc test.sco

...

WARNING: OPCODEDIR IS NOT SET

Csound requires this environment variable to be set to find its plugin libraries. 
If it is not set, you may experience missing opcodes, audio/MIDI drivers, or utilities.

Ubuntu handles environmental variables differently than other Linux distros. The variables won’t stick if you place them in places like:

  • /etc/profile
  • /etc/bash.bashrc
  • ~/.bashrc

Turns out that environmental variables should be set in /etc/environment for Ubuntu:
OPCODEDIR=/usr/local/lib/csound/plugins

You may also need to set this in /etc/environment depending on your setup:

OPCODEDIR64=/usr/local/lib/csound/plugins

In my case logging out and back in was also necessary.

Real Time Playback Problems with PortAudio

The next issue was that realtime output was not playing:
$ csound -odac -iadc test.orc test.sco

...
 *** error: unknown rtaudio module: 'PortAudio'
Failed to initialise real time audio input

Csound can use various real time (“rtaudio”) modules. Typically these are PortAudio and ALSA. For whatever reason PortAudio was installed but not available to csound. To use ALSA as the rtaudio module I used this command:

csound -odac -iadc -+rtaudio=alsa test.orc test.sco

Success!

Bonus

Since I am lazy (or pragmatic) and don’t like typing. I stored the flags above in ~/.csoundrc
-odac -iadc -+rtaudio=alsa
Now Csound can be run with these flags using:
csound test.orc test.sco