DO

dexterlabs1/openpatch

Developer tools
1 stars 0 forks Quality 61 Trend 25MIT

An open-source modular synthesizer in Rust, built for performance and native MCP control by Claude and Codex.

Overview

A native modular synthesizer in Rust. Build a voice, follow the voltage, and make it move. Get started · Controls · Claude & Codex · Project status · Documentation Studio Rack panels, transport toolbar and analysis dock in the native desktop app, rendered on Linux with Mesa in CI. macOS is the primary design target. - Set values with direct faders, visible mode choices and precise numeric entry, connect cables, and arrange modules on rack rails. Held cable drags pan at the rack edges to reach offscreen jacks. Live edits preserve oscillator phase and circuit memory. - Explore a nonlinear transistor ladder, OTA VCA, and switched RC envelope alongside an idealized ramp VCO, gate clock, and voltage/audio interface. Each model has documented assumptions and validation. - Explore a stiff string / beam with sixteen resonant modes, force excitation, damping, and movable strike and pickup positions. Shape it with sliders and precise values.

README

A native modular synthesizer in Rust. Build a voice, follow the voltage, and make it move.

Get started · Controls · Claude & Codex · Project status · Documentation

Studio Rack panels, transport toolbar and analysis dock in the native desktop app, rendered on Linux with Mesa in CI. macOS is the primary design target.

  • An instrument you can patch. Set values with direct faders, visible mode choices and precise numeric entry, connect cables, and arrange modules on rack rails. Held cable drags pan at the rack edges to reach offscreen jacks. Live edits preserve oscillator phase and circuit memory.
  • A reference analog voice. Explore a nonlinear transistor ladder, OTA VCA, and switched RC envelope alongside an idealized ramp VCO, gate clock, and voltage/audio interface. Each model has documented assumptions and validation.
  • Strike a physical body. Explore a stiff string / beam with sixteen resonant modes, force excitation, damping, and movable strike and pickup positions. Shape it with sliders and precise values. Physical model and limits →
  • Build a richer voice. Blend four simultaneous oscillator waveforms, drive FM and PWM, and choose hard or soft sync. Audio oscillator and validation →
  • Play your own waves. Wavetable VCO and LFO add immutable custom banks, position CV, polyphonic modulation and guarded workspace import/export. Controls, portable files and checked digital scope →
  • Shape random motion. Clock probabilistic voltage changes, control their spread, and move between targets with stepped, linear, smooth and exponential outputs. Patch external polyphonic CV to interpolate your own values. Random controls and numerical scope →
  • Explore macro synthesis. MACRO VOICE offers eight engines: detuned analog, wavefolding, feedback FM, harmonic spectra, spectral wavetables, four-note chords, swarm, and metallic tones. It supports 16 independent voices, OUT/AUX outputs, three timbral CVs, and a trigger-driven decaying low-pass gate. Leave TRIG unpatched for sustained sounds. Its FM and additive shaping adapt MIT-licensed Plaits algorithms; this native instrument is not a sample-identical Plaits port. Signal contract and validation →
  • Write a moving pattern. Sequence pitch, timbre, and accents with three rows of eight voltage controls, live step lights, and Clock/Run/Reset actions. Sequencer controls →
  • Build longer arrangements. Use SCORE through MCP for chords, ratchets and automation, then shape the mix with native drums, stereo delay, reverb and sidechain compression. A bounded patch reconstruction now maps matching VCA, ADSR and VCF roles to the qualified stock models. Scores and studio modules →
  • Clock an echo. Stock Delay adds a mono clock-synchronized delay with tone, feedback, independent MIX/WET outputs and four signed CV depths. Its shared rack/browser panel accepts milliseconds or seconds directly. The final guarded DSP matrix passes; native device and remaining host qualification are tracked in the Delay contract.
  • Shape and route control signals. Eight attenuverters, ten independent mutes, and a three-input CV mixer add voltage offsets and performance control. Module bypass is saved and undoable. Voltage utilities →
  • Follow the voltage. Probe any output and voice in the native signal scope. Compare two signals, trigger a waveform, or switch to X/Y; read calibrated range, DC, and RMS. Scope controls →
  • See the signal in each plug. Green/red lights follow positive/negative mono signals; blue follows polyphonic signal energy. Stacked inputs show their actual sum, and the lights keep emitting in dark-room mode. Signal lights →
  • Clear space to work. Adjust cable transparency and tension in View, reveal routes by hovering a port, and set plug-light brightness independently. Turning plug lights off stops their observation work. Cable presentation →
  • Sound into motion. Open the optional Aurora, Spectrum, or Waveform view in the analysis dock. Edit GLSL shaders in the app while the last working shader keeps running.
  • A rack agents can work with. Claude and Codex can inspect, preview batch edits, patch, undo/redo, analyze individual output channels, capture waveform bins, tune, save, and render through a local MCP server using the same validated controls as the UI.
  • Watch a patch take shape. Agents can submit paced construction plans, with real edits, shared undo, and Pause, Resume and Cancel. Existing cables unplug, travel and settle when MCP repatches them, including direct tool calls. View → Agent motion offers Full, Reduced or Off for the module, cable and parameter cues. Opt into Follow agent edits to reveal offscreen work while preserving your zoom and saved project view.

