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

◆ threshold()

template<typename D >
Tendency< D, float > MayaFlux::Kinesis::threshold ( const Tendency< D, float > &  t,
float  thresh 
)

Zero output below threshold, pass through above.

Template Parameters
DDomain type
Parameters
tSource tendency
threshThreshold value
Returns
Thresholded tendency

Definition at line 141 of file Tendency.hpp.

142{
143 return { .fn = [t, thresh](const D& d) -> float {
144 float v = t(d);
145 return v < thresh ? 0.0F : v;
146 } };
147}

References MayaFlux::Kinesis::Tendency< D, R >::fn.

Referenced by MayaFlux::Kinesis::Discrete::onset_positions(), MayaFlux::Kinesis::Discrete::peak_positions(), and MayaFlux::Kinesis::Discrete::zero_crossing_positions().

+ Here is the caller graph for this function: