Releases: sauloverissimo/midi2cpp
Release list
v0.6.1
Recipe TinyUSB pins follow the merge of PR #3738 (Function Blocks derived
from the GTB descriptor) into TinyUSB upstream on 2026-07-05. Device and
bridge recipes that tracked the fix/midi2-fb-direction PR branch now pull
hathach/tinyusb at the merge commit; the fork is no longer required for
them.
Changed
- Examples: 16 recipes moved from the
sauloverissimo/tinyusb
fix/midi2-fb-directionbranch tohathach/tinyusbat the PR #3738
merge commit. - Examples:
adafruit-feather-rp2040-host-midi2advanced its upstream pin
from the PR #3571 merge commit to the PR #3738 merge commit. - Examples: TinyUSB FetchContent recipes set
GIT_SHALLOW FALSE, since an
exact upstream commit (unlike a branch) is not reliably shallow-fetchable. - Examples: the 3 ESP32-P4 coexistence recipes
(esp32-p4-devkit-host-midi2,esp32-p4-devkit-bridge-midi2,
esp32-p4-devkit-bridge2-midi2) stay on theexperiment/midi-coexistence
fork branch, staged as a follow-up PR upstream. - Docs: recipe comments and READMEs now describe TinyUSB as upstream
(PR #3738, merged) rather than the PR branch.
v0.6.0
midi2cpp now bundles the midi2 C99 core (vendored amalgam in src/), so a
consumer imports one library. The external midi2 dependency is removed from
library.properties, library.json, idf_component.yml, and CMakeLists.txt.
Bundles midi2 0.6.0. A standalone midi2 install coexists.
Fixed
- Host no longer drops inbound messages under a burst.
Host::feedRxran the
full UMP decode + dispatch synchronously, so calling it from a platform RX
callback starved the USB service and the non-overwritable RX FIFO truncated
under high message rates. The host recipes hit this on machine-gun inputs.
Added
midi2_rx_ring.h: an SPSC ring (the "stream core") that decouples the USB
receive path from message processing, mirroring the queue/drain split proven
on the ESP32 host transport. Header-only, drop-newest, lock-free for one
producer and one consumer.Host::rxDropped()reports packets refused on a full RX ring (0 = clean);
size the ring withMIDI2CPP_HOST_RX_RING(default 256).
Changed
Host::feedRxnow only enqueues the inbound UMP (O(1), no decode) into the
RX ring, so it is safe to call straight from a TinyUSBrx_cb. The decode +
dispatch moved intoHost::task(), which drains the ring on the main loop.
Callbacks fire fromtask(), not fromfeedRx; recipes that already call
task()each loop iteration need no change.Bridgeinherits the fix through
Host::feedRx/Host::task().
v0.5.0
Tracks midi2 0.5.0 (NULL-safe public entry points, midi2_msg_word_count
across all 16 message types). Adds the first Arduino IDE and libDaisy
recipes.
Added
- Teensy 4.1 recipes
teensy41-midi2(device showcase) and
teensy41-control-surface(hardware-driven pots + switches), built
against thesauloverissimo/coresUSB MIDI 2.0 descriptor fork. First
Arduino IDE / arduino-cli recipes in the tree. - Daisy Seed recipe
daisyseed-midi2, built against the
sauloverissimo/libDaisyUSB MIDI 2.0 transport fork (STM32 HAL stack).
Changed
- Dependency on
midi2raised to>=0.5.0. - Examples: midi2 pin bumped to v0.5.0 across the Pico SDK, ESP-IDF,
PlatformIO, and TinyUSB native CMake recipes.
v0.4.1
TinyUSB upstream. Recipes that pulled the MIDI 2.0 driver from the
sauloverissimo/tinyusb fork now pull from hathach/tinyusb at the
merge commit of PR #3571. RX drain migrated from polling loop to the
tud_midi2_rx_cb / tuh_midi2_rx_cb callbacks across 18 device, host,
and bridge recipes. BUFSIZE aligned with upstream defaults (device
without override = EPSIZE, host 512/512).
Changed
- Examples: 15 recipes bumped TinyUSB pin to
hathach/tinyusbupstream
(PR #3571 merged 2026-05-19). - Examples: 3 ESP32-P4 recipes (
esp32-p4-devkit-host-midi2,
esp32-p4-devkit-bridge-midi2,esp32-p4-devkit-bridge2-midi2)
bumped to theexperiment/midi-coexistencebranch on top of upstream
master (alt-walkbcdMSCdefer + opt-in user responder, staged as
follow-up PRs). - Examples: RX drain moved from polling loops to driver callbacks
(tud_midi2_rx_cb,tuh_midi2_rx_cb). - Examples:
CFG_TUD_MIDI2_*_BUFSIZEoverrides removed where the
upstream default (= EPSIZE) is sufficient; host recipes aligned with
the upstreammidi2_hostexample (512/512). - README: Boards table reorganized;
Statuscolumn renamed toNotes,
per-rowoverridebadges removed. The Waveshare ESP32-P4-WIFI6-DEV-KIT
is now listed as two rows: device-only (upstream, stable) and
host / bridge (experimental branch).
Fixed
- Examples: removed stale reference to the deprecated
usbd_control.c
source in thecomponents/tinyusb/CMakeLists.txtof
esp32-p4-devkit-bridge-midi2andesp32-p4-devkit-bridge2-midi2
(the upstream mergedusbd_control.cintousbd.c). - Examples: added default for
CFG_TUD_MIDI2_USER_RESPONDERin the
experimental branch so the opt-in macro compiles cleanly under
-Werror=undefand-Werror=unused-function.
v0.4.0
v0.4.0
Track midi2 v0.4.0. Public Device / Host / Bridge APIs stay
source-compatible where possible; sendFbInfo gains a uiHint
argument to match the new spec field. See CHANGELOG for the
full list.
v0.3.1 - ESP Component Registry support
ESP Component Registry support. midi2cpp now ships an idf_component.yml at the root and an if(ESP_PLATFORM) gate in CMakeLists.txt, so ESP-IDF projects can pull it through the official Espressif registry with semver constraints instead of hard-pinning a git tag.
Install (ESP-IDF, new)
# main/idf_component.yml
dependencies:
sauloverissimo/midi2cpp: ">=0.3.1"The Component Manager pulls midi2cpp from the registry; midi2 (the C99 core) is resolved transitively (declared in midi2cpp's own idf_component.yml).
Added
idf_component.ymlat the repo root (description, version, license, maintainers, tags, dependencies onsauloverissimo/midi2 >= 0.3.4andidf >= 5.0).- ESP-IDF gate at the top of
CMakeLists.txt: whenESP_PLATFORMis set, callsidf_component_register(SRCS src/midi2_*.cpp INCLUDE_DIRS src REQUIRES midi2)withcxx_std_17and returns beforeproject()runs.
Other install paths (unchanged)
- Arduino IDE: search
midi2cpp(after the rename request lands) - arduino-cli:
arduino-cli lib install midi2cpp(after registry update) - PlatformIO:
lib_deps = sauloverissimo/midi2cpp @ ^0.3.1 - CMake:
find_package(midi2cpp 0.3.1 CONFIG)orFetchContent_Declare(midi2cpp GIT_TAG v0.3.1)
v0.3.0 - rename to midi2cpp + midi2 v0.3.4
Renamed from midi2_cpp to midi2cpp in deference to starfishmod/MIDI2_CPP (maintained since 2021 by Andrew Mee, MIDI Association TSB Rep), which operates in the same domain. Keeping the namespaces disjoint avoids confusion in package managers and search.
This is a breaking release. Every consumer-facing identifier moved.
Breaking
- Repository:
github.com/sauloverissimo/midi2_cpp->github.com/sauloverissimo/midi2cpp(the old URL redirects on GitHub). - Header:
<midi2_cpp.h>-><midi2cpp.h>.using namespace midi2;and them2device/m2host/m2bridge/m2cialiases are unchanged. - CMake target / alias:
midi2_cpp->midi2cpp;midi2_cpp::midi2_cpp->midi2cpp::midi2cpp. - Preprocessor macros:
MIDI2_CPP_*->MIDI2CPP_*(MIDI2CPP_BUILD_TESTS,MIDI2CPP_MAX_PROFILES,MIDI2CPP_MAX_PROPERTIES,MIDI2CPP_MAX_SUBSCRIBERS,MIDI2CPP_HOST_MAX_DEVICES,MIDI2CPP_BRIDGE_MAX_SLOTS). - Manifests:
library.propertiesname=midi2cpp,library.json"name": "midi2cpp".
Changed
- midi2 dependency bumped to v0.3.4 across every install path. midi2 v0.3.4 fixes the ESP-IDF Component Manager gate (v0.3.3 routed at
dist/midi2.cwhich the Component Manager filters out).
Migration
-#include <midi2_cpp.h>
+#include <midi2cpp.h>CMake:
-FetchContent_Declare(midi2_cpp ...)
-target_link_libraries(my_target PRIVATE midi2_cpp)
+FetchContent_Declare(midi2cpp ...)
+target_link_libraries(my_target PRIVATE midi2cpp)Install
| Build flow | Install |
|---|---|
| Arduino IDE | search midi2cpp in the Library Manager (after the registry PR lands) |
| arduino-cli | arduino-cli lib install midi2cpp |
| PlatformIO | lib_deps = sauloverissimo/midi2cpp @ ^0.3.0 |
| ESP-IDF | dependencies.midi2cpp.git in idf_component.yml (or copy under components/) |
| CMake | FetchContent_Declare(midi2cpp GIT_TAG v0.3.0) |
Verified
- Host suite (cmake + ctest) 7/7 pass
- arduino-cli compile of
examples/HelloMIDI2/HelloMIDI2.inoon rp2040: 67 KB program (3% of flash) - ESP-IDF build of
examples/esp32-s3-devkitc-usb-midi2against midi2 v0.3.4 from the GitHub Component Manager: clean .bin - Repository CI on the rename PR: 6/6 jobs green
v0.2.0 - external midi2 dependency
Single source of truth for the MIDI 2.0 stack: midi2_cpp no longer vendors the C99 core. midi2 v0.3.3 is now declared as an explicit dependency across every package manager surface (Arduino Library Manager, PlatformIO Registry, ESP-IDF Component Manager, CMake find_package / FetchContent).
This is a breaking release. Pre-v0.2 consumers that vendored midi2_cpp/src/midi2.{h,c} directly will break.
Install
Arduino IDE
Once midi2_cpp is published to the Arduino Library Manager, the install becomes: search midi2_cpp, click Install. The dependency on midi2 (already on the Library Manager) auto-resolves.
PlatformIO
lib_deps =
https://github.com/sauloverissimo/midi2_cpp.git#v0.2.0CMake
include(FetchContent)
FetchContent_Declare(
midi2_cpp
GIT_REPOSITORY https://github.com/sauloverissimo/midi2_cpp.git
GIT_TAG v0.2.0)
FetchContent_MakeAvailable(midi2_cpp)midi2_cpp cascades the dependency on midi2: find_package(midi2 0.3.3 CONFIG) is tried first, falling back to FetchContent_Declare(midi2 GIT_TAG v0.3.3) if no install is found.
ESP-IDF
# main/idf_component.yml
dependencies:
midi2:
git: https://github.com/sauloverissimo/midi2.git
version: \">=0.3.3\"Drop midi2_cpp/ into your project's components/. The recipes under examples/ ship working templates for device, host and bridge roles.
Highlights
midi2::Bridge(aliasm2bridge) — multi-FB topology with per-slot group rewrite, dynamic FB names, USB-MIDI 1.0 byte-stream uplift. Reusable across bridge recipes.- 20 recipes migrated to pull midi2 externally:
| Build system | Mechanism | Count |
|---|---|---|
| Pico SDK | FetchContent_Declare(midi2 GIT_TAG v0.3.3) + target_link_libraries midi2::midi2 |
8 |
| TinyUSB native CMake | same FetchContent pattern | 2 |
| ESP-IDF | idf_component.yml declaration + midi2 in REQUIRES |
7 |
| PlatformIO + ESP32_Host_MIDI | lib_deps += sauloverissimo/midi2 @ ^0.3.3 |
3 |
- 11 host-side sub-tests for
m2bridgecover construct/destruct heap balance (50× cycle stress), topology setter bounds, group rewrite formula on slots 0/1/3, out-of-range slot rejection, and the USB-MIDI 1.0 byte-stream uplift path. Compiles and runs clean under-fsanitize=address,undefined. - Tagline shift from "zero-allocation" to "static-by-default" — honest about init-time
newinsidem2bridge. The C99 core (midi2) remains strictly zero-allocation. - 5155 lines removed (vendored midi2.{h,c}) replaced by 26 lines of FetchContent + 22 lines of dependency declarations across manifests.
See CHANGELOG.md for the full breakdown.