February 9, 2010

For the Gearheads

When I played guitar in high school, conversations with other guitarists inevitably turned to gear: makes and models of guitars, amps, pedals, and so on, all the way to preferred pick thickness. Maybe these types of dialog are the musician’s conversational safety net; failing any meaningful social bond, guitarists can always weigh the merits of the Flying-V. At the time, these conversations annoyed me because I was more interested in music theory than esoteric fuzz boxes. I thought, What’s the point in effects if you don’t know what notes to play? Today I could see other sides of the argument, but I’m still suspicious of conflating interesting gear with interesting ideas.

That said, people are naturally curious and want to know how things work. Here I’ll present some of the details that I skipped over in my How It Works youtube video, which you will be able to view in the video page sometime around mid February. I’ll start at the beginning of the signal chain.

The WiiMotes transmit a Bluetooth signal that is received by my MacBook Pro. This signal contains raw information about the state of the Wii: which buttons are depressed, its orientation in space, and its acceleration in three axes. On my MacBook, I use a small, clever program called OSCulator to translate that data into OSC messages and make them available on a local port. In MAX from Cycling ’74, I parse OSC messages with a custom Java external. Once parsed, state information from the OSC messages is sent to other homebrew Java externals that use the state of the buttons and the orientation of the Wii to determine if a note should be played, when it should be played, and how loud. How that process works is much easier to demonstrate than describe, so I would encourage you to watch the video if you haven’t done so already.

If a note is to be played, MAX tells my audio interface to generate a MIDI Note-On command. MIDI messages from the audio interface are routed through a MIDI-Thru box and broadcast to all (at this time) three machines. At the other end of the MIDI cable are Arduinos outfitted with a small circuit and a DIN connector that allows them to interpret MIDI messages. After the Arduino has received a Note-On command, it communicates with an external 16-channel Pulse Width Modulation chip, the TLC5940, which adjusts the voltage across a particular solenoid to a level determined by the velocity value of Note-On command. (A Darlington transistor, the TIP120, amplifies the signal of the TLC5940, which produces small currents, and the solenoids, which consume large currents). The solenoid stays on until the Arduino receives a note off command, which is sent automatically after a certain amount of time between 10 and 20 milliseconds, depending on the velocity of the note.

That, anyway, is a rough overview of the software and electronics. If there is enough demand for this sort of thing, I could discuss my favorite router bits and preferred epoxies. Or I might just post links to phat beats.


Comments (6)

avocado kid

February 19th, 2010 at 9:56 am    

very cool stuff! thanks for sharing a bit of your inner workings.


February 19th, 2010 at 4:34 pm    

Patrick, would you be willing to share your solenoid driver circuit schematic? And which solenoids you’re using?

Avocado Papa

February 20th, 2010 at 7:14 am    

Those custom Java externals – you made those yourself? I’d like to hear more about them.

Excellent work, would love to see & hear more!


February 22nd, 2010 at 3:27 am    

Thanks for the info!
Still wondering about those solenoids though, if you have a link or some views on what works and what not that would be very cool! I’m a music technology student in Norway – just started working with the Arduino :)

[...] Musical group Jazari consists of one human, a variety of percussive instruments, and a whole lotta solenoids. Patrick Flanagan directs his mechanical bandmates by way of two Wii remotes sending data via bluetooth over to Max/MSP software. Actual note data is sent out to Arduinos which handle all that solenoid switching seen above. Patrick provides a more detailed explanation of the setup for us gearheads. [...]

Robotic percussion grooves via Wiimote | SquareCows

February 23rd, 2010 at 8:21 am    

[...] all that solenoid switching seen above. Patrick provides a more detailed explanation of the setup for us gearheads. [via Create Digital [...]

Leave a reply