Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
pulp::signal::SpectrumCdf Class Reference

The normalised cumulative of a power spectrum on a uniform bin grid. More...

#include <loudness_compensation.hpp>

Public Member Functions

void prepare (std::size_t bins)
 Control thread: size for bins.
void assign (std::span< const double > power, double bin_hz) noexcept
 Allocation-free once prepared for at least power.size() bins.
double weight (double lo_hz, double hi_hz) const noexcept
 Energy between two frequencies; the whole spectrum weighs 1.

Detailed Description

The normalised cumulative of a power spectrum on a uniform bin grid.

Bin k spans [(k - 1/2) df, (k + 1/2) df]; the energy is linear inside a bin.

Member Function Documentation

◆ assign()

void pulp::signal::SpectrumCdf::assign ( std::span< const double > power,
double bin_hz )
inlinenoexcept

Allocation-free once prepared for at least power.size() bins.

◆ prepare()

void pulp::signal::SpectrumCdf::prepare ( std::size_t bins)
inline

Control thread: size for bins.

◆ weight()

double pulp::signal::SpectrumCdf::weight ( double lo_hz,
double hi_hz ) const
inlinenodiscardnoexcept

Energy between two frequencies; the whole spectrum weighs 1.


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