i believe something similar may be reached with Lua itself: game events triggering pre-mixed instruments so, when some structure is build, an audio effect is played and a cello or french horn phrase is added to the music, etc. such phrase would already be recorded and playing along with the other audible instruments, but its level would be set at zero. Lua would "open" it — make it audible — only after some event was triggered.
That is exactly what I had in mind. I thought about coding it into the engine and expose it through our configuration files - which coincidentally are also in Lua.
now: on a negative side. more audio files translates as a "heavier" game for downloading and even playing, for more will be required from the audio board and CPU. but the benefits are substantial!
I have no worries here. Widelands is single threaded. All computers today have more than one CPU, but Widelands only uses one. We have plenty of resources (on other threads/CPUs) to use for extra decoding of music. Also download size: Music can and is already optionally bundled. For those that want it, it should not matter too much if the size increases a bit.
so, if the original composers allow me
Please go ahead. You do not require permission from the individual composers. That is the beauty of open source - people come, contribute something and eventually leave again. Others come and build upon the work of those that came before them. Everybody contributes their work in the GPL license, so it can be taken, improved and recontributed. Please take any music from Widelands you like and propose improvement!
The music contributors that came before you put their source files into source control in the media repository. Maybe it helps you get started quicker. Please think if there is a way for you to also contribute back the "source" of your music for easier future changes. This has been notoriously difficult for graphics and sound in the past - source code is so much simpler to share and archive