MIDI Inspector
Audio effect with MIDI in/out that passes the track's audio through untouched, forwards MIDI, and shows a live scrolling log of every event it receives, decoded with a raw fallback line.
Source: examples/truce-example-midi-inspector/.
#What it demonstrates
- MIDI 2.0 opt-in (
midi2 = trueintruce.toml) so hosts deliver native 2.0 events (NoteOn2,PerNoteCC, ...) for full-resolution display - Streaming structured realtime data (not just scalar meters) from
the audio thread to the editor: a lock-free
EventRing(crossbeam_queue::ArrayQueue) thatprocess()pushes into and the editor drains each frame - Sharing non-parameter state through a
#[skip]field on the#[derive(Params)]struct, reached via the sameArcon both threads - iced editor via
IcedEditor/IcedPlugin, withneeds_redraw()polling the ring so a live MIDI stream repaints promptly, plus pause / clear / category filters - SysEx handling:
EventList::sysex_bytesresolves payloads, and thru re-pushes them withpush_sysex_on_portso bytes land in the output list's own pool - Stereo passthrough bus (
BusLayout::stereo()) so the plugin loads as an ordinary insert in audio-centric hosts that don't host MIDI-only plugins
#Parameters
| Name | Range | Unit | Description |
|---|---|---|---|
| MIDI Thru | on/off | -- | Forward every MIDI event to the output (on, default) or monitor only (off) |