Options for analyze_modes. More...
#include <modal_extraction.hpp>
Public Attributes | |
| int | fft_length = 32768 |
| Discovery FFT length (power of two). | |
| double | search_low_hz = 20.0 |
| Discovery search band. Peaks outside it are ignored. | |
| double | search_high_hz = 20000.0 |
| double | peak_floor_db = -60.0 |
| Reject peaks quieter than this (dB below the strongest peak). | |
| double | min_separation_hz = 8.0 |
| Two peaks closer than this are treated as one mode; the louder wins. | |
| int | max_modes = 64 |
| Cap on reported modes (strongest first during discovery). | |
| double | refine_span_cents = 60.0 |
| Half-width of the cents grid scanned around each discovery peak when refining its frequency, and the grid step. | |
| double | refine_step_cents = 2.0 |
| int | refine_window = 8192 |
| Window (samples) used by the refinement DFT probe. | |
| double | fit_start_db = -3.0 |
| dB window, relative to the mode's own level at fit_offset_s, over which the log-envelope slope is fit. | |
| double | fit_end_db = -30.0 |
| double | fit_offset_s = 0.005 |
| Skip this much of the head before fitting, so an excitation pulse or a processor's pre-ring is outside the fit region. | |
| int | envelope_window = 2048 |
| Envelope tracking window/hop for the decay fit, in samples. | |
| int | envelope_hop = 512 |
| int | min_fit_points = 4 |
| A slope fit needs at least this many envelope points to be reported with non-zero confidence. | |
| int | channel = 0 |
| Channel index when a multi-channel view is reduced (unused by the span overloads; present so callers can record their choice). | |
Options for analyze_modes.
Defaults suit a decaying instrument body IR at 44.1/48 kHz; every threshold is named here rather than buried in the implementation.
| int pulp::test::audio::ModeAnalysisOptions::channel = 0 |
Channel index when a multi-channel view is reduced (unused by the span overloads; present so callers can record their choice).
| int pulp::test::audio::ModeAnalysisOptions::envelope_hop = 512 |
| int pulp::test::audio::ModeAnalysisOptions::envelope_window = 2048 |
Envelope tracking window/hop for the decay fit, in samples.
| int pulp::test::audio::ModeAnalysisOptions::fft_length = 32768 |
Discovery FFT length (power of two).
Sets the bin resolution (sample_rate / fft_length) and therefore which modes can be separated at all — see the resolvability limit above.
| double pulp::test::audio::ModeAnalysisOptions::fit_end_db = -30.0 |
| double pulp::test::audio::ModeAnalysisOptions::fit_offset_s = 0.005 |
Skip this much of the head before fitting, so an excitation pulse or a processor's pre-ring is outside the fit region.
| double pulp::test::audio::ModeAnalysisOptions::fit_start_db = -3.0 |
dB window, relative to the mode's own level at fit_offset_s, over which the log-envelope slope is fit.
The T60 is the extrapolation of that slope to −60 dB. Do NOT widen fit_end_db toward −60 expecting a better answer: the point of the window is to stay above the floor.
| int pulp::test::audio::ModeAnalysisOptions::max_modes = 64 |
Cap on reported modes (strongest first during discovery).
| int pulp::test::audio::ModeAnalysisOptions::min_fit_points = 4 |
A slope fit needs at least this many envelope points to be reported with non-zero confidence.
| double pulp::test::audio::ModeAnalysisOptions::min_separation_hz = 8.0 |
Two peaks closer than this are treated as one mode; the louder wins.
| double pulp::test::audio::ModeAnalysisOptions::peak_floor_db = -60.0 |
Reject peaks quieter than this (dB below the strongest peak).
| double pulp::test::audio::ModeAnalysisOptions::refine_span_cents = 60.0 |
Half-width of the cents grid scanned around each discovery peak when refining its frequency, and the grid step.
The refined frequency is a parabolic interpolation of the windowed-magnitude peak on this grid.
| double pulp::test::audio::ModeAnalysisOptions::refine_step_cents = 2.0 |
| int pulp::test::audio::ModeAnalysisOptions::refine_window = 8192 |
Window (samples) used by the refinement DFT probe.
Must be long enough to resolve the mode from its neighbours and short enough that the mode has not decayed into the noise floor across it.
| double pulp::test::audio::ModeAnalysisOptions::search_high_hz = 20000.0 |
| double pulp::test::audio::ModeAnalysisOptions::search_low_hz = 20.0 |
Discovery search band. Peaks outside it are ignored.