This repository provides an Arduino library that implements the Bluetooth Low Energy MIDI (BLE-MIDI) transport layer, enabling Arduino boards to send and receive MIDI data over BLE connections. The library works with the FortySevenEffects Arduino MIDI Library and supports multiple hardware platforms including ESP32 (with both standard BLE and NimBLE), ArduinoBLE (NANO 33 BLE), and nRF52. The architecture features a clean separation between the core BLE-MIDI protocol implementation and hardware-specific adaptations. The transport layer correctly handles timestamp generation per the BLE-MIDI specification, running status optimization, and buffer management. Hardware abstractions use C++ templates to provide a consistent interface across different BLE stacks while exposing platform-specific configuration options.
BlueALSA is a Bluetooth audio ALSA backend for Linux systems that integrates with BlueZ to provide A2DP, HFP/HSP, ASHA, and BLE-MIDI profiles. It operates as a daemon (bluealsad) managing Bluetooth connections and exposing audio streams via ALSA PCM plugins and D-Bus interfaces. The architecture is modular, separating transport management, codec handling, D-Bus communication, and ALSA plugin layers. Key entry points include the daemon (src/main.c), ALSA PCM plugin (src/asound/bluealsa-pcm.c), ALSA mixer plugin (src/asound/bluealsa-ctl.c), and control utility (src/bluealsactl/main.c). Data flows from ALSA applications through the PCM plugin to Bluetooth transports, with control signaling via D-Bus. External dependencies include BlueZ, ALSA, GLib, and various codec libraries (SBC, aptX, LDAC, etc.).