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

Fixed-capacity streaming centroid, flatness, rolloff, and flux analysis. More...

#include <spectral_feature_frontends.hpp>

Public Types

using Frame = SpectralFeatureFrameT<SampleType>

Public Member Functions

bool prepare (const StreamingAnalysisConfig &config)
void reset () noexcept
template<typename Sink>
bool process (const SampleType *const *channels, std::size_t channel_count, std::size_t frames, Sink &&sink) noexcept
const Frame & current () const noexcept
std::uint32_t algorithmic_latency_samples () const noexcept
std::uint32_t startup_samples () const noexcept
std::uint64_t retained_fft_bytes () const noexcept

Detailed Description

template<typename SampleType = float, std::size_t MaxFftSize = 4096, std::size_t MaxChannels = 8>
class pulp::signal::SpectralFeatureFrontEndT< SampleType, MaxFftSize, MaxChannels >

Fixed-capacity streaming centroid, flatness, rolloff, and flux analysis.

This reuses the shared StreamingAnalysisWindowT FFT owner with its symmetric Hann window. prepare() is control-thread work and may allocate only inside FftT. After a successful prepare, reset() and process() allocate nothing. The instance and its nothrow sink have one processing-thread owner; callers publish copied frames across threads. Rolloff is the first bin containing 85% of spectral power. Flux is the Euclidean distance between consecutive unit-sum magnitude spectra, divided by sqrt(2), so gain-only changes do not become modulation.

Member Typedef Documentation

◆ Frame

template<typename SampleType = float, std::size_t MaxFftSize = 4096, std::size_t MaxChannels = 8>
using pulp::signal::SpectralFeatureFrontEndT< SampleType, MaxFftSize, MaxChannels >::Frame = SpectralFeatureFrameT<SampleType>

Member Function Documentation

◆ algorithmic_latency_samples()

template<typename SampleType = float, std::size_t MaxFftSize = 4096, std::size_t MaxChannels = 8>
std::uint32_t pulp::signal::SpectralFeatureFrontEndT< SampleType, MaxFftSize, MaxChannels >::algorithmic_latency_samples ( ) const
inlinenodiscardnoexcept

◆ current()

template<typename SampleType = float, std::size_t MaxFftSize = 4096, std::size_t MaxChannels = 8>
const Frame & pulp::signal::SpectralFeatureFrontEndT< SampleType, MaxFftSize, MaxChannels >::current ( ) const
inlinenodiscardnoexcept

◆ prepare()

template<typename SampleType = float, std::size_t MaxFftSize = 4096, std::size_t MaxChannels = 8>
bool pulp::signal::SpectralFeatureFrontEndT< SampleType, MaxFftSize, MaxChannels >::prepare ( const StreamingAnalysisConfig & config)
inlinenodiscard

◆ process()

template<typename SampleType = float, std::size_t MaxFftSize = 4096, std::size_t MaxChannels = 8>
template<typename Sink>
bool pulp::signal::SpectralFeatureFrontEndT< SampleType, MaxFftSize, MaxChannels >::process ( const SampleType *const * channels,
std::size_t channel_count,
std::size_t frames,
Sink && sink )
inlinenodiscardnoexcept

◆ reset()

template<typename SampleType = float, std::size_t MaxFftSize = 4096, std::size_t MaxChannels = 8>
void pulp::signal::SpectralFeatureFrontEndT< SampleType, MaxFftSize, MaxChannels >::reset ( )
inlinenoexcept

◆ retained_fft_bytes()

template<typename SampleType = float, std::size_t MaxFftSize = 4096, std::size_t MaxChannels = 8>
std::uint64_t pulp::signal::SpectralFeatureFrontEndT< SampleType, MaxFftSize, MaxChannels >::retained_fft_bytes ( ) const
inlinenodiscardnoexcept

◆ startup_samples()

template<typename SampleType = float, std::size_t MaxFftSize = 4096, std::size_t MaxChannels = 8>
std::uint32_t pulp::signal::SpectralFeatureFrontEndT< SampleType, MaxFftSize, MaxChannels >::startup_samples ( ) const
inlinenodiscardnoexcept

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