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

One resonant mode recovered from a rendered impulse response. More...

#include <modal_extraction.hpp>

Public Attributes

double freq_hz = 0.0
 Refined mode frequency.
double t60_s = 0.0
 Time to decay 60 dB, from the fitted slope.
double amplitude = 0.0
 Linear amplitude of this mode at t = 0.
double confidence = 0.0
 Fit quality in [0, 1]: the R^2 of the log-envelope slope fit, and zero when no fit was possible at all (see note).
double prominence_db = 0.0
 Peak height in dB relative to the strongest peak in the discovery spectrum.
int fit_points = 0
 Number of envelope points the T60 slope fit consumed.
std::string note
 Empty when the mode fit cleanly; otherwise says what went wrong (fit window ran past the buffer, envelope non-monotonic, ...).

Detailed Description

One resonant mode recovered from a rendered impulse response.

Member Data Documentation

◆ amplitude

double pulp::test::audio::MeasuredMode::amplitude = 0.0

Linear amplitude of this mode at t = 0.

◆ confidence

double pulp::test::audio::MeasuredMode::confidence = 0.0

Fit quality in [0, 1]: the R^2 of the log-envelope slope fit, and zero when no fit was possible at all (see note).

This is a goodness-of-fit score, NOT a probability. Above ~0.95 the mode is a clean single exponential; below ~0.7 the decay is not one exponential (beating, a close neighbour, or a genuinely time-varying decay rate) and only freq_hz should be trusted. A weak mode scores low on its own, because a noisy envelope does not fit a line — no separate weighting is applied.

◆ fit_points

int pulp::test::audio::MeasuredMode::fit_points = 0

Number of envelope points the T60 slope fit consumed.

◆ freq_hz

double pulp::test::audio::MeasuredMode::freq_hz = 0.0

Refined mode frequency.

◆ note

std::string pulp::test::audio::MeasuredMode::note

Empty when the mode fit cleanly; otherwise says what went wrong (fit window ran past the buffer, envelope non-monotonic, ...).

◆ prominence_db

double pulp::test::audio::MeasuredMode::prominence_db = 0.0

Peak height in dB relative to the strongest peak in the discovery spectrum.

Only analyze_modes populates this; measure_mode runs no discovery and leaves it at 0, which is not a claim that the mode is the loudest one present.

◆ t60_s

double pulp::test::audio::MeasuredMode::t60_s = 0.0

Time to decay 60 dB, from the fitted slope.


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