THE ENGINE · RUST · WASM · CLAP
ONE RUST CORE.
THREE SURFACES.
The same solver runs in the desktop app, the browser, and hosts CLAP plugins inside itself. No AI. No network. Just the code in /src/harmony.
◆ ◇ ◆ ◇ ◆ VOICE-LEADING SOLVER
FOUR STYLE PRESETS · STRUCT-LEVEL WEIGHTS
THE RULES, AS NUMBERS
Contrapunk's solver is a cartesian-product enumerator over legal voices, pruned by hard rules, scored by a weighted sum. Swap presets to change the aesthetic.
PALESTRINA
16th-century strict species
| Motion | Mostly stepwise |
| Voicing | Tight |
| Common tones | Held when possible |
| Contrary motion | Encouraged |
LIVE · CLICK A FRET
—
◆ ◇ ◆ ◇ ◆ VOICE REGISTERS
SATB · FIXED MIDI RANGES
WHERE EACH VOICE LIVES
Every candidate note is clamped to its voice's register before scoring. Centering bias picks the opening chord.
SOPRANOC4–C6
ALTOG3–E5
TENORC3–A4
BASSE2–E4
MIDI 36 — 84 · CENTER MARK = FIRST-CHORD PREFERENCE
◆ ◇ ◆ ◇ ◆ PLUGIN HOST
CLAP · clack-host
HOST YOUR OWN INSTRUMENT
The app links clack-host, a safe Rust wrapper over the CLAP ABI. Load a .clap synth; Contrapunk routes the generated MIDI straight into it and mixes the audio out.
CLAP PLUGIN HOST · clack-host
SLOT 01 · INSTRUMENT
VITAL.clap
HARMONY
→ MIDI →
PLUGIN
→ AUDIO →
OUT
CLAP ABI · SAFE WRAPPER · GUI, LOG, AUDIO-PORTS, NOTE-PORTSROUTING HARMONY → INSTRUMENT
◆ ◇ ◆ ◇ ◆ THE STACK
CORE
Rust · no_std-friendly
/src/harmony, /src/dsp
DESKTOP
Tauri v2
native window · plugin host
BROWSER
WASM · Web Audio API
same core · no install
MIDI
midir · virtual ports
route into any DAW
AUDIO
cpal · CoreAudio/ASIO
lock-free ring buffers
PLUGINS
clack-host · CLAP
GUI, log, audio + note ports
GET CONTRAPUNK
THREE WAYS IN.
ALL FREE.
Browser at app.contrapunk.com. macOS DMG from GitHub Releases. Build from source with cargo tauri dev.