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

A reusable spectral slope built from a fixed cascade of high shelves. More...

#include <tilt_eq.hpp>

Classes

struct  Config

Public Types

using Coefficients = BiquadCoefficientsT<SampleType>

Public Member Functions

 TiltEqT () noexcept
bool prepare (double sample_rate) noexcept
 Change sample rate and clear history. Invalid rates reject atomically.
bool set_config (Config requested) noexcept
 Apply one coherent pivot/slope request at a block boundary.
Config config () const noexcept
double sample_rate () const noexcept
double design_high_hz () const noexcept
double normalization_gain () const noexcept
std::uint64_t fault_count () const noexcept
Coefficients coefficients (std::size_t index) const noexcept
SampleType process (SampleType input, std::size_t channel=0) noexcept
 Process one channel.
bool process_block (SampleType *samples, std::size_t frames, std::size_t channel=0) noexcept
 Process a caller-owned channel in place.
bool process_block (const SampleType *input, SampleType *output, std::size_t frames, std::size_t channel=0) noexcept
 Process one channel into separate caller-owned storage.
void reset () noexcept
 Clear all recursive history and the fault diagnostic without changing sample rate or configuration.
bool reset (std::size_t channel) noexcept
 Clear one channel's recursive history. Invalid channels are rejected.
double magnitude (double frequency_hz) const noexcept
 Magnitude response of the active coefficient endpoint.
double magnitude_db (double frequency_hz) const noexcept
int tail_samples () const noexcept
 Recursive shelves decay asymptotically when active.

Static Public Member Functions

static constexpr int latency_samples () noexcept

Static Public Attributes

static constexpr std::size_t channel_count = Channels
static constexpr std::size_t shelf_count = 9
static constexpr double min_sample_rate = 8000.0
static constexpr double max_sample_rate = 384000.0
static constexpr double min_tilt_db_per_octave = -6.0
static constexpr double max_tilt_db_per_octave = 6.0
static constexpr double min_pivot_hz = 31.25
static constexpr double max_design_hz = 16000.0
static constexpr double default_sample_rate = 48000.0

Detailed Description

template<typename SampleType = float, std::size_t Channels = 2>
class pulp::signal::TiltEqT< SampleType, Channels >

A reusable spectral slope built from a fixed cascade of high shelves.

tilt_db_per_octave is the signed magnitude-response slope across the design band [31.25 Hz, min(16 kHz, 0.4 * sample_rate)]. Positive values brighten and negative values darken. pivot_hz selects the frequency whose gain is normalized to exactly unity; changing the pivot changes only that normalization, not the slope. Zero tilt bypasses the cascade so every finite input sample is returned bit-for-bit.

Configuration is a bounded control-side operation. A request is validated and fully designed before any coefficient or recursive state changes; a rejected request leaves the object unchanged. An accepted non-no-op retune clears every channel's recursive history. Process, block, reset, response, and configuration paths allocate no memory and lock nothing.

Member Typedef Documentation

◆ Coefficients

template<typename SampleType = float, std::size_t Channels = 2>
using pulp::signal::TiltEqT< SampleType, Channels >::Coefficients = BiquadCoefficientsT<SampleType>

Constructor & Destructor Documentation

◆ TiltEqT()

template<typename SampleType = float, std::size_t Channels = 2>
pulp::signal::TiltEqT< SampleType, Channels >::TiltEqT ( )
inlinenoexcept

Member Function Documentation

◆ coefficients()

template<typename SampleType = float, std::size_t Channels = 2>
Coefficients pulp::signal::TiltEqT< SampleType, Channels >::coefficients ( std::size_t index) const
inlinenoexcept

◆ config()

template<typename SampleType = float, std::size_t Channels = 2>
Config pulp::signal::TiltEqT< SampleType, Channels >::config ( ) const
inlinenoexcept

◆ design_high_hz()

template<typename SampleType = float, std::size_t Channels = 2>
double pulp::signal::TiltEqT< SampleType, Channels >::design_high_hz ( ) const
inlinenoexcept

◆ fault_count()

template<typename SampleType = float, std::size_t Channels = 2>
std::uint64_t pulp::signal::TiltEqT< SampleType, Channels >::fault_count ( ) const
inlinenoexcept

◆ latency_samples()

template<typename SampleType = float, std::size_t Channels = 2>
constexpr int pulp::signal::TiltEqT< SampleType, Channels >::latency_samples ( )
inlinestaticconstexprnoexcept

◆ magnitude()

template<typename SampleType = float, std::size_t Channels = 2>
double pulp::signal::TiltEqT< SampleType, Channels >::magnitude ( double frequency_hz) const
inlinenoexcept

Magnitude response of the active coefficient endpoint.

◆ magnitude_db()

template<typename SampleType = float, std::size_t Channels = 2>
double pulp::signal::TiltEqT< SampleType, Channels >::magnitude_db ( double frequency_hz) const
inlinenoexcept

