Musical programming and languages

Over on Slashdot I saw a thing about a guy hacking Perl in a live musical performance, and it got me wondering again if music and programming can be fused even more tightly, so that code itself is musical?

Being something of a geek for obfuscated languages, I wrote one of my own called SC5, which is based upon the simon-says dance commands from the video game "Space Channel 5". The idea is that the same program text can be executed as an algorithm or performed as a rhythmic piece (as in the game). Unfortunately I haven't yet written an interpreter that will perform SC5 code musically but theoretically, anyway, it's possible.

Anyone else interested in this sort of thing?

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Yup

I designed a musical DSL once and actually used it. It was basically a grammar formalism with special features just for music. One thing for example was the ability to specify different rules to be picked for generation based on probabilities, and then to constrain this randomness by making it the same from certain parent rules. This allowed you to specify certain variations in the music.

It was implemented in another of my languages, E, and compiled the grammar spec to "protracker" .mod files, including all samples specified, which was then launched with a player. Fun to play around with :)

Choon

Check out Choon.

Choon is an esoteric programming language.

Its special features are:

  • Output is in the form of music - a wav file in the reference interpreter
  • There are no variables or alterable storage as such
  • It is Turing complete

Lots of DSLs for making music

I'm note sure that this is exactly what you mean, but there are a lot of DSLs for generating music.

In the lisp world you have the "Common" family ( Common Lisp Music, Common Music) and my favourite for conventional music is compo.

For haskell fans like me haskore is just brilliant.

I've also used midge which although quite hacky (it's perl) is useful for simple tracks.

For me, the strangth of systems like haskore and compo/cm/clm is that they not only give you a nice DSL, you have the full power of the core language at your disposal.

The Well-Tempered Object

... is the name of a very good book on using Smalltalk for music by Stephen Travis Pope.

Thanks, guys....

Of the languages listed, Choon is most like what I was talking about. Though I now have enough interesting links to satisfy my computer-music geekiness for a while. :)