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
CONTRAPUNK WEEKEND JAMWK 01·Koji Kondo·STARTS IN 3 DAYS

EVERY NOTE
HAS A CONSEQUENCE

A Harmony Engine and Improvisation Companion.

<10ms PLUCK→MIDI 7 MODES 57 SCALES OPEN SOURCE
◆ ◇ ◆ ◇ ◆ LIVE · TRY IT NOW

PLAY ONE NOTE. HEAR COUNTERPOINT.

◆ ◇ ◆ ◇ ◆ OUTPUT · LIVE TAKE
DEMO REEL

WATCH THE HARMONY WRITE ITSELF

Every block, the solver picks the best legal next note for each voice.

demo · contrapunk.mp4 · live take
RECORDING SOON
v1.1.0 — Kondo KITT
Performance view · MIDI Learn · sheet-music history · internal synth · CLAP plugins
LIVE GUITAR TAKE · PALESTRINA MODE · SUB-10MS PLUCK→NOTE · NO EDITING
◆ ◇ ◆ ◇ ◆ HARMONY MODES

DIATONIC FOURTHS

+3 scale degrees above melody
Chromatic fallback when out of key
Open / quartal sound
Stateless
LIVE · CLICK A FRET
E2A2D3G3B3E43579121517192124
◆ ◇ ◆ ◇ ◆ VOICE LEADING

PALESTRINA

16th-century strict species

MotionMostly stepwise
VoicingTight
Common tonesHeld when possible
Contrary motionEncouraged
LIVE · CLICK A FRET
E2A2D3G3B3E43579121517192124
◆ ◇ ◆ ◇ ◆ PLUGIN HOST
CLAP · HOSTED IN-APP

BRING YOUR OWN SYNTH

Contrapunk hosts CLAP plugins via a safe clack-host wrapper. Route the harmony straight into an instrument — no DAW required.

CLAP PLUGIN HOST · clack-host
SLOT 01 · INSTRUMENT
VITAL.clap
wavetable · 2 in · 2 out
HARMONY
→ MIDI →
PLUGIN
→ AUDIO →
OUT
CLAP ABI · SAFE WRAPPER · GUI, LOG, AUDIO-PORTS, NOTE-PORTSROUTING HARMONY → INSTRUMENT
◆ ◇ ◆ ◇ ◆ HOW TO RUN IT
FREE · OPEN SOURCE · NO ACCOUNT

THREE WAYS IN

DESKTOP
FREE
TAURI V2 · NATIVE · OFFLINE
  • ✓ Full engine · 7 harmony modes · 57 scales
  • ✓ Hosts CLAP plugins inside the app
  • ✓ macOS DMG, Windows, Linux
  • ✓ Your audio never leaves your machine
BROWSER
NO INSTALL
APP.CONTRAPUNK.COM · WASM
  • ✓ Same Rust core, compiled to WebAssembly
  • ✓ WebMIDI out to DAWs and hardware
  • ✓ Open a tab, grant mic, play
OPEN IN BROWSER →
SOURCE
OPEN
BUILD FROM SOURCE WITH CARGO TAURI
  • ✓ Fork it, ship a DAW plugin
  • ✓ Use the rules engine in research
  • ✓ Open source — read it, change it, share it
  • ✓ Rust + Tauri + WASM on one repo
CLONE THE REPO →
◆ ◇ ◆ ◇ ◆ VOICES
FROM THE COMMUNITY

WHAT MUSICIANS SAY

"

The Jazz mode voicings are better than I am. I mean that as a compliment to the code.

KE
@kenji_osaka
JAZZ GUITARIST
"

I make my species-counterpoint students check their homework against Palestrina mode. Beats my red pen.

LE
@lena.strings
COMPOSITION PROF
"

Random-below-no-2nds into a Rhodes plugin hosted in-app. Instant ECM record.

DR
@drifter_7
AMBIENT PRODUCER
"

Looked under the hood expecting hacks. Found a voice-leading solver with comments. Read the whole thing on a flight.

BO
@boris.k
DSP ENGINEER
"

We run two guitars into two instances, quantize to different modes. Feels like a third band member.

SU
@sunday_kids
POST-ROCK BAND
"

Parallel-fifths rejection on by default is a value statement. Ship more value statements.

MA
@mara.note
MUSIC THEORIST
◆ ◇ ◆ ◇ ◆ FUN FACT
1970s INDONESIAN PROG ROCK

There was a 1970s Indonesian progressive rock band also called Contrapunk that released an album called "Putri Mohon Diri". They blended traditional Indonesian instruments, intense guitar work, and classical influences. Listen on YouTube.

GET CONTRAPUNK

THREE WAYS IN.
ALL FREE.

Browser at app.contrapunk.com. macOS DMG from GitHub Releases. Build from source with cargo tauri dev.