It seems to me the music on each mission directly relates to the map that is loaded.
I can see why for some missions a specific music track would be required but then there are "generic" maps that any music track would work on.
For example, an underground cave map might work with a spooky, dark, dripping atmosphere so it wants its own music. The final map in the game would have its own music.
An aboveground forest would work with any combat sounding music...
We could have 2 groups of music:
1: General music - for any map
2: Specific music - unique to a map (defined during map compile).
This would require a little bit of coding, I've been looking through the code and I think the music is chosen in worldspawn, on this line:
gi.configstring(CS_CDTRACK, va("%i", ent->sounds));
but a simple check ie:
if (strcmp(ent->sounds, "anymusic")
{
//logic to pick a random "General" music file
//Option 1: Scan the music resource path, generate an array of all music tracks and pick one at random
//Option 2: A global resource is defined with a hard-coded array of the general music tracks that can be chosen, this code picks one at random.
}
else
{
gi.configstring(CS_CDTRACK, va("%i", ent->sounds));
}
Anyway I've only had a quick glance at the code, so forgive me if I'm barking up the wrong tree, but I do believe in principle that some maps would work well if the music changed each time, to add some variety to the game.
edit:
This idea could be expanded upon. We could have groups of music, ie:
Alien Base
Cave
Forest
City
Generic
With the code selecting a random track from the above groups unless a specific track is asked for.
Anyway it's just an idea, and I know you all have enough work to do, but in principle what do you think of the idea?