Class thl::dsp::BaseProcessor#

class BaseProcessor#

Inheritance diagram for thl::dsp::BaseProcessor:

digraph { graph [bgcolor="#00000000"] node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2] edge [color="#1414CE"] "1" [label="thl::dsp::BaseProcessor" tooltip="thl::dsp::BaseProcessor" fillcolor="#BFBFBF"] "2" [label="thl::dsp::dynamics::CompressorImpl" tooltip="thl::dsp::dynamics::CompressorImpl"] "3" [label="thl::dsp::dynamics::LookaheadLimiterImpl" tooltip="thl::dsp::dynamics::LookaheadLimiterImpl"] "4" [label="thl::dsp::filter::ParametricEqImpl" tooltip="thl::dsp::filter::ParametricEqImpl"] "5" [label="thl::dsp::fx::ConstellationReverbImpl" tooltip="thl::dsp::fx::ConstellationReverbImpl"] "6" [label="thl::dsp::fx::IntellijelWavefolderImpl" tooltip="thl::dsp::fx::IntellijelWavefolderImpl"] "7" [label="thl::dsp::fx::StereoFDN" tooltip="thl::dsp::fx::StereoFDN"] "12" [label="thl::dsp::fx::StereoWidenerImpl" tooltip="thl::dsp::fx::StereoWidenerImpl"] "8" [label="thl::dsp::granular::GrainProcessorImpl" tooltip="thl::dsp::granular::GrainProcessorImpl"] "9" [label="thl::dsp::metronome::MetronomePlayerImpl" tooltip="thl::dsp::metronome::MetronomePlayerImpl"] "10" [label="thl::dsp::synth::SineProcessorImpl" tooltip="thl::dsp::synth::SineProcessorImpl"] "11" [label="thl::dsp::utils::BandSplitter" tooltip="thl::dsp::utils::BandSplitter"] "14" [label="thl::dsp::utils::DelayProcessor" tooltip="thl::dsp::utils::DelayProcessor"] "15" [label="thl::dsp::utils::LimiterImpl" tooltip="thl::dsp::utils::LimiterImpl"] "13" [label="thl::dsp::utils::MultibandLimiterImpl" tooltip="thl::dsp::utils::MultibandLimiterImpl"] "16" [label="thl::graph::Graph" tooltip="thl::graph::Graph"] "2" -> "1" [dir=forward tooltip="public-inheritance"] "3" -> "1" [dir=forward tooltip="public-inheritance"] "4" -> "1" [dir=forward tooltip="public-inheritance"] "5" -> "1" [dir=forward tooltip="public-inheritance"] "6" -> "1" [dir=forward tooltip="public-inheritance"] "7" -> "1" [dir=forward tooltip="public-inheritance"] "12" -> "11" [dir=forward tooltip="public-inheritance"] "8" -> "1" [dir=forward tooltip="public-inheritance"] "9" -> "1" [dir=forward tooltip="public-inheritance"] "10" -> "1" [dir=forward tooltip="public-inheritance"] "11" -> "1" [dir=forward tooltip="public-inheritance"] "14" -> "1" [dir=forward tooltip="public-inheritance"] "15" -> "1" [dir=forward tooltip="public-inheritance"] "13" -> "11" [dir=forward tooltip="public-inheritance"] "16" -> "1" [dir=forward tooltip="public-inheritance"] }

Subclassed by thl::dsp::dynamics::CompressorImpl, thl::dsp::dynamics::LookaheadLimiterImpl, thl::dsp::filter::ParametricEqImpl, thl::dsp::fx::ConstellationReverbImpl, thl::dsp::fx::IntellijelWavefolderImpl, thl::dsp::fx::StereoFDN, thl::dsp::granular::GrainProcessorImpl, thl::dsp::metronome::MetronomePlayerImpl, thl::dsp::synth::SineProcessorImpl, thl::dsp::utils::BandSplitter, thl::dsp::utils::DelayProcessor, thl::dsp::utils::LimiterImpl, thl::graph::Graph

Public Functions

BaseProcessor() = default#
virtual ~BaseProcessor() = default#
inline BaseProcessor(const BaseProcessor &other) noexcept#
inline BaseProcessor &operator=(const BaseProcessor &other) noexcept#
virtual void prepare(const double &sample_rate, const size_t &samples_per_block, const size_t &num_channels) = 0#
virtual void process(thl::core::BufferView buffer, uint32_t modulation_offset = 0) = 0#
virtual void process_with_dry(thl::core::BufferView buffer, uint32_t modulation_offset, thl::core::BufferView dry)#

process(), also writing the dry signal into dry: the input with the phase response of process() but without its effect, so wet and dry can be blended.

It matches the phase only, never the latency. Undelayed: a processor with latency_samples() leaves aligning the dry signal to its latency to whoever mixes it (a Graph delays a node’s dry path by it). The default copies buffer into dry; override it if process() changes the phase. An empty dry means no dry signal.

inline virtual void reset()#

Clears what the processor holds from the audio it has processed (delay lines, filter states, envelopes), keeping its settings, as if no audio had passed.

Real-time safe: a Graph calls it on the audio thread when a bypassed node comes back, so the node does not resume where it froze. The default does nothing.

void process_modulated(const thl::core::BufferView &buffer, uint32_t modulation_offset = 0)#
void process_modulated_with_dry(const thl::core::BufferView &buffer, const thl::core::BufferView &dry, uint32_t modulation_offset = 0)#
void process_modulated(const thl::core::BufferView &buffer, std::span<const uint32_t> change_points, uint32_t modulation_offset = 0)#
void process_modulated_with_dry(const thl::core::BufferView &buffer, std::span<const uint32_t> change_points, const thl::core::BufferView &dry, uint32_t modulation_offset = 0)#
inline uint32_t latency_samples() const#
inline uint32_t max_latency_samples() const#

Protected Functions

inline virtual std::span<const uint32_t> get_change_points()#
inline void set_latency_samples(uint32_t samples)#
inline void set_max_latency_samples(uint32_t max)#