14

I'm looking into playing around with procedurally generating music. I'm hoping to find a really a 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). Is there any library that does this?

1
  • I am impressed to see that a question like this one is not down voted and not flag like "Questions asking us to recommend or find a book, tool, software library, tutorial or other off-site resource". If the author had 1 reputation point, I'm sure everyone would have told him to ask his question on StackExchange instead
    – GGO
    Oct 12, 2017 at 14:31

5 Answers 5

8

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 interface 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.

2
3

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

2
  • Anyone know of any non-LGPL options? Jul 24, 2014 at 17:05
  • The newest version of JFugue, now in beta, uses Apache License 2.0. Jul 29, 2014 at 2:28
1

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.

0

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

0

You might want to look at Common Music.
It's a music composition system that transforms high-level algorithmic representations of musical processes and structure into a variety of control protocols for sound synthesis and display

1
  • 1
    This is a common lisp implementation you are linking to. Nothing about music on that page. What gives?
    – Hejazzman
    May 11, 2009 at 22:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.