← All docs

Synth lab — primitive audition

Render a single primitive from lib, lib_pro, or lib_studio with the parameters you set. Useful for sanity-checking an oscillator before wiring it into a build.

What’s available

lib.* — legacy primitives

  • sine(n, freq_hz) — pure sine
  • shaped_noise(n, exponent) — colored noise (exponent: 0=white, -0.5=pink, -1=brown, +1=blue, +0.5=violet)
  • bell_hit(dur, freq, decay_sec) — additive bell with inharmonic partials
  • varied_bell_hit(dur, freq, decay, pitch_cents, decay_spread, partial_spread) — same with per-call variation for live-bowl placement
  • chord_pad(n, freqs, detune_cents, amp) — detuned chord pad
  • fm_voice(n, carrier_hz, mod_ratio, mod_index) — 2-op FM
  • bird_chirp(n, rate_hz, f_lo, f_hi) — songbird-style chirps
  • owl_call(n, period_sec, base_hz) — two-note owl hoot
  • heartbeat(n, bpm) — lub-dub at set tempo
  • impulse_train(n, rate_hz, freq_hz, decay_sec, jitter) — Poisson-spaced damped sines

lib_pro.* — studio-grade primitives

  • wavetable_voice(freq, dur, num_oscs, detune_cents, morph) — multi-voice wavetable with morphing
  • granular_cloud(source, dur, grains_per_sec, grain_dur_ms, pitch_jitter) — granular time-stretching / pitch-shifting
  • additive_voice(f0, dur, partials) — sum of damped sine partials
  • modal_resonator(impulse, modes, dur) — impulse → modal IR convolution
  • karplus_strong(freq, dur, damping) — plucked-string synthesis
  • fm_voice_multi(carrier, dur, ops) — DX7-style multi-operator FM

lib_studio.* — analog modeling (Phase 7)

Oscillators (alias-free):

  • polyblep_saw, polyblep_square, polyblep_triangle
  • supersaw(freq, n_voices, detune_cents) — JP-8000 supersaw
  • sub_osc(freq, ratio) — square sub-oscillator foundation
  • sync_oscillator(leader, follower) — hard-sync (optionally swept)
  • analog_drift(audio, drift_cents, lfo_hz) — slow random pitch wobble
  • wavetable_voice_v2(table_a, table_b, freq, morph, n_voices) — two-table morph

Filters (analog models):

  • moog_ladder(audio, cutoff, resonance, drive, mode) — Moog 4-pole (via Pedalboard’s LadderFilter)
  • state_variable_filter(audio, cutoff, resonance) — Chamberlin SVF
  • ms20_filter(audio, cutoff, resonance, mode, drive) — Korg MS-20
  • steiner_parker_filter(audio, cutoff, resonance, mode) — Arp 2600
  • vactrol_lpg(audio, gate_signal, attack_ms, release_ms, cutoff_floor, cutoff_ceiling) — Buchla 292 (amplitude + filter linked by vactrol)

Modulation:

  • lfo(rate_hz, dur, shape, depth, phase) — 7 shapes
  • dusg(attack, decay, sustain, release, curve, cycling) — Serge slope
  • envelope_follower(audio, attack_ms, release_ms)
  • sample_and_hold(dur, rate_hz)
  • slew_limiter(signal, max_rise_per_sec, max_fall_per_sec)
  • sidechain_keyer(modulator, source, attack_ms, release_ms, depth)
  • ModMatrix — source/destination/amount routing

Phase 8 helpers:

  • harmonic_dressing(freq, dur, amp) — pure-tone richness (2nd, 3rd harmonics + sub at -18/-24/-30 dB, hard LP at 4×fundamental)
  • palindromic_loop(audio, crossfade_sec) — concat + reverse for perfect loop seams (sweeps, beats)

How the synth-lab UI dispatches

The synth-lab page passes:

  • primitive — module.function (e.g. lib_studio.moog_ladder)
  • duration_sec (10) — render length
  • freq_hz (440) — applicable to most pitched primitives
  • amp (0.6) — output amplitude
  • kwargs — JSON dict of additional kwargs

The wrapper script (tools/admin/cli_wrappers/run_primitive.py) contains per-primitive dispatch logic — filters need a source signal (saw), modulators need a duration / shape, sample-based primitives (granular) need a source.

When to reach for it

  • Tuning a single parameter (e.g. find the right resonance for the Moog ladder on this filter sweep)
  • Demonstrating a sound to someone without firing the full build
  • Comparing a primitive at different freq_hz settings rapidly