Skip to content
johnclaryPublic

About

A polyphonic synth and audio effects vibecoded in rust

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

144 Commits

Folders and files

Repository files navigation

johnwave

A wave-morphing synth plugin (CLAP + VST3), built in Rust with nice-plug. There's also a reverb and a vocoder plugin.

synth-image

Getting started

Prebuilt binaries for Mac (Apple Silicon or Intel) are available. See the installation guide.

The synth also has a user manual.

What's in this repo

Folder What it is
johnwave/ The synth
johnverb/ A companion reverb effect built from the same parts (README)
johncoder/ A filter-bank vocoder, also built from the same parts (README)
shared/ The UI kit, DSP and mod routing the plugins share
xtask/ The cargo xtask bundle build command
tools/ Dev helpers, like chord.py

Requirements

  • Stable Rust, installed via rustup

Test

cargo test

This runs every crate's tests. Unit tests live alongside the code in each crate's src/. cargo test -p johnwave runs just the synth's.

Listening checks: Osc 2 Sync and Ring

Patches to try by ear in a DAW. Start each with Osc 2 ON and Mix all the way to Osc 2.

  • Sync sweep: Osc 2 Shape on saw, SYNC on, sweep Coarse 2 up. The pitch should stay put while the tone tears and sweeps. Route the Mod Env to Coarse 2 for the classic sync lead.
  • Bells: both Shapes on sine, RING on, Coarse 2 at an odd interval like +7 or +11, and a fast amp Decay.
  • Classic ring: RING on, Coarse 2 at 0, and Fine 2 nudged a little off centre.
  • Metallic sync: SYNC and RING both on, with the Mod Env on Coarse 2.
  • Switching mid-note: RING fades in and out, so it shouldn't click. SYNC switches instantly and may click.
  • High notes: some harshness is expected with SYNC at high Coarse 2 settings.

Build

cargo xtask bundle johnwave --release

This writes the plugin bundles to:

  • target/bundled/johnwave.vst3
  • target/bundled/johnwave.clap

Leave off --release for a faster, unoptimised debug build. For production releases, use bundle-universal to compile plugins that run across architectures.

cargo xtask bundle-universal -p johnwave -p johnverb -p johncoder --release

UI dev loop (standalone)

For UI work you can run johnwave as its own app, without a DAW:

cargo dev

This opens the plugin window and plays through CoreAudio. Options go after the command, e.g. cargo dev --tempo 90; cargo dev --help lists them all.

No MIDI input is connected unless you name one, by its exact device name:

cargo dev --midi-input "Oxygen 61"

If the name doesn't match, the app still opens but falls back to a silent mode (no audio or MIDI), with the error only in the terminal. To list the MIDI devices instead, run cargo dev --backend core-audio --midi-input "".

No keyboard handy? tools/chord.py opens a virtual MIDI device that holds a chord (one-time setup: pip install mido python-rtmidi). Start it first, since the app only connects to MIDI at launch:

python3 tools/chord.py                    # leave running; Enter toggles the chord
cargo dev --midi-input "johnwave keys"    # in a second terminal

--notes 48,52,55 picks other notes (MIDI numbers, 60 = middle C).

To rebuild and relaunch on every save, use watchexec (brew install watchexec):

watchexec -n -r -e rs -- cargo dev --midi-input "Oxygen 61"

-n passes the arguments straight through. Without it watchexec goes through a shell that splits "Oxygen 61" at the space.

The standalone app uses the same synth and editor code as the plugin, but nothing sits around it the way a DAW would:

  • the tempo is fixed and there's no song position, so tempo-synced LFOs can't lock to a playing song
  • nothing is saved, so every relaunch starts from default settings
  • nothing changes parameters from outside (no automation)
  • it's a debug build, so it's slower than the release plugin

Use it for layout, drawing, knob feel and the scope. Check automation, tempo sync, saving/reloading and performance in Ableton with a bundled build.

Deploy (macOS)

Copy the bundles into your user plug-in folders:

mkdir -p ~/Library/Audio/Plug-Ins/VST3 ~/Library/Audio/Plug-Ins/CLAP
cp -R target/bundled/johnwave.vst3 ~/Library/Audio/Plug-Ins/VST3/
cp -R target/bundled/johnwave.clap ~/Library/Audio/Plug-Ins/CLAP/

Then rescan in your DAW.

Todo

  • ability to type in param values (with right click?)
  • ability to edit lfo shape while modding
  • rename noise knob to "level" or "gain"
  • PAR's readout says "Filter Parallel: On/Off"; maybe "Parallel/Serial" reads better
  • show mod adjustments in readout
  • ability to mod mod env shape
  • 2× oversampling around the filter, to cut back on Drive's aliasing turns

About

A polyphonic synth and audio effects vibecoded in rust

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages