A lowpass gate: an amplitude gate and a lowpass filter driven by one control signal with deliberately asymmetric dynamics.
More...
|
| | LowpassGateT () |
| | A default-constructed gate is usable at 44.1 kHz without a setup call, so a caller that only overrides one control still gets working vactrol dynamics rather than a stuck-shut gate.
|
| void | set_sample_rate (double sr) |
| void | set_rise_ms (double ms) |
| | Time constant of the vactrol turning on, in milliseconds.
|
| void | set_fall_ms (double ms) |
| | Time constant of the vactrol turning off, in milliseconds.
|
| void | set_colour (double amount) |
| | Blend between amplitude gating (0) and filtering (1).
|
| void | set_closed_cutoff_hz (double hz) |
| | Filter corner when the gate is fully closed, in Hz.
|
| void | set_open_cutoff_hz (double hz) |
| | Filter corner when the gate is fully open, in Hz.
|
| void | set_gain_exponent (double e) |
| | Exponent of the control-to-gain law.
|
| void | reset () |
| double | control () const |
| | Current smoothed control value in [0, 1].
|
| SampleType | process (SampleType input, double target) |
| | Advances the vactrol by one sample toward target and applies the resulting gate to input.
|
template<typename SampleType = float>
class pulp::signal::LowpassGateT< SampleType >
A lowpass gate: an amplitude gate and a lowpass filter driven by one control signal with deliberately asymmetric dynamics.
The behaviour being modelled is a vactrol — an LED facing a photoresistor in a sealed package. The photoresistor's resistance falls quickly when the LED lights and recovers slowly when it goes dark, and that asymmetry is not a design choice anyone made; it is a property of the material. The musical consequence is that a lowpass gate cannot produce a fast release. Every note ends with the same unhurried decay, and because the filter closes as the level falls, the note also gets darker as it dies. That single coupling — quiet implies dark — is what makes struck and plucked sounds read as physical rather than as an envelope applied to an oscillator.
set_colour() selects how much of the gating is amplitude and how much is filtering: 0 is a pure VCA (level only, no timbral change), 1 is a pure filter (the tail darkens but never fully stops), and intermediate values run both.
Model family: Parker & D'Angelo, "A Digital Model of the Buchla Lowpass
Gate", DAFx-13. The vactrol response here is the one-pole asymmetric smoother that paper identifies as the tractable core of the behaviour, with a power-law mapping from control to gain.
The vactrol lag itself lives in VactrolConditionerT (vactrol.hpp) because several unrelated circuits model the same component — this gate, the Univibe's staggered phase stages, an optical compressor's gain element — and they must not each carry their own copy of the law. This class is that conditioner plus the power-law gain mapping and the sweeping filter, which are the parts that ARE specific to a lowpass gate.
RT contract: every member allocates nothing and takes no locks.