37 if ( nStatusByte >= 128 && nStatusByte < 144 ) {
41 else if ( nStatusByte >= 144 && nStatusByte < 160 ) {
45 else if ( nStatusByte >= 160 && nStatusByte < 176 ) {
49 else if ( nStatusByte >= 176 && nStatusByte < 192 ) {
53 else if ( nStatusByte >= 192 && nStatusByte < 208 ) {
57 else if ( nStatusByte >= 208 && nStatusByte < 224 ) {
61 else if ( nStatusByte >= 224 && nStatusByte < 240 ) {
66 else if ( nStatusByte == 240 ) {
70 else if ( nStatusByte == 241 ) {
73 else if ( nStatusByte == 242 ) {
76 else if ( nStatusByte == 243 ) {
80 else if ( nStatusByte == 246 ) {
85 else if ( nStatusByte == 248 ) {
89 else if ( nStatusByte == 250 ) {
92 else if ( nStatusByte == 251 ) {
95 else if ( nStatusByte == 252 ) {
99 else if ( nStatusByte == 254 ) {
102 else if ( nStatusByte == 255 ) {
112 sOutput = QString(
"%1[MidiMessage]\n" ).arg( sPrefix )
113 .append( QString(
"%1%2m_type: %3\n" )
115 .append( QString(
"%1%2m_nData1: %3\n" )
117 .append( QString(
"%1%2m_nData2: %3\n" )
119 .append( QString(
"%1%2m_nChannel: %3\n" )
121 .append( QString(
"%1%2m_sysexData: [" ) );
122 bool bIsFirst =
true;
125 sOutput.append( QString(
"%1" ).arg( dd ) );
129 sOutput.append( QString(
" %1" ).arg( dd ) );
132 sOutput.append(
"]" );
135 sOutput = QString(
"[MidiMessage] " )
137 .append( QString(
", m_nData1: %1" ).arg(
m_nData1 ) )
138 .append( QString(
", m_nData2: %1" ).arg(
m_nData2 ) )
139 .append( QString(
", m_nChannel: %1" ).arg(
m_nChannel ) )
140 .append( QString(
", m_sysexData: [" ) );
141 bool bIsFirst =
true;
144 sOutput.append( QString(
"%1" ).arg( dd ) );
148 sOutput.append( QString(
" %1" ).arg( dd ) );
151 sOutput.append(
"]" );
170 sType =
"POLYPHONIC_KEY_PRESSURE";
173 sType =
"CONTROL_CHANGE";
176 sType =
"PROGRAM_CHANGE";
179 sType =
"CHANNEL_PRESSURE";
182 sType =
"PITCH_WHEEL";
197 sType =
"QUARTER_FRAME";
200 sType =
"SONG_SELECT";
203 sType =
"TUNE_REQUEST";
206 sType =
"TIMING_CLOCK";
209 sType =
"ACTIVE_SENSING";
216 sType =
"Unknown MIDI message type";
219 return std::move( sType );
233 sEvent =
"PROGRAM_CHANGE";
242 sEvent =
"MMC_PAUSE";
245 sEvent =
"MMC_DEFERRED_PLAY";
248 sEvent =
"MMC_REWIND";
251 sEvent =
"MMC_FAST_FORWARD";
254 sEvent =
"MMC_RECORD_STROBE";
257 sEvent =
"MMC_RECORD_EXIT";
260 sEvent =
"MMC_RECORD_READY";
267 return std::move( sEvent );
271 if ( sEvent ==
"NOTE" ) {
274 else if ( sEvent ==
"CC" ) {
277 else if ( sEvent ==
"PROGRAM_CHANGE" ) {
280 else if ( sEvent ==
"MMC_STOP" ) {
283 else if ( sEvent ==
"MMC_PLAY" ) {
286 else if ( sEvent ==
"MMC_PAUSE" ) {
289 else if ( sEvent ==
"MMC_DEFERRED_PLAY" ) {
292 else if ( sEvent ==
"MMC_FAST_FORWARD" ) {
295 else if ( sEvent ==
"MMC_REWIND" ) {
298 else if ( sEvent ==
"MMC_RECORD_STROBE" ) {
301 else if ( sEvent ==
"MMC_RECORD_EXIT" ) {
304 else if ( sEvent ==
"MMC_RECORD_READY" ) {
313 QStringList eventList;
328 return std::move( eventList );
static QString sPrintIndention
String used to format the debugging string output of some core classes.
QString toQString(const QString &sPrefix="", bool bShort=true) const
Formatted string version for debugging purposes.
static QStringList getEventList()
Retrieve the string representation for all available Event.
Event
Subset of incoming MIDI events that will be handled by Hydrogen.
void setType(int nStatusByte)
Derives and set m_type (and if applicable m_nChannel) using the statusByte of an incoming MIDI messag...
static QString TypeToQString(MidiMessageType type)
MidiMessageType
All possible types of incoming MIDI messages.
@ POLYPHONIC_KEY_PRESSURE
std::vector< unsigned char > m_sysexData
static QString EventToQString(Event event)
void clear()
Reset message.
static Event QStringToEvent(const QString &sEvent)