◆ normalization_gain()

template<typename SampleType = float, std::size_t Channels = 2>
double pulp::signal::TiltEqT< SampleType, Channels >::normalization_gain ( ) const
inlinenoexcept

◆ prepare()

template<typename SampleType = float, std::size_t Channels = 2>
bool pulp::signal::TiltEqT< SampleType, Channels >::prepare ( double sample_rate)
inlinenoexcept

Change sample rate and clear history. Invalid rates reject atomically.

◆ process()

template<typename SampleType = float, std::size_t Channels = 2>
SampleType pulp::signal::TiltEqT< SampleType, Channels >::process ( SampleType input,
std::size_t channel = 0 )
inlinenoexcept

Process one channel.

Invalid channels fail transparent. A non-finite sample or result clears that channel, increments the fault count, and emits zero so recursive state cannot remain poisoned.

◆ process_block() [1/2]

template<typename SampleType = float, std::size_t Channels = 2>
bool pulp::signal::TiltEqT< SampleType, Channels >::process_block ( const SampleType * input,
SampleType * output,
std::size_t frames,
std::size_t channel = 0 )
inlinenoexcept

Process one channel into separate caller-owned storage.

Exact in-place aliasing is supported; other overlapping ranges are not.

◆ process_block() [2/2]

template<typename SampleType = float, std::size_t Channels = 2>
bool pulp::signal::TiltEqT< SampleType, Channels >::process_block ( SampleType * samples,
std::size_t frames,
std::size_t channel = 0 )
inlinenoexcept

Process a caller-owned channel in place.

Invalid arguments reject without changing state; a null pointer is valid only for zero frames.

◆ reset() [1/2]

template<typename SampleType = float, std::size_t Channels = 2>
void pulp::signal::TiltEqT< SampleType, Channels >::reset ( )
inlinenoexcept

Clear all recursive history and the fault diagnostic without changing sample rate or configuration.

◆ reset() [2/2]

template<typename SampleType = float, std::size_t Channels = 2>
bool pulp::signal::TiltEqT< SampleType, Channels >::reset ( std::size_t channel)
inlinenoexcept

Clear one channel's recursive history. Invalid channels are rejected.

◆ sample_rate()

template<typename SampleType = float, std::size_t Channels = 2>
double pulp::signal::TiltEqT< SampleType, Channels >::sample_rate ( ) const
inlinenoexcept

◆ set_config()

template<typename SampleType = float, std::size_t Channels = 2>
bool pulp::signal::TiltEqT< SampleType, Channels >::set_config ( Config requested)
inlinenoexcept

Apply one coherent pivot/slope request at a block boundary.

Non-finite or out-of-domain fields reject the whole request.

◆ tail_samples()

template<typename SampleType = float, std::size_t Channels = 2>
int pulp::signal::TiltEqT< SampleType, Channels >::tail_samples ( ) const
inlinenoexcept

Recursive shelves decay asymptotically when active.

-1 means the active configuration has no finite advertised tail.

Member Data Documentation

◆ channel_count

template<typename SampleType = float, std::size_t Channels = 2>
std::size_t pulp::signal::TiltEqT< SampleType, Channels >::channel_count = Channels
staticconstexpr

◆ default_sample_rate

template<typename SampleType = float, std::size_t Channels = 2>
double pulp::signal::TiltEqT< SampleType, Channels >::default_sample_rate = 48000.0
staticconstexpr

◆ max_design_hz

template<typename SampleType = float, std::size_t Channels = 2>
double pulp::signal::TiltEqT< SampleType, Channels >::max_design_hz = 16000.0
staticconstexpr

◆ max_sample_rate

template<typename SampleType = float, std::size_t Channels = 2>
double pulp::signal::TiltEqT< SampleType, Channels >::max_sample_rate = 384000.0
staticconstexpr

◆ max_tilt_db_per_octave

template<typename SampleType = float, std::size_t Channels = 2>
double pulp::signal::TiltEqT< SampleType, Channels >::max_tilt_db_per_octave = 6.0
staticconstexpr

◆ min_pivot_hz

template<typename SampleType = float, std::size_t Channels = 2>
double pulp::signal::TiltEqT< SampleType, Channels >::min_pivot_hz = 31.25
staticconstexpr

◆ min_sample_rate

template<typename SampleType = float, std::size_t Channels = 2>
double pulp::signal::TiltEqT< SampleType, Channels >::min_sample_rate = 8000.0
staticconstexpr

◆ min_tilt_db_per_octave

template<typename SampleType = float, std::size_t Channels = 2>
double pulp::signal::TiltEqT< SampleType, Channels >::min_tilt_db_per_octave = -6.0
staticconstexpr

◆ shelf_count

template<typename SampleType = float, std::size_t Channels = 2>
std::size_t pulp::signal::TiltEqT< SampleType, Channels >::shelf_count = 9
staticconstexpr

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