How about adding different 'moods' of music to SoundSense? You could tag music with, for example, [battle], and if certain conditions are met - a certain amount of battle-related messages within a short time - it'd play battle music. Maybe even with mixed tags, so a [battle][winter] music would play if there's a battle going on in winter.
Another idea I had was to have beginnings and ends to looping sounds, so when it starts it'll first play the beginning, then loop the body of the sound, and when it ends it'll play the end bit before stopping. I don't know if it's possible, but being able to tell SoundSense to fade in or fade out a looping sound over a certain amount of time would also be nice. That'd make for a less jarring start and end of a looping rain sound.
First one: That basically requires app to understand state of game and do a bit more processing than "dumb" log reading and matching patterns.
It is possible to some extent with resolvable issues: For example, if you are ambushed, you want to know when ambush is done with to stop combat sounds; you can get rough idea from cancel job/combat messages spam, but you can very well sound end of battle because player paused game and combat messages stopped flowing.
Seasons are great for this because you have clear indication when it ends and starts and such state is easy to manage, ditto for moody dwarves or caravans, but "being in combat" is not really well defined.
This is where i would like some enhancements:
Log messages relating to, for example, all ambush squads being eliminated, mega/forgotten beast being downed, etc ... would go a long way towards this.
---
As for looping, yeah, it is possible to have warmup/cooldown segments.