A simple Midi Parser for BLE Midi messages that calls the corresponding events.
More...
#include <MidiBleParser.h>
|
| MidiBleParser (MidiAction *MidiAction, int channelFilter=-1) |
|
void | begin (MidiAction *MidiAction, int filter_channel=-1) |
| Assigns the MidiAction and optinally defines a midi channel.
|
|
virtual void | onCommand (uint8_t channel, uint8_t status, uint8_t p1, uint8_t p2) |
|
virtual void | onControlChange (uint8_t controller, uint8_t controllerValue, uint8_t channel) |
|
virtual void | onNoteOff (uint8_t note, uint8_t velocity, uint8_t channel) |
|
virtual void | onNoteOn (uint8_t note, uint8_t velocity, uint8_t channel) |
|
virtual void | onPitchBend (uint8_t value, uint8_t channel) |
|
virtual void | onRead (BLECharacteristic *pCharacteristic) |
| Callback function to support a read request. More...
|
|
virtual void | onWrite (BLECharacteristic *pCharacteristic) |
| Callback function to support a write request. More...
|
|
void | parse (uint8_t *msg, uint8_t len) |
| Parse a string into midi messages. More...
|
|
|
int | filter_channel = -1 |
|
MidiAction * | p_MidiAction = nullptr |
|
A simple Midi Parser for BLE Midi messages that calls the corresponding events.
In this implementation the handler just passes the noteOn and noteOff to the MidiAction.
http://www.hangar42.nl/wp-content/uploads/2017/10/BLE-MIDI-spec.pdf
by Phil Schatzmann
◆ onRead()
void midi::MidiBleParser::onRead |
( |
BLECharacteristic * |
pCharacteristic | ) |
|
|
virtual |
Callback function to support a read request.
- Parameters
-
[in] | pCharacteristic | The characteristic that is the source of the event. |
◆ onWrite()
void midi::MidiBleParser::onWrite |
( |
BLECharacteristic * |
pCharacteristic | ) |
|
|
virtual |
Callback function to support a write request.
- Parameters
-
[in] | pCharacteristic | The characteristic that is the source of the event. |
◆ parse()
void midi::MidiParser::parse |
( |
uint8_t * |
msg, |
|
|
uint8_t |
len |
|
) |
| |
|
inherited |
Parse a string into midi messages.
Parse byte stream for ble midi messages.
- Parameters
-
[in] | msg | byte stream |
[in] | len | length of the msg |
The documentation for this class was generated from the following files: