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

The motor-scanned tapped delay line. More...

#include <scanner_vibrato.hpp>

Public Types

using Mode = ScannerMode

Public Member Functions

 ScannerVibratoT ()
void prepare (double sample_rate)
void reset ()
void discard_history () noexcept
void set_mode (Mode mode)
Mode mode () const
void set_scan_hz (double hz)
void set_line_ms (double ms)
void set_v1_frac (double frac)
void set_v2_frac (double frac)
void set_v3_frac (double frac)
void set_chorus_mix (double mix01)
double depth_fraction () const
 The fraction of the line the scanner currently traverses.
double dry_mix () const
 How much dry is blended back.
double peak_pitch_shift_ratio () const
 The peak fractional pitch shift this setting produces, |Δf/f|.
SampleType process (SampleType input)
void process_block (const SampleType *in, SampleType *out, int n)

Static Public Member Functions

static constexpr int latency_samples ()
 Zero, for the same reason as the Leslie: the line box's delay is the modelled electrical path, not processing latency.
static int worst_case_delay_samples (double sample_rate)

Static Public Attributes

static constexpr double kScanHz = 6.9
 [design parameter] scanner rate 6.9 Hz, range 6.0 .
static constexpr double kScanHz50 = kScanHz * 50.0 / 60.0
 [design parameter] the 50 Hz-mains rate, 5.75 Hz, range 4.5 .
static constexpr double kLineDelayMs = 1.0
 [design parameter] total line delay 1.0 ms, range 0.6 .
static constexpr int kScannerTaps = 18
 [design parameter] 18 taps, range 12 .
static constexpr double kV1 = 0.33
 [design parameter] the three vibrato depths, as fractions of the line.
static constexpr double kV2 = 0.66
static constexpr double kV3 = 1.00
static constexpr double kChorusMix = 0.5
 [design parameter] chorus dry blend 0.5, range 0 .
static constexpr double kMaxLineDelayMs = 1.4
 Parameter-range maxima used for buffer sizing.
static constexpr double kWorstCaseGain = 1.5
 The measured constructive-sum bound, in linear gain.

Detailed Description

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

The motor-scanned tapped delay line.

Member Typedef Documentation

◆ Mode

template<typename SampleType = float>
using pulp::signal::ScannerVibratoT< SampleType >::Mode = ScannerMode

Constructor & Destructor Documentation

◆ ScannerVibratoT()

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

Member Function Documentation

◆ depth_fraction()

template<typename SampleType = float>
double pulp::signal::ScannerVibratoT< SampleType >::depth_fraction ( ) const
inline

The fraction of the line the scanner currently traverses.

◆ discard_history()

template<typename SampleType = float>
void pulp::signal::ScannerVibratoT< SampleType >::discard_history ( )
inlinenoexcept

◆ dry_mix()

template<typename SampleType = float>
double pulp::signal::ScannerVibratoT< SampleType >::dry_mix ( ) const
inline

How much dry is blended back.

Zero in every V mode — that is what makes V and C different effects rather than two depths of one effect.

◆ latency_samples()

template<typename SampleType = float>
constexpr int pulp::signal::ScannerVibratoT< SampleType >::latency_samples ( )
inlinestaticconstexpr

Zero, for the same reason as the Leslie: the line box's delay is the modelled electrical path, not processing latency.

◆ mode()

template<typename SampleType = float>
Mode pulp::signal::ScannerVibratoT< SampleType >::mode ( ) const
inline

◆ peak_pitch_shift_ratio()

template<typename SampleType = float>
double pulp::signal::ScannerVibratoT< SampleType >::peak_pitch_shift_ratio ( ) const
inline

The peak fractional pitch shift this setting produces, |Δf/f|.

A linearly ramping delay is a CONSTANT pitch shift, so the depth follows from the slope alone: the scanner traverses depth·line seconds of delay in each half period, giving Δf/f = depth·line / (1/(2·rate)). Published here so the acceptance test can predict the shift from the shipped constants instead of restating a number.

◆ prepare()

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

◆ process()

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

◆ process_block()

template<typename SampleType = float>
void pulp::signal::ScannerVibratoT< SampleType >::process_block ( const SampleType * in,
SampleType * out,
int n )
inline

◆ reset()

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

◆ set_chorus_mix()

template<typename SampleType = float>
void pulp::signal::ScannerVibratoT< SampleType >::set_chorus_mix ( double mix01)
inline

◆ set_line_ms()

