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

#include <spectral_morph.hpp>

Classes

struct  Config

Public Member Functions

bool prepare (int channels, int num_bins) noexcept
 Fix the coherent frame geometry.
void reset () noexcept
 Stateless lifecycle symmetry for frame-processing chains.
bool set_config (Config config) noexcept
Config config () const noexcept
bool prepared () const noexcept
int channels () const noexcept
int num_bins () const noexcept
bool process (const std::complex< SampleType > *const *a, const std::complex< SampleType > *const *b, std::complex< SampleType > *const *out, int channels, int num_bins, SampleType magnitude_amount, SampleType phase_amount) const noexcept
 Morph an entire coherent frame group.
bool process_partition (const std::complex< SampleType > *const *a, const std::complex< SampleType > *const *b, std::complex< SampleType > *const *out, int channels, int first_bin, int bin_count, SampleType magnitude_amount, SampleType phase_amount) const noexcept
 Morph [first_bin, first_bin + bin_count).

Static Public Member Functions

static bool supports_configuration (int channels, int num_bins) noexcept

Static Public Attributes

static constexpr int maximum_channels = 64
static constexpr int minimum_bins = 129
static constexpr int maximum_bins = 8193

Member Function Documentation

◆ channels()

template<typename SampleType = float>
int pulp::signal::SpectralMorphT< SampleType >::channels ( ) const
inlinenoexcept

◆ config()

template<typename SampleType = float>
Config pulp::signal::SpectralMorphT< SampleType >::config ( ) const
inlinenoexcept

◆ num_bins()

template<typename SampleType = float>
int pulp::signal::SpectralMorphT< SampleType >::num_bins ( ) const
inlinenoexcept

◆ prepare()

template<typename SampleType = float>
bool pulp::signal::SpectralMorphT< SampleType >::prepare ( int channels,
int num_bins )
inlinenoexcept

Fix the coherent frame geometry.

This stores two integers and allocates nothing; invalid geometry leaves a prepared instance unchanged.

◆ prepared()

template<typename SampleType = float>
bool pulp::signal::SpectralMorphT< SampleType >::prepared ( ) const
inlinenoexcept

◆ process()

template<typename SampleType = float>
bool pulp::signal::SpectralMorphT< SampleType >::process ( const std::complex< SampleType > *const * a,
const std::complex< SampleType > *const * b,
std::complex< SampleType > *const * out,
int channels,
int num_bins,
SampleType magnitude_amount,
SampleType phase_amount ) const
inlinenoexcept

Morph an entire coherent frame group.

Magnitude and phase amounts are finite normalized values and are independently clamped to [0,1]. Output may exactly alias either endpoint. A non-finite endpoint bin falls back to the other finite endpoint; two non-finite endpoints produce silence.

◆ process_partition()

template<typename SampleType = float>
bool pulp::signal::SpectralMorphT< SampleType >::process_partition ( const std::complex< SampleType > *const * a,
const std::complex< SampleType > *const * b,
std::complex< SampleType > *const * out,
int channels,
int first_bin,
int bin_count,
SampleType magnitude_amount,
SampleType phase_amount ) const
inlinenoexcept

Morph [first_bin, first_bin + bin_count).

Disjoint partitions produce the exact same result as process(), enabling caller-owned parallelism.

◆ reset()

template<typename SampleType = float>
void pulp::signal::SpectralMorphT< SampleType >::reset ( )
inlinenoexcept

Stateless lifecycle symmetry for frame-processing chains.

Configuration and prepared geometry are preserved.

◆ set_config()

template<typename SampleType = float>
bool pulp::signal::SpectralMorphT< SampleType >::set_config ( Config config)
inlinenoexcept

◆ supports_configuration()

template<typename SampleType = float>
bool pulp::signal::SpectralMorphT< SampleType >::supports_configuration ( int channels,
int num_bins )
inlinestaticnoexcept

Member Data Documentation

◆ maximum_bins

template<typename SampleType = float>
int pulp::signal::SpectralMorphT< SampleType >::maximum_bins = 8193
staticconstexpr

◆ maximum_channels

template<typename SampleType = float>
int pulp::signal::SpectralMorphT< SampleType >::maximum_channels = 64
staticconstexpr

◆ minimum_bins

template<typename SampleType = float>
int pulp::signal::SpectralMorphT< SampleType >::minimum_bins = 129
staticconstexpr

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