![]() |
wxMidi - A MIDI interface based on PortMidi
|
wxMidiShortMessage represents a MIDI short message. More...
#include <wxMidi.h>
Public Member Functions | |
wxMidiShortMessage (wxByte status, wxByte data1, wxByte data2) | |
Constructor. More... | |
void | SetTimestamp (wxMidiTimestamp timestamp) |
Set the message timestamp value. More... | |
wxMidiTimestamp | GetTimestamp () |
wxByte | GetStatus () |
Returns the status byte of the message. More... | |
wxByte | GetData1 () |
Returns the first data byte of the message or 0x00 if the type of message only has the status byte. More... | |
wxByte | GetData2 () |
Returns the second data byte of the message or 0x00 if the type of message only has one data byte. More... | |
PmEvent * | GetBuffer () |
![]() | |
wxMidiMessage () | |
Constructor. | |
virtual | ~wxMidiMessage () |
Destructor. | |
wxMidiMsgType | GetType () |
Returns either wxMIDI_SHORT_MSG, or wxMIDI_SYSEX_MSG, identifying the type of the message object. More... | |
Additional Inherited Members | |
![]() | |
wxMidiMsgType | m_type |
wxMidiShortMessage represents a MIDI short message.
They are the most common and have a status byte and at most two data bytes.
|
inline |
Constructor.
To build a message from its components: a status byte and at most two data bytes.
|
inline |
Returns the first data byte of the message or 0x00 if the type of message only has the status byte.
|
inline |
Returns the second data byte of the message or 0x00 if the type of message only has one data byte.
|
inlinevirtual |
Returns the status byte of the message.
For a wxSysExMessage status byte is always 0xF0 but the end of sysex message (0xF7) is also included in the message data. According MIDI standard the most significant bit of the status byte is always 1 so the range of status values goes from 0x80 to 0xFF.
Values lower than 0xF0 identify channel messages, with the four lower bits specifying the channel (0-15); for example, status byte 0x93 is a NoteOn for channel 3:
Message | Status byte |
---|---|
Note-Off Event | 0x8n |
Note-On Event | 0x9n |
Polyphonic Key Pressure | 0xAn |
Control Change | 0xBn |
Program Change | 0xCn |
Channel Pressure | 0xDn |
Pitch Bend | 0xEn |
Values 0xF0 to 0xFF are for system messages and are no intended for a specific channel:
Message | Status byte |
---|---|
Begin System Exclusive | 0xF0 |
MIDI Time Code | 0xF1 |
Song Position Pointer | 0xF2 |
Song Select | 0xF3 |
Tune Request | 0xF6 |
End System Exclusive | 0xF7 |
Real-time Clock | 0xF8 |
Undefined | 0xF9 |
Start | 0xFA |
Continue | 0xFB |
Stop | 0xFC |
Undefined | 0xFD |
Active Sensing | 0xFE |
System Reset | 0xFF |
Implements wxMidiMessage.
|
inlinevirtual |
Set the message timestamp value.
On output to a wxMidiOutDevice opened with non-zero latency, the timestamp will determine the time to begin sending the message. If the wxMidiOutDevice was opened with a latency value of zero, timestamps will be ignored and messages will be delivered inmediatelly.
timestamp | The timestamp value. It is milliseconds elapsed since the wxMidi package initialization. Current time can be obtained by calling wxMidi::GetTime(). |
Implements wxMidiMessage.