LPW 2007: Doing music in Perl

jns on 2007-12-03T09:49:22

Saturdays LPW was all great fun and I think everyone enjoyed themselves. Thanks to the organizers and the generous sponsors for an event that will be remembered (or not depending on how long one spent in the pub afterward.)

Anyhow for anyone who might have missed my lightning talk or wasn't sitting in the front row and hence couldn't hear anything then I have put up a recreation of the output at WhenTheLouieBreaks

I say "recreation", but I simply used versions of the same programs I used modified to output to WAV files rather than directly to the soundcard and mixed these down in the wonderful Linux DAW Ardour. The only difference to what you would have heard is that there are some fades and the relative levels of the sounds have been tweaked: otherwise all the sounds there have been generated in Perl programs (with the obvious exception of the drums but the loop itself was performed by a Perl program.) Oh and due to feedback I omitted the Louie Louie samples as the reaction to them was somewhat, er, mixed :-)

In case you are interested to see exactly how this was achieved then the original programs are at: http://www.its-going-to-be-fabulous.com/music/jns_lpw_20071201.tgz I haven't included the samples I used lest the BPI slap a writ on me.

I've got a few ideas about taking this stuff further, including creating an interface to enable output to the wonderful JACK and thus enabling it to be routed to, say, Ardour (or used as an insert therein,) Creating a "softsynth definition language" which builds the LADSPA networks for you, MIDI or OSC input for control of both notes and parameters and a more complete pure-perl sequencer. This all of course depends on my finding the tuits, but the idea is nice :-)


cool

slanning on 2007-12-03T10:32:51

Really awesome, looks fun. :)

I've had some kind of interest in generating music programmatically for at least 10 years, but it's one of those things that I never get around to. Plus it seems so complicated, and probably I'm not really creative enough. (Like with the thing Ardour, that looks like it would take a good bit of effort to learn.)

(I made a Perl script a few years ago to play an Etude of Chopin's that I copied the notes from out of a book by Douglas Hofstadter. It only used the Linux console bell (escape sequences), varying the pitch and duration, and anyway not nearly as cool sounding as yours. (Depending on what you find cool. :) )