|
| void | prepare (double sample_rate) |
| void | set_refractory_ms (double ms) |
| void | set_threshold (SampleType t) |
| | Threshold for the refractory process_signal() lane.
|
| void | reset () |
| bool | process (bool gate) |
template<typename Value>
requires (!std::same_as<std::remove_cvref_t<Value>, bool>) |
| bool | process (Value)=delete |
| | Prevent continuous values from silently selecting the decoded-event lane through implicit conversion to bool.
|
| bool | process_signal (SampleType input) |
| | Established single-threshold signal lane.
|
| void | process_signal (SampleType input, bool &rising, bool &falling) |
| bool | armed () const |
template<typename SampleType = float>
class pulp::signal::TriggerDetectT< SampleType >
Rising-edge detector with a refractory period.
After it fires, further edges are ignored for refractory_ms. Real gate CV and real thresholded audio both chatter at the transition; without the refractory window a single musical event fires two or three triggers, and everything downstream doubles.
RT contract: prepare() and setters are control-side; process(), process_signal(), and reset() allocate nothing.
USE: extracting note-ons from gate CV; clocking a SampleHoldT; resetting an LFO on a beat; converting an envelope follower or a TransientDetectorT output into discrete hits.