BASS.NET API for the Un4seen BASS Audio Library

MidiInputDeviceAutoPairController Property

BASS.NET API for the Un4seen BASS Audio Library
Gets or Sets if Channel Messages (a MidiShortMessage) with a ControlChange should automatically be paired (default is None).

Namespace:  radio42.Multimedia.Midi
Assembly:  Bass.Net (in Bass.Net.dll) Version: 2.4.17.5
Syntax

public bool AutoPairController { get; set; }

Property Value

Type: Boolean
Remarks

Some controllers are continuous controllers, which simply means that their value can be set to any value within the range from 0 to 16383 (for 14-bit coarse/fine resolution) or 0 to 127 (for 7-bit, coarse resolution). Setting this property to will automatically pair short-message values defined in the ColtrollerPairMatrix. In such case only one MessageReceived event will be fired, containing the combined (paired, 14-bit) ControllerValue.

In detail: Some Midi data messages might actually use two sub-sequent short messages to construct a paired message representing a single value range (e.g. the ControlChange with a BankSelect). This to support paired values with a higher resolution (16384 instead of 128 values). In such case normally two short messages will be send, where one contains the LSB value (single steps, fine) in it's Data2 byte and the other message contains the MSB value (128th steps, coarse) in it's Data2 byte. Typically the messages with a StatusType of ControlChange and with a Controller value between 0 and 31 (MSB, coarse) are paired with a message of a Controller value between 32 and 63 (LSB, fine). But also a Controller value of 98 (LSB, fine) will be paired with a Controller value of 99 (MSB, coarse) as well as a Controller value of 100 (LSB, fine) will be paired with a Controller value of 101 (MSB, coarse). Other pairs might be hardware specific and might be specified by using the ColtrollerPairMatrix.

The resulting combined data value will be constructed like this: dataMSB=0xxxxxxx, dataLSB=0yyyyyyy = paired=00xxxxxxxyyyyyyy.

By default this property is set to meaning each individual short message will be handled and independently as a single message. If this member is set to and the message is a ControlChange message and is defined in the ColtrollerPairMatrix, then only the second message will fire the MessageReceived event.

In case the Midi device will under certain cases not send paired messages together the non-paired message will be handled as a single message again. For example: It's only desirable to make fine adjustments to the Mod Wheel without changing its current coarse setting (or vice versa), a device can be sent only a controller #33 message without a preceding controller #1 message (or vice versa). Thus, if a device can respond to both coarse and fine adjustments for a particular controller (ie, implements the full 14-bit resolution), it should be able to deal with either the coarse or fine controller message being sent without its counterpart following. The same holds true for other continuous (ie, coarse/fine pairs of) controllers.

In any case you can simply access the ControllerValue property and you'll get in return the combined and paired 14-bit controller value or the single uncombined value without further taking care.

Use the ColtrollerPairMatrix to define the controller pairs belonging together and for more details.

NOTE: ControlChannel messages are ONLY combined and paired if the messages as defined in the ColtrollerPairMatrix are send exactly subsequently (with no other short-message in between)!

See Also

Reference