LED Sousaphone Bell
AKA Pixel Mapping with MaxMSP
by John Baylies - sousastep.quest
Many thanks to the Brooklyn College Sonic Arts program and the Performance And Interactive Media Arts program.
Note
Check out Jay Converse’s LED bell too!
Materials
One dedicated sousaphone bell (this is a permanent installation) I used a fiberglass bell spray-painted black. the LEDs will stick to a lacquered bell just as well, but keep in mind that the LEDs will be soldered while they’re on the bell, which would not do the lacquer any favors.
Condenser clip-on mic. My max patch currently only uses amplitude data from the mic. It’s definitely possible to use a much cheaper mic, or even solder your own.
Teensy 3.2 A Teensy 4 will work as well.
Note
(200 LEDs needed for this tutorial, but definitely buy extras. Even the pros sometimes have trouble sourcing good ones that won’t burn out quickly) WS2812 LEDs were released to the world 7 years ago, and they’ve been improved upon since then. Click here to read more about other types of LEDs.
Note
After four years of using this PSU I just had an issue where, a few times an hour, my LEDs would all turn off for a minute. Unplugging the PSU from the outlet and plugging it back in fixed it. It had been plugged in for months so maybe just don’t leave this PSU plugged in for weeks on end.
Soldering Iron (I bought a cheap soldering iron, hated it, then splurged on the Weller, which is great)
lead solder (leadless solder is a PITA)
Note
If you haven’t soldered before, Nic Collins’ book Handmade Electronic Music is a great way to learn. Also, Adafruit has a soldering guide specifically for LEDs.
Important
DON’T BREATH THE FUMES! IT’S LEAD!
Electrical tape and Gorilla tape
Projector and tripod (the tripod matters more than the projector. It must remain completely stationary for however long it takes you to place all of the LEDs on the bell)
Overview
Max/MSP handles the VFX, and outputs a stream of RGB data to the Teensy, which uses the venerable OctoWS2811 to send RGB data to the ws2812b LEDs. Max must ensure that the RGB data is sent to the Teensy in the order in which the LEDs are wired to the OctoWS2811. Sometimes this stream of RGB data can become offset. To fix this we add start and end markers to each frame of RGB data .
Since Max can only send the numbers 0 - 255 to the Teensy, we clamp 0 - 253 so that 254 and 255 can be used as markers. There’s not much of a difference in brightness at that end of the range, anyways.
The current Teensy code can be downloaded from here. Last time I touched this code I was messing with an accelerometer and a capacitive touch sensor, and couldn’t get them to work well, but haven’t removed the code yet, so there’s some superfluous code in there.
You can download my VFX Max project here (with the start and end markers). It’s set up to work with my rig, so you may want to extract the serial stuff and build your own rig around that.
Initial Setup
Start with the simplest possible setup to ensure that Max can control the LEDs before they’re attached to the bell.
Click here for instructions on how to connect the OctoWS2811, Teensy 3.2, power supply, and LEDs.
Download this folder o’ files. (without start and end markers)
Upload success.ino to the teensy by following these instructions.
Open testpatch1.maxpat
Turn the patch’s audio on.
Clear the serial ports and locate the teensy.
Enable jit.world, and the LEDs should light up…
If only some of the LEDs light up, change this portion of the code:
const int ledsPerStrip = 26;
const int numStrips = 8;
Getting the Coordinates
We can get a list of RGB data from Max by sending pixel coordinates to a matrix. You can arrange the LEDs in any pattern you’d like as long as there’s an ordered list of coordinates, which will have to be reordered after the LED wiring order is determined.
Here’s how I got the coordinates for remappedLEDcoordinates.txt
I found this website, clicked “table”, selected the first 200 coordinates, copy-pasted them into google sheets, exported the sheet as a csv file, and used Justin G’s max patch to convert the csv file into Max’s coll object.
then,
Arranging the LEDs
Project a screenshot of the spiral in jit.world onto the bell. Place the LEDs onto the projected dots while being mindful of the wiring order. You’ll want to wire the 200 LEDs in eight groups of 25. You should use your own discretion to do this as efficiently as possible.
One problem I faced is that I placed half the LEDs, then took a break for a few days, and when I tried to set up the projector again I learned that realigning the projector perfectly is impossible. This led to one speck of light hitting the flare of the bell the first time, and the throat of the bell the second time, which made me place one extra LED, which led to much confusion later on.
Once completed, the bell will look best from the projector’s point of view.
The top numbers are the Fibonacci indices, from iwant2study.org. The bottom numbers are the wiring indices, which can be determined by turning on the first LED in each of the eight strips.
Typing those indices into a coll object allows the coordinates to be reordered using the patch below.