Get started on macOS

For Apple Silicon, install stable Rust, Xcode Command Line Tools (xcode-select --install), and Python 3. Build a native application bundle:

git clone https://github.com/dexterlabs1/openpatch.git
cd openpatch
cargo build --locked --release -p openpatch-desktop -p openpatch --bins
python3 scripts/package_macos.py
open dist/OpenPatch.app

The bundle includes the desktop app and the CLI used for MCP attachment. The app opens a connected reference voice with playback paused. Press Play or Space to hear it. To run directly from source, use cargo run --locked --release -p openpatch-desktop.

This is a v0.2 development preview, built from source. The local .app is ad-hoc signed; it is not notarized. CI also builds Linux and Windows targets; platform notes are below.

Play the rack

Action Control
Play / pause Space or the transport toolbar button
Open the library Enter, the library toolbar icon, Edit → Add module, or right-click empty rack space
Add from the library Drag a tile onto the rack, click a tile, or use Up/Down → Enter in search
Inspect a library panel Click Inspect, or Cmd/Ctrl-I while the library has focus; Esc closes inspection first
Enlarge library previews Library → Preview selects 25–200%; wide panels scroll horizontally and keep their real proportions. Details →
Patch / unplug Drag or click between jacks; an occupied output picks its top plug for moving to another output; right-click an input to unplug
Add / clone a cable Cmd-drag either jack adds a cable; Cmd-Shift-drag clones its top cable
Stack / remove cables Drop onto a version-2 input to add a signal; Shift-click a jack deletes its top cable
Bring a buried plug forward Right-click its jack → select the cable → Move this cable, then return it to the same jack; the opposite end keeps its order
Edit cable bundles / colours Right-click either jack → Move all cables, individual cable actions, or Custom RGB…; each operation is undoable
Choose the next cable colour Toolbar Cable swatch; [ / ] cycle while the rack is idle. Edit palettes… saves personal sets
Adjust a numeric fader Click or drag vertically; hold Cmd/Ctrl for fine adjustment; double-click to reset
Choose a categorical state Click its segment; clicking or double-clicking the selected state leaves it selected. Five shared choice controls and keyboard actions →
Type a value or expression Right-click a parameter control, or click a printed value; try A4, 440*2, or C4v. Enter applies and Esc cancels
Shape a voice with linear or exponential CV gain File → Stock VCA voice; controls and gain meter
Blend and synchronize audio waveforms File → Synced waveform voice
Layer voices with CV-controlled mixing File → Layered stereo morph
Add transpose and vibrato to a chord File → Stacked pitch voice
Shape gates and sample pitch File → Gate shaping voice
Explore voltage and mute banks File → Voltage utilities
Play manual gates and triggers File → Manual pulses voice
Latch and interrupt a note File → Manual push voice
Delay and reshape gates File → Delayed gate voice
Hear clocked audio repeats File → Clocked delay voice
Build a generative melody File → Random motion voice; probability and interpolation
Bypass a module Right-click its panel → Bypass module
Clock a stereo routing pattern File → Switched stereo voice
Play the sequencer example File → Sequenced analog voice
Inspect audio processing load View → Audio performance, or click DSP in the footer; measurement details
Inspect a signal View → Signal scope, the scope toolbar icon, or right-click an output jack → Inspect in scope X/Y
Select / arrange Shift-click module headers to build a group; drag a selected header to move it; Cmd-A selects all
Duplicate Cmd-D for modules only; Shift-Cmd-D adds inputs for a selection, or all cables for a hovered module when nothing is selected
Save / browse module presets Right-click a module → Presets; preview settings before applying
Initialize / randomize Cmd-I / Cmd-R, or the module context menu; one undo step per group
Remove Delete / Backspace the selection, or the hovered module when nothing is selected
Clear patching Edit → Clear cables removes all cables in one undoable action
Pan / zoom Scroll, middle-drag, or arrow keys; pinch or Cmd-scroll to zoom 25–400%; Cmd −/+ steps zoom; Cmd-0 restores 100%
Dim the room View → Room brightness, with Darkroom (10%) and Lights on (100%); live module lamps and Scope screens keep emitting
Lock placement View → Lock module positions prevents accidental module moves while keeping controls and cables editable
Save / Save As / open Cmd-S / Shift-Cmd-S / Cmd-O
Undo / redo Cmd-Z / Shift-Cmd-Z

