Pretty city ping pong (retrospective)

Photo taken on the night by Elaine Hill

After meeting Peter, who runs Belfast’s PS2 gallery, about showing some of my PhD pieces there, he asked me to do ‘something’ with their ping pong table for Belfast Culture Night. Naturally I thought to myself ‘I’ll piezo mic it and do bonk detection’ and use the player’s actions to drive some interactive sound and light mood altering music machine. This boiled down to ‘I’ll stick an Arduino in it’ (this seems to be a pattern in my projects) and drive some pretty LEDS that can react to the ball hitting the table and use a Max patch to control the whole sha-bang as well and putting out some pleasant reactive sounds.

All this led me to getting messy with some contact/piezo/transducer mics, the first time I’d used them though I’ve seen them in numerous interactive projects as they’re pretty handy for simple bonk detection. I spent a week fooling about with them gaffa taped to the underside of a plastic garden table which was all I had to hand at the time. The outcome of the was a ground breaking equation governing the relative loudness of ping pong balls on plastic as a function of distance which proved rather less useful when I moved the contact mics on to Peter’s table.

Photo showing wires draped from table

Prototype garden table, at that point I’d given up and filled the table with synthesisers instead.

After I’d got reliable bonk data coming into Max I started with the lights. I had a limited budget which I decided to blow almost entirely on ultrabright RGB LEDS which I sourced quite reasonably from Rapid. I used a 16 channel TLC9540 PWM current sink to control 5 groups of 3 RGB LEDS in series, I picked the TLC9540 because Alex Leone’s well written Arduino library for the chip. The LED’s were powered from a spare DC multi-adaptor supply that I had lying around, 12V sufficed (I find it best to avoid electrocuting the public wherever possible).

A word to the wise, if you get your own TLC9540 and you’re not careful to set the dot brightness low (and you have no way of knowing what it gets scrambled to when you power up) you can easily sink enough current to trigger the built in thermal protection which turns off the chip till it cools down. I found a cheap heatsink that was wider than the chip which I stuck on the back of it using the same thermally conductive double sided sticky tape I later used to stick the LEDs to their heatsinks.

The only Arduino code I had to write was a simple serial library to convert commands from Max into commands for the TLC. I always like to write these kind of things from scratch because I enjoy the challenge of it and they never normally take very long. I generally just base them around my understanding of MIDI (i.e. a command space for values above a certain number and a data space for values below then use extra packets and bitshifts to send larger values if necessary).

At that stage I had an array of bright lights I could control the intensity and colour of and a method for getting data in. As culture night loomed I needed away of sticking them safely to the underside of a ping pong table, luckily I’d been put in touch with the excellent guys at Farset Labs who lent me use of their glue gun and some old aluminium strips. I spent a very happy and very late night using some heat conductive double sided sticky tape (it was from Maplin and designed for sticking heat sinks on GPUs) gluing the LEDS to the bars and wiring the whole thing up.

A couple of days before Culture Night I set up the table in PS2 with sensors and lights for some serious play testing and mapping design. In the end I tacked the aluminium strips to the underside of the table and used the ubiquitous gaffa tape to hold the cables in place. This is a video I took when I was getting the lights set up for the first time.

I had initially had all sorts of ideas about how to use the sensor data to control Ableton Live and even created a drum machine that kept tempo with the tapping of the ball back and forth. In the end I went for a more literal approach and decided to actually use the acoustic signal from the piezo mics for more than just bonk detection but to actually generate the sound itself. I achieved this by feeding banks of tuned resonators and a custom Reaktor patch that I made years ago that does interesting things with interpolated delay lines. Each of the sensors fed its own effects chain and I also mixed in some live signal from a microphone I hung above the table to pick up the natural acoustic sound of the ball and the audience, this was just fed through some EQ and delays. I think it ended up sounding like a mix between Basic Channel and Autechre, which is no bad thing in my opinion. This is a recording of a game that I made.

The mapping worked using the location system I’d established earlier, I let the position of the ball strike along the length of the table control the chords the resonator was programmed to play and the colour of the LEDS such that the table had a red and blue end with the spectrum in between. Where the ball landed across the width of the table affected the panning of Live’s master output. I also used the peak amplitude of Live’s output to control the intensity of the lights as they flashed and faded after each ball strike, this was a really nice effect that tied the sound and light together. Here’s a video of the final installation on Culture Night.

Looking at the piece technically the whole thing ran on a combination of Live hosting all the Reaktor vsts and processing the acoustic signal while Max used the same signal to do bonk detection and control Live and the Arduino, if I had more time I’d have tried to squeeze the whole thing into a single M4L patch but to be honest I find communication between instances of M4L patches to be pretty unpredictable timing wise so it might have to stay as two separate applications with OSC and Midi doing the communicating.

Putting it in its artistic context there a whole host of interesting ping pong projects. Some of my favourites are Kings of Ping, Ping Tron and the spookily contemporary Noisy Table.

 

New acid house track done

Pretty pleased with this one as it feels like an improvement both in terms of tune and mixdown. It’s based on the skit I posted here Hangover acid medley. This is the first track I did on my Atari using Notator, normally I’m a Cubase 3.1 kind of guy but I thought I’d see how the other half live (or should that be lived given development stopped in ’93). Notator’s really good for track layout and development, the only problem is the piano roll note editor doesn’t display long notes very well, makes programming long chordal stuff a bit tricky at times. I can see why people flicked between both.

