Assembly: Bass.Net (in Bass.Net.dll) Version: 18.104.22.168
public MidiShortMessage( IntPtr param1, IntPtr param2, MidiShortMessage previous )
Public Sub New ( param1 As IntPtr, param2 As IntPtr, previous As MidiShortMessage )
public: MidiShortMessage( IntPtr param1, IntPtr param2, MidiShortMessage^ previous )
new : param1 : IntPtr * param2 : IntPtr * previous : MidiShortMessage -> MidiShortMessage
- Type: SystemIntPtr
The MIDI message that was received.
- Type: SystemIntPtr
The timestamp that the message was received by the input device driver.
- Type: radio42.Multimedia.MidiMidiShortMessage
The previous short message received (e.g. in order to check, if a ControlChange message need to be paired - which is not done automatically here!).
MIDI messages received from a MIDI input port have running status disabled; each message is expanded to include the MIDI status byte.
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 overload to always keep your previous message with the current short message. NOTE: The PreviousShortMessage property will only be set in case this current message and the previous are having the same StatusType (otherwise all previous messages would be links together and memory wil simply increase and increase, since the Garbage Collector would never release any un-needed messages)! In case of real-time messages the the PreviousShortMessage will also not be set.
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.