fluid-dev
[Top][All Lists]
Advanced

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

Re: [fluid-dev] New "bank offset" feature and selecting sfont/bank/prese


From: Ken Ellinwood
Subject: Re: [fluid-dev] New "bank offset" feature and selecting sfont/bank/preset...
Date: Thu, 29 Jul 2004 16:04:45 -0700 (PDT)

--- Peter Hanappe <address@hidden> wrote:


> I made the changes for the bank select (in CVS). I must admit I'm a
> little confused about what the correct behavior is. I thought the
> following three messages had to be sent together, in this order:
> 
>    BankSelect_MSB + BankSelect_LSB + ProgramChange
> 
> The select bank is then: BankSelect_MSB * 128 + BankSelect_LSB.
> Sending only a ProgramChange, without the BankSelect, is fine too.
> In that case the previous bank will be used.
> 
> However, what should the synth do when it receives the
> BankSelect_MSB? Or when it receives BankSelect_MSB + ProgramChange,
> without a BankSelect_LSB?
> 
> 1) Do nothing, just store the value of BankSelect_MSB somewhere until a
>     BankSelect_LSB comes in (that is what the synth did)
> 2) Set the bank number to BankSelect_MSB and store the value
>     until a BankSelect_LSB comes in (this is the solution
>     you propose.)
> 3) Set the bank number to BankSelect_MSB * 128 and store the value.
> 
> What do other synths do?

It appears to be manufacturer dependent with no clear answer one way or the
other.  Since the MIDI spec itslef is not available online, I use a freeware
reference which indicates that many devices ignore LSB and simply set the bank
using MSB (see links below).  After searching google for 'bank select msb', I'm
now even more convinced of this.  Nowhere have I seen a requirement that both
MSB and LSB must be sent to change the bank (except in previous versions of
fluidsynth).  And in sequencers such as Rosegarden, one must add two seperate
events to specify bank select MSB and LSB.  So the path of least resistence is
to just use MSB if there are 128 banks or less on the synth.

So my proposal of #2 above gets us the best of both worlds.  Using only MSB
will allow the client to specify 1 of 128 banks in a single control change
message, using MSB+LSB allows the client to specify 1 of 16384 possible banks.

http://www.borg.com/~jglatt/tech/midispec/bank.htm
http://www.swivelsystems.com/support/SG20%20MIDI%20Specifications.pdf

> However, I have some reservations about
> the proposed changes to the code. 
[snip]
> I'll be happy to change the 'select' and 'load' commands.
> 
> Does that seem alright to you?
> 

OK with me.  I have to admit that I coded the patch with the realization that
it would change the API, but was "unlikely" to break other clients.  My patch
causes the output of the 'inst' command to show the bank numbers with the bank
offset applied.  I'm not sure if your implementation would do this too.  It
seems like a desireable behavior so it can be determined if two banks from two
soundfonts still had numbering conflicts after loading one with a bank offset. 
The bank/preset numbers output by 'inst' are displayed in the tree view of
FluidGUI.

Ken

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 




reply via email to

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