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

#include <true_peak_limiter.hpp>

Classes

struct  Params

Public Types

enum class  ChannelLink { linked , independent }

Public Member Functions

bool prepare (double sample_rate, std::size_t channels, Params params={})
void reset () noexcept
bool set_ceiling_dbtp (double dbtp) noexcept
bool set_release_ms (double milliseconds) noexcept
bool set_realtime_control_coefficients (double ceiling_dbtp, double safe_ceiling_linear, double release_ms, double release_retain) noexcept
 Install already-computed control coefficients without calling libm.
double ceiling_dbtp () const noexcept
double lookahead_ms () const noexcept
double release_ms () const noexcept
ChannelLink channel_link () const noexcept
std::size_t channel_count () const noexcept
int latency_samples () const noexcept
int tail_samples () const noexcept
bool prepared () const noexcept
std::uint64_t fault_count () const noexcept
double gain_reduction_db (std::size_t channel=0) const noexcept
 Current attenuation as a non-negative dB magnitude.
std::array< double, interpolation_factor()> detector_phases (std::span< const double, interpolation_taps()> newest_to_oldest) const noexcept
 Reconstruct the eight detector phases for one channel without changing limiter state.
bool process_frame (std::span< const SampleType > input, std::span< SampleType > output) noexcept
bool process_interleaved (const SampleType *input, SampleType *output, std::size_t frames, std::size_t channels) noexcept

Static Public Member Functions

static constexpr std::size_t interpolation_factor () noexcept
static constexpr std::size_t interpolation_taps () noexcept
static constexpr int detector_latency_samples () noexcept
static constexpr int internal_gain_lookahead_samples () noexcept
 Fixed future-peak horizon required by the output gain scheduler.
static constexpr double detector_guard_db () noexcept
static constexpr double maximum_supported_sample_rate () noexcept
static constexpr double maximum_lookahead_ms () noexcept
static constexpr std::size_t maximum_supported_channels () noexcept
static constexpr std::size_t detector_mac_count_per_channel () noexcept

Member Enumeration Documentation

◆ ChannelLink

template<typename SampleType = float, std::size_t MaxChannels = 2>
enum class pulp::signal::TruePeakLimiterT::ChannelLink
strong
Enumerator
linked 
independent 

Member Function Documentation

◆ ceiling_dbtp()

template<typename SampleType = float, std::size_t MaxChannels = 2>
double pulp::signal::TruePeakLimiterT< SampleType, MaxChannels >::ceiling_dbtp ( ) const
inlinenoexcept

◆ channel_count()

template<typename SampleType = float, std::size_t MaxChannels = 2>
std::size_t pulp::signal::TruePeakLimiterT< SampleType, MaxChannels >::channel_count ( ) const
inlinenoexcept

◆ channel_link()

template<typename SampleType = float, std::size_t MaxChannels = 2>
ChannelLink pulp::signal::TruePeakLimiterT< SampleType, MaxChannels >::channel_link ( ) const
inlinenoexcept

◆ detector_guard_db()

template<typename SampleType = float, std::size_t MaxChannels = 2>
constexpr double pulp::signal::TruePeakLimiterT< SampleType, MaxChannels >::detector_guard_db ( )
inlinestaticconstexprnoexcept

◆ detector_latency_samples()

template<typename SampleType = float, std::size_t MaxChannels = 2>
constexpr int pulp::signal::TruePeakLimiterT< SampleType, MaxChannels >::detector_latency_samples ( )
inlinestaticconstexprnoexcept

◆ detector_mac_count_per_channel()

template<typename SampleType = float, std::size_t MaxChannels = 2>
constexpr std::size_t pulp::signal::TruePeakLimiterT< SampleType, MaxChannels >::detector_mac_count_per_channel ( )
inlinestaticconstexprnoexcept

◆ detector_phases()

template<typename SampleType = float, std::size_t MaxChannels = 2>
std::array< double, interpolation_factor()> pulp::signal::TruePeakLimiterT< SampleType, MaxChannels >::detector_phases ( std::span< const double, interpolation_taps()> newest_to_oldest) const
inlinenoexcept

Reconstruct the eight detector phases for one channel without changing limiter state.

This exposes the detector stage to tests and visualizers.

◆ fault_count()

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

◆ gain_reduction_db()

template<typename SampleType = float, std::size_t MaxChannels = 2>
double pulp::signal::TruePeakLimiterT< SampleType, MaxChannels >::gain_reduction_db ( std::size_t channel = 0) const
inlinenoexcept