Compatible jacks glow and snap during patching. Valid drops onto occupied version-2 inputs preserve existing cables. Dropping a moved plug on empty space, a wrong-type jack, or an identical route deletes that cable; Esc cancels. Add Shift at drop to permit an identical route. Cable gestures → The quantizer’s piano keys toggle scale notes. One numeric parameter drag, changed categorical selection, or completed single/group module move is one undo step. Selecting the current categorical state adds no edit or undo step. Module drag previews stay out of saves and recovery. Split and Merge expose all 16 ports; right-click a module to select its monitored output, or right-click an output jack to inspect its voltage in the signal scope. Polyphonic playback uses the first channel unless you route through SUM, which now includes output attenuation, a six-band level meter, and a live input-channel count. VIZ adds a dedicated 16-channel polarity display with matching rack and browser panels.

Use Ctrl in place of Cmd on Linux and Windows. Keyboard shortcuts apply outside text fields. Esc cancels patching or closes an editor.

Projects live in ~/OpenPatch by default. Save updates the current .openpatch file with its modules, cables, layout, view, and current sequencer Run and Push HOLD settings; Save As creates another copy. Older JSON patches still import. Recovery copies keep unsaved work separate from the original and are offered on the next launch. Saving and recovery →

Claude & Codex

Follow the MCP setup guide for Claude Code, Claude Desktop, or Codex configuration. On macOS and Linux, openpatch attach connects clients to an already-open rack: Claude and Codex can share the same live patch, revision checks and undo history. Click MCP in the toolbar to start the bridge and copy connection details. Press Play locally to audition changes; agents can also export WAV files without speaker playback.

The desktop --mcp mode launches a new window per client and remains available on all three platforms; Windows attachment is still ahead. The separate CLI also supports headless MCP, offline rendering, and visualizer export.

Where it stands

Parity is the baseline: match VCV Rack Free 2 host functionality and the 49 Core / Free modules, then extend usability, performance, visuals, and agent control. The parity roadmap tracks concrete acceptance gates. OpenPatch has not reached parity yet.

Watch the patch take shape. Progressive MCP construction now gives real committed steps coordinated module, cable and parameter motion, with Reduced and Off modes. The toolbar MCP button starts the local bridge and provides Claude/Codex connection details. See visible construction and session controls.

69 built-in kinds: Random modulation, Wavetable VCO and LFO, an eight-engine MACRO VOICE, a separate stock-style VCA with linear/fourth-power CV response and per-channel gain columns, a separate stock-style VCF with low-pass/high-pass outputs and signed CV depths, a clock-synchronized Stock Delay with MIX/WET outputs, editable Notes and resizable Blank, sixteen-pad MIDI → Gate, sixteen-output MIDI CC, polyphonic ADSR EG, eight-row S&H / Analog Shift Register, polyphonic Random Values, seven-color Noise, an original physical string / beam resonator, a four-output audio oscillator, a reference analog voice, four-track scores and studio effects, sequencer, sequential switches, ten-row Pulses, latching Push, polyphonic Gates, rack-mounted Scope, voltage, gate-processing and polyphonic utilities, MIDI → CV, stereo audio, and legacy modules. Try the connected examples in File, then drag modules from the docked library. Search controls and ports, filter by musical role, and save favorites without leaving the rack. Saved module bypass and atomic mute inversion share the UI and MCP history. The module coverage plan tracks 49 VCV Core / Free targets; kind count is not a count of completed equivalents.

