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

Time-resolved track of one note. More...

#include <modal_extraction.hpp>

Public Member Functions

double mean_f0 (double from_s, double to_s) const
 Mean over cycles with sigma_valid, in [from_s, to_s).
double mean_sigma (double from_s, double to_s) const
double mean_q (double from_s, double to_s) const
double sigma_span_percent (double from_s, double to_s) const
 Peak-to-peak spread of sigma over valid cycles in the window, as a percentage of its mean.
double f0_span_percent (double from_s, double to_s) const
double f0_q_correlation (double from_s, double to_s) const
 Pearson correlation of f0 and Q over valid cycles in the window.

Public Attributes

std::vector< CycleObservation > cycles
double onset_s = 0.0
double sample_rate = 0.0
double monocomponent_confidence = 0.0
 Fraction of cycle periods within 20% of the median period, in [0, 1].
bool ok = false
std::string message

Detailed Description

Time-resolved track of one note.

Member Function Documentation

◆ f0_q_correlation()

double pulp::test::audio::CycleTrack::f0_q_correlation ( double from_s,
double to_s ) const

Pearson correlation of f0 and Q over valid cycles in the window.

Returns 0 when either is constant or fewer than 3 cycles qualify.

◆ f0_span_percent()

double pulp::test::audio::CycleTrack::f0_span_percent ( double from_s,
double to_s ) const

◆ mean_f0()

double pulp::test::audio::CycleTrack::mean_f0 ( double from_s,
double to_s ) const

Mean over cycles with sigma_valid, in [from_s, to_s).

Returns 0 when the window holds no valid cycle.

◆ mean_q()

double pulp::test::audio::CycleTrack::mean_q ( double from_s,
double to_s ) const

◆ mean_sigma()

double pulp::test::audio::CycleTrack::mean_sigma ( double from_s,
double to_s ) const

◆ sigma_span_percent()

double pulp::test::audio::CycleTrack::sigma_span_percent ( double from_s,
double to_s ) const

Peak-to-peak spread of sigma over valid cycles in the window, as a percentage of its mean.

The calibration control asserts on this.

Member Data Documentation

◆ cycles

std::vector<CycleObservation> pulp::test::audio::CycleTrack::cycles

◆ message

std::string pulp::test::audio::CycleTrack::message

◆ monocomponent_confidence

double pulp::test::audio::CycleTrack::monocomponent_confidence = 0.0

Fraction of cycle periods within 20% of the median period, in [0, 1].

A clean single component sits near 1.0. Well below ~0.8 means the zero-crossing tracker is seeing more than one comparable partial and the whole track is suspect — the estimator has no way to know which component it is following.

◆ ok

bool pulp::test::audio::CycleTrack::ok = false

◆ onset_s

double pulp::test::audio::CycleTrack::onset_s = 0.0

◆ sample_rate

double pulp::test::audio::CycleTrack::sample_rate = 0.0

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