Game Music

Blitz3D Forums/Blitz3D Programming/Game Music

Black Hydra(Posted 2005) [#1]
After reading several articles on progressive musical techniques in game, more specifically adaptive music, I started looking into whether this would be feasable to try to attempt in my game.

I make all of my music in a tracker program (.it, if it matters). Seeing as the way these files are structured, with patterns and samples. One would think you might be able to use some external commands to set the music to a specific pattern sequence in the module.

This way I could jump between music styles depending on where I am in the game.

Seeing as I don't see any of these commands on BlitzBasic's command list, is there a dll file that would allow me to have more complete control over my modules?

I really like the idea of adaptive music and I don't want to abandon the idea unless I know it is completely unfeasable.


Rob Farley(Posted 2005) [#2]
You can't do this in blitz natively as you don't have control over the patterns. You'd need to write your own tracker to do this. I did start writing one a while back but didn't see it through, but the idea behind it was so exactly this sort of thing could be achieved.

You'd need to use a DLL as you mentioned to control this, no idea which one, but you might want to look at the bass.dll however that has a fee attached.


Sledge(Posted 2005) [#3]
I wouldn't advise rolling your own tracker in Blitz... just try altering the pitch of an instrumental sample to hear why not.

People have been asking for pattern jumping (which is part of FMOD so, technically at least, comparatively trivial to add... maybe it's a license restriction?) for ages but it never appears. One (wasteful, where shared instruments are concerned) solution is to use multiple mods but, as you'll know, you can't hold mods in waiting in RAM for instantaneous initiation in Blitz; instead you tend to get a pause as the file is loaded in fresh. However it has been suggested that loading all the modules you'll need before starting a level can ensure they're in the cache and thus minimise this glitch - might be a compromise, but it's worth a look at least.


Black Hydra(Posted 2005) [#4]
Hmmm... I've decided that, at least for this project, using adaptive music won't be feasable. Perhaps when I have a bit more resources at my disposal I may attempt it, but it seems it will be more hassle than its worth right now.


EddieRay(Posted 2005) [#5]
You my try a general strategy of making small "song files" on the fly and passing them to whatever system you use. I guess the system would just need to be able to queue up a song ahead of time and play it immediately when the currently playing song ends. If the songs are something like one measure each, you could vary the score enough (on a nice beginning-of-the-measure boundary) to match the game mood as it changes.

If you record your songs into loops (little WAV files for a measure or two or four each, that seamlessly fit to the next section), you could actually play them simultaneously during a change in mood and cross-fade them by volume change.

Just some random thoughts... hope it sparks something for you.

Ed