PDA

View Full Version : implementing interactive non midi based music


magates
09-30-2006, 02:12 PM
I'd like to start a thread to discuss this. I am a composer and I really like the music to react to the game. The issues are many. I have recently done several interactive cues that aren't midi. The way I did it was as follows.

First I created a piece with 4 distinct musical "layers" the first layer being the most bare (least intense) and the 4th being the most intense - reflecting a wounded status in the game. The challenge was getting each of the 4 layers to have enough elements added to it so that it was a noticeable change while having the 4th layer not be overbearing and the first layer having enough material.

Next I took the 4 layers from start to finish and cut them into "chunks" about every 30-45 seconds. Because we don't have a way to implement cross-fades I built the cross-fades into the chunks so they could be played consecutively in any order of layers (the always have to be played in the same order of "chunks" though obviously) - although an ambient piece of music could possibly even have unique chunk order. Most of my music is not ambient however.

I'd love to hear how other people do interactive music and critiques of the way I did it this time. (interactive midi music is much easier and another topic all together).

undersan
09-30-2006, 03:58 PM
As far as constructive criticism, I think you need a way to quickly increase intensity, like when the player is wandering around and suddenly encounters an enemy.

My other criticism is more of a question. So, you've taken a piece and arranged the entire piece at 4 different intensities. I'm guessing this is orchestral. Doesn't the original piece already have intensity changes? Ya know, it starts out quiet, builds up to a crescendo, then goes quiet but tense for a while, etc. So, doesn't your layer 1 arrangement just end up being a loop of that early quiet part? And the layer 4 arrangement just a loop of the crescendo part? Or how do you avoid this?

Here's what I'm doing in my game:
1. I find and license a track, probably electronic, probably something I heard on Digitally Imported or whatever.
2. I try to find about 4 loopable chunks (within the track) of varying intensity. The chunks have to "match up" such that one can cross-fade between chunks at any time. This has worked out so far, since most electronic music is just repetition with different combinations of instruments, without key changes, tempo changes, or time signature changes.
3. I save each chunk to a separate ogg file.
4. In game, I play all 4 chunks (looping) simultaneously, using volume control to select which chunk I want the user to hear. Volume control is also used to accomplish the cross-fade. The big problem here is CPU usage with 4 simultaneous ogg streams. If I could start and stop chunks as needed, I'd only need 1 stream (or 2, during the cross-fade). I haven't figured this out in fmod yet, though.

magates
09-30-2006, 05:04 PM
Yea, quick changes are almost impossible to do and have them be musically satisfying (to me). The way it's usually done, as you are doing, is quick fades in and out of pieces. It's just something as a musician I'd like to avoid because even if it is planned out well it's never perfect. (and yes it does work better with electronica or ambient cues) The way I have done it the music can react on average within 15-22 seconds of an event (because on average you will be 50% of the way through a chunk when a event happens) - and the change is something that's perceptible but not something that draws attention to itself like fade outs and fade ins do. In this case it wasn't something we needed to do instantly anyway. This way also only needs one .ogg at a time to be streaming (I believe, 2 at the most and then only briefly).

Of course there are times when you need the music to react instantly - but I haven't worked a musical way to do that yet.