HTML 5 multimedia
I’ve been morbidly fascinated by the Rich Internet Application technology blood bath for a while now: Whirled,Metaplace and others tried to stuff virtual worlds in to web pages using Flash, Second Life stuffed Flash in to virtual worlds via Webkit, Unity stuffed Mono in to a 3D engine and then took on the world and Silverlight and Moonlight stuffed the CLR in to web browsers and Erik Meijer stuffed a CIL interpreter straight in to Javascript.
All good fun and there are fortunes to be won and lost to be sure, but the smart money seemed to be on waiting for the dust to settle and then using the winning technology. Recently, however, amazing technologies like V8, Node.js and the resulting browser Javascript arms race have been adding weight to the Google viewpoint that all you need is Javascript: a philosophy made more pragmatic by Apple’s decree that all you get is Javascript.
A week or so ago I decided to test the hypothesis by building a drum machine using only HTML 5 and Javascript. My first discovery was that while the canvas element is perfectly capable, it’s a very low level API, even for building something as rudimentary as a step sequencer interface. After looking at a number of drawing libraries I settled on processing.js as a higher level drawing API, something I’ve been meaning to play with since we used it to build SLorpedo at Hack Day a few years ago. Processing.js is a neat hack, that despite an incomplete API and some subtleties around casting does a great job of running processing sketches within a browser without a plugin. It also uses a sloppy parser enabling you to drop arbitrary Javascript in to your processing sketch, which makes it easy to just create Audio() objects within the sketch to playback audio. Unfortunately while it was easy to add audio playback, the playback itself was pretty disappointing: Firefox just spluttered and belched sadly while Safari did a decent job of playing beats for a couple of minutes before its timing went to hell and then the browser crashed. The shiny future may yet be HTML 5 and Javascript, especially when the experimental extensions to Firefox become widely supported, but we’re not there yet.
To experiment for yourself, click on the squares on the grid below to add beats to the sequence. To see the code, view source.
Always Watching The Watchers
On May 17th, the first 100 robots single, Always Watching, will be released online via Amazon, iTunes, emusic, Rhapsody, napster, spotify and many more digital outlets.
Always Watching has been one of the most satisfying projects I’ve ever worked on. Using a commodity PC and the incredible Ableton Live music production software, Max and I were able to compose, record, arrange and produce the track, sharing versions online using the free and open source Subversion revision control software and downloading freely reusable samples from the amazing freesound online sample site.
With the music done we were able to produce a DIY video for the track, filmed and directed by our friend Chris Cole again using digital technology that would have been out of reach of anyone but film studios a few years ago. After an incredibly fun day running around Brighton recording shots we could again get additional material from the internet, in this case footage of internet luminaries Chris Anderson, John Battelle, Sherry Turkle and Lee Tien interviewed about online privacy for the BBC virtual revolution series which were released online with a permissive license that allowed us to reuse them.
With the video in the can it was time to promote the track online using the social network sites MySpace, Facebook Sound Cloud and Last.fm, make a remix pack available via Bit Torrent and sell the track via Zimbalam, a site that that makes music available for sale on all of the major online stores, using artwork that we found on Flickr and that Rainer Messerklinger kindly let us use.
It really has been an amazing and eye-opening experience. Using cheap digital technology, the internet and a DIY spirit we have been able to create, promote and sell our music to the world and while I don’t expect to make a ton of money from selling the track, being able to sell it is important.
Computers and the internet have put the means of production back in to the hands of musicians, creatives and other workers in the digital economy. Whereas musicians in decades past would have had to rely on recording facilities and production and distribution chains owned and controlled by major labels, musicians now can choose to do it all themselves and potentially get much better deals. Historically record deals have been incredibly unfair on artists who have to pay for their recordings from their royalties but still don’t own their recordings once they are paid for. Right now sites like Zimbalam, TuneCore and CD Baby are fiercely competing to provide the best deal to musicians who are doing it themselves.
The last time ownership of the means of production changed hands from workers to factory owners the disenfranchised rose up to smash the machines until they were suppressed by the government. This time the disintermediated are turning to the government to defend and enforce the old business models by crippling the new machines that are handing back the means of production to the workers.
Always Watching is a song about biometrics, click tracking, online privacy, Phorm, governmental data loss, corruption and the increasingly Orwellian surveillance state. Even while we’ve been recording it the state has rushed through the Digital Economy Bill which further endangers our digital rights and freedoms. With a general election coming up, it’s even more important to always watch the watchers.
Battle of the Battle of the Bands
Somehow, 100 robots have ended up playing 2 different Battle of the Band competitions on consecutive nights in Brighton: at The Providence on April 2nd and The Lectern on April 3rd.
So, which band is the best and which battle of the bands is better? Early indications favour The Providence, which seems to have a better PA, but The Lecturn is near the University. It could go either way.
Anything you can do, I can do meta: join us for both nights of the Battle of the Bands tour and see who we declare the winner of the Battle of the Battle of the Bands!
An Open Source, Guitar Mounted, Multi Touch, Wireless, OSC Interface for Ableton Live
(100 robots images by Steve Marshall )
Ever since playing with iPhones as music interfaces with the London Community iPhone OSCestra at Open Hack London in May I’ve been wondering how I could use my iPhone as a controller in my rock/electronic band 100 robots. The 100 robots set up has Max and I playing live drums and guitar over a number of tracks played from Ableton Live. If I could mount an iPhone on the guitar I could manipulate the tracks playing from Ableton making the whole experience more varied and live and less like 2 people playing over a backing track.
The biggest problem with using the OSCestra set up with 100 robots is that we run Ableton on Windows with 100 robots so that we can use a number of plugins that aren’t available on OS X. This stopped us using the OS X Osculator to convert OSC data from Mrmr in to MIDI data that we could feed to Ableton — the really simple and easy solution that I recommend if you’re using OSC and Ableton on OS X.
Some quick Googling showed that we could potentially use the open source and incredibly powerful pd to read OSC and send MIDI to Ableton, but pd seemed a bit heavy weight and complex to use just for controller mapping in a live environment which needs to be stable and predictable under heavy load while streaming 6 audio tracks and recording 2 tracks live.
Some more research I discovered LiveAPI: an open source project that gives access to the Python interpreter embedded in Ableton Live. LiveAPI allows you to write python code which listens to events from Ableton and allows control of Ableton from python code. Conveniently LiveAPI also includes LiveOSC an OSC server that quickly allows you to map OSC messages from applications like Mrmr to Python methods that use LiveAPI to control Ableton.
In the end it only took a couple of hours and a few lines of Python code to rig up Mrmr on the iPhone to control Ableton on Windows and a few minutes more to build a guitar mount for the iPhone from a cable tie and a piece of gaffa tape.
Using the iPhone live with 100 robots:
(Cinematography by David Packer)
Despite being a really quick hack to build, LiveAPI is somewhat fiddly to set up, so I thought I should document the process of wiring things up. If you’d like to build your own open source, guitar mounted multi touch, osc interface for Ableton Live 8 running on Windows, follow these instructions:
Install Mrmr on your iPhone or iPod touch
Design your Mrmr interface using a text editor. If you have a Mac, you can use the interface builder. The 100 robots mmr file is here
Upload the mmr file to a web server.
Connect the iPhone to the same network as the computer running Ableton.
Run Mrmr on the iPhone, download the mmr file from your web server to get your interface running on the iPhone
Download LiveOSC
Unpack the LiveOSC zip in to a new LiveOSC folder created inside the Resources/MIDI Remote Scripts directory in your Ableton installation.
Edit Resources/MIDI Remote Scripts/LiveOSCCallbacks.py to add new callbacks for Mrmr to the init method of the LiveOSCCallbacks class. Widgets are numbered sequentially from 0 in the mmr file, so this line registers a callback for the first widget in the file. The 100 robots callbacks look like this:
""" 100robots callbacks """ self.callbackManager.add(self.toggleBass, "/mrmr/pushbutton/0/iPhone1")Add methods to Resources/MIDI Remote Scripts/LiveOSCCallbacks.py to respond to the messages from Mrmr. These can use LiveAPI freely to control ableton. The 100 robots callbacks toggle the first parameter of effect racks on different tracks to turn them on and off:
def toggleBass(self, msg): """Called when a /mrmr/pushbutton/0/iPhone1 message is received.""" track = 38 device = 0 parameter = 0 value = msg[2] LiveUtils.getSong().visible_tracks[track].devices[device].parameters[parameter].value = valueSelect LiveOSC as a control surface in the Ableton preferences. This will load the LiveOSCCallbacks.py and set up your mappings. Interact with the controls in Mrmr and see Ableton Live respond!
The full, modified 100 robots LiveOSCCallbacks.py.
My presentation on the hack at the £5 App Christmas Special which includes more details on the Ableton Live routing we use.
4 Robot Attacks!
Incredibly, 100 robots have 4 gigs lined up in the next 3 weeks: tomorrow we’re playing at an electro/rock night at The Freebutt with Bang Bang Eche, Son of Robot and labasheeda, then next Thursday we’re playing at a more hip hop themed night at The Hope with Tactical Thinking and L-Mo. On the 2nd of December we’re playing at the music hack themed £5 App Christmas Special, where I’ll also be giving a talk about my open source guitar mounted iPhone multitouch Mrmr/LiveAPI/OSC wireless Ableton Live interface and then using it to play live. Finally on the 11th of December we’re playing at the Linden Lab Brighton Christmas party along with the other real rock band that formed from the remnants of the all conquering Linden Lab Brighton virtual Rock Band.
Whew. It’s going to be a busy few weeks. If you can come to any of the gigs, please do. It’s going to be fun: we’ll be playing brand new songs including our first excursion in to Rock/Dubstep and trying out new ways of performing. If all the gigs weren’t in Brighton I’d call it a tour…
100 robots vs 100 geeks
We’ve just about finished setting up the 100 robots gear at BarCamp Brighton 4 in a derelict building that’s going to make the gig feel like an illegal rave. If you’re at BarCamp please come downstairs to hear us sing songs about the surveilance state, Twitter and the Iran election, gene therapy cures for aids, world of Warcraft love affairs and lots more at 8:15 this evening. If you can’t make it we’re also playing at the Prince Albert on Trafalgar street in Brighton at 8 PM on the 24th of October and if you can’t make it to either you can watch the videos from the Dance of the Dead zombie prom which are now on YouTube. You can also listen to and download some of our tracks for free from last.fm or myspace and add yourself as a fan to the facebook page.
The London Geek Community iPhone OSCestra
On Friday evening while mulling over potentially interesting hacks to build at Open Hack London I remembered an idea I’d had a while ago: there are now loads of interesting ways to use iphones as music interfaces and the iphone to hacker ratio at hack days tends to be around 1, so you could probably put together an entire iPhone orchestra.
With only a few hours left before heading to London I started rummaging around on the internet to find the bits I needed. I’d looked at the various iPhone music interface apps over Christmas and ITM MidiLab had been the easiest to use, but although I could start up multiple iTouchMidi servers listening on different ports, I couldn’t send the output of the servers to different MIDI ports, making it impossible to distinguish between multiple iPhones.
Next I looked at the OSC based iPhone apps: OSCemote, TouchOSC and mrmr. Of these, mrmr was the easy choice as it is free as in beer and speech, allowing me to extend it if needed. It also allows custom interface design via scripting allowing for potentially interesting UI hacking at open hack. OSC is also an open standard, so as a last resort I’d be able to build a server that could listen to multiple devices.
With the client settled on I started looking at existing software to run on my laptop to convert OSC data in to MIDI to control Ableton. The first thing I looked at was pd, an incredibly powerful data processing environment that can understand OSC and generate MIDI. As well as being incredibly powerful, pd also has an incredibly steep learning curve and time was running out, so despite having used it in the past and wanting to use open source software for my hack, I eventually gave up on pd and tried OSCulator.
OSCulator is incredibly easy to use. Within minutes I had multiple OSC servers listening on different ports, my iPhone had connected to each of them and I’d set up mappings from dozens of OSC inputs to MIDI controllers. OSCulator also supports up to 8 Wiimotes connected via bluetooth, so I chucked a couple of wiimotes my bag, tested the iPhone could connect to an Ad Hoc WiFi network created on my MacBook Pro, threw a Dr Who MIDI file in to Ableton and then got some sleep.
After booking a slot for the non-existant iPhone orchestra during the hack demos, I set out to make it exist. With a combination of arm twisting and volunteering I convinced 8 plucky hackers to join the orchestra then spent a few hours auditioning synth patches in Ableton and assiging MIDI controllers to their parameters and tweaking iPhone accelerometer smoothing settings in OSCulator to get a couple of Wiimotes working as drums.
I managed to organise an hour’s rehearsal on Saturday afternoon where we spent the first half trying to connect all of the devices and the second huddled around the laptop trying to hear the audio from the built in speakers. After a bit more tweaking I set up a 3rd Wiimote to launch loops and start and stop the set, allowing me to get in on the fun while conducting and borrowed an amp for our second and final rehearsal.
The performance was a hoot. We’d been having trouble getting all of the devices to connect to OSCulator at the same time and Simon Willison’s iPhone refused to connect for the final performance, which freed him up to concentrate on hamming it up with a look of intense concentration. I also managed to completely lose track of where we were in the music, so Jon Markwell’s haunting theremin solo section ended up following an embarrasing silence when his part wasn’t actually playing. All in all though, I think we did pretty well and it went down a storm with the assembled geeks.
Many thanks to Ryan Alexander, Jonathan Markwell, Natalie Downe, Nigel Crawley, Matt Jarvis, Simon Willison and Matthew Smith for indulging me once again at hack day — it was loads of fun. There are more videos and photos of the performance in my delicious stream.
100 Robots Vs 200 Zombies
I may not have blogged much recently, but I’ve been hard at work writing new songs about the financial meltdown, the surveilance state, gene therapy cures for hiv, anger and guilt for the new band I’ve put together with Max Williams and Aleks Krotoski: 100 Robots. We’ll be performing the new songs along with rock/dance/electronic versions of Thriller and Re: Your Brains among others to 200 zombies at Dance Of The Dead: a charity zombie prom in London in aid of St Mungos on April 4th. If you’d like to come along, dance, rock, shamble and groan tickets are available here. I’m always happy to dress up as a zombie, throw in playing music and supporting a band called the The Tits Of Death and it’s clear that this is going to be the best gig ever!
Music Again!
Since moving to Brighton 18 months ago I’ve been pretty busy finding my feet, moving house twice, sorting out schools and setting up Linden Lab Brighton, so I haven’t had as much time to make music as I’d have liked. It hasn’t helped that my brother Roo, who collaborated with me on Vanishing Trick has gone from being a medical student to an opthalmologist, so has been pretty busy too.
I’ve still been reading create digital music though, so couldn’t resist buying Luke a copy of Korg DS-10 for his birthday just before Christmas. It’s a great piece of software that reminds me a lot of ReBirth (which is now free!) — the same infectious acid sounds and a fun interface that you can’t resist tweaking. Within hours Luke was coming up with screaming synth noises that would have made the Chemical Brothers proud, so I told him that when he had a track finished we could record it on to the computer, add some more sounds and make a CD.
30 minutes later I had Luke to thank for finally convincing me to unpack my bag of midi and audio cables for the first time since we rolled up in Brighton. While adding bits to Lukes DS-10 and Electroplankton creations, I took the opportunity to finally play around with Ableton Live properly and was completely bowled over. It’s one of those pieces of software that as a software engineer you can’t help admiring. It makes you want to use it and turns the complex process of sequencing and producing music in to joyful fun. I’d been a Cubase user for 10 years, but I’m not going back.
Over Christmas I put together a Live rig that lets me use my ancient Yamaha MFC05 MIDI controller to switch between drum beats, record guitar loops and automatically switch between effects settings without touching the computer. With some tweaking I’m going to get it to do the same for my Nord Modular and switch patches on both the Nord and my POD allowing me to quickly record, compose, arrange and perform music from 5 foot pedals. I’ve also got ITM set up on my iPhone which I’m planning to mount on my guitar giving me a wireless X/Y touchpad that can control any number of Ableton parameters.
I also finally got round to playing around with circuit bending for the first time. Last Christmas Roo got me a reissue Stylophone, which is a fun toy, but whenever I read about circuit bending online I kept thinking it would be fun to try connecting the headphone output of the stylophone to the MP3 input. In the end it only took an hour or so of poking around inside the Stylophone while telling Luke about electronics to find some bend points that turn the mild mannered Stylophone in to a wailing banshee of feedback distortion that’s more Hendrix than Harris. The modded Stylophone is shown below and I’ve added annotations to a picture of the opened up Stylophone on Flickr that shows the points that I connected. If you’d like to hear the evil sounds it makes there are a selection of Creative Commons licensed samples on Freesound, but I advise turning the volume down and using headphones if you give them a listen.
It’s great to be having fun making music again. Thanks Luke and Roo!


