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

Audio-thread processor for a fixed-capacity arbitrary transfer curve. More...

#include <transfer_curve.hpp>

Public Types

using Point = TransferCurvePointT<SampleType>
using PreparedCurve = PreparedTransferCurveT<SampleType, MaxPoints>

Public Member Functions

 TransferCurveT () noexcept
bool publish_curve (std::span< const Point > points, SampleType input_min, SampleType input_max, SampleType output_min, SampleType output_max) noexcept
SampleType process (SampleType input) noexcept
void process (const SampleType *input, SampleType *output, int num_samples) noexcept
void process (SampleType *samples, int num_samples) noexcept
void reset () noexcept
 A transfer curve has no history.

Static Public Member Functions

static constexpr int latency_samples () noexcept
static constexpr int tail_samples () noexcept

Static Public Attributes

static constexpr std::size_t max_points = MaxPoints

Detailed Description

template<typename SampleType = float, std::size_t MaxPoints = 32>
class pulp::signal::TransferCurveT< SampleType, MaxPoints >

Audio-thread processor for a fixed-capacity arbitrary transfer curve.

publish_curve() is the single-writer control-side entry point. A complete, validated curve is published through a triple buffer and becomes visible at the next scalar or block process boundary. The audio path is lock-free and allocation-free. The processor deliberately owns no oversampling policy; callers that need alias suppression compose it with OversamplerT.

Member Typedef Documentation

◆ Point

template<typename SampleType = float, std::size_t MaxPoints = 32>
using pulp::signal::TransferCurveT< SampleType, MaxPoints >::Point = TransferCurvePointT<SampleType>

◆ PreparedCurve

template<typename SampleType = float, std::size_t MaxPoints = 32>
using pulp::signal::TransferCurveT< SampleType, MaxPoints >::PreparedCurve = PreparedTransferCurveT<SampleType, MaxPoints>

Constructor & Destructor Documentation

◆ TransferCurveT()

template<typename SampleType = float, std::size_t MaxPoints = 32>
pulp::signal::TransferCurveT< SampleType, MaxPoints >::TransferCurveT ( )
inlinenoexcept

Member Function Documentation

◆ latency_samples()

template<typename SampleType = float, std::size_t MaxPoints = 32>
constexpr int pulp::signal::TransferCurveT< SampleType, MaxPoints >::latency_samples ( )
inlinestaticconstexprnoexcept

◆ process() [1/3]

template<typename SampleType = float, std::size_t MaxPoints = 32>
void pulp::signal::TransferCurveT< SampleType, MaxPoints >::process ( const SampleType * input,
SampleType * output,
int num_samples )
inlinenoexcept

◆ process() [2/3]

template<typename SampleType = float, std::size_t MaxPoints = 32>
void pulp::signal::TransferCurveT< SampleType, MaxPoints >::process ( SampleType * samples,
int num_samples )
inlinenoexcept

◆ process() [3/3]

template<typename SampleType = float, std::size_t MaxPoints = 32>
SampleType pulp::signal::TransferCurveT< SampleType, MaxPoints >::process ( SampleType input)
inlinenoexcept

◆ publish_curve()

template<typename SampleType = float, std::size_t MaxPoints = 32>
bool pulp::signal::TransferCurveT< SampleType, MaxPoints >::publish_curve ( std::span< const Point > points,
SampleType input_min,
SampleType input_max,
SampleType output_min,
SampleType output_max )
inlinenoexcept

◆ reset()

template<typename SampleType = float, std::size_t MaxPoints = 32>
void pulp::signal::TransferCurveT< SampleType, MaxPoints >::reset ( )
inlinenoexcept

A transfer curve has no history.

Reset only adopts the latest complete control-side publication so the next sample starts from that snapshot.

◆ tail_samples()

template<typename SampleType = float, std::size_t MaxPoints = 32>
constexpr int pulp::signal::TransferCurveT< SampleType, MaxPoints >::tail_samples ( )
inlinestaticconstexprnoexcept

Member Data Documentation

◆ max_points

template<typename SampleType = float, std::size_t MaxPoints = 32>
std::size_t pulp::signal::TransferCurveT< SampleType, MaxPoints >::max_points = MaxPoints
staticconstexpr

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