fluid-dev
[Top][All Lists]
Advanced

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

Re: [fluid-dev] Fluidsynth bank select


From: David Back
Subject: Re: [fluid-dev] Fluidsynth bank select
Date: Wed, 27 Dec 2017 13:25:08 +0000 (UTC)

Hi Tom

The documentation is that which tells me how to load a sound font with multiple
banks and set the bank which I want to use for ALL channels -- the most common
requirement. 

The fact that this documentation does not exist was the reason for my
original query which has now been answered.

I have been using and programming with midi for many years and
as far as I am aware the term "offset" does not exist with regard to
bank selection. What is the offset with respect to? -- I do not know
but would guess bank 0. I would need to experiment to be sure.
What about the minus sign - this is weird.

Also, as far as I am aware, the term "reset" does not exist with regard
to midi channels. Reset to what? I would guess its  the midi defaults
but would have to experiment to find out.

These terms need to be defined and explained.

You also need several examples of how these functions should be
used -- there are none.

> 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.

I have no knowledge of the "original thread" and
fluid_synth_bank_select() selects the bank for only one channel at a time
so is not what I needed, though it could be pressed into service if there
was no alternative.

Best Wishes
David




From: Tom M. <address@hidden>
To: David Back <address@hidden>; FluidSynth mailing list <address@hidden>
Sent: Friday, 22 December 2017, 20:50
Subject: Re: [fluid-dev] Fluidsynth bank select

> 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 <address@hidden>:
> 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 <address@hidden>
> To: David Back <address@hidden>
> Cc: FluidSynth Mailing List <address@hidden>
> Sent: Thursday, 21 December 2017, 14:39
> Subject: Re: Fluidsynth bank select
>
> Hi David,
>
> 2017-12-21 14:45 GMT+01:00 David Back <address@hidden>:
>>
>> 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
> https://lists.nongnu.org/mailman/listinfo/fluid-dev

>



reply via email to

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