Friday, February 17, 2012

Randomness is not creativity

If you ever come across a system that purports to be creative but, under the hood, it's driven by randomness, it is not creative. Randomness is a stand-in for creativity, a shortcut because we don't always know what it means to be creative, or what aspects of a topic a system can be creative about. Bach's "Musikalisches W├╝rfelspiel" - sorry, not creative. Well, Bach was creative in composing the piece - fun idea (and I'm convinced that Bach would have loved JFugue), but the music that comes out of the game does not have any special creativity more than its initial creation. Aleatoric, yes. Ah, aleatoric - a more beautiful way to say "random."

Okay, now that I've put that in the open, let me state that, in the interest of science, you may see me produce some music that does use randomness as I seek to discover what those aspects of musical creativity this generative system can be creative about.

Look at you, watching science in the making. Isn't this fun?

Experiments with generative beats

One of my goals is to create a fully generative radio station that people would love to listen to. So much research into generative music has focused on classical and jazz composition. I'm aiming more for rock, pop, hip hop, and electronica.

I've been putting a lot of thought into how a computer program might generate decent music. Part of this has involved hours listening to the structure and composition of modern music to figure out what makes it tick.

Without making too simplistic of an assumption, a lot of music is a unique combination of simple elements. For example, the basic beat of most music is rather simple. There are notable exceptions - see Rush and Red Hot Chili Peppers for examples.

Many 4/4 beats fit use the template "1 and 2 and 3 and 4 and", where the 1 and 3 beats are frequently bass drums, and the 2 and 4 beats are often hand claps or something lighter. There are switch-ups to this pattern, for example the addition of a cymbal crash or the lack of 2, 3, and 4 beats. And, there are stylistic tricks like turning a single bass strike into two quicker strikes (is that what drummers call it when you hit a drum? My music vocabulary lags my experimentation)

I've hand-programmed this into a JFugue Rhythm. I still have such a fun time with the Rhythm class in JFugue:
Rhythm r = new Rhythm();
//             1-a-2-a-3-a-4-a-
r.setLayer(1, "Q ....q.q.......");
r.setLayer(2, "....H ......H ..");
Where "Q" and "q" are bass drums (eighth and sixteenth durations), and "H" are hand claps (which are specified by calls to r.setSubstitution() that I've left out of this example for brevity).

And this one, as an alternate (OK, what do real musicians call that?):
//             1-a-2-a-3-a-4-a-
r.setLayer(1, "Q ....q.q.q.....");
r.setLayer(2, "....H ......H ..");

And this one, as a switch-up (again, vocabulary):
//             1-a-2-a-3-a-4-a-
r.setLayer(1, "Q ..............");
r.setLayer(2, "....H ......H ..");

You can listen to a composition of these beats (decent automated composition is another aspect of my generative music experiments - but I'm not focusing on that today).

The question I'm trying to figure out is how a program would determine that this is an acceptable, good-sounding beat. It could be that a program simply has a huge list of acceptable beats; my shock at how modern music borrows from other music certainly demonstrates this as a valid, if disappointing, approach (see WhoSampled's "The 10 Most Sampled Breakbeats of All Time"). But there's also something of a heuristic in here - the ability to turn a single long beat into two quicker beats, for example.