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

A band-compressed, rate-independent copy of a LongTermSpectrum's estimate, for saving with a session and restoring warm. More...

#include <loudness_compensation.hpp>

Static Public Member Functions

static int band_of (double hz) noexcept
static double centre_hz (int band) noexcept

Public Attributes

bool valid = false
double level_ms = 0.0
std::array< float, kBands > ww {}
std::array< float, kBands > dd {}
std::array< float, kBands > re {}
std::array< float, kBands > im {}

Static Public Attributes

static constexpr int kBands = 160
static constexpr double kLowHz = 10.0
static constexpr double kHighHz = 24000.0

Detailed Description

A band-compressed, rate-independent copy of a LongTermSpectrum's estimate, for saving with a session and restoring warm.

kBands log-spaced bands from 10 Hz to 24 kHz (the first band reaches down to DC, the last up to Nyquist). Powers are normalised so the wet leg sums to 1; level_ms is the wet leg's K-weighted mean square, which restores the level the level-drop rule compares against.

Member Function Documentation

◆ band_of()

int pulp::signal::SpectrumBands::band_of ( double hz)
inlinestaticnodiscardnoexcept

◆ centre_hz()

double pulp::signal::SpectrumBands::centre_hz ( int band)
inlinestaticnodiscardnoexcept

Member Data Documentation

◆ dd

std::array<float, kBands> pulp::signal::SpectrumBands::dd {}

◆ im

std::array<float, kBands> pulp::signal::SpectrumBands::im {}

◆ kBands

int pulp::signal::SpectrumBands::kBands = 160
staticconstexpr

◆ kHighHz

double pulp::signal::SpectrumBands::kHighHz = 24000.0
staticconstexpr

◆ kLowHz

double pulp::signal::SpectrumBands::kLowHz = 10.0
staticconstexpr

◆ level_ms

double pulp::signal::SpectrumBands::level_ms = 0.0

◆ re

std::array<float, kBands> pulp::signal::SpectrumBands::re {}

◆ valid

bool pulp::signal::SpectrumBands::valid = false

◆ ww

std::array<float, kBands> pulp::signal::SpectrumBands::ww {}

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