Closed Tails closed 2 months ago
Thanks for the comment 😊
Regarding the support for multiple SF2 files, I have no plans to implement this functionality, as I want to keep the API simple. However, it wouldn't be difficult to modify the library to add such functionality.
For instance:
Currently, a Synthesizer
holds only a single Arc<SoundFont>
. This could be changed to hold multiple Arc<SoundFont>
s.
Synthesizer
uses an internal look-up table called preset_lookup
to identify the desired preset-ID in an SF2, based on a combination of bank and patch numbers. This could be modified to look up a combination of SF2-ID and preset-ID.
Finally, in the note_on
function, obtain both SF2-ID and preset-ID from the look-up and use that SF2 to start the voice.
I hope this is somewhat helpful.
That's great, thank you! I'll have a stab at it when I start integrating.
Hi, thank you for this great work! I have been waiting for a proper Rust SF2+MIDI synth. It will be perfect for parture.org
Would it be possible to assemble a synth from multiple individual instrument .sf2 files? That would allow only loading the neccessary instruments for a piece instead of a potentially large .sf2 that covers the complete General MIDI.