Clojure in Berlin

Clojure in Berlin #

Though I had the chance to tinker with some Clojure code only briefly it’s programming model and the resulting compact programs do fascinate me. As the resulting code runs on a JVM and does integrate well with existing Java libraries migration is comparably cheap and easy.

Today I finally managed to attend the local Berlin Clojure meetup, co-organised by Stefan Hübner and Fronx. Timing couldn’t have been much better: In this evenings event Philip Potter from Thoughtworks introduced Overtone - a library for making music with Clojure.

After installing and configuring jack for sound output, supercollider, and overtone outputting your first tone is as simple as registering the overtone library and typing

(definst foo [] (saw 220))

To stop it type (stop).

Other types of waves of course are supported as well, so is playing different waves simultaneously and modifying them at runtime. Also expressing sounds as notes (c, d, e, f, g) that may have a certain length is possible of course – which makes it so much easier to design music than having to thing in frequencies.

A sample of what can easily be done with Overtone: