Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
lpg.hpp File Reference

Buchla-style low-pass gate: one control drives amplitude and brightness together, through a vactrol model. More...

#include <pulp/signal/denormal.hpp>
#include <pulp/signal/tpt_filter.hpp>
#include <algorithm>
#include <cmath>

Go to the source code of this file.

Classes

class  pulp::signal::LpgT< SampleType >
 Vactrol-modelled low-pass gate. More...

Namespaces

namespace  pulp
namespace  pulp::signal

Typedefs

using pulp::signal::Lpg = LpgT<float>
using pulp::signal::Lpg64 = LpgT<double>

Detailed Description

Buchla-style low-pass gate: one control drives amplitude and brightness together, through a vactrol model.

The vactrol response follows the model family in Parker & D'Angelo, "A digital model of the Buchla lowpass-gate" (DAFx-13): a fast light-onset rise, a slow and level-dependent dark recovery, and a control-to-amplitude power law separate from the control-to-cutoff exponential.

RT contract: prepare() and the set_*() setters are control-side calls; strike(), set_gate(), process(), reset(), and the accessors allocate nothing and are audio-thread safe. The type owns no memory.

USE — the physics being borrowed, and why it is worth borrowing:

A vactrol is an LED facing a photoresistor in one package; the Buchla 292 used a single cell to control amplitude and cutoff at once. The photoresistor responds to light onset in about a millisecond but recovers its dark resistance slowly and nonlinearly — a fast snap open, then a long drooping close. Two consequences make it musical. First, loudness and brightness co-vary, which is how every acoustic percussive source behaves: as a struck object's level falls, its highs die first. A pinged LPG reads as a thing that was hit, not as a synth patch. Second, the closing is not exponential — fast at first, then lengthening — which is exactly the decay contour of struck wood and skin that a plain RC envelope misses.

The core patch idioms:

  1. The ping — strike(velocity) with no envelope anywhere. The LPG is the envelope. Material comes from two controls: decay is the size of the object, colour is its surface. Starting points: decay 60 ms + colour 0.25 is a woodblock or clave; decay 150 ms + colour 0.5 is the classic bongo; decay 350 ms + colour 0.75 is a marimba or soft tom; decay 500 ms and above with a reduced fc_max is a felt mallet. Ping anything — a noise burst becomes a shaker, a wavetable becomes mallet keys, a chord stab becomes a plucked ensemble.
  2. Velocity done right with one wire — strike(velocity_to_strike(v)). Harder hits get louder and brighter in the physically coupled ratio, with zero extra routing. Per-voice velocity-to-timbre is a debt in most drum synths; the LPG pays it structurally.
  3. The roll — a re-strike mid-decay starts from the vactrol's current state, so fast rolls accumulate: each hit lands slightly louder and brighter than a cold one. That accumulation is why LPG rolls crescendo naturally where retriggered-envelope rolls sound like a machine gun. BurstGenT -> LpgT is the two-primitive roll patch.
  4. Gated, not pinged — feed a sustained control with set_gate() (from an ArT, or a fader) instead of strikes: swells open from darkness to brightness in one gesture. An ArT -> LpgT pad reads more bowed or blown than ArT -> VcaT, because the spectrum moves with the level.
  5. In feedback loops — an LPG in a delay's feedback path makes each echo quieter and darker, the way real rooms absorb. A static lowpass gives constant colour at falling level, which is the giveaway of a cheap echo. Strike the loop's LPG from the input's TransientDetectorT and the echoes duck open with the playing: a live, breathing echo from three primitives.
  6. Stereo pairs — two LPGs with strike levels or decays decorrelated by 10-15% give instant natural width on percussive material. Nothing is identical twice in the physical world; make the two sides disagree slightly.

When not to use it: sustained material that needs constant timbre — that is VcaT. Precise transient design — that is the envelope family. The vactrol's lag and droop are character, and character is the wrong tool when you need accuracy.