Hi!

Am 18.10.19 um 20:48 schrieb Tom M.:
> You see, if you want to use fluidsynth for SFZ, it is not done by just
> implementing a new soundfont loader. Instead, it would require a whole
> user application that treats MIDI events according to the SFZ spec.

Ah, right, that is a good idea how to solve my problem. I've now ported
my code to be a jack client and react to the midi events. This allows me
to execute custom code for note-on/note-off/cc events. So instead of
implementing a loader, I now handle the midi events myself and start new
voices and release old ones as needed.

To test this, I've now implement loop_mode=one_shot (often used for drum
samples), which doesn't release these regions on note off. So spawning
new voices on note off/cc should now also be possible.

There is a minor issue with the fluid synth public API here, which
allows creating new voices (fluid_synth_alloc_voice and
fluid_synth_start_voice), but there is no corresponding public API to
release a voice, which is needed for implementing note_off. So right now
I implemented fluid_synth_release_voice in my own fluidsynth repo.

https://github.com/swesterfeld/fluidsynth/commit/e2963c9227072384ed805c904300ee308c0674ee

It might be reasonable to wait for a while to see what else could be
needed before merging API additions upstream.

   Cu... Stefan
-- 
Stefan Westerfeld, http://space.twc.de/~stefan

_______________________________________________
fluid-dev mailing list
fluid-dev@nongnu.org
https://lists.nongnu.org/mailman/listinfo/fluid-dev

Reply via email to