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)

GETTING STARTED

Up and running in under 5 minutes

CHOOSE YOUR INPUT

Contrapunk turns notes into harmony. Pick how you want to send notes in:

BROWSER (QUICKEST START)

STEP 1

Open app.contrapunk.com in Chrome or Edge (Web MIDI requires Chromium).

STEP 2

Select an input device from the dropdown. If you have a MIDI controller plugged in, it will appear here.

STEP 3

Select an output device. To hear sound, you need a software synth receiving MIDI. On macOS, set up an IAC Driver to route MIDI to your DAW or synth app.

STEP 4

Press Start. Play a note. Hear harmony.

MIDI KEYBOARD

WHAT YOU NEED

  • A USB MIDI controller (any keyboard, pad controller, or wind controller)
  • A software synth or DAW to receive the harmonized MIDI output
STEP 1: OPEN THE APP

Go to app.contrapunk.com in Chrome or Edge.

LOWER LATENCY

For the lowest latency, download the macOS app (9.6 MB).

STEP 2: CONNECT

Plug in your MIDI controller. It should appear in the Input dropdown. Select it.

For output, select your synth's MIDI port, or use an IAC Driver to route to a DAW.

STEP 3: CONFIGURE

Pick your settings:

  • Key + Scale: set the musical key (e.g. C Major, D Dorian)
  • Harmony Mode: choose how harmony is generated (Diatonic Thirds, Contrary Motion, Strict Counterpoint, etc.)
  • Voice Leading: Palestrina, Bach, Jazz, or Free
STEP 4: PLAY

Press Start. Every note you play generates harmony voices in real-time following the counterpoint rules you selected.

GUITAR INPUT

WHAT YOU NEED

  • An electric guitar (or acoustic with pickup)
  • An audio interface (e.g. Focusrite Scarlett, Audient iD14, etc.)
  • A software synth or DAW to receive MIDI output
STEP 1: CONNECT

Plug your guitar into your audio interface. Download the macOS app (native recommended for lowest latency).

STEP 2: SELECT DEVICE

In the Guitar Input panel, select your audio interface from the device dropdown. Choose the correct channel (usually 1 for mono guitar).

STEP 3: CALIBRATE

Click Tune + Calibrate. Tune each string when prompted. Contrapunk learns your guitar's response: gain levels, noise floor, and string characteristics.

TIP

Calibration only takes 30 seconds and dramatically improves detection accuracy. Do it once per guitar.

STEP 4: CHECK SIGNAL

Strum your guitar. The signal meter should respond. If it looks flat, check:

  • Correct channel selected
  • Audio interface gain is up
  • Guitar volume knob is up
STEP 5: PLAY

Set your key, scale, and harmony mode. Press Start. Play single notes or melodies. Contrapunk detects each note and generates harmony in real-time.

TIP

For best results, play clean single notes. Chords and heavy distortion make pitch detection harder. Clean tone works best.

IAC DRIVER SETUP (MACOS)

IAC (Inter-Application Communication) is a virtual MIDI bus built into macOS. It lets Contrapunk send MIDI to any app: Logic, Ableton, GarageBand, a standalone synth, etc.

STEP 1: OPEN AUDIO MIDI SETUP

Open Audio MIDI Setup (search in Spotlight or find in /Applications/Utilities).

If you don't see the MIDI Studio window, go to Window > Show MIDI Studio.

STEP 2: ENABLE IAC DRIVER

Double-click IAC Driver in the MIDI Studio window.

Check Device is online.

You should see at least one port listed (usually "Bus 1"). That's all you need.

STEP 3: USE IN CONTRAPUNK

Back in Contrapunk, the IAC Driver port will now appear in the Output dropdown. Select it.

STEP 4: RECEIVE IN YOUR DAW

In your DAW or synth app:

  • Logic Pro: create a Software Instrument track. MIDI from IAC is received automatically.
  • Ableton Live: Preferences > MIDI > enable IAC Driver as input (Track + Remote).
  • GarageBand: create a Software Instrument track. IAC MIDI appears automatically.
NOTE

IAC is macOS only. On Windows, use loopMIDI for virtual MIDI routing. On Linux, JACK or ALSA virtual ports work similarly.

WHAT NEXT

  • Try different harmony modes: Strict Counterpoint follows Renaissance rules, Barry Harris uses jazz 6th diminished movement
  • Experiment with voice leading styles: Palestrina rejects parallel fifths, Jazz allows them
  • Enable modal interchange to harmonize out-of-scale notes by borrowing from parallel modes
  • Try the style presets for instant character changes
  • Adjust humanization for timing jitter, velocity variation, and swing