let harmony = Engine.new(Palestrina);
fn detect_pitch(buf) -> Note
const MAX_VOICES: usize = 4;
voice_leading.reject_parallels()
struct GuitarInput { onset }
engine.harmonize(note, scale)
fn detect_pitch(
  buf: &[f32]
) -> Option<Note>
let voices =
  counterpoint::
    generate(line, mode);
if interval == Fifth
  && motion == Parallel
  { reject() }
#[inline(always)]
fn onset(
  frame: &Frame
) -> bool
block_size: 128
sample_rate: 48_000
latency_ms: 7.2
// Palestrina
// counterpoint
// rules.rs
MACOS · WINDOWS · LINUX · BROWSER

DESKTOP AND BROWSER APPS

Run Contrapunk locally as a native app or use the WebAssembly build in a browser. Audio processing stays on your device.

◆ ◇ ◆ ◇ ◆LIVE IN BROWSER
WASM · WEB AUDIO · WEB MIDI

BROWSER APP

The WebAssembly build supports computer-keyboard, Web MIDI, and microphone input without installation.

app.contrapunk.com · WASM · 48KHZOPEN IN NEW TAB ↗
◆ ◇ ◆ ◇ ◆DOWNLOAD DESKTOP
NATIVE · LOWER LATENCY

DOWNLOAD THE APP

Universal macOS .dmg (Intel + Apple Silicon) and Windows x64 .exe. Latest: v1.3.1 — Holdsworth HAL.

DOWNLOAD

MACOS

UNIVERSAL · INTEL + APPLE SILICON
SIGNED + NOTARIZED · MACOS 11+
DOWNLOAD

WINDOWS

x64 · NSIS · TAURI V2
UNSIGNED · WASAPI · ASIO
DOWNLOAD

LINUX

BUILD FROM SOURCE
ALSA · JACK · PIPEWIRE
DOWNLOAD

BROWSER

WASM · WEB AUDIO API
NO INSTALL · MIC ACCESS
LAUNCH →

macOS builds are signed and notarized. The Windows installer is unsigned. Linux users can build from source.

◆ ◇ ◆ ◇ ◆NEW IN v1.3.1
HOLDSWORTH HAL · WORKSPACE + DAW

Changes in version 1.3.1

Production workspace, arrangement presets, DAW plug-ins, and guitar-to-MIDI routing.

WORKSPACE

One production UI

The full workspace now ships across desktop, browser, VST3, CLAP, and Audio Unit builds.

ARRANGEMENTS

13 presets

Apply complete harmony and Companion configurations, then duplicate them with Save As.

LOGIC PRO

MIDI FX + Guitar Audio FX

Harmonize track MIDI or convert mono/stereo guitar audio to CoreMIDI for instruments such as Analog Lab V.

VST3 + CLAP

macOS universal + Windows x64

Run Contrapunk before a DAW instrument using the host's event-routing workflow.

GUITAR

Stable sustained tracking

Faster analysis, live pitch telemetry, and a centered expression-roll trace.

USER GUIDE

Installation through troubleshooting

Read the guide for every surface, arrangement, and routing workflow.

◆ ◇ ◆ ◇ ◆FEATURES
01 · HARMONY

SEVEN HARMONY MODES

PassThrough. Diatonic Thirds. Diatonic Fourths. Random Below. Random Below (No 2nds). Contrary Motion. Strict Counterpoint. Each is a file in src/harmony/modes.rs — two are stateful, five are pure.

02 · SCALES

FIFTY-SEVEN SCALES

Ten families: diatonic, harmonic minor, melodic minor, harmonic major, double harmonic, pentatonic, blues/bebop, symmetric, world, Barry Harris. Modal interchange with a tunable borrowing range.

03 · GUITAR

GUITAR → MIDI

McLeod + single-cycle pitch detection on 128-sample buffers (~2.7ms). Onset detection, pitch voting, auto-calibration, string/fret ID. Sub-10ms pluck-to-note on M-series Macs.

04 · VOICE

FOUR-VOICE LEADING SOLVER

Cartesian-product placements across Soprano / Alto / Tenor / Bass registers. Rejects parallel 5ths and 8ves, prevents voice crossings, scores spacing, common tones, contrary motion.

05 · HUMANIZE

HUMANIZER

Timing jitter, velocity variation, swing on offbeats, duration extension. BeatClock tracks tempo and time signature. Per-note records match Note-Off to Note-On.

06 · HOST

CLAP INSTRUMENT HOST

Load a CLAP instrument through clack-host, route generated MIDI to it, and mix its audio output in the standalone app on macOS, Windows, or Linux.

07 · BROWSER

WEBASSEMBLY BROWSER APP

The Rust core is compiled to WebAssembly at app.contrapunk.com. It supports computer-keyboard input and Web MIDI output without installation.

08 · SOURCE

MIT-LICENSED SOURCE CODE

The harmony engine, application, browser build, and plug-in adapters are available on GitHub under the MIT license.