Traditionally, the different musics for those different "states" are changed simply by crossfading (fading first tune down and fading second tune up). This is quite boring and in many cases, it doesn't sound very good.
I have long time ago had an idea how these music state changes could be done seamlessy without a need for any crossfading, but that the song could actually envolve into another song. Imagine a simphony with a slow start with just some strings and which quickly envolves into a mass orchestra piece.
Before I represent you the idea, I'll quickly describe what tracker music is.
Tracker is the generic term for a class of software music sequencers which, in their purest form, allow the user to arrange sound samples stepwise on a timeline across several monophonic channels. A tracker's interface is primarily numeric; notes are entered via the keyboard, while parameters, effects and so forth are entered in hexadecimal. A complete song consists of several small multi-channel patterns chained together via a master list. http://en.wikipedia.org/wiki/Tracker
The trick is the following:
Create a simple statechart which contains all different music styles needed in one scene. Geoscape would be a good example of "one scene". The geoscape would contain the following different states (note that my ideas WHAT the music of those states are just my own examples and not to be taken seriously):
1) No UFO's on the globe (some slow ambient music, maybe)
2) Ufo(s) are flying on the globe (a bit faster ambient music with a bit of agressivity)
3) Interception of an ufo (some fast and agressive rock/heavy quitar tune)
This statechart would contain the following state changes:
- 1 -> 2
- 2 -> 1
- 2 -> 3
- 3 -> 2
Now compose all those three different music tunes into one tracker module file (like .XM or .IT). Then also compose (at least one pattern long) translation patterns, one for each state change (like a pattern which translates music (1) into music (2))
Then the music engine can be programmed so, that when it's (for example) playing tune 1 (the ambient background tune), and it receiveres an event which tells that there's now an ufo on the globe, the music engine schedules the translation pattern 1 -> 2 to be the next pattern after the current one. This means that the current song is stopped after the current pattern and the translation patter is played immediatelly after the current one. After the translation pattern is done, the music engine schedules the patterns of tune number 2 into the master pattern playlist.
- No need for simple crossfading to switch between two different music
- A good (as the translation from one to another has been composed into the beginning to be a part of the song) switch from one song to another
- Need to compose music into tracker module format (for example, .XM or .IT)
- Additional work to create the translation patterns and statecharts
- Additional work as it needs to think a bit how the individual sounds are arranged into the tracker channels to allow easy writing of translation patterns.
Please tell what do you think or ask for details if you doubt that I couldn't explain myself clearly enough. Technically I believe that we can use FMOD Ex to support all this with minimal additional coding.