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: Thu, 28 Dec 2017 18:41:31 +0000 (UTC)

Tom

The problem with your suggested code is that it does not work properly!!!

Bank 0 appears to be always selected no matter what bank I try to select.

I have tried 0, 1, 10 and 200 with an sf2 font which has only banks 0 and 1,
in all cases there is no error and bank 0 is selected.

See my code below:

int Division::loadSoundFont(char* sfont, int bank){
  int sfID = 0;
  char buffer[128];
  int result = FLUID_FAILED;
          sprintf(buffer,"%i",bank);
   MessageBox(NULL,buffer,"Bank",MB_ICONEXCLAMATION | MB_OK);
  sfID = fluid_synth_sfload(synth, sfont, 1);
  for(int i=0; i<fluid_synth_count_midi_channels(synth); i++)
    result = fluid_synth_bank_select(synth, i, bank);
   if(result == FLUID_FAILED)MessageBox(NULL,"Bad bank select","Bank",MB_ICONEXCLAMATION | MB_OK);
  return sfID;
}

Any comments??

David.



From: Tom M. <address@hidden>
To: David Back <address@hidden>
Cc: address@hidden
Sent: Wednesday, 27 December 2017, 14:30
Subject: Re: [fluid-dev] Fluidsynth bank select

Regarding "reset" and "offset" I agree they could be explained a bit more detailed. I'll see what can be done.

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

Sorry, there really is nothing special about using these functions. We cannot have an example for every easy-to-use function.

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

Why dont you do:

for(int i=0; i<fluid_synth_count_midi_channels(synth); i++)
  fluid_synth_bank_select(synth, i, my_bank);



Tom



reply via email to

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