Next week the weaving codes project assembles in the Museum für Abgüsse Klassischer Bildwerke in Munich. We’ll be working for a few days surrounded by these characters to get us in a classical mood:
The museum is hosting Ellen’s ‘Textile Matrix’ exhibition, a crossbreeding of logical science, religion, crafts and visual arts. The word ‘matrix’ originates from the latin word for mother or uterus, but today is predominantly used in mathematics, science and technology. Her work, as much of the weavingcodes project, provides new perspectives on connections between modern digital technology and ancient weaving.
Alex, Ellen, Emma and I will be in residency in the museum from the 6th May and I’ll be reporting our activities here as usual. On the 9th there will be talks and slub will be performing a special livecoding gig. On the 10th we will be presenting the work we have been doing during the residency and inviting people to participate in a citizen science event, exploring mathematics, weaving, music and code – including the brand new pattern matrix tangible weavecoding device.
Compilers are perceived to be magical artifacts, carefully crafted
by the wizards, and unfathomable by the mere mortals.
This is from a great paper by Abdulaziz Ghuloum on how compilers are made. It, along with a timely email from Julian Rohrhuber inspired me to have a go at making a tiny one for compiling scheme to betablocker – the idea is that you only need a handful of scheme primitives before you are able to bootstrap all the other code together. Betablocker is no way powerful enough to go too far with this, but I think there may be some good uses for compiling bits of fluxus scheme code on Raspberry Pi and Android, maybe not to native binary but mixing an interpreter with a fast intermediate language for graphics processing would make it possible to compile object deformation inner loops i.e. (pdata-map!) and friends for per-vertex operations, but have it transparently the same language to the user/livecoder.
I’ve only dealt with fixnums, booleans, null lists and a handful of simple core procedures, but compiling something stupid like this:
(and (zero? (- (+ 12 4) (+ 43 (add1 34)))) (boolean? #f))
Results in this:
Via the slightly more conventional looking:
pshl 24 pshl 8 add pshl 86 pshl 68 pshl 2 add add sub pshl 0 equ jmpz label-1 pshl 4 jmp label-2 label-1: pshl 0 label-2: pshl 0 pshl 3 and pshl 3 equ jmpz label-3 pshl 4 jmp label-4 label-3: pshl 0 label-4: and jmpz label-5 pshl 4 jmp label-6 label-5: pshl 0 label-6:
A system for creating an abundance of useless software for tiny devices. Spork Factory evolves programs that run on Atmel processors – the same make as found on the Arduino, in this case the ATtiny85 – a £2.50 8 pin 8bit CPU. I’m currently simply using a piezo speaker as an output and evolving programs based on the frequency of the sound produced by flipping the pins up and down, so creating 2bit synths using the Fourier transform as the fitness function. With more hardware (input as well as output) perhaps we could evolve small robots, or even maybe cheap claytronics or programmable matter experiments.
This project reuses the previous genetic programming experiments (including jgap as its genetic algorithm framework), and is also inspired by Till Bovermann’s recent work with Betablocker in Supercollider for bytecode synthesis.
The programs generated don’t use the Atmel instruction set directly, but interpret a custom one derived from Betablocker for two reasons. Atmel processors separate their instruction memory from data (the Harvard architecture) which makes it difficult to modify code as it’s running (either uploading new evolved code or running self modifying instructions), the other is that using a simplified custom instruction set makes it easier for genetic algorithms to create all kinds of strange programs that will always run.
I’ve added an ‘OUT’ instruction, which pops the top of the stack and writes it to the pins on the ATtiny, so the first thing a program needs to do is generate and output some data. The second thing it needs to do is create an oscillator to create a tone, after that the fitness function grades the program on the amount of frequencies present in the sound, encouraging it to make richer noises.
Here are two example programs from a single run, first the ancestor, a simple oscillator which evolved after 4 or 5 generations:
out out nop nop dec nop nop nop out nop jmpz 254 nop nop nop dup
It’s simply outputting 0’s, then using the ‘dec’ to decrement the top of the stack to make a 255 which sets the rightmost bit to 1 (the one the speaker is attached to) and then loops with the ‘jmpz’ causing it to oscillate. This program produces this fft plot:
After 100 or so further generations, this descendant program emerges. The dec is replaced by ‘pshl 81′ which does the same job (pushes the literal value 81 onto the stack, setting our speaker bit to 1) but also uses a ‘dup’ (duplicate top of the stack) to shuffle the values around to make a more complex output signal with more frequencies present:
out out not nop pshl 81 pshi 149 out nop out nop dup psh 170 jmp 0
Some further experiments, and perhaps even sound samples soon…
The first UK focus group/game testing session for Germination X will take place at the “Loading” gaming cafe in Falmouth, Cornwall on the 28th March at 18.00!
I spent thursday afternoon in the tangible auditory interfaces studio at the Helsinki Media Lab with Till Bovermann and Erich Berger. Till has a report on our investigations of taking the Betablocker virtual machine into new noisemaking territories.
Here is an example of a betablocker program written without the help of the graphical programming interface, by poking heap memory directly to create a simple sawtooth oscillator:
// begin LFSaw u32 threadID = m.add_thread(23); m.poke(23, ORG); m.poke(24, PIP); m.poke(25, 6); m.poke(26, JMP); m.poke(27, 1); // end
I spent last weekend in Berlin, on Saturday we has a fluxus workshop at pickled feet where I introduced livecoding and fluxus, and then had a quick play with the groworld game prototypes.
On Sunday I tried some audience participation livecoding. I think it went quite well, people were playing al jazari quite happily from the moment I got it set up, so I never really got the chance to explain anything – but it didn’t seem to matter too much. I just joined in with them, first doing some classic fluxus livecoding using the sounds they generated, then accompanying them with scheme bricks and finally al jazari myself, where I messed around with the bpm a bit too much and broke everything (slightly on purpose…)
I’d like to explore this form of audience inclusive performance more, I think it could work better if I was more in an audience role myself and not a separate entity – there is a bit of a performer/audience barrier to overcome.
I’ve been a bit slack on the blogging front lately, but my excuse is that I’ve been doing a lot!
Firstly slub had a gig at the Slade Technology Faire where we were joined by Jamie Forth on supercollider percussion duties.
My favourite thing at futuresonic was Rob Bailey’s paper insects – there were 5000 of them swarming in the gallery, and every visitor was given one in their welcome pack as a free artwork. Following on from the environment theme, each one was cut out of last year’s futuresonic paper brochures.
Today is the TakeAway Festival at the DANA centre in South Kensington – and slub is performing to end the live events tonight. The gallery installations, which include Pitch control by Marcus Lyall and Evan Raskob continue for another week.