Releases: sauloverissimo/midi2cpp
v0.4.0
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.