Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
pulp::signal::PhaseVibratoT< SampleType > Class Template Reference

Magnatone-style phase vibrato: N cascaded first-order allpass stages whose corner is driven straight from the LFO, summed back against the direct path. More...

#include <vibrato.hpp>

Public Member Functions

 PhaseVibratoT ()
void prepare (double sample_rate)
void set_rate_hz (double hz)
double rate_hz () const
void set_depth (double depth)
double depth () const
void set_center_hz (double hz)
double center_hz () const
void set_stage_count (int count)
 Stages that become active are cleared first, so switching count in does not fold a stale state from an earlier setting into the audio.
int stage_count () const
void set_mix (double mix)
double mix () const
double corner_hz () const
 Corner the cascade is currently sitting at, in Hz.
std::size_t latency_samples () const
 Pure IIR: no bulk delay anywhere in the path.
void reset ()
SampleType process (SampleType input)

Static Public Attributes

static constexpr double kDefaultRateHz = 0.8
 [design parameter] default 0.8 Hz, range 0.05 .
static constexpr double kMinRateHz = 0.05
static constexpr double kMaxRateHz = 10.0
static constexpr double kDefaultDepth = 0.6
 Sweep width as a fraction of kSweepOctaves.
static constexpr double kSweepOctaves = 1.5
 Total one-sided sweep span at full depth.
static constexpr double kDefaultCenterHz = 500.0
 Centre corner of the cascade.
static constexpr double kMinCenterHz = 200.0
static constexpr double kMaxCenterHz = 2000.0
static constexpr int kDefaultStageCount = 2
 [design parameter] default 2 stages, range 1 .
static constexpr int kMaxStages = 4
static constexpr double kDefaultMix = 0.5
 Direct/shifted blend. [design parameter] default 0.5, range 0 .. 1.
static constexpr double kSinusoidalGainBound = 1.0
 Steady-state sinusoidal gain bound for a direct/shifted CROSSFADE of unity-magnitude paths: (1-mix)*1 + mix*1 = 1.

Detailed Description

template<typename SampleType = float>
class pulp::signal::PhaseVibratoT< SampleType >

Magnatone-style phase vibrato: N cascaded first-order allpass stages whose corner is driven straight from the LFO, summed back against the direct path.

The direct drive is the lineage's distinguishing feature, not an omission. A varistor is a voltage-controlled resistor: its resistance follows its control voltage with no storage element in the way. Adding an optical lag here would turn this into the Univibe, which is the next class down and is meant to sound different.

All active stages track the same corner. Staggered per-stage corners are the Univibe's documented topology, not this circuit's, and giving both engines the same spread would erase the difference the module exists to show.

Constructor & Destructor Documentation

◆ PhaseVibratoT()

template<typename SampleType = float>
pulp::signal::PhaseVibratoT< SampleType >::PhaseVibratoT ( )
inline

Member Function Documentation

◆ center_hz()

template<typename SampleType = float>
double pulp::signal::PhaseVibratoT< SampleType >::center_hz ( ) const
inline

◆ corner_hz()

template<typename SampleType = float>
double pulp::signal::PhaseVibratoT< SampleType >::corner_hz ( ) const
inline

Corner the cascade is currently sitting at, in Hz.

Reads the sweep without advancing it.

◆ depth()

template<typename SampleType = float>
double pulp::signal::PhaseVibratoT< SampleType >::depth ( ) const
inline

◆ latency_samples()

template<typename SampleType = float>
std::size_t pulp::signal::PhaseVibratoT< SampleType >::latency_samples ( ) const
inline

Pure IIR: no bulk delay anywhere in the path.

◆ mix()

template<typename SampleType = float>
double pulp::signal::PhaseVibratoT< SampleType >::mix ( ) const
inline

◆ prepare()

template<typename SampleType = float>
void pulp::signal::PhaseVibratoT< SampleType >::prepare ( double sample_rate)
inline

◆ process()

template<typename SampleType = float>
SampleType pulp::signal::PhaseVibratoT< SampleType >::process ( SampleType input)
inline

◆ rate_hz()

template<typename SampleType = float>
double pulp::signal::PhaseVibratoT< SampleType >::rate_hz ( ) const
inline

◆ reset()

template<typename SampleType = float>
void pulp::signal::PhaseVibratoT< SampleType >::reset ( )
inline

◆ set_center_hz()

