Tom Says: Safe code is boring code! Why??
Previous page:
Daily Crap 2009-09-27
Next page:
SketchMuse
kindness is a networked software instrument for many laptop performers in ChucK, Processing and Ruby. I created it for the Princeton Laptop Orchestra (PLOrk) my senior year of undergrad. You can listen to it from PLOrk's spring 2009 concert page as you read. (There is MP3 and a video.)

The main interface is shown above. On the left, it is at rest. On the right, three notes are sounding. The window vertically represents a wide frequency range on which players click to play a particular note. When they do, parts of the spectrum near and far enough to sound dissonant are blacked out. That information is broadcast to all other players.
Not every performer in the laptop orchestra is an amateur musician, but most suck at any software instrument they're given in PLOrk because they have less than a semester to learn it. That's why kindness displays what everyone else is playing on your screen, to make up for the fact that nobody can play my Processing sketch by ear after a few afternoons' practice.
There are a few additional controls – such as tilting the laptop to control envelope and munging filters, and a few keyboard commands (see instructions in the UI) – but all you really have to do is click.
I had two ways to tell people what to do: send text messages, and send frequency cues.
A one-sided chat program sits alongside the instrument's display on every person's screen. It allows me to broadcast English commands and stupid jokes to all performers. Whenever I appended a line of text to a certain file, a Ruby script sends it to everybody via OSC.
A frequency cue appears on a performer's screen as a horizontal line with a number. The number indicates which of the five groups I'm signaling. The conductor has a text file with five lines, one for each group. A number on line 2 would cue group 2 to play at that frequency. Clearing the line would clear their cue.
| Languages/Environments | Libraries |
|---|---|
| Ruby, ChucK, Processing | rosc |
I've only ever tried this stuff on OS X. It will only be fully-functional on a MacBook because it uses the laptop's accelerometer as a control. If you're on another OS, everything else will probably work, although you will have to start the Processing sketches by hand (the ChucK scripts will start the included OS X binaries automatically).
kindness.tar.gz has everything – performer scripts, conductor scripts, and Processing sources in case you're not on OS X. There is also a README.txt that describes how to start the performer scripts:
cd kindness/ chuck --caution-to-the-wind --blocking cyclone.ck kindness.ck
And how to start the conductor scripts:
cd conduct/ chuck ruby-conduct-proxy.ck & ruby commands.rb commands & ruby messages.rb messages &
Run it all on your computer and it should work.
I wish I'd created a score. Experiencing the piece was incredible, but what we played in concert was not listenable music. Having thirty of the hemisphere speakers and subs blasting distorted sines at you creates a blanket of sound that feels unsafe and makes you uncomfortable even though it's not actually that loud. Brains – well, at least my brain doesn't seem to judge volume of that kind of sound properly. I ask myself, "Why doesn't this hurt?" At its craziest it's noise music (which often does hurt), but unlike noise music you can buy, mine is thrown together by a hobbyist with very little experience as a musician, and I think it shows.
In place of a score I had a cleaned-up transcript from one of the practice performances. It had the piece's overall shape outlined and a few choice frequencies (such as for the intro). In other words, I improvised it every time, but I had the file to help me when I froze up in front of an audience.
Here's my transcript from the Richardson performance. It's missing frequency cues because those were stored in a separate file, but I bet you can follow along with the recording if you try.
thumbs up? from zero volume to half red remember hemis and stuff at 2pm kevin, beat volume to 30% groups 1 & 3, sync and beat volume to 50% improv kindly volume to 70% all: beats synced then on volume to 90% groups 2 and 4, double time (resync!) volume to 110% improv UNkindly try kind again pulse (lean forward) be unkind again ooh, I hear an ambulance volume to 50% be a little more kind, but not TOO kind re sync beats all half time beats still improv'ing but now fade to red fade to half red less notes now pulse on your way to zero volume 20s 10s <3 ^_^ ftw okbye
"Red" refers to the red bar that indicates "the highest volume before distortion." That bar is very low compared to the max volume. 30% volume (30% of the screen) is already above it.
In this context, "kind" and "unkind" refer to "consonant" and "dissonant," according to the color-coding of the display. It's kind to play on white, which puts you either within the "in tune" band of another note that's playing or outside the critical bands of all playing notes, far enough to not interfere.
Posted Sep 28, 2009, in the early morning.