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

◆ refractory_gate()

MAYAFLUX_API bool MayaFlux::Kinesis::Discrete::refractory_gate ( double  input,
double  time,
std::span< double >  coefs 
)
noexcept

Fires while the input is high, then ignores it for a period.

coefs: [last fire time, period, threshold]. A held input fires again once per period.

Definition at line 225 of file Boolean.cpp.

226{
227 if (coefs.size() < 3)
228 return false;
229
230 if (input > coefs[2] && time - coefs[0] >= coefs[1]) {
231 coefs[0] = time;
232 return true;
233 }
234 return false;
235}
Core::GlobalInputConfig input
Definition Config.cpp:42

References input.