Nightjar camouflage project: paper planning

It’s great to settle down to a few days of drawing and planning on paper for the Nightjar camouflage project I’m working on with the sensory ecology and evolution group. First things first, exploring the data, identifying potential groups of people who will find it useful and exciting, working out ways to bring it to their attention – and a bit of rough and ready ‘mobile first’ web design.


MS Stubnitz Algorave #2

Our second offshore Algorave on the MS Stubnitz, during the ship’s final night in London. The crowd was pleasingly diverse with lots of people new to algorave and livecoding, and although behind the scenes we had some hitches due to the ship’s impending departure for France, the event was relaxed and went smoothly. Our performance was honoured by guest appearance from Elvi$ Ca$h as well as a re-compile of the Al Jazari rave bots. As one of those spending the night on the ship afterwards, I had to be careful not to have too much of a lie in!

Alexandra Cárdenas live coded dark textures and sharply angled beats.
Shelly and some Mandelbrots, transmitting multi-layered synthetic tones with Davide Della Casa in the foreground operating livecodelab who, with Guy John live coded inspiring minimalist geometric expressions to match the music throughout the night.

Better, and considerably wider angle photos can be found here by Yoshizen.

Algorave practice

It’s been a huge amount of time since I recorded anything, but I thought I would a) try and do some actual livecoding practice for the upcoming algorave on Thursday and b) record everything. As usual I’m following my foolhardy approach of improvising both musical structure and sound material by livecoding synth graphs from scratch. Sometimes it takes while longer than I would like to reach a suitable musical complexity (this is faster in a real live situation, with increased adrenaline), and some fiddly things there never seems time to sort out, such as stereo! For these recordings, and live on stage with slub I use the scheme bricks visual programming language. Here are some of my favourites, the complete set is here.

‘The Marja trio’ – Sonic Bike Experience for Marjaniemi

I’ve been doing more remote install work on Kaffe’s latest piece she’s been building while resident at Hai Art in Hailuoto, an island in the north of Finland. The zone building, site specific sample composing and microscopic Beagleboard log debugging is over, and two new GPS Opera bikes are born! Go to Hai Art or Kaffe’s site for more details.

The Marja trio_score2_KM2013


Screen Shot 2013-05-03 at 9.55.33 AM

Compiling Scheme to Javascript

Recently I’ve been continuing my experiments with compilers by writing a Scheme to Javascript compiler. This is fairly simple as the languages are very similar, both have garbage collection and first class functions so it’s largely a case of reusing these features directly. There are some caveats though – here is an example of the canonical factorial example in Scheme:

(define factorial
  (lambda (n)
    (if (= n 0) 1
        (* n (factorial (- n 1))))))

The Javascript code generated by the compiler:

var factorial = function (n)
    if ((n == 0)) {
        return 1
    } else {
        return (n * factorial((n - 1)))

Scheme has tail call optimisation, meaning that recursive calls are as fast as iterative ones – in Javascript however, a function that calls itself will gradually use up the stack. The factorial example above breaks with larger numbers so we need to do some work to make things easier for Javascript interpreters. When considering list processing, fold can be considered a core form that abstracts all other list processing. If we make that fast, we can reuse it to define higher order list processing such as filter, which takes a function and a list and returns another list. The function is called on each element, if it returns false it’s filtered out of the resulting list.

(define filter
  (lambda (fn l)
     (lambda (i r)
       (if (fn i) (append r (list i)) r))

Compiling this with an iterative version of fold – which uses a for loop in Javascript, we generate this code:

var filter = function (fn,l)
    return (function() {
        var _foldl_fn=function (i,r) {
            if (fn(i)) {
                return r.concat([i])
            } else {
                return r

        var _foldl_val=[];
        var _foldl_src=l;
        for (var _foldl_i=0; _foldl_i<_foldl_src.length; _foldl_i++) {
            _foldl_val = _foldl_fn(_foldl_src[_foldl_i], _foldl_val); 
        return _foldl_val; })()

We have to be a little bit careful that variables created by the compiler don’t clash with those of the user’s code, so we have to make really ugly variable names. You also need to be careful to wrap code in closures as much as possible to control the scope. The problem with this is that there is probably a limit to the amount of nesting possible, especially comparing different implementations of Javascript. A interesting project that has got much further than this is Spock. More context to this work and some actual source code soon…

New project with the Sensory Ecology and Evolution group at Exeter University

Time to announce a new a new project with the Sensory Ecology and Evolution group at Exeter University. We’re going to be working on games and experimental online work to bring their research into the evolution of camouflage and animal perception to new audiences, particularly focused on these stealthy characters, the Fiery-necked Nightjar:


The group’s previous work includes all kinds of experiments on animal perception, this one is a favourite of mine:

Bike Opera – layering sounds in space

New advancements on the the bike opera project with Kaffe Matthews include a brand new mapping tool based on, yes you guessed it – Ushahidi which I’ve been using for a lot of wildly different projects recently. This time the work has been mainly focused in improving the area mapping – adding features for editing polygons so Kaffe can layer her sounds in space:


This work is fairly reusable, as it only concerns changes to the submit_edit_js.php file in the standard Ushahidi install. In the meantime, Kaffe has been collecting sounds from musicians in Porto and building up a work of truly operatic proportions. We keep our fingers crossed that the bike mounted BeagleBoards can cope with all this material!