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

The minimal in-graph frequency shifter: shift in Hz, one knob, no feedback. More...

#include <pulp/signal/frequency_shifter_ssb.hpp>
#include <cmath>

Go to the source code of this file.

Classes

class  pulp::signal::FrequencyShifterT< SampleType >
 Shifts every frequency in a signal by the same number of Hz. More...

Namespaces

namespace  pulp
namespace  pulp::signal

Typedefs

template<typename SampleType = double>
using pulp::signal::HilbertPairT = HilbertQuadratureNetworkT<SampleType>
 A pair of allpass chains whose outputs stand a quarter cycle apart across the audio band — the analytic-signal splitter, spelled the way this header has always spelled it.
using pulp::signal::HilbertPair = HilbertPairT<double>
using pulp::signal::FrequencyShifter = FrequencyShifterT<float>
using pulp::signal::FrequencyShifter64 = FrequencyShifterT<double>

Detailed Description

The minimal in-graph frequency shifter: shift in Hz, one knob, no feedback.

This is the reduced-scope member of the pair. The full Bode/Moog module — up/down/dual-mono/stereo-split modes, barberpole feedback, dry/wet, de-zippering, a stated loop-gain bound and the acceptance suite that measures all of it — is SsbFrequencyShifterT in frequency_shifter_ssb.hpp. This class stays because drum/cymbal.hpp composes it by name and wants exactly this much: a shift amount and a sample, inside a voice that already owns its own gain staging.

It owns none of the math. The quadrature network and its coefficient table live in frequency_shifter_ssb.hpp and are composed from here, so there is one Hilbert network in the tree rather than two that can drift apart. New work should reach for SsbFrequencyShifterT; this remains as the thin front end its one caller needs.

RT contract: set_sample_rate and set_shift_hz are scalar updates. process() and reset() allocate nothing and take no locks.