Current attenuation as a non-negative dB magnitude.

◆ internal_gain_lookahead_samples()

template<typename SampleType = float, std::size_t MaxChannels = 2>
constexpr int pulp::signal::TruePeakLimiterT< SampleType, MaxChannels >::internal_gain_lookahead_samples ( )
inlinestaticconstexprnoexcept

Fixed future-peak horizon required by the output gain scheduler.

◆ interpolation_factor()

template<typename SampleType = float, std::size_t MaxChannels = 2>
constexpr std::size_t pulp::signal::TruePeakLimiterT< SampleType, MaxChannels >::interpolation_factor ( )
inlinestaticconstexprnoexcept

◆ interpolation_taps()

template<typename SampleType = float, std::size_t MaxChannels = 2>
constexpr std::size_t pulp::signal::TruePeakLimiterT< SampleType, MaxChannels >::interpolation_taps ( )
inlinestaticconstexprnoexcept

◆ latency_samples()

template<typename SampleType = float, std::size_t MaxChannels = 2>
int pulp::signal::TruePeakLimiterT< SampleType, MaxChannels >::latency_samples ( ) const
inlinenoexcept

◆ lookahead_ms()

template<typename SampleType = float, std::size_t MaxChannels = 2>
double pulp::signal::TruePeakLimiterT< SampleType, MaxChannels >::lookahead_ms ( ) const
inlinenoexcept

◆ maximum_lookahead_ms()

template<typename SampleType = float, std::size_t MaxChannels = 2>
constexpr double pulp::signal::TruePeakLimiterT< SampleType, MaxChannels >::maximum_lookahead_ms ( )
inlinestaticconstexprnoexcept

◆ maximum_supported_channels()

template<typename SampleType = float, std::size_t MaxChannels = 2>
constexpr std::size_t pulp::signal::TruePeakLimiterT< SampleType, MaxChannels >::maximum_supported_channels ( )
inlinestaticconstexprnoexcept

◆ maximum_supported_sample_rate()

template<typename SampleType = float, std::size_t MaxChannels = 2>
constexpr double pulp::signal::TruePeakLimiterT< SampleType, MaxChannels >::maximum_supported_sample_rate ( )
inlinestaticconstexprnoexcept

◆ prepare()

template<typename SampleType = float, std::size_t MaxChannels = 2>
bool pulp::signal::TruePeakLimiterT< SampleType, MaxChannels >::prepare ( double sample_rate,
std::size_t channels,
Params params = {} )
inline

◆ prepared()

template<typename SampleType = float, std::size_t MaxChannels = 2>
bool pulp::signal::TruePeakLimiterT< SampleType, MaxChannels >::prepared ( ) const
inlinenoexcept

◆ process_frame()

template<typename SampleType = float, std::size_t MaxChannels = 2>
bool pulp::signal::TruePeakLimiterT< SampleType, MaxChannels >::process_frame ( std::span< const SampleType > input,
std::span< SampleType > output )
inlinenoexcept

◆ process_interleaved()

template<typename SampleType = float, std::size_t MaxChannels = 2>
bool pulp::signal::TruePeakLimiterT< SampleType, MaxChannels >::process_interleaved ( const SampleType * input,
SampleType * output,
std::size_t frames,
std::size_t channels )
inlinenoexcept

◆ release_ms()

template<typename SampleType = float, std::size_t MaxChannels = 2>
double pulp::signal::TruePeakLimiterT< SampleType, MaxChannels >::release_ms ( ) const
inlinenoexcept

◆ reset()

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

◆ set_ceiling_dbtp()

template<typename SampleType = float, std::size_t MaxChannels = 2>
bool pulp::signal::TruePeakLimiterT< SampleType, MaxChannels >::set_ceiling_dbtp ( double dbtp)
inlinenoexcept

◆ set_realtime_control_coefficients()

template<typename SampleType = float, std::size_t MaxChannels = 2>
bool pulp::signal::TruePeakLimiterT< SampleType, MaxChannels >::set_realtime_control_coefficients ( double ceiling_dbtp,
double safe_ceiling_linear,
double release_ms,
double release_retain )
inlinenoexcept

Install already-computed control coefficients without calling libm.

Intended for sample-accurate automation whose lookup table was built on the control thread. The dB/ms values remain the public control state.

◆ set_release_ms()

template<typename SampleType = float, std::size_t MaxChannels = 2>
bool pulp::signal::TruePeakLimiterT< SampleType, MaxChannels >::set_release_ms ( double milliseconds)
inlinenoexcept

◆ tail_samples()

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

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