Rust library for the Behringer DeepMind MIDI protocol. Sans-IO, no_std,
no dependencies.
The host program owns the MIDI connection and feeds bytes in and out; the library turns them into typed messages, typed parameters and a tracked view of the synthesizer.
DeepMind <--MIDI--> host program <--bytes--> deepmind-midi
let mut device: Device = new;
device.feed; // inbound, any chunking
device.tick; // the host owns the clock
device.drain_tx?; // outbound
while let Some = device.poll_event // results
device.edit?; // becomes one NRPN message
It also answers the questions an editor has to ask before it can draw anything:
what the instrument prints over each of its own faders, where the panel rules a
line between them, what colour the plate's banner and each button's lamp are,
which two presses are printed as a waveform rather than a word, which buttons
latch the keyboard rather than move a parameter and whether a cable can press
them, where an effect's controls sit and what colour its panel is, how the four
effect engines are wired, and which parameters are read about a centre rather
than from the bottom of their range. generator goes one step further and publishes the shapes a
set of parameters makes — the envelopes, the LFO waves and fades, the two
filter responses, what each oscillator is putting out, the arpeggiator's gates
— as functions a host samples into its own screen, saying in the type where an
axis is published and where it is only an ordering, where the shape rests, and
where along it the things a player is editing fall. The modulation sources say
which way they swing, and both ends of the matrix carry a dot-matrix cell —
every source, and every destination the parameter table cannot picture — so a
patch bay can be drawn in pictures; every effect slot, most parameters and the standard
controllers carry a glyph of what they do, so a tiny display can show a
picture and a bar; and each effect has a mark, its family's or a finer one of
its own, and the characters that say what kind of thing it is. The descriptions feature adds a sentence per parameter and
per effect slot saying what the control does; leaving it off keeps that prose
out of an embedded build.
Status: early. Every layer is implemented and tested against the manual:
MIDI decoding, SysEx, the 242-parameter table, the 35 effect panels, the
instrument's own front panel, programs, .syx files, the device state machine,
a blocking transport adapter and a simulated synthesizer. None of it has been
run against real hardware yet.
There is no command-line tool and there will not be one. A host needs a MIDI backend, and the library deliberately has no opinion about which.
Hardware
DeepMind 6, 6X, 12, 12X, 12D and 12XD. One protocol across all six; they differ only in voice count and whether there is a keyboard. Comms protocol versions 6 and 7, firmware 1.0 and 1.1.
Testing a host without a synthesizer
The sim feature is the other end of the conversation: it answers requests,
applies the edits it is sent and reports what it heard.
let mut synth: Synth = new;
let mut host: Device = new;
host.request_edit_buffer?;
host.drain_tx?;
synth.drain_tx?;
assert!;
A syx::File can stand in for the unit's memory, so a preset pack is a
simulated synthesizer. It has no clock: not draining it is a synthesizer that
has not replied yet, which is how a host's timeout path gets tested.
Documentation
| Protocol | Signal path, SysEx, NRPN, all 242 parameters, the CC map, value tables |
| Effects | All 35 algorithms: a drawing of each panel and what its twelve slots do, which the effect module also publishes, along with the grid and colours the drawings are made from |
| Architecture | Design, layering, testing, releases, status |
spec/ |
The same protocol as TOML. Source of truth for the docs and the code |
| NOTICE | Where the descriptions and panel colours come from |
| docs.rs | API reference, or cargo doc --open |
Development
RUSTDOCFLAGS="-D warnings"
The rustdoc line is there because a broken or redundant intra-doc link is an error in CI and nothing else catches one.
Documentation, diagrams, the effect panel drawings and the library's parameter
tables are generated from spec/. Edit the spec, then:
Editing a spec file without regenerating fails cargo test.
Fuzzing needs nightly and cargo-fuzz:
The factory preset packs are not in the repository. The tests that read them
are ignored unless DEEPMIND_PACKS points at your own copy:
DEEPMIND_PACKS=/deepmind/packs
License
Apache-2.0. See LICENSE.
Not affiliated with or endorsed by Behringer or Music Tribe.