Kanagawa wave

Live-coding in Haskell with Dirt and Tidal

I am not a programmer and probably never will, but I like to think of myself as someone who tinkers with everyday tools – tools like a computer. I use my computer for a lot of things and especially for playing with music software. My favorite toy when I was a kid was a toy laptop that had a BASIC editor and I had tons of fun with it (thanks, GrandPa!).

Read my rant

My first introduction to live coding was this screencast by Yaxu (aka Alex McLean) using the Haskell language and what he was going to call Tidal (a frontend to the Dirt sampler he was making). I was hooked. It was intriguing, the sound was interesting and yet I could not figure how it was produced – all I saw was a sequence of command-line blobs and bits of code describing a score that I could then hear. And then I realized I had to embrace my computer for what it is. The quality of sounds that comes out of it is what makes it musical; digital supposedly sounds cold and I should stop fighting this cold and use that quality in a musical way instead. A couple of months ago, I began researching this live-coding thing and trying some software to make music in an usual way. This was also a period of my life when I listened to a lot of noisy digital pieces by people like Muslimgauze.

First up was SuperCollider. It’s a language, a sound server and now even an IDE. It’s probably the most complete and versatile piece of sound software I used. The learning curve is steep though and I only just figured how to sequence actual notes two months ago. Then I tried Pure Data. It’s yet another paradigm, borrowing from early modular synths and basically just consists in boxes that link to one another in order to make a synth, a sequencer and whatnot. It’s also fun and very complete and looks a lot like Max/MSP (it was in fact developed by the same guy/genius, Miller Puckette). Then again its complexity makes it hard to get instant gratification. And the same thing could be said of other environments/languages like Fluxus (for video purposes). Those are tools mainly developed with programmers in mind, not musicians interested in new ways of making music.

Instant gratification?

That’s something Yaxu’s Tidal has no problem offering. It’s very easy to install and use and results are quickly interesting, with a bit of practice. It’s also a really fun way of describing patterns and modifying patterns on the fly with some effects and transformations that can be applied. It reminds me a lot of Ixi Lang in that regard (unfortunately only available for OS X).

One of the best parts of that software is that it does not require you to be a programmer to use it. Of course it helps to know your way around a command line interface or your Emacs editor (the only way to use Tidal as of now). But my total lack of Haskell skills never was a problem when using Tidal – thanks to the great documentation Alex is maintaining. It really is that simple. For instance, I would play a (somewhat lame) cover of Plastikman’s Spastik with this few lines of code:

and make all kinds of transformations using effects like digital distortion, granular effects and cutups to the sounds on the fly.

My favorite is the striate function: it cuts samples into pieces plays them back in a stuttery way. Another favorite of mine is the vowel formant filter that makes everything sound roboticly awesome.

Should you want to give it a go, the code is here and fairly simple instructions are available for OS X and Linux installation.