|
hydrogen 1.2.6
|
#include <MidiCommon.h>
Public Types | |
| enum class | Event { Null , Note , CC , PC , MmcStop , MmcPlay , MmcPause , MmcDeferredPlay , MmcFastForward , MmcRewind , MmcRecordStrobe , MmcRecordExit , MmcRecordReady } |
| Subset of incoming MIDI events that will be handled by Hydrogen. More... | |
| enum | MidiMessageType { UNKNOWN , SYSEX , NOTE_ON , NOTE_OFF , POLYPHONIC_KEY_PRESSURE , CONTROL_CHANGE , PROGRAM_CHANGE , CHANNEL_PRESSURE , PITCH_WHEEL , START , CONTINUE , STOP , SONG_POS , QUARTER_FRAME , SONG_SELECT , TUNE_REQUEST , TIMING_CLOCK , ACTIVE_SENSING , RESET } |
| All possible types of incoming MIDI messages. More... | |
Public Member Functions | |
| MidiMessage () | |
| void | clear () |
| Reset message. | |
| void | setType (int nStatusByte) |
| Derives and set m_type (and if applicable m_nChannel) using the statusByte of an incoming MIDI message. | |
| QString | toQString (const QString &sPrefix="", bool bShort=true) const |
| Formatted string version for debugging purposes. | |
Static Public Member Functions | |
| static QString | EventToQString (Event event) |
| static QStringList | getEventList () |
| Retrieve the string representation for all available Event. | |
| static Event | QStringToEvent (const QString &sEvent) |
| static QString | TypeToQString (MidiMessageType type) |
Data Fields | |
| int | m_nChannel |
| int | m_nData1 |
| int | m_nData2 |
| std::vector< unsigned char > | m_sysexData |
| MidiMessageType | m_type |
Static Public Attributes | |
| static constexpr int | instrumentOffset = 36 |
| When recording notes using MIDI NOTE_ON events this offset will be applied to the provided pitch in order to map it to an instrument number in the current drmmkit. | |
Definition at line 37 of file MidiCommon.h.
|
strong |
Subset of incoming MIDI events that will be handled by Hydrogen.
| Enumerator | |
|---|---|
| Null | |
| Note | |
| CC | |
| PC | |
| MmcStop | |
| MmcPlay | |
| MmcPause | |
| MmcDeferredPlay | |
| MmcFastForward | |
| MmcRewind | |
| MmcRecordStrobe | |
| MmcRecordExit | |
| MmcRecordReady | |
Definition at line 66 of file MidiCommon.h.
| enum MidiMessageType |
All possible types of incoming MIDI messages.
Definition at line 41 of file MidiCommon.h.
|
inline |
Definition at line 99 of file MidiCommon.h.
| void clear | ( | ) |
Reset message.
Definition at line 27 of file MidiCommon.cpp.
|
static |
Definition at line 222 of file MidiCommon.cpp.
|
static |
Retrieve the string representation for all available Event.
Definition at line 312 of file MidiCommon.cpp.
|
static |
Definition at line 270 of file MidiCommon.cpp.
| void setType | ( | int | nStatusByte | ) |
Derives and set m_type (and if applicable m_nChannel) using the statusByte of an incoming MIDI message.
The particular values are defined by the MIDI standard and do not dependent on the individual drivers.
Definition at line 35 of file MidiCommon.cpp.
| QString toQString | ( | const QString & | sPrefix = "", |
| bool | bShort = true ) const |
Formatted string version for debugging purposes.
| sPrefix | String prefix which will be added in front of every new line |
| bShort | Instead of the whole content of all classes stored as members just a single unique identifier will be displayed without line breaks. |
Definition at line 107 of file MidiCommon.cpp.
|
static |
Definition at line 157 of file MidiCommon.cpp.
|
staticconstexpr |
When recording notes using MIDI NOTE_ON events this offset will be applied to the provided pitch in order to map it to an instrument number in the current drmmkit.
It corresponds to the electric bass drum in the General MIDI notation.
Definition at line 91 of file MidiCommon.h.
| int m_nChannel |
Definition at line 96 of file MidiCommon.h.
| int m_nData1 |
Definition at line 94 of file MidiCommon.h.
| int m_nData2 |
Definition at line 95 of file MidiCommon.h.
| std::vector<unsigned char> m_sysexData |
Definition at line 97 of file MidiCommon.h.
| MidiMessageType m_type |
Definition at line 93 of file MidiCommon.h.