ESPHome 2026.11.0b6
Loading...
Searching...
No Matches
midi_parser.h File Reference

Go to the source code of this file.

Data Structures

struct  esphome::ble_midi::MidiMessage
 A decoded MIDI message. More...
 
class  esphome::ble_midi::MidiParser
 Decoder for the BLE-MIDI packet format (Apple/MMA "Bluetooth Low Energy MIDI" specification, section 3). More...
 

Namespaces

namespace  esphome
 
namespace  esphome::ble_midi
 

Typedefs

using esphome::ble_midi::MidiMessageHandler = void (*)(void *ctx, const MidiMessage &message)
 Called once per decoded message with the context passed to feed().
 

Enumerations

enum class  esphome::ble_midi::MessageType : uint8_t {
  esphome::ble_midi::NOTE_OFF , esphome::ble_midi::NOTE_ON , esphome::ble_midi::POLY_AFTERTOUCH , esphome::ble_midi::CONTROL_CHANGE ,
  esphome::ble_midi::PROGRAM_CHANGE , esphome::ble_midi::CHANNEL_AFTERTOUCH , esphome::ble_midi::PITCH_BEND , esphome::ble_midi::SYSEX ,
  esphome::ble_midi::SYSEX_INCOMPLETE , esphome::ble_midi::SYSTEM_COMMON , esphome::ble_midi::SYSTEM_REAL_TIME , esphome::ble_midi::INCOMPLETE ,
  esphome::ble_midi::UNKNOWN
}
 

Functions

 esphome::ble_midi::PROGMEM_STRING_TABLE (MessageTypeNames, "NOTE_OFF", "NOTE_ON", "POLY_AFTERTOUCH", "CONTROL_CHANGE", "PROGRAM_CHANGE", "CHANNEL_AFTERTOUCH", "PITCH_BEND", "SYSEX", "SYSEX_INCOMPLETE", "SYSTEM_COMMON", "SYSTEM_REAL_TIME", "INCOMPLETE", "UNKNOWN")
 
size_t esphome::ble_midi::frame_sysex (const uint8_t *payload, size_t length, uint8_t *out, size_t out_size)
 Frame a SysEx payload for one BLE-MIDI packet: 0xF0 and 0xF7 are added when the payload lacks them, with the timestamp byte the specification requires before 0xF7.