The new Stock VCA’s pinned actual-class comparison passes 72 traces at three sample rates: 55,872 frames and 800,328 active output/gain comparisons, with maximum absolute error 9.54e-7 under the frozen 2e-6 + 2e-6 * abs(reference) gate. Its integration validation record includes passing callback/panel tests, reviewed Linux screenshots and macOS ARM, Windows and Linux CI. Native macOS/Windows window input, physical MIDI/audio I/O, and complete Rack host/import parity remain open.

Stock Delay’s final guarded DSP report passes all 43 whole-module cases at three rates with zero measured error. Its Engine adoption microprofile measures ownership transfer separately from full callback deadlines. The release workspace, Rust checks and 79 Python/MCP tests pass; the macOS ARM bundle’s ad-hoc signature and notices are verified without installing or launching it. Platform CI and verification of the configured 97 native screenshots are release gates. Native Mac window/input/playback and physical device qualification remain open.

macOS ARM is the current product focus. CI builds and tests macOS ARM64, Linux x86-64, and Windows x86-64, including native window and shader checks on Linux. Audio devices and GPU drivers need broader hands-on testing.

File → Save template sets your reusable starting patch. New / Cmd-Ctrl-N opens it as a clean, untitled project; missing or invalid templates fall back to the factory analog voice. See projects and recovery.

Factory patches use the version-2 engine: named outputs, up to 16 channels per cable, and feedback with one sample of delay per cable. Old patches retain their original mono timing until explicitly converted. The explicit STEREO AUDIO sink sums polyphonic voices into left/right output and stereo WAV files; other selected outputs retain channel-0 mono behavior. Hardware audio input, expanded multichannel I/O, MIDI output and broader parameter mapping, VCV patch/plugin compatibility, and broader module coverage remain ahead. See MIDI and audio for performance controls and sample-timed MCP traces.

Performance goal: low CPU use and predictable audio deadlines on large patches. The latest paired M1 Max reference-voice benchmark takes about 33% less processing time than the previous OpenPatch build, with matching checked signals. Sixteen full circuit voices still exceed realtime capacity. Callback tests check allocation-free processing and graph swaps. A speedup over VCV Rack has not been demonstrated; see the results and methodology.

Go deeper

Guide What it covers
Rack editing Group selection, duplication, placement, cable-copy policies, and runtime identity
Stacked cables Input summing, polyphonic modulation, individual cable editing, and MCP routing
Projects and recovery Save, Save As, legacy imports, concurrent edits, and recovery copies
Module presets Capture, preview, save and load native presets from the rack or MCP
Stereo and routing Mid/Side width, six-input mixing, octave shifts, and signal distribution
Voltage-controlled mixing Four-channel VCA mixing, live strip meters, CV response, and complementary fades
MIDI and audio Keyboard performance, input devices, stereo routing, and reproducible agent performances
Engine v2 Named ports, polyphony, feedback timing, state migration, and legacy compatibility
Analog models Circuit equations, voltage conventions, reference comparisons, and limits
Parity roadmap Host functionality, acceptance gates, delivery order, and MCP expansion
Stock VCA Percentage level, CV response modes, per-channel effective gain and bounded DSP qualification
Stock Delay Clocked mono repeats, ms/s entry, MIX/WET routing, state handoff and final bounded DSP evidence
Audio oscillator Polyphonic FM, PWM, sync and measured compatibility gaps
Module coverage The 49 Core / Free targets and acceptance criteria
MCP integration Client configuration, tools, revision checks, and file safety
Visualizers Native rendering, shader uniforms, and optional HTML export
Architecture DSP, audio/control thread boundaries, persistence, and roadmap
Performance Benchmarks and fair comparisons

MIT licensed. Original native artwork; Rust DSP includes attributed algorithm adaptations under their respective licenses. OpenPatch is independent of VCV and is not affiliated with or endorsed by VCV. Dependency licenses remain with their respective authors. Stock Delay’s mono sinc adaptation credits BSD-2-Clause libsamplerate; its notice is bundled and available with openpatch-desktop --third-party-licenses. Panel typography uses Barlow Semi Condensed under the SIL Open Font License; its notice is bundled with the Mac app and available with openpatch-desktop --font-license.

View this README on GitHub

Install

This server does not publish a one-line install command.

Open the repository installation guide