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

The house low-frequency oscillator: seven waveforms plus a continuous shape morph, a delay/fade/repeat lifecycle, stereo and quadrature output, and a deterministic random layer — all on one phase accumulator. More...

#include <pulp/signal/lfo_sampling.hpp>
#include <pulp/signal/mod_tools.hpp>
#include <pulp/signal/rng.hpp>
#include <algorithm>
#include <cmath>
#include <cstdint>

Go to the source code of this file.

Classes

class  pulp::signal::detail::BasicLfoT< SampleType, Convention >
 Shared implementation selected by the two explicit public LFO types below. More...
class  pulp::signal::LfoT< SampleType >
class  pulp::signal::EffectLfoT< SampleType >

Namespaces

namespace  pulp
namespace  pulp::signal
namespace  pulp::signal::detail
 Round-2 effect-wave vocabulary.

Typedefs

using pulp::signal::Lfo = LfoT<float>
using pulp::signal::Lfo64 = LfoT<double>
using pulp::signal::EffectLfo = EffectLfoT<float>
using pulp::signal::EffectLfo64 = EffectLfoT<double>

Enumerations

enum class  pulp::signal::detail::LfoConvention : std::uint8_t { pulp::signal::detail::toolkit , pulp::signal::detail::effect }
 Selects the waveform/rate convention at the type boundary. More...

Detailed Description

The house low-frequency oscillator: seven waveforms plus a continuous shape morph, a delay/fade/repeat lifecycle, stereo and quadrature output, and a deterministic random layer — all on one phase accumulator.

RT contract: prepare() and the set_*() setters recompute coefficients and are control-side calls. next(), next_stereo(), next_unipolar(), next_quadrature(), retrigger(), reset(), and the accessors allocate nothing and are audio-thread safe. The type owns no memory.

USE — what each waveform is actually for, because picking the wrong one is the difference between "modulated" and "musical":

  • sine — vibrato and tremolo. The only wave with no corners, so it is the only one that needs nothing downstream to smooth it.
  • triangle — filter sweeps. Linear travel and no dwell at the extremes, so the sweep reads as constant motion rather than as two held positions.
  • saw_down — rhythmic plucks and pumping. The instant reset followed by a decay is read by the ear as a beat, which is why it is the shape a sidechain imitation converges on.
  • saw_up — risers and reverse-feel swells; the same event heard backwards.
  • square + pulse width — choppers and trance gates. The pulse width is the gate length. Feed it a SlewLimiterT unless clicks are the goal.
  • sh_random — the classic random-step patch: sample-and-hold bass filters, burbling leads.
  • smooth_random (and its N-segment mode) — analog drift and wander, the "nothing repeats but nothing jumps" layer. Adjacent to tape wow.
  • shape morph automated — evolving motion from a single source, when a second LFO would be one too many moving parts.
  • audio rate — the tremolo-to-AM continuum. Ride set_rate_hz() from 5 Hz into the hundreds; the transition itself is the effect.
  • delay + fade in — delayed vibrato, the performance behavior where the vibrato arrives after the note has settled.
  • repeat 1 + fade out — a shaped one-shot swell: an envelope wearing an LFO's clothes.

Depth windows and cross-modulation of rate or fade are deliberately not here. Routing concerns belong to ModMatrixT and AttenuverterT; "an envelope rides the LFO's depth" is the matrix's via slot. The LFO stays a pure source.