template<typename SampleType = float>
void pulp::signal::ScannerVibratoT< SampleType >::set_line_ms ( double ms)
inline

◆ set_mode()

template<typename SampleType = float>
void pulp::signal::ScannerVibratoT< SampleType >::set_mode ( Mode mode)
inline

◆ set_scan_hz()

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

◆ set_v1_frac()

template<typename SampleType = float>
void pulp::signal::ScannerVibratoT< SampleType >::set_v1_frac ( double frac)
inline

◆ set_v2_frac()

template<typename SampleType = float>
void pulp::signal::ScannerVibratoT< SampleType >::set_v2_frac ( double frac)
inline

◆ set_v3_frac()

template<typename SampleType = float>
void pulp::signal::ScannerVibratoT< SampleType >::set_v3_frac ( double frac)
inline

◆ worst_case_delay_samples()

template<typename SampleType = float>
int pulp::signal::ScannerVibratoT< SampleType >::worst_case_delay_samples ( double sample_rate)
inlinestatic

Member Data Documentation

◆ kChorusMix

template<typename SampleType = float>
double pulp::signal::ScannerVibratoT< SampleType >::kChorusMix = 0.5
staticconstexpr

[design parameter] chorus dry blend 0.5, range 0 .

. 1. That chorus is "vibrato plus dry" is documented; the equal blend is a default.

◆ kLineDelayMs

template<typename SampleType = float>
double pulp::signal::ScannerVibratoT< SampleType >::kLineDelayMs = 1.0
staticconstexpr

[design parameter] total line delay 1.0 ms, range 0.6 .

. 1.4 ms. Documented line-box delay is about a millisecond.

◆ kMaxLineDelayMs

template<typename SampleType = float>
double pulp::signal::ScannerVibratoT< SampleType >::kMaxLineDelayMs = 1.4
staticconstexpr

Parameter-range maxima used for buffer sizing.

◆ kScanHz

template<typename SampleType = float>
double pulp::signal::ScannerVibratoT< SampleType >::kScanHz = 6.9
staticconstexpr

[design parameter] scanner rate 6.9 Hz, range 6.0 .

. 7.5 Hz.

Honest-gap note: the documented Hammond vibrato sweeps at roughly 7 Hz and the scanner is geared off the synchronous motor, so the rate is mains-locked rather than free. The exact figure is model- and mains-dependent and was not pinned to a verified primary source, so this is a calibration constant, not a citation.

◆ kScanHz50

template<typename SampleType = float>
double pulp::signal::ScannerVibratoT< SampleType >::kScanHz50 = kScanHz * 50.0 / 60.0
staticconstexpr

[design parameter] the 50 Hz-mains rate, 5.75 Hz, range 4.5 .

. 6.5 Hz. Derived rather than asserted: kScanHz · 50/60, the mains-ratio scaling of the same motor gearing, because the European rate was not independently verified either and inventing a second number would be worse than scaling the first.

◆ kScannerTaps

template<typename SampleType = float>
int pulp::signal::ScannerVibratoT< SampleType >::kScannerTaps = 18
staticconstexpr

[design parameter] 18 taps, range 12 .

. 24.

This is a build-time calibration constant and deliberately NOT a live parameter, because it does not appear in the shipped arithmetic at all — see process for why. It records how many taps the physical line box is being taken to have; the range is bounded by "enough that the tap crossfade is indistinguishable from a continuous sweep".

◆ kV1

template<typename SampleType = float>
double pulp::signal::ScannerVibratoT< SampleType >::kV1 = 0.33
staticconstexpr

[design parameter] the three vibrato depths, as fractions of the line.

The ORDERING is documented behaviour; the values are engineering defaults.

◆ kV2

template<typename SampleType = float>
double pulp::signal::ScannerVibratoT< SampleType >::kV2 = 0.66
staticconstexpr

◆ kV3

template<typename SampleType = float>
double pulp::signal::ScannerVibratoT< SampleType >::kV3 = 1.00
staticconstexpr

◆ kWorstCaseGain

template<typename SampleType = float>
double pulp::signal::ScannerVibratoT< SampleType >::kWorstCaseGain = 1.5
staticconstexpr

The measured constructive-sum bound, in linear gain.

Feedforward, so this is dry + wet peaking together, not a loop gain. The suite's sweep measures 1.16 across the whole mode and parameter space; this is that maximum rounded up, with the headroom covering grid coarseness rather than covering a guess. [design parameter] default 1.5 (+3.5 dB), range 1.2 .. 4.0.


The documentation for this class was generated from the following file: