adafruit_ble_midi

BLE MIDI service for CircuitPython

class adafruit_ble_midi.MIDIService(**kwargs)

BLE MIDI service. It acts just like a USB MIDI PortIn and PortOut and can be used as a drop in replacement.

BLE MIDI’s protocol includes timestamps for MIDI messages. This class automatically adds them to MIDI data written out and strips them from MIDI data read in.

read(length)

Reads up to length bytes and returns them.

readinto(buf, length)

Reads up to length bytes into buf starting at index 0.

Returns the number of bytes written into buf.

write(buf, length)

Writes length bytes out.