11# Changelog
22
3- All notable changes to ` midi2_cpp ` are recorded here. Format follows
3+ All notable changes to ` midi2cpp ` are recorded here. Format follows
44[ Keep a Changelog] ( https://keepachangelog.com/en/1.1.0/ ) and this project
55adheres to [ Semantic Versioning] ( https://semver.org/spec/v2.0.0.html ) ,
66mirrored from the upstream midi2 C99 policy.
77
8+ ## [ 0.3.0]
9+
10+ Renamed from ` midi2_cpp ` to ` midi2cpp ` in deference to [ ` starfishmod/MIDI2_CPP ` ] ( https://github.com/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.
11+
12+ This is a ** breaking** rename. Every consumer-facing identifier moved:
13+
14+ ### Breaking
15+
16+ - ** Repository:** ` github.com/sauloverissimo/midi2_cpp ` -> ` github.com/sauloverissimo/midi2cpp ` (the old URL redirects on the GitHub side, but new code should pin the new name).
17+ - ** Header:** ` <midi2_cpp.h> ` -> ` <midi2cpp.h> ` . ` using namespace midi2; ` is unchanged; the C++ API surface (` m2device ` , ` m2host ` , ` m2bridge ` , ` m2ci ` , ` Bridge ` , ` Device ` , ...) is unchanged.
18+ - ** CMake target:** ` midi2_cpp ` -> ` midi2cpp ` ; alias ` midi2_cpp::midi2_cpp ` -> ` midi2cpp::midi2cpp ` . ` target_link_libraries(... midi2cpp) ` replaces ` ... midi2_cpp ` .
19+ - ** 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 ` ).
20+ - ** Manifests:** ` library.properties ` ` name=midi2cpp ` , ` library.json ` ` "name": "midi2cpp" ` . The Arduino Library Manager and the PlatformIO Registry treat the rename as a new entry; the previous ` midi2_cpp ` listings will be retired in a follow-up PR to ` arduino/library-registry ` .
21+
22+ ### Changed
23+
24+ - ** Dependency on midi2 bumped to v0.3.4** across every install path (Arduino LM ` depends=midi2 (>=0.3.4) ` , PlatformIO ` ^0.3.4 ` , ESP-IDF ` version: "v0.3.4" ` , CMake ` find_package(midi2 0.3.4 CONFIG) ` + ` FetchContent_Declare(... GIT_TAG v0.3.4) ` ). midi2 v0.3.4 fixes the ESP-IDF Component Manager gate (` dist/ ` filtered from the dependency tarball); without it, ESP-IDF recipes failed configure.
25+
26+ ### Migration
27+
28+ ``` diff
29+ - #include <midi2_cpp.h>
30+ + #include <midi2cpp.h>
31+ ```
32+
33+ CMake:
34+ ``` diff
35+ - FetchContent_Declare(midi2_cpp ...)
36+ - target_link_libraries(my_target PRIVATE midi2_cpp)
37+ + FetchContent_Declare(midi2cpp ...)
38+ + target_link_libraries(my_target PRIVATE midi2cpp)
39+ ```
40+
41+ Arduino Library Manager: search ` midi2cpp ` (the previous ` midi2_cpp ` entry will be removed once the registry PR lands).
42+
43+ PlatformIO: ` lib_deps = sauloverissimo/midi2cpp @ ^0.3.0 ` .
44+
845## [ 0.2.0]
946
10- Single source of truth for the MIDI 2.0 stack: midi2_cpp no longer
47+ Single source of truth for the MIDI 2.0 stack: midi2cpp no longer
1148vendors the C99 core and is published as a regular Arduino /
1249PlatformIO library that depends on midi2 explicitly. Every recipe
1350under ` examples/ ` was migrated to pull midi2 externally through the
@@ -16,23 +53,23 @@ native CMake, IDF Component Manager for ESP-IDF, lib_deps for
1653PlatformIO).
1754
1855This is a breaking release. Consumers that previously vendored
19- ` midi2_cpp /src/midi2.{h,c}` directly will break; the migration path
56+ ` midi2cpp /src/midi2.{h,c}` directly will break; the migration path
2057is documented in the manifest below and in the per-build-system
2158patterns shipped under ` examples/ ` .
2259
2360### Breaking
2461
25- - ** Vendored ` src/midi2.{h,c} ` removed.** midi2_cpp now declares
62+ - ** Vendored ` src/midi2.{h,c} ` removed.** midi2cpp now declares
2663 midi2 as an external dependency:
27- - ` library.properties ` carries ` depends=midi2 (>=0.3.3 ) ` . Arduino
64+ - ` library.properties ` carries ` depends=midi2 (>=0.3.4 ) ` . Arduino
2865 Library Manager auto-installs midi2 when a sketch includes
29- midi2_cpp .
66+ midi2cpp .
3067 - ` library.json ` carries `dependencies."sauloverissimo/midi2":
31- "^0.3.3 "`. PlatformIO resolves midi2 from its registry.
68+ "^0.3.4 "`. PlatformIO resolves midi2 from its registry.
3269 - The root ` CMakeLists.txt ` exposes a three-layer fallback at the
33- top (` if(NOT TARGET midi2) ` -> ` find_package(midi2 0.3.3 CONFIG) `
34- -> ` FetchContent_Declare(midi2 GIT_TAG v0.3.3 ) ` ), then links
35- midi2_cpp ` PUBLIC midi2::midi2 ` so downstream targets see the
70+ top (` if(NOT TARGET midi2) ` -> ` find_package(midi2 0.3.4 CONFIG) `
71+ -> ` FetchContent_Declare(midi2 GIT_TAG v0.3.4 ) ` ), then links
72+ midi2cpp ` PUBLIC midi2::midi2 ` so downstream targets see the
3673 C99 core transitively.
3774
3875### Added
@@ -56,23 +93,23 @@ patterns shipped under `examples/`.
5693- ** CMake entry surface for downstream consumers** : the root
5794 ` CMakeLists.txt ` follows the same ` find_package ` -> ` FetchContent `
5895 fallback pattern that midi2 itself ships. Subprojects pulling
59- midi2_cpp via ` add_subdirectory ` or ` FetchContent ` skip the
96+ midi2cpp via ` add_subdirectory ` or ` FetchContent ` skip the
6097 ` find_package ` step (` if(NOT TARGET midi2) ` guard).
6198
6299### Changed
63100
64- - ** README tagline** drops the ` zero-allocation ` claim. midi2_cpp
101+ - ** README tagline** drops the ` zero-allocation ` claim. midi2cpp
65102 allocates in two narrow places (` m2bridge::begin() ` slot tables and
66103 ` std::function ` callback storage), so the wrapper is now described
67104 as ` static-by-default ` . The C99 core (midi2) remains strictly
68105 zero-allocation. Same shift applied to the logo and to the
69106 ` .intern/decisoes.md ` design heritage notes.
70107- ** README "Manual vendor" path** rewritten: pre-v0.2 builds vendored
71- a single ` midi2_cpp /src/midi2.{h,c}` copy; today the consumer
108+ a single ` midi2cpp /src/midi2.{h,c}` copy; today the consumer
72109 downloads both repositories side by side and adds ` midi2/dist/ `
73- plus ` midi2_cpp /src/` to its include path.
110+ plus ` midi2cpp /src/` to its include path.
74111- ** ` paragraph ` in ` library.properties ` ** rewritten: drops
75- comparisons with other libraries, focuses on what midi2_cpp itself
112+ comparisons with other libraries, focuses on what midi2cpp itself
76113 ships and the embedded targets validated.
77114
78115### Examples / Recipes
@@ -81,16 +118,16 @@ patterns shipped under `examples/`.
81118
82119| Build system | Mechanism | Recipes |
83120| ---| ---| ---|
84- | Pico SDK | ` FetchContent_Declare(midi2 GIT_TAG v0.3.3 ) ` plus ` target_link_libraries(midi2_cpp PUBLIC midi2::midi2) ` | ` rp2040-midi2 ` , ` waveshare-rp2040-midi2 ` , ` sparkfun-promicro-rp2350-midi2 ` , ` waveshare-rp2350-usb-a-midi2 ` , ` waveshare-rp2350-usb-a-bridge-midi2 ` , ` adafruit-feather-rp2040-host-midi2 ` , ` adafruit-feather-rp2040-bridge-midi2 ` , ` rp2040-promicro-ump-test-bench ` |
121+ | Pico SDK | ` FetchContent_Declare(midi2 GIT_TAG v0.3.4 ) ` plus ` target_link_libraries(midi2cpp PUBLIC midi2::midi2) ` | ` rp2040-midi2 ` , ` waveshare-rp2040-midi2 ` , ` sparkfun-promicro-rp2350-midi2 ` , ` waveshare-rp2350-usb-a-midi2 ` , ` waveshare-rp2350-usb-a-bridge-midi2 ` , ` adafruit-feather-rp2040-host-midi2 ` , ` adafruit-feather-rp2040-bridge-midi2 ` , ` rp2040-promicro-ump-test-bench ` |
85122| TinyUSB native CMake | same FetchContent pattern as Pico SDK | ` xiao-samd21-midi2 ` , ` nrf52840-promicro-midi2 ` |
86- | ESP-IDF | ` idf_component.yml ` declares ` midi2: { git: ..., version: ">=0.3.3 " } ` and ` idf_component_register ` lists ` midi2 ` in ` REQUIRES ` | ` arduino-nano-esp32-midi2 ` , ` esp32-s3-devkitc-usb-midi2 ` , ` esp32-p4-devkit-usb-midi2 ` , ` esp32-p4-devkit-host-midi2 ` , ` esp32-p4-devkit-bridge-midi2 ` , ` esp32-p4-devkit-bridge2-midi2 ` , ` t-display-s3-midi2 ` |
87- | PlatformIO + ESP32_Host_MIDI | ` lib_deps += sauloverissimo/midi2 @ ^0.3.3 ` | ` esp32-c6-devkitc-multi-midi2 ` , ` esp32-s3-devkitc-host-midi2 ` , ` t-display-s3-shield-host-midi2 ` |
123+ | ESP-IDF | ` idf_component.yml ` declares ` midi2: { git: ..., version: ">=0.3.4 " } ` and ` idf_component_register ` lists ` midi2 ` in ` REQUIRES ` | ` arduino-nano-esp32-midi2 ` , ` esp32-s3-devkitc-usb-midi2 ` , ` esp32-p4-devkit-usb-midi2 ` , ` esp32-p4-devkit-host-midi2 ` , ` esp32-p4-devkit-bridge-midi2 ` , ` esp32-p4-devkit-bridge2-midi2 ` , ` t-display-s3-midi2 ` |
124+ | PlatformIO + ESP32_Host_MIDI | ` lib_deps += sauloverissimo/midi2 @ ^0.3.4 ` | ` esp32-c6-devkitc-multi-midi2 ` , ` esp32-s3-devkitc-host-midi2 ` , ` t-display-s3-shield-host-midi2 ` |
88125
89- Each recipe drops the ` ${MIDI2_CPP_ROOT }/src/midi2.c ` (or ` midi2_c99 `
90- helper library) from its source list. Other midi2_cpp sources
126+ Each recipe drops the ` ${MIDI2CPP_ROOT }/src/midi2.c ` (or ` midi2_c99 `
127+ helper library) from its source list. Other midi2cpp sources
91128(` midi2_device.cpp ` , ` midi2_ci.cpp ` , ` midi2_host.cpp ` ,
92129` midi2_bridge.cpp ` ) keep being compiled inline from the parent tree
93- via ` ${MIDI2_CPP_ROOT }/src ` until the host helper-library shape is
130+ via ` ${MIDI2CPP_ROOT }/src ` until the host helper-library shape is
94131finalised in a future cycle.
95132
96133#### New recipes since v0.1.0
@@ -178,16 +215,16 @@ library (vendored stb-style at `src/midi2.{h,c}` from v0.3.0+).
178215- Profile (M2-101 §7): ` addProfile ` , ` removeProfile ` , callbacks for
179216 ` onProfileInquiry ` , ` onProfileEnable ` , ` onProfileDisable ` ,
180217 ` onProfileAdded ` , ` onProfileRemoved ` , ` onProfileDetailsInquiry ` ,
181- ` onProfileSpecificData ` . Storage tunable via ` MIDI2_CPP_MAX_PROFILES `
218+ ` onProfileSpecificData ` . Storage tunable via ` MIDI2CPP_MAX_PROFILES `
182219 (default 8).
183220- Property Exchange (M2-101 §8, M2-103, M2-105):
184221 - Registry: ` addProperty(name, getter, setter=nullptr) ` (read-only by
185222 default), ` addPropertyStatic(name, value) ` , ` removeProperty ` .
186- Storage tunable via ` MIDI2_CPP_MAX_PROPERTIES ` (default 8).
223+ Storage tunable via ` MIDI2CPP_MAX_PROPERTIES ` (default 8).
187224 - Subscribe / Notify state machine:
188225 ` setPropertySubscribable(name, true) ` , ` notifyPropertyChanged(name) `
189226 for fan-out, ` subscriberCount() ` . Subscriber registry tunable via
190- ` MIDI2_CPP_MAX_SUBSCRIBERS ` (default 4).
227+ ` MIDI2CPP_MAX_SUBSCRIBERS ` (default 4).
191228 - PE callbacks deliver raw bytes (header + body) instead of
192229 NUL-terminated strings, to avoid silent truncation of large JSON
193230 payloads.
@@ -196,7 +233,7 @@ library (vendored stb-style at `src/midi2.{h,c}` from v0.3.0+).
196233
197234### ` midi2::Host ` — USB MIDI 2.0 host shape
198235
199- - Reactive multi-device host (` MIDI2_CPP_HOST_MAX_DEVICES ` , default 4).
236+ - Reactive multi-device host (` MIDI2CPP_HOST_MAX_DEVICES ` , default 4).
200237 Caller wires ` tuh_midi2_* ` (or platform-equivalent) into
201238 ` notifyDeviceMounted/Unmounted ` , ` feedRx(idx, words, count) ` and
202239 ` setWriteFn(idx, words, count) ` .
@@ -261,14 +298,14 @@ library (vendored stb-style at `src/midi2.{h,c}` from v0.3.0+).
261298 platform-conditional RNG ` #if ` chain from ` midi2_ci.cpp ` . The library
262299 no longer pulls ` <Arduino.h> ` , ` pico/time.h ` , ` esp_timer.h ` , or any
263300 USB stack header.
264- - Removed the ` MIDI2_CPP_TEST_MODE ` build option. Tests now consume the
301+ - Removed the ` MIDI2CPP_TEST_MODE ` build option. Tests now consume the
265302 same public hooks platforms wire. One contract, one code path.
266303- ` Device::begin() ` no longer claims to call ` tusb_init ` internally. It
267304 initialises the library's own dispatcher and returns; the caller owns
268305 the platform USB stack lifecycle.
269306- ` Device::task() ` drops the commented ` tud_task ` stubs.
270307- C++17 floor enforced via ` static_assert(__cplusplus >= 201703L) ` in
271- ` midi2_cpp .h` .
308+ ` midi2cpp .h` .
272309- ` lib/tinyusb ` git submodule and the ` .gitmodules ` entry removed. The
273310 library has zero external dependencies: midi2 C99 stays vendored,
274311 every USB stack and clock and RNG source is caller-wired. ` git clone `
0 commit comments