[linux-audio-dev] MIDI bank select MSB + LSB

Christian Schoenebeck cuse at users.sourceforge.net
Sat Dec 9 16:04:16 UTC 2006


Am Samstag, 9. Dezember 2006 03:01 schrieb Alexandre Ratchov:
> Keyboards that only support "MSB only" mode (or "LSB only" mode)
> are just too limited and there is no workaround that will "just
> work" with both modes. AFAIK, there is no standard way to detect if
> a device will use MSB, LSB or both. According to midi standard the
> bank number is (LSB + 128 * MSB), so the "Both" mode is the correct
> one to use. That's also what most users would expect.

Of course there is no real way to detect if a keyboard sends MSB-only or 
LSB-only bank selects, but there would be a workaround at least. I guess I 
will implement it similar as suggested by Grigor and Rui:

	"Normally, the instrument is only changed effectively when, and only when, a 	
	program change is received? Check. So, let's try having two int placeholders 
	per MIDI channel for bank selection in linuxsampler, one as MSB and another 
	as LSB, initialized to -1. If a bank MSB arrives, it will override the 
	corresponding variable. Same as LSB, but independently. Then, if the LSB 
	variable has the -1 value then, most probably, the sending device does not 
	support the conjugated bank selection method, and in that case the MSB value 
	will function as LSB alone, but iif the stored LSB value is -1, meaning that 
	it was untuoched by the sending device. Once the program change is done, just 	
	reset both values to -1 and we're back in business ;)"

At least I can't see a drawback of this workaround.

Am Samstag, 9. Dezember 2006 13:30 schrieb Jens M Andreasen:
> Who needs such a vast sample library? I can see the usefulness of having
> various dogs, cats, craws, crickets, seagulls or traffic-jams to set the
> the tone of a scene filmed off-site. but 127^3 is kind of a huge number.

We'll see. ;)

The point is that it doesn't make much of a difference to me in regards of the 
effort to implement it either with 127 or 127^2 banks, beside that little 
overhead of writing to this mailing list probably. ;)

> Is it even implemented on the receiving side?
> Inquiring minds wants to know :-)

Yes, it is implemented on LS CVS HEAD: 	

	http://www.linuxsampler.org/api/draft-linuxsampler-protocol.html#anchor14

But as you can see you have to map the respective sounds by yourself, i.e. by 
QSampler's new MIDI map editor or by manually placing the map commands in a 
LSCP script file. For each entry you can indiidually define if the respective 
sound should be loaded on demand or preloaded ("persistent").

But I'm currently working to extend this mapping feature a bit: ATM you can 
only manage one single, global map which is used by all sampler channels. 
Within the next days however you can add an arbitrary amount of individual 
maps and define which sampler channel should be associated with which map. 
That way you can i.e. at least create two maps: one for "normal" instruments 
and one for drumkits and in contrast to the common GM behavior you could 
assign such a drumkit map to other MIDI channels beside MIDI channel 10 
and/or you can define a 2nd drumkit map or whatever.
	
CU
Christian



More information about the Linux-audio-dev mailing list