BASS.NET API for the Un4seen BASS Audio Library

MidiShortMessagePreviousShortMessage Property

BASS.NET API for the Un4seen BASS Audio Library
Gets or Sets the previous short message (preceding this short message) if set (or if not set).

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

public MidiShortMessage PreviousShortMessage { get; set; }

Property Value

Type: MidiShortMessage
Remarks

Note: Some ControlChange messages might actually use two short messages (e.g. the BankSelect) to support paired values with a higher resolution (16384 instead of 128 values). In such case two messages will be send, where one contains the the LSB value (single steps) in it's Data2 byte and the other on the MSB value (128th steps) in it's Data2 byte.

For this special case it might be useful to keep in your MIDIINPROC handler always the current and the last (previous) message. Use this property to keep your previous message with the current short message.

To access the single value assigned to the Controller/ControllerType access the ControllerValue property.

You might use the GetPairedData(Byte, Byte), GetPairedData2(MidiShortMessage, MidiShortMessage) resp. the GetPairedData1(MidiShortMessage, MidiShortMessage) method to retrieve a combined value from two short messages resp. two data value.

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.

If no previous message was set (e.g. see constructor overloads) this member might return . It is also not possible to get a series of previous messages (i.e. the previous of the previous etc.) - only the last previous message is kept here.

See Also

Reference