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

◆ one_shot()

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

Monostable: every rise of the input opens the output for a fixed time.

coefs: [threshold, latched, release time, duration]. A rise during the pulse restarts it; the input's own length does not matter.

Definition at line 242 of file Boolean.cpp.

243{
244 if (coefs.size() < 4)
245 return false;
246
247 if (rises(input > coefs[0], coefs[1]))
248 coefs[2] = time + coefs[3];
249 return time < coefs[2];
250}
Core::GlobalInputConfig input
Definition Config.cpp:42

References input.