Lee Goddard .net — another boring personal homepage

Zen and the art of ....

Generative Sound With L-Systems

L-system Tree
Lindenmayer tree,
A → AB, B → A.

Computer-generated music has been an interest of mine since dissing it at university in 1999, where I took a course called AI a and Creativity with the inspiring Maggie Boden OBE. However, despite the clever psuedo-music and clichés of Garage Band and Baysian networks, I have found all attempt at human-sounding music to be depressingly emotionless, their lack of lyrics and lyricism removing them far even from the song machines of Orwell's 1984.

But I have always been fascinated by the idea (shared by Kandinsky, Klee, Victor Pasmore to name three of my faviourites) that paintings and images could be rendered as music, so when I cam across the extremely simple Lindenmayer System, the music application was obvious and irresistible, and the first prototype created within a day.

The appeal of the equation, generally used to model plant growth, is its simplicity, as this rough graphing demo illustrates. Without simulating varying soil, light, and weather conditions, growth is unnaturally regular, but the instantly familiar shapes produced by equations of as few as four bits encourages me to think Lindenmayer et al were closer to discovering some secrets of creation than anyone. But that's another subject.

L-system Tree
Sierpinski Median Curve, twice L → R-F-R+, R → -L+F+L-

As for the qualities of the 'musical' output, it depends on your taste, and how you imagine a plant might sound. To my ear, it is often reminiscent of Terry Riley's dervish music, and thus to Acton's own The Who's tribute to Terry Riley (and Avatar Meher Baba), and thus Talking Heads' Once In A Lifetime.

The two above sounds combined:

My current system is a mixture of HTML5 vanilla.js, with the binary midi files being encoded by old-fashioned Modenr Perl 5, with Moose (using MIDI-Perl kindly dontated to the world by Sean M Burke). The resluting MIDI file is the imported into Logic Pro/BitWig/Sonar, and mastered through a Yamaha 01X and a variety of synths and samplers.

However, my work has been moving towards landscapes of Lsystem 'plants,' which would push my current paradigm to the limit, so a rewrite is planned that would allow live alteration of a loop, which could be interesting for performance, especially if the alterations were genetic algorithms linked to the performance space, or bio-feedback of the performer.


I am usually looking for three- to six-month contract, anywhere a British citizen can work — I frequently work in my native London (freeloading on my kind family), but would welcome the change to work anywhere else at all. I am happy to work with Perl in any form, or Java (though I have yet to take a Sun/Oracle certification), but I am especially interested in HTML5 and advanced OO JavaScript, maybe using Angular or Backbone, with or without jQuery, and real-time work with HTML5 audio, Web Audio API, SVG and canvas manipulation. Ideally I'd like to be serving in Node.js — I've lots of non-commercial experience, but have yet to take a commercial opportunity — they are still relatively few, let alone in an Agile environment with dev/CI/stage VMs managed through Jira.

In the past year or so, I have been focusing my free time on using and improving the Node/HTML5 L-systems audio, described above. Personal projects include Freedharma (Backbone), an SPWA to create video subtitle files in real-time (Angular), Plonk, a (Web Sockets/Audio) rip-off of Plink, a collaborative music doodling tool, a bit like the silly brush toy which you can see in the Zen section above. From the server's point of view, it's just a chat server, for the client is a kind of musical etchasketch. It does demonstrate the power of WebSockets and weaknesses of the HTML5 canvas element. Perhaps I'll write an article. I'd let you see it, but what ISP supports WebSockets?

When Mozilla eventually completely fixe their HTML5 audio looping bug, I hope to continue development of a simple HTML5 multitrack that allows the mixing and looping, cutting and pasting, of SoundCloud and other online audio files, in the style of Logic/Cubase.

Latest Scribblings

JavaScript, Work: Ionic, Cordova, Android

The Ionic docs describing development on Android are a bit out of date. These steps worked for me on Windows 10. Assuming Java, JDK, and Ant are installed with `ANT_HOME` set to the directory containing `bin/ant`, and `JAVA_HOME` is set. Install Android Studio. Run Android Studio, select the `Configure` drop down, select `SDK Manager`, use it … Continue reading Ionic, Cordova, Android


Enso: Enso 2015-07-04/01

Enso 2015-07-04/01 was created in Photoshop using a Mac Book Pro track pad. Photoshop is not just about airbrushing products and models.


Work: Credit Card Details Storage

Avoid liability: why not  encrypt them and have the client store them for latest display and stateless use of the serer? Probably because all forms of local storage are an out-of-sync mess (no pun intended). Perhaps Mozilla’s localforage is the answer? Though not through its messed-up Backbone ‘driver’.


JavaScript: Parametric L-system — CommonJS in Browserify

L-system 'X -> C0FF[+X][-X]C1FC2X; F -> FF'

Ported the core of my L-system work to user Browserify through CommonJS — much nicer API than AMD/requirejs. Not sure I’m keen on exposing node_modules, though.


Life 3D

This verseion of Conway's Game Of Life works in 3D, but I've not yet had time to find some goods seeds.

I'm curious if the shapes can make interesting sounds.

(Drag, click-click, to control pan and zoom.)