Cross-Plugin Data Transport via Shared Memory
Cross-plugin data transport via shared memory. discoLink enables real-time audio streaming and bidirectional MIDI/parameter control between independent processes, designed as an intra-plugin bridge for modular operation. Route full synth paths, individual oscillators, envelopes, filters, or external effects into a host plugin with near-zero latency. Open source under the MIT License.
discoLink uses two plugin instances on the same DAW channel: a Host Plugin (e.g. Discovery Pro) that reads audio from shared memory and sends MIDI commands, and a discoLink Effect that writes audio to shared memory and receives commands. Audio flows through lock-free ring buffers with near-zero latency, and no function calls cross the process boundary.
The same architecture works across separate OS processes. A standalone synth can register as a device, and a DAW plugin can discover and connect to it automatically. Shared memory ring buffers and opaque 256-byte IPC messages handle all communication.
At the core of discoLink is a lock-free Single-Producer Single-Consumer (SPSC) ring buffer architecture. Audio buffers hold 16,384 samples per channel with cache-line aligned atomics to prevent false sharing. Nothing in the audio path locks or allocates, so it's safe for real-time threads.
Command and response rings carry 256-byte fixed-size messages for MIDI, parameter changes, preset loading, file exchange, and routing control. Protocol-versioned handshakes negotiate capabilities, buffer sizes, and sample rates bidirectionally.
Three transport modes are available: Audio+MIDI (default), Audio-only, and MIDI-only, so you can pick exactly the overhead your integration needs.
Devices register in a shared memory bulletin board with 16 slots. Hosts scan the registry to auto-discover running devices, check claim status, and connect without any manual configuration.
Dead processes are automatically cleaned via PID validation. Host claim tracking with linkTag support handles DAW session recall: save your project, reload, and discoLink reconnects to the same devices automatically.
discoLink supports classic MIDI 1.0 (NoteOn/Off, CC, Program Change, Pitch Bend, SysEx), full MIDI 2.0 Universal MIDI Packet with 32-bit velocity and CC resolution, and MPE (MIDI Polyphonic Expression) with per-note controllers.
Beyond MIDI, the protocol handles parameter setting (single/double precision, normalized), preset management (load by index/name, browsing, state transfer), file exchange (WAV, SFZ, presets), and dynamic routing that can tap into any oscillator, filter, LFO, envelope, gate, or output bus.
discoLink is pure C++17 with zero external dependencies. The core library builds as a static library with no framework lock-in. A self-contained JUCE module (juce_discoLink) is available for drop-in integration with Projucer or CMake projects.
Reference CLI tools (device, host, master) are included for testing the full IPC chain without a DAW. The AU/VST3 plugin acts as a polyphonic sine device for end-to-end validation.
Cross-platform support covers macOS (POSIX shm_open), Linux (POSIX shm_open), and Windows (Win32 CreateFileMapping). Builds via CMake or Projucer.
discoLink is released under the MIT License. The full source code, documentation, API reference, and protocol specification are available on GitHub.