For playing music lists in the background, I generated a
recursive script that works in combination with a column I added to the ambientmusic 2da. The new column contains a number which represents track length in seconds.
The music that I am using in Arnheim is available on the Vault, although to get the 2da you'd have to dig through Arnheim's core content which is currently only on the Nexus (I'll get to cross posting someday, promise!) The only reason why you might want to do this is that I entered all the lengths of the Wyvern Crown music tracks, which in my opinion are amongst the best music that vanilla NWN comes with.
Nevertheless I don't think any of that addresses what Archer is looking for. Back in Vives - circa 2006 - Veran and I riffed on the idea of recording mono sounds that could be used in a dynamic music system. We are both musicians, I apretender, and he the real thing. The idea was primarily his while I was his sounding board, and talked it out with him. Anyway, it never came to anything. The idea was that you could record chords and short phrases in various keys on a variety of instruments. Each of these sounds would have the same length, and follow a naming convention which would work well with scripts. Once these were rolled up in a HAK, a builder would create a script that would enable a player to access the music through chat commands.
I think this is the closest the game can come to enabling a player to generate a musical performance in game. It would require a large number of files. You'd need a number of various chords, and then a number of phrases in various keys and each key with various modes. That would cover stringed instruments. For horns, you'd focus on phrases. You could ofcourse simplify it all if you just did notes, but the game interface is not smooth enough in my opinion (as well as his) to enable this.
If you have these sounds already, it would be simply a matter of formatting them and putting together the system. Of mor eimportance would be making the right choices about which chords and phrases you include.