Skip to content

v0.2.2 -- Single-header midi2.h

Choose a tag to compare

@sauloverissimo sauloverissimo released this 03 Apr 15:26
· 118 commits to main since this release

What's new

Single-header amalgamation (midi2.h)

All 7 modules in one file. Drop src/midi2.h into your project:

#include "midi2.h"            // declarations + inline functions

// In exactly ONE .c file:
#define MIDI2_IMPLEMENTATION
#include "midi2.h"

Follows the same pattern as SQLite, stb, cJSON, and cmidi2. Auto-generated from multi-module sources via tools/amalgamate.sh.

MT 0x2 → MT 0x4 protocol translation

  • midi2_msg_mt2_to_mt4() -- stateless translation with proper value scaling per M2-104-UM v1.1.2 Section 7
  • midi2_dispatch.upscale_mt2 flag -- automatic upscale of incoming MIDI 1.0 CV messages to MIDI 2.0 CV callbacks

Streaming SysEx (midi2_conv)

The byte stream converter now emits SysEx7 packets incrementally (START/CONTINUE/END) as bytes arrive, removing the previous 6-byte limitation. Breaking change: midi2_conv_init() simplified to 2 parameters.

Hardware validation expanded

  • Daisy Seed (STM32H750) confirmed: USB MIDI 2.0 Device via STM32 HAL USB
  • Table now shows real board names (T-Display S3, Waveshare ESP32-P4, T-PicoC3, Raspberry Pi Pico/Pico 2, etc.)
  • New Transport column replacing TinyUSB column (TinyUSB, ESP-NOW, BLE, Native USB, STM32 HAL USB, PIO-USB)

Tests

252 tests across 8 test suites (was 232). 20 new tests for the amalgamated header covering all modules.