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. | |
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.
|
inline |
|
inline |
|
inline |
Corner the cascade is currently sitting at, in Hz.
Reads the sweep without advancing it.
|
inline |
|
inline |
Pure IIR: no bulk delay anywhere in the path.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
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.
|
inline |
|
staticconstexpr |
Centre corner of the cascade.
[design parameter] default 500 Hz, range 200 .. 2000 Hz.
|
staticconstexpr |
Sweep width as a fraction of kSweepOctaves.
[design parameter] default 0.6, range 0 .. 1.
|
staticconstexpr |
Direct/shifted blend. [design parameter] default 0.5, range 0 .. 1.
|
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.
|
staticconstexpr |
[design parameter] default 2 stages, range 1 .
. 4. Two matches the documented two-sequential-stage configuration.
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
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.
|
staticconstexpr |
Total one-sided sweep span at full depth.
[design parameter] default 1.5 octaves, range 0.5 .. 3.0.