> Just as I said at the start; the Documentation of bank selection is a mess > which is virtually impossible for someone who has not studied the code and > scraps of documentation in detail to follow.
Sorry, to which documentation are you referring specifically? Tom 2017-12-21 19:28 GMT+01:00 David Back <csw...@yahoo.co.uk>: > Hi Marcus > > I realised after reading the Documentation again that reverb has to be setup > before the synth is started (its not a REAL TIME option). I have now moved > it back to its proper place and it is working. Its quite strange listening > to an organ > with reverb off!! > > I do not totally understand what fluidsynth means by resetting all channels > but > as the sound font is loaded right at the start, before the channels have > been set > up, resetting them should initialise them all to a common state, ready for > use. > Even if resetting is not needed it does no harm. > > I do not find any need to reset them again after changing the sound bank. > None > of the channels have been used at this point. > > Both reverb and bank select are now working as intended. > > It is quite possible that fluid_synth_bank_select might work just as well -- > its the > first I have heard of it. Just as I said at the start; the Documentation of > bank selection > is a mess which is virtually impossible for someone who has not studied the > code > and scraps of documentation in detail to follow. You really ought to have a > few > examples. > > All of the setting up of the organ is done automatically with data taken > from the > xml file. Virtually nothing has to be done manually. > > I invite you to download and try the latest version (reverb always on and no > bank selection) from my website https://midimusic.github.io/ > > David. > > ________________________________ > From: Marcus Weseloh <mar...@weseloh.cc> > To: David Back <csw...@yahoo.co.uk> > Cc: FluidSynth Mailing List <fluid-dev@nongnu.org> > Sent: Thursday, 21 December 2017, 14:39 > Subject: Re: Fluidsynth bank select > > Hi David, > > 2017-12-21 14:45 GMT+01:00 David Back <csw...@yahoo.co.uk>: >> >> Yes it is working now, I have managed to get bank 1 selected and just as >> you prophesied I needed to use an offset of -1 to select it. > > That is weird, because from looking at your code, I wouldn't have expected > it to work. > >> int Division::loadSoundFont(char* sfont, int reverb, int bank){ >> int sfID = 0; >> int offset; >> offset = -bank; >> sfID = fluid_synth_sfload(synth, sfont, 1); > > Here you load the soundfont and also reset all channels (because you passed > 1 as the last parameter). > >> fluid_settings_setint(settings, "synth.reverb.active", reverb); //***not >> convinced its working > > Toggling reverb is completely independent of soundfont loading, it's a > setting on the synth object itself. And the 'synth.reverb.active' setting is > only examined when first creating the synth using new_fluid_synth. But you > can enable or disable reverb with the fluid_synth_set_reverb_on function. > But in any case, it has no logical connection to sound font loading, so it > seems out of place in a loadSoundFont function IMHO. > >> fluid_synth_set_bank_offset(synth, sfID, offset); > > Only now do you set the bank offset, but you don't reset the channels again. > The fact that you say it's working as intended seems to indicate that you do > manual fluid_synth_program_change calls later on, in a different function. > In that case, you could simply do what Tom suggested in the original thread: > just use fluid_synth_bank_select before doing the program changes. No need > to mess with bank offsets at all. > > Cheers, > > > Marcus > > > > _______________________________________________ > fluid-dev mailing list > fluid-dev@nongnu.org > https://lists.nongnu.org/mailman/listinfo/fluid-dev > _______________________________________________ fluid-dev mailing list fluid-dev@nongnu.org https://lists.nongnu.org/mailman/listinfo/fluid-dev