We're getting musical instruments, generated by the game to accompany different cultures with different music styles. Watching that PAX video, the idea the host (Tanya X) had about wrangling some musicians to show off the generated musical instruments is actually not all that unreasonable. I love me some software synthesis.
There are physical modelling solutions to this - grab something like a drum, a string, and a woodwind simulation, and you're mostly already set. Hell, there's even an animal vocal tract sim or two out there waiting to be used for the game's generated animals (
Fauna,
Oscine Tract). Then there are other synthesis methods like subtractive, FM, etc that can achieve some things more directly. But in the spirit of DF modding, I'd like to suggest something a little bolder: exposing some parts of the game to actual real-life software synths like Skrillex and John Williams use through the use of the raws.
Doing this, you'd have to have a VST or AU host running alongside or within DF. That's not
too difficult (famous last words) - there are open source libraries for playback and patching of both. Linux's sound situation is shaky, but everyone with Linux knows that. You're more likely to find a usable AU library with it. I don't know about Mac - I think VST is more easily supported? Anyway...
By default, you could ship with a bare-bones subtractive synth that gets the job done - it might sound like horrible chiptune noise by default, it might even be turned off by default for that reason, but the idea is that each part of a generated instrument - from its overall size, to the way it's played, to how many strings it has, to whether it has a resonator and how big the resonator is - could be attached to a different output tag, and then patched through in the raws. By modders this would be with a bit of assistance from a DAW or plugin host to find the correct VST parameters (or AU equivalent - I haven't worked with it so I don't know). The modding could proceed like this:
[INSTRUMENT:STRINGS_COOLFX]
[TYPE:STRINGS]
[PLUGIN:VST:COOL_FX]
[PLUGIN:AU:DEFAULT] (Wouldn't select this plugin at all if VST support was disabled for some reason)
[STRING_LENGTH:VST:0] (the 0 parameter in the VST is now controlled by the length of the strings in game)
[STRING_POLYPHONY:VST:1]
[RESONATOR_NUM:VST:2]
[MIN:0:MAX:0.25] (minimum of 0, maximum of 0.25 - this sort of tag would be expandable to any other channel. Lots of VSTs only use numbers from 0 to 1 which would be a good default, some VSTs break that because the authors goofed off in VST school, and sometimes you only want a certain range of numbers if they go beyond what's reasonable)
[RESONATOR_SIZE:VST:3]
[CURVE:STEP:5] (Gives it a step-like number of values, like 0 - 0.25 - 0.5 - 0.75 - 1. The output now snaps to those values)
[CURVE:EXP:0.5] (averages with the previous curve, smoothing out the values of the steps so that it looks like a wavey line. No longer quite as snappy)
[CURVE:NEXP:1] (averages again with a negative exponential, and so on, to make increasingly complex modulations. All the cool kids in music use maths and modulation curves)
[SIZE:VST:3] (Parameters can be selected more than one time. Whatever curves they have are multiplied together, so you can have volume affected by more than one part of the instrument)
[SIZE:VST:4] (You can also assign a part of an instrument to more than one parameter of the synth)
etc.
[PRIORITY:2] (Could be used to decide on multiple STRINGS type instruments if the player had more than one floating around)
And for plugins:
[PLUGIN:COOL_FX]
[FILE:VST:"massive.dll"]
[PARAMETER:0] (selects the zeroeth parameter for modulation)
[CURVE:STEP:5]
[CURVE:EXP:0.5]
[CURVE:SUB:NEXP:1] (More curve-foolery can occur here for metacurviness of multiple instruments)
[FX:REVERB]
(yeah, I'm pushing it here, but potentially you could patch instrument plugins through effects (which also come in VST and AU) for extended musicality.
That's turning the game into a DAW in its own right though, since there are step sequencer effects, which would be really weird. DJ URIST IN THE HOUSE!! ok no)
So every time a game generates a stringed instrument (especially a stringed instrument with a resonator) it has a chance of picking COOL_FX to be its voice. The different parts of the instrument tweak appropriate parameters in the synth, and when a note is played by the wonderful (or not so wonderful) elven bards pestering your fort, a midi signal is sent to COOL_FX through the host, and you can then hear something almost, but not quite, entirely unlike a harp pushed out of a Yamaha keyboard from the 80s. But it will be
his harp...board.
I know this suggestion is goofy and frivolous. I know it might not be that interesting to people outside of music, and electronic music in particular. But when Tanya said she knew some musicians that might like to help, I just had to show how easily it could actually be accomplished, and with modding support to boot. Whether or not it's worth the CPU load (for reference, I could run almost all of the synths I use now on my old 3.06 GHZ P4), time invested to program, etc. is up to Toady, but it's not as inaccessible as you might imagine.