[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [fluid-dev] Multiple Synthesizers

From: David Henningsson
Subject: Re: [fluid-dev] Multiple Synthesizers
Date: Mon, 29 Sep 2014 08:28:56 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.2

On 2014-09-29 03:03, Garth Hjelte wrote:
Can you have different Fluidsynth Synthesizers open at one time?

My issue is this: my app uses Fluidsynth to play SoundFonts created by my app 
on the fly to the user to play via MIDI. Almost always they are single-Bank 
single-Preset SoundFonts meant to represent one imported instrument. They are 
imported in via the massive other instrument file formats (Kontakt, EXS24, 
GigaStudio, etc.)

However, sometimes the Preset I want to playback is actually a SoundFont Preset.

So, stepping back: I make the on-the-fly SoundFonts on the fly while a user 
chooses to audition things, and I keep them loaded in Fluidsynth so if the user 
wants to play it again they can. So I do sfload() and then do 
set_bank_offset(), so at least I have 128 spots to put Instruments before I 
wrap around and sfunload() and start having to give up spots.

But, I'm in a real pickle if worst comes to worst and a person wants to listen 
to a Preset that is part of a SoundFont that has all 128 Banks filled or 
occupied. (And I know of plenty that are quite small but yet have all spots 
filled.) I'd have to go super-overkill and sfunload() however-many SoundFonts...

I know there's other ways of doing this, but they seem to all require more 
file-reading and composing that may not be necessarily necessary.

If I could make another synthesizer, then I'd have more room. Is that doable?

In general, yes. You can certainly make several fluid_synth_t objects and they will just work independently of each other. Each one will have a separate reverb and chorus engine, e g.

If you want to mix output from several fluid_synth_t into the same audio driver, you will have to do this yourself. Use the new_fluid_audio_driver2 call, and from that callback, call fluid_synth_write_* for all of the synths. (Note that the callback will be called from a real-time priority thread.)

// David

reply via email to

[Prev in Thread] Current Thread [Next in Thread]