template<typename SampleType = float>
void pulp::signal::PhaseVibratoT< SampleType >::set_center_hz ( double hz)
inline

◆ set_depth()

template<typename SampleType = float>
void pulp::signal::PhaseVibratoT< SampleType >::set_depth ( double depth)
inline

◆ set_mix()

template<typename SampleType = float>
void pulp::signal::PhaseVibratoT< SampleType >::set_mix ( double mix)
inline

◆ set_rate_hz()

template<typename SampleType = float>
void pulp::signal::PhaseVibratoT< SampleType >::set_rate_hz ( double hz)
inline

◆ set_stage_count()

template<typename SampleType = float>
void pulp::signal::PhaseVibratoT< SampleType >::set_stage_count ( int count)
inline

Stages that become active are cleared first, so switching count in does not fold a stale state from an earlier setting into the audio.

◆ stage_count()

template<typename SampleType = float>
int pulp::signal::PhaseVibratoT< SampleType >::stage_count ( ) const
inline

Member Data Documentation

◆ kDefaultCenterHz

template<typename SampleType = float>
double pulp::signal::PhaseVibratoT< SampleType >::kDefaultCenterHz = 500.0
staticconstexpr

Centre corner of the cascade.

[design parameter] default 500 Hz, range 200 .. 2000 Hz.

◆ kDefaultDepth

template<typename SampleType = float>
double pulp::signal::PhaseVibratoT< SampleType >::kDefaultDepth = 0.6
staticconstexpr

Sweep width as a fraction of kSweepOctaves.

[design parameter] default 0.6, range 0 .. 1.

◆ kDefaultMix

template<typename SampleType = float>
double pulp::signal::PhaseVibratoT< SampleType >::kDefaultMix = 0.5
staticconstexpr

Direct/shifted blend. [design parameter] default 0.5, range 0 .. 1.

◆ kDefaultRateHz

template<typename SampleType = float>
double pulp::signal::PhaseVibratoT< SampleType >::kDefaultRateHz = 0.8
staticconstexpr

[design parameter] default 0.8 Hz, range 0.05 .

. 10 Hz. Amp vibrato runs slower than pedal vibrato; roughly 1-7 Hz is the characteristic band, stated as approximate context rather than a cited figure.

◆ kDefaultStageCount

template<typename SampleType = float>
int pulp::signal::PhaseVibratoT< SampleType >::kDefaultStageCount = 2
staticconstexpr

[design parameter] default 2 stages, range 1 .

. 4. Two matches the documented two-sequential-stage configuration.

◆ kMaxCenterHz

template<typename SampleType = float>
double pulp::signal::PhaseVibratoT< SampleType >::kMaxCenterHz = 2000.0
staticconstexpr

◆ kMaxRateHz

template<typename SampleType = float>
double pulp::signal::PhaseVibratoT< SampleType >::kMaxRateHz = 10.0
staticconstexpr

◆ kMaxStages

template<typename SampleType = float>
int pulp::signal::PhaseVibratoT< SampleType >::kMaxStages = 4
staticconstexpr

◆ kMinCenterHz

template<typename SampleType = float>
double pulp::signal::PhaseVibratoT< SampleType >::kMinCenterHz = 200.0
staticconstexpr

◆ kMinRateHz

template<typename SampleType = float>
double pulp::signal::PhaseVibratoT< SampleType >::kMinRateHz = 0.05
staticconstexpr

◆ kSinusoidalGainBound

template<typename SampleType = float>
double pulp::signal::PhaseVibratoT< SampleType >::kSinusoidalGainBound = 1.0
staticconstexpr

Steady-state sinusoidal gain bound for a direct/shifted CROSSFADE of unity-magnitude paths: (1-mix)*1 + mix*1 = 1.

The +6 dB figure that comes from |1| + |1| applies to an unnormalised SUM, which is not the blend this class implements. Sample gain is a separate, larger quantity; see the header note.

◆ kSweepOctaves

template<typename SampleType = float>
double pulp::signal::PhaseVibratoT< SampleType >::kSweepOctaves = 1.5
staticconstexpr

Total one-sided sweep span at full depth.

[design parameter] default 1.5 octaves, range 0.5 .. 3.0.


The documentation for this class was generated from the following file:
  • /home/runner/work/pulp/pulp/core/signal/include/pulp/signal/vibrato.hpp