|
MayaFlux 0.1.0
Digital-First Multimedia Processing Framework
|
| void MayaFlux::Nodes::Generator::Phasor::on_threshold | ( | const NodeHook & | callback, |
| double | threshold, | ||
| bool | rising = true |
||
| ) |
Registers a callback for every time the phasor crosses a threshold.
| callback | Function to call when the threshold is crossed |
| threshold | Value at which to trigger the callback |
| rising | Whether to trigger on rising (true) or falling (false) edges |
This method allows external components to monitor or react to every time the phasor crosses a specific threshold value. The callback receives a GeneratorContext containing the generated value and generator parameters like frequency, amplitude, and phase.
Definition at line 174 of file Phasor.cpp.
References m_threshold_callbacks.