Articles

The Beat Goes on: Dynamic Music in Spore

By now you may be familiar with Spore's unique method of generating content: Procedural content creation allows for players to dream up nearly any type of creature, and the game will figure out how to animate it and wrap textures around it on the fly. We've all seen the graphics in action, but what about the music? It may surprise you to learn that the music in Spore is also dynamically generated in real time.

The design team partnered with legendary ambient musician Brian Eno to give Spore a uniquely flavored soundtrack. The dynamic music is especially prominent while users are using the editors to create content -- since the game isn't running any simulations during that time, there's plenty of processing power available to create some funky beats.

Sound engineers Kent Jolly and Aaron McLeran walked attendees of the 2008 Game Developers Conference through the process they used to create the dynamic tunes. Much of their talk was fairly technical, but the process itself is fascinating.

The team used a special version of a software tool called Pure Data (or Pd), customized by Electronic Arts and affectionately called EAPd. Pd has a graphical interface that visually shows you events that can be linked together with lines, creating a kind of flowchart to describe how sounds are created. Jolly gave a quick demonstration of how to create a nifty conga drum loop: Gather together some drum samples, use a metronome routine to trigger off a random drum every beat, and loop it every eight beats... presto! Instant drum loop. This was achieved with only a few boxes in Pd.

Jolly loaded up another example that had four different drums, all running the same routine. One touch of a button and he had an instant rhythm section. By changing the random number seed he got a different rhythm every time -- he showed off some random seeds that he thought sounded particularly groovy.

Of course, random conga drums are just the start. What about actual musical notes, with pitch? Rhythms? Harmonies and counterpoints? This is where Brian Eno stepped in and spent a week working with the team, experimenting with different sounds, and really trying to push the envelope. On the first day he and the team uploaded tons of samples and programmed the system to randomly string notes together. They spent the second day teaching the system to filter notes into scales and modes, so that it started to sound like music instead of noise.