Forthcoming installation in Belfast’s PS2 gallery.

From the 20th to the 25th of August I’ll be showing some of my works in Belfast’s PS2 gallery. This’ll include a radio, a TV some remote controls and a recreation of my living room. For the show I’ve rebooted my Journey Through a Burning Brain patch from way back in 2009 and gone to town with a new concept and some fancy effects. Here’s a video showing some  Euclidean rhythms triggering a cut up video of the QVC channel being played through my new video synthesiser. Excuse the slightly jerky video, the actual patch runs at twice the speed this was just a quick and dirty real-time capture. More details to follow…

XBee4Max – Sending data wirelessly in Max via XBee

I made this about a year ago and just never posted it. I’ve really gone off blogging but I figured this might be useful for other people who want to send and receive data wirelessly over XBee in Max. It uses RXTX to access the serial port from inside mxj so it requires you to copy a two files to Max’s support directory to get it to work. Most of the hard work is done by by Andrew Rapp’s excellent XBee java api so big shout outs to Andrew who was really helpful when I got stuck. I’ve had good results at baud rates up to 57,600 any faster and the Arduino seems to get it’s knickers in a twist reading the bytes out of the serial buffer. When loaded the external sends a node discover packet to ask the other XBees to chime back with there names, from then on you can send data using the ‘send’ message followed by the name of the XBee and the raw bytes your sending. It comes with a help file and the source is fairly transparent so feel free to hack away…

 

External: XBee4Max-Max-External.zip

Eclipse source code: XBee4Max-Eclipse-Source.zip

Euclidean sequencer max4live version now here!

Alright I got a bit distracted by other things and I forgot that there were people out there who really wanted this thing. What can I say, I get chronic blog fatigue.  I also wanted it to be good and to have preset recall and interpolation so I stalled on the initial release, then the comments mounted up on the teaser post…

screenshot of max4live version of the euclidean sequencer

Euclidean Sequencer M4L

But it’s here now! Installation is a breeze, simply download the file (see the bottom of the post), unzip and copy the “Euclidean Sequencer” folder to <your live library>\Presets\MIDI Effects\Max MIDI Effect\”. The sequencer will then appear the next time you load live in the “MIDI Effects\Max Midi Effect” part of Live’s browser.

A note about presets, presets are not stored with the live patch but are stored seperately as max pattr .json files when you click the write button, you can get them back using the read button. When you program a rhythm you like you can store it by selecting a note number and pressing store. Notice that the presets are referred to not by a number but by a note, this is because of how the presets are recalled using MIDI notes.

You can also interpolate between rhythm presets to generate odd material! To start with  manually select two presets to interpolate between by clicking on the note boxes labelled A and B and interpolate between them using the slider (you have to have first stored something in these preset slots for interpolation to occur).  Once you’ve programmed some material to work with you can go ahead and  sequence and automate the interpolation using MIDI clips or live MIDI input as follows. Playing or sequencing a note with a velocity above 64 causes a rhythm stored with that note to be recalled in box A. If the interpolation slider is set fully left then it will simply recall that rhythm. Playing or sequencing a note with a velocity below 64 causes a pattern stored with that note name to be recalled in box B. Again if the slider is set fully right it will simply recall that pattern. The interpolation slider itself can be controlled by MIDI CC 3.

REMEMBER PRESETS ARE NOT SAVED WITH LIVE SETS! YOU HAVE TO SAVE THEM SEPARATELY USING THE READ AND WRITE BUTTONS! YOU HAVE BEEN WARNED!

DOWNLOAD EUCLIDEAN SEQUENCER M4L

If you like this sequencer then please consider donating me £2 GBP which after PayPal fees will give me roughly the £1.70 a pint of foaming nut brown ale costs in my local Wetherspoons. You don’t have to, but not doing so means you are well stingy plus since my uni funding ran out I’m completely brassic.

Handheld music remote controllers

I’ve been working on a set of remote controllers that can be given out at a gig to create audience participation in electronic music. After a year of designing, re-designing, soldering and programming they’re nearly ready. Here’s a video of the first application I’ve programmed for them, a simple clip controller for Ableton Live.

The LEDS light up red for stopped clips, yellow for cued and green for playing and the rotary encoder moves a blinking cursor around while depressing the knob triggers or stops a clip playing. The remotes communicate wirelessly via XBee transceivers using a custom external for XBee that I hope to release as soon as I’ve created a help patch describing its features.

Euclidean sequencer – Max for Live version

Some people have expressed an interest in my Euclidean sequencer patch getting ported to max for live. Ummm, it’s like nearly there. Any minute now, look…

Image of euclidean sequencer running in live

Euclidean sequencer ported to max 4 live.

I’ve been playing with this little baby for a week now, the algorithmic sequencer works nice. Programming wise I’ve been getting bogged down in preset management but after having decided to ditch live’s presets and just stick with max’s xml files it’s nearly there. I wish the live number boxes had settable max and minimum parameters but they don’t.

This is my first patch in max for live and the new purchase is nice and everything but I can see it just being another barrier between me and music making. That and the fact the sparse documentation just confuses me leaves me grumpy. Ho hum.