CSMA is a synthesizer/laptop duo Stuart Russell and I formed recently, our inaugural gig will be at the Network Music Festival in Birmingham in September.
This gig will be purely sample-based and using laptops only rather than synths so I was looking for an interesting control surface to use – I don’t like watching laptop players working just on the screen/keyboard, it’s indistinguishable from them playing a prebuilt WAV/MP3 file while messing around on Facebook or Twitter 😉
The idea
One of the things I was wanting to do with this show was to speed up and slow down the samples as they played – Stuart had already written a sample “tape scrubber” in Max for Live – and it occurred to me that the standard DJ decks would be an ideal tool for this, they have two decks that can rotate quickly as well as an army of faders and often pads that I could use to change the sounds or launch other clips.
To test the idea I made a dummy version of a DJ control surface using TouchOSC on my Android tablet, connected it to Ableton Live and had great fun with it, eventually producing this proof of concept piece.
The purchase
Inspired by that I went to the lovely Production Room in Leeds where they let me play with the Numark Mixtrack Pro-II controller for a while and I had fun with that, and came out with one. While playing with the device in the shop it was obvious to me that the encoder controls and the decks did not work quite right in Ableton but I was confident (over-confident as it turns out!) that something could be done to fix this.
The problem
Wondering if the encoder problems were specific to Ableton I tried the device in IntegraLive. This is a relatively new tool, aimed squarely at live performance of electronic music and customisable using Pure Data(PD). It has lots of good features that meant we were keen to use the software for this project. However IntegraLive had the same trouble with the encoders as Ableton did so, being a career programmer, I delved into PD to see what codes were emitted on the MIDI stream by the devices and how they should be interpreted. This took me under an hour to crack, and I had an “Encoder decoder” patch working. It took me only a little longer to integrate that into Stuart’s ‘tape scrubber’ patch (which by then also had a PD version), so I set about integrating that into IntegraLive. This was where even more trouble started.
Modules – or not
IntegraLive has a module builder which is the way that PD patches are incorporated into the software. It supports separation of form & function (a good thing[™]) where the form is the PD patch set and the function is drawn using its own tools. The communication between these is arcane to be quite honest, and it took quite a while to alter the patch so it understood the messages coming in. It was very far from the smooth integration in Max For Live, though this is understandable in a small, open source project. A bigger problem for me was that once inside the module there was no way to debug what the patch was doing – I couldn’t tell which messages were being sent or what the software was doing with them – it was click-and-hope really and it got very frustrating. I never did get that module to work, even basically. Another problem I had with IntegraLive was that it often refused to acknowledge that I had any MIDI drivers or devices, despite several being connected. This was a killer bug for me. I can’t afford to go on stage and not do a set because the software can’t see the control surface on the desk next to me. There seemed to be no workaround that was reliable and shortly after it started doing it for audio devices too. Clearly unacceptable
So, while I like IntegraLive and hope to use it in future, this project was too soon to be trying to get software integrated and bugs fixed in time for it. I went back to Ableton and Max for Live.
Over optimisation
However, this was not without its problems. I ported the encoder-decoder patch I wrote for PD into Max and incorporated it into the M4L tape scrubber but it didn’t work. I was baffled. I searched for some potential incompatibilities between the similarly-named objects in PD and Max but could find none. I inserted print and number boxes in the code and eventually discovered that a huge number of the MIDI messages send by the encoders were just being thrown away! I suspect this to be an Ableton “optimisation” as I have read of such things before, but I can’t prove it just yet as I don’t have standalone Max/MSP to test it.
Encoders (which includes the decks on the Mixtrack Pro-II as well as the FX controllers) send a MIDI CC value which is a signed byte stating (roughly) which direction and speed it is being moved. So a gentle move clockwise sends a 1, and gentle move anti-clockwise sends 127(rendered unsigned); a fast movement could send a higher (signed) number e.g. 2(clockwise) or 125(anti-clockwise) for example. The problem is that Ableton filters out all of what it sees as duplicate messages. So if you move the encoder clockwise in a normal fashion, then all your Ableton device (including M4L patch) sees is a single CC of value 1 … this is no use at all!
There is obviously some way round this for certain devices, there are drivers for Push (obviously) and things like the Novation Remote SL that have encoders and I am assuming that those device’s encoders work fine. But there seems to be little documentation on how to write such drivers and what little I found seemed to involve coding in the Python language, something I am unfamiliar with, and I was very reluctant to start learning yet another complex system in the vague hope that it might be able to fix something, but wasn’t guaranteed to achieve anything.
A sort-of solution
In the end I settled for a rather hack-ish system where I have PD read the raw MIDI CCs coming from the Mixtrack device, that patch reformats the encoders to look like normal rotary controls and sends the result using the internal MIDI channel to Ableton. Other MIDI messages it passes through unchanged. This works OK, though it loses a lot of the resolution of the decks. It’s not a huge problem for this project, but it would be useless for a real DJ I imagine. The latency for this seems acceptable to me so it’s probably how I will run things on the day. I really don’t want to be spending even more huge chunks of time working out how to do this … there’s music to be made!
In the end I have something that works. It’s taken me a little over three days to get to this point – and I’m quite a strong programmer – so it’s now no surprise to me that nobody else seems to be using these devices in such a way inside Ableton … or any other software for that matter.
Some sorrow
The jettisoning of IntegraLive is a source of some sorrow to me. I like to support open source projects and this software has huge potential, and a lot of really nice features for live performance that no other software does. The design is well thought out and it’s not just a DAW that can be used on stage, it’s a whole new paradigm for live use, which I like. However it seems to be hard to integrate new modules into the system and it has some bugs that are show-stoppers. I hope these things can be fixed (and I’m prepared to help out where I can) so that it can become a good capable performance system.
But the show must go on
So that’s what I’ve been up to this week, we will be playing at the closing concert at the Network Music Festival in Birmingham on the 28th September … come along if you can!
Read Full Post »