One cycle of a decaying quasi-sinusoid. More...
#include <modal_extraction.hpp>
Public Attributes | |
| double | time_s = 0.0 |
| Centre of the cycle. | |
| double | freq_hz = 0.0 |
| 1 / (period between zero crossings). | |
| double | envelope = 0.0 |
| Peak |x| within the cycle. | |
| double | sigma_np_s = 0.0 |
| Local decay rate, Np/s. Valid iff sigma_valid. | |
| double | q = 0.0 |
| pi * freq_hz / sigma_np_s. | |
| bool | sigma_valid = false |
| False for cycles within half_window of either end of the track, where the sliding log-envelope fit has no full window. | |
| bool | directional_only = false |
| True for the first tracked cycle — the attack cycle, whose freq_hz is a mixture of the attack-mode resonance and excitation feedthrough rather than a settled f0. | |
One cycle of a decaying quasi-sinusoid.
Q convention throughout: the envelope is e^{-sigma t}, so Q = pi * f0 / sigma. (Quoting a Q without its envelope convention is how factor-of-two arguments start.)
| bool pulp::test::audio::CycleObservation::directional_only = false |
True for the first tracked cycle — the attack cycle, whose freq_hz is a mixture of the attack-mode resonance and excitation feedthrough rather than a settled f0.
Treat its frequency as a direction, never a value. It never carries a sigma: the sliding fit needs half_window cycles of runway on both sides, so sigma_valid is always false here. This is not a limitation to route around — an attack window shorter than one period of the attack frequency contains no cycle to measure a decay over, so no attack Q exists to be measured.
| double pulp::test::audio::CycleObservation::envelope = 0.0 |
Peak |x| within the cycle.
| double pulp::test::audio::CycleObservation::freq_hz = 0.0 |
1 / (period between zero crossings).
| double pulp::test::audio::CycleObservation::q = 0.0 |
pi * freq_hz / sigma_np_s.
Valid iff sigma_valid.
| double pulp::test::audio::CycleObservation::sigma_np_s = 0.0 |
Local decay rate, Np/s. Valid iff sigma_valid.
| bool pulp::test::audio::CycleObservation::sigma_valid = false |
False for cycles within half_window of either end of the track, where the sliding log-envelope fit has no full window.
sigma_np_s and q are zero there.
| double pulp::test::audio::CycleObservation::time_s = 0.0 |
Centre of the cycle.