Tarsos
Tarsos copied to clipboard
Midi to wav attempts to unload incorrect SoundBank
https://github.com/JorenSix/Tarsos/blob/4b3f172314766f9d2ff85946f7c82d32e5d4b5a1/src/be/tarsos/midi/MidiToWavRenderer.java#L149
In the class MidiToWavRenderer when using custom SoundBank to create the wav file their is an attempt to unload the default SoundBank:
this.synth.unloadAllInstruments(soundbank);
soundbank
is the custom SoundBank and so will not unload anything. It also means the next attempt to load the custom SoundBank silently fails:
...
this.synth.unloadAllInstruments(soundbank);
final Instrument[] instruments = soundbank.getInstruments();
for (final Instrument instrument : instruments) {
synth.loadInstrument(instrument);
}
createWavFile(midiFile, outputFile);
...