views:

209

answers:

5

I'm looking into playing around with procedurally generating music. I'm hoping to find a really simple API where I can just call out instrument, note, duration and string together a song (I'll take anything of course but that would be my preference). Does anyone know of any library that does this?

+1  A: 

It's hard to give specific recommendations, since you didn't specify a language. Most languages have a decent MIDI library though, that would be the first place I would look, unless you need something heavier than the MIDI format allows.

Chad Birch
+3  A: 

Your best bet is a music programming environment, of which there are several.

CSound is one of the best known ones. Here is their website.

Max MSP is also another widely used option, and it provides a visual programming iterface too. It is, however, commercial.

Another well known option (and widely used by experimental electronic musicians) is SuperCollider. This is its webpage.

Here's a wikipedia article describing similar languages/environments.

You can also use a general programming language with the right libraries to do audio/music work. Java, for one, provides the Java Sound API.

foljs
Good call on CSound, I had forgotten about that. I know BT used it to do one of the songs on his This Binary Universe album: http://en.wikipedia.org/wiki/This_Binary_Universe
Chad Birch
Max/MSP is sourced from Pure Data, an open-source project by Miller Puckette. See: http://www-crca.ucsd.edu/~msp/software.html
Alex Reynolds
A: 

You might want to look at Common music

PiedPiper
This is a common lisp implementation you are linking to. Nothing about music on that page. What gives?
foljs
oops wrong link: corrected
PiedPiper
A: 

Maybe Generative music is a good start. Googling leads a couple interesting links, too. Brian Eno created procedurally generated music for Spore.

lothar
+1  A: 

JFugue was developed specifically to support procedural generation of music. It's a free, open-source (LGPL) Java API.

David