MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ decay_per_sample()

MAYAFLUX_API double MayaFlux::Kinesis::Discrete::decay_per_sample ( double  seconds,
double  sample_rate 
)
noexcept

Per-sample factor that falls by 1/e in a given time.

Parameters
secondsTime for the factor's powers to fall by 1/e
sample_rateSample rate in Hz
Returns
exp(-1 / (seconds * sample_rate)), with no floor or cap

The bare exponential behind pole_radius_from_decay and any amplitude that decays by one factor per sample. A time of zero gives zero.

Definition at line 138 of file Coefficients.cpp.

139{
140 return std::exp(-1.0 / (seconds * sample_rate));
141}

Referenced by MayaFlux::Nodes::Network::ModalNetwork::initialize_modes(), pole_radius_from_decay(), and MayaFlux::Nodes::Network::ModalNetwork::refresh_decay().

+ Here is the caller graph for this function: