Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: frdmk22f-usbhid-4axis
MIDIMessage Class Reference
A MIDI message container. More...
#include <MIDIMessage.h>
| Public Types | |
| enum | MIDIMessageType | 
| MIDI Message Types.More... | |
| Public Member Functions | |
| MIDIMessageType | type () | 
| Read the message type. | |
| int | channel () | 
| Read the channel number. | |
| int | key () | 
| Read the key ID. | |
| int | velocity () | 
| Read the velocity. | |
| int | value () | 
| Read the controller value. | |
| int | pressure () | 
| Read the aftertouch pressure. | |
| int | controller () | 
| Read the controller number. | |
| int | program () | 
| Read the program number. | |
| int | pitch () | 
| Read the pitch value. | |
| Static Public Member Functions | |
| static MIDIMessage | NoteOff (int key, int velocity=127, int channel=0) | 
| Create a NoteOff message. | |
| static MIDIMessage | NoteOn (int key, int velocity=127, int channel=0) | 
| Create a NoteOn message. | |
| static MIDIMessage | PolyphonicAftertouch (int key, int pressure, int channel=0) | 
| Create a PolyPhonic Aftertouch message. | |
| static MIDIMessage | ControlChange (int control, int value, int channel=0) | 
| Create a Control Change message. | |
| static MIDIMessage | ProgramChange (int program, int channel=0) | 
| Create a Program Change message. | |
| static MIDIMessage | ChannelAftertouch (int pressure, int channel=0) | 
| Create a Channel Aftertouch message. | |
| static MIDIMessage | PitchWheel (int pitch=0, int channel=0) | 
| Create a Pitch Wheel message. | |
| static MIDIMessage | AllNotesOff (int channel=0) | 
| Create an All Notes Off message. | |
| static MIDIMessage | SysEx (uint8_t *data, int len) | 
| Create a SysEx message. | |
Detailed Description
A MIDI message container.
Definition at line 45 of file MIDIMessage.h.
Member Enumeration Documentation
| enum MIDIMessageType | 
MIDI Message Types.
Definition at line 190 of file MIDIMessage.h.
Member Function Documentation
| static MIDIMessage AllNotesOff | ( | int | channel = 0) |  [static] | 
Create an All Notes Off message.
- Parameters:
- 
  channel Channel (0-15, default 0) 
- Returns:
- A MIDIMessage
Definition at line 173 of file MIDIMessage.h.
| int channel | ( | ) | 
Read the channel number.
Definition at line 228 of file MIDIMessage.h.
| static MIDIMessage ChannelAftertouch | ( | int | pressure, | 
| int | channel = 0 | ||
| ) |  [static] | 
Create a Channel Aftertouch message.
- Parameters:
- 
  pressure Pressure channel Key channel (0-15, default 0) 
- Returns:
- A MIDIMessage
Definition at line 145 of file MIDIMessage.h.
| static MIDIMessage ControlChange | ( | int | control, | 
| int | value, | ||
| int | channel = 0 | ||
| ) |  [static] | 
Create a Control Change message.
- Parameters:
- 
  control Controller ID value Controller value (0-127) channel Controller channel (0-15, default 0) 
- Returns:
- A MIDIMessage
Definition at line 117 of file MIDIMessage.h.
| int controller | ( | ) | 
Read the controller number.
Definition at line 257 of file MIDIMessage.h.
| int key | ( | ) | 
Read the key ID.
Definition at line 233 of file MIDIMessage.h.
| static MIDIMessage NoteOff | ( | int | key, | 
| int | velocity = 127, | ||
| int | channel = 0 | ||
| ) |  [static] | 
Create a NoteOff message.
- Parameters:
- 
  key Key ID velocity Key velocity (0-127, default = 127) channel Key channel (0-15, default 0) 
- Returns:
- A MIDIMessage
Definition at line 72 of file MIDIMessage.h.
| static MIDIMessage NoteOn | ( | int | key, | 
| int | velocity = 127, | ||
| int | channel = 0 | ||
| ) |  [static] | 
Create a NoteOn message.
- Parameters:
- 
  key Key ID velocity Key velocity (0-127, default = 127) channel Key channel (0-15, default 0) 
- Returns:
- A MIDIMessage
Definition at line 87 of file MIDIMessage.h.
| int pitch | ( | ) | 
Read the pitch value.
Definition at line 267 of file MIDIMessage.h.
| static MIDIMessage PitchWheel | ( | int | pitch = 0, | 
| int | channel = 0 | ||
| ) |  [static] | 
Create a Pitch Wheel message.
- Parameters:
- 
  pitch Pitch (-8192 - 8191, default = 0) channel Channel (0-15, default 0) 
- Returns:
- A MIDIMessage
Definition at line 159 of file MIDIMessage.h.
| static MIDIMessage PolyphonicAftertouch | ( | int | key, | 
| int | pressure, | ||
| int | channel = 0 | ||
| ) |  [static] | 
Create a PolyPhonic Aftertouch message.
- Parameters:
- 
  key Key ID pressure Aftertouch pressure (0-127) channel Key channel (0-15, default 0) 
- Returns:
- A MIDIMessage
Definition at line 102 of file MIDIMessage.h.
| int pressure | ( | ) | 
Read the aftertouch pressure.
Definition at line 248 of file MIDIMessage.h.
| int program | ( | ) | 
Read the program number.
Definition at line 262 of file MIDIMessage.h.
| static MIDIMessage ProgramChange | ( | int | program, | 
| int | channel = 0 | ||
| ) |  [static] | 
Create a Program Change message.
- Parameters:
- 
  program Program ID channel Channel (0-15, default 0) 
- Returns:
- A MIDIMessage
Definition at line 131 of file MIDIMessage.h.
| static MIDIMessage SysEx | ( | uint8_t * | data, | 
| int | len | ||
| ) |  [static] | 
Create a SysEx message.
- Parameters:
- 
  data SysEx data (including 0xF0 .. 0xF7) len SysEx data length 
- Returns:
- A MIDIMessage
Definition at line 182 of file MIDIMessage.h.
| MIDIMessageType type | ( | ) | 
| int value | ( | ) | 
Read the controller value.
Definition at line 243 of file MIDIMessage.h.
| int velocity | ( | ) | 
Read the velocity.
Definition at line 238 of file MIDIMessage.h.
Generated on Thu Jul 21 2022 16:40:05 by
 1.7.2
 1.7.2