Dear Tom,
thanks for the quick answer to our question. I will go with the option
of using a single synth with 256 MIDI channels.
As I now got this out of the way new questions arose:
1. Is it possible to create multiple audio-drivers for a single synth
(One for Audio + One for wav-rendering)?
2. Is it possible to have effects without using a sequencer (if I don't
use a sequencer or don't send a sequencer-reverb-send-event I do not get
any effects)?
3. Can mutliple MIDI Players fade into each other using a single synth
(e.g. In the last ticks of the played MIDI File one player gets more
quiet, while the other is getting louder progressively; my solution
would be to use 2 synthesizers and changing the respective gains of the
players synth)?
Thanks in Advance and best Regards
Tim Heitkamp
On 2023-01-09 11:29, Tom M. wrote:
No, it's not possible for multiple synths to share a single sequencer.
Each synth needs it's own sequencer instance due to the internal
sample timer making the sequencer advance (*).
It's not exactly clear to me what you mean by "shared MIDI-Channels".
Yet I think it should be possible to do it with a single synth
instance. Just "invent" additional channels. E.g. if you have N
tracks, where each track can have up to 16 MIDI channels, this would
give you a total of N*16 channels. So, just set the
synth.midi-channels settings to the number of desired channels - be
sure to not exceed 256 channels. And in your application handle the
channels as if you were accessing a two-dimensional array.
To control the effects of those channels individually, also set
synth.effects-groups to N*16, so that e.g. the first 16 channels
(corresponding to the 1st track) would have some reverb settings, the
next 16 channels (corresponding to the 2nd track) would have some
other reverb settings, etc. (Note that this will be very CPU intensive
though.)
Tom
(*) A sequencer can have many clients registered - that's true. And if
you decide to bypass / reimplement all the magic that
fluid_sequencer_register_fluidsynth() does for you, it might be
possible to share a single sequencer with many synths by manually
calling e.g. fluid_sequencer_process(). I think it would be harder to
achieve than the described above. But it would probably save a lot CPU
usage.
_______________________________________________
fluid-dev mailing list
fluid-dev@nongnu.org
https://lists.nongnu.org/mailman/listinfo/fluid-dev