I've had this idea for music in DF floating around in my head for quite a while. In my opinion, it would very elegantly fit the DF world and engine.
Imagine music that is automatically composed and played, and its tone and mood depends on what is happening on the screen. Hang on, this is not nearly as crazy as it sounds.
The whole idea is based on generating data from cellular automata (Wikipedia article if you know your maths ) and converting it into music, for it to be then played in-game (using MIDI).
If you don't know already, computers are already able to produce pretty convincing pieces of music. A very effective and convincing way to do this is to translate data generated with cellular automata into notes.
How does that sound ? Check out this in-webpage automatic music composer : http://tones.wolfram.com/generate/advanced.html
The About and FAQ pages contain instructions and insight on how it all works. Be sure to mess with the settings a bit.
Fully random compositions (by clicking on a style) is pretty spectacularly hit and miss : sometimes you get surprisingly good stuff, sometimes more inharmonious and "weird" music.
Better yet, the diversity of styles of music you can get is really high. I have come across fugues that you would mistake for Bach's or caprices straight out of a Vivaldi sheet. I like the classical music generator, but pretty much all styles of music are successfully covered in the generator.
I think using too many instruments give mixed results because the whole thing becomes too random to be able to keep consistence and coherence. Limiting what's going on and choosing simple scales and modes often yields surprisingly good results.
Try going manual and choose the instruments, tempo and scales yourself. For instance have just a cello playing lead1, a piano playing lead2, select the minor scale, and a slow tempo. Play around with the rule type and seed : instant music with actual character and mood !
Starting from this, it is conceivable to have in-game events or conditions summon mode/scale/tempo/instruments changes. For example you could have just a single cello or guitar playing a downtempo melody in a minor(sad) scale in a cold and eventless winter, or have a violin play a short uptempo major(happy) melody (something like a caprice) when a caravan arrives with goods. When a goblin army arrives to siege your fortress, a full blown orchestra with the right settings could be used to indicate tension/action.
You could have several factors affecting the generation, such as the general mood of your dwarves, or the fact that you are losing or winning a battle.
This is a pretty much a you name it thing, sky is really the limit here.
I don't know just how hard implementing this would be. This page offers some insight, with some practical examples and applications. http://www.ibm.com/developerworks/java/library/j-camusic/
What do you think ? It definitely deserves some thought. I believe this is absolutely revolutionary, doable, and would fit Dwarf Fortress like a glove !