I remember trying to script a simple music system that would do just that, but also had subfolders for each type of music - action, suspense, retreat, defeat, etc... - and would randomly select from any music files in there. The idea being that you could chuck in any MP3s you wanted, and they'd become part of the game music.
For example:
data/sfx/music/klingon/suspense/
would be one of the paths it'd randomly play a file from.
Unfortunately, I knew too little of scripting back then. I know a tiny bit more now, but I don't have anywhere near the patience I used to. That's probably why my biggest contribution to the scene in the last few years is the wormhole model in DS9FX Xtended.