[Top][All Lists]

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

Re: [fluid-dev] MIDI bank select problems

From: Chris Robinson
Subject: Re: [fluid-dev] MIDI bank select problems
Date: Fri, 29 Nov 2013 17:15:53 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20131005 Icedove/17.0.9

On 11/29/2013 11:31 AM, Element Green wrote:
The original MIDI standard pretty much spells that out, though I think
there was some confusion around it leading to divergent vendor standards.
  CC 32-63 are supposed to be the least significant bytes and CC 0-31 the
most significant bytes of 14 bit controller values.

Instead, the MMA went a different way with GM2. CC0 selects a channel type
(120 = percussion (only allowed on channels 9 and 10), and 121 = melodic),
and CC32 selects a bank (must be 0 on percussion channels).

I don't really see it as a "different way" in respect to MIDI, but more in
comparison to the other instrument mapping standards.  Interpreting CC0 and
CC32 as MSB/LSB of a 14 bit number (as the GM2 article on Wikipedia also
says), then GM2 percussion is on bank 15360 and the melodic banks start
at 15488.

The way I see it, it's basically a shifted+masked value pair. i.e.

int type = ctrl >> 7;
int bank = ctrl & 127;

The upper bits hold the channel type, and the lower bits hold the bank number. You can't use more than 128 melodic banks (just like with GS and XG) since the 128th bank value will overflow into the type bits:

01111001000000 /* CC0 121 */
00000001000000 /* bank 128 */

And since percussion must set CC32 to 0, you still get 128 melodic banks (0-127), and a percussion bank (implied 128).

Though that's just my interpretation from the wikipedia page.

reply via email to

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