Latch a value on a clock's rising edge, with optional glide to the new value instead of a step.
More...
|
| void | prepare (SampleType sample_rate) |
| void | set_threshold (SampleType threshold) |
| void | set_glide_ms (SampleType ms) |
| | 0 disables the glide entirely (the output steps).
|
| void | set_glide_mode (typename SlewLimiterT< SampleType >::Mode m) |
| void | reset (SampleType value=SampleType{0}) |
| SampleType | process (SampleType input, bool clock) |
| SampleType | process_signal (SampleType input, SampleType trigger) |
| | Explicit signal-threshold spelling used by the Round-2 sequencing kit.
|
| SampleType | held () const |
| | The latched value before any glide — what the last clock actually saw.
|
| SampleType | value () const |
template<typename SampleType = float>
class pulp::signal::SampleHoldT< SampleType >
Latch a value on a clock's rising edge, with optional glide to the new value instead of a step.
RT contract: prepare() and setters are control-side; process() and reset() allocate nothing.
USE: the classic random-step patch (a clock plus a noise source is a sequencer nobody has to write); freezing an LFO or envelope value at note-on so a per-note variation stays put for the note's duration; turning a continuous controller into a stepped one. The glide is what separates "S&H
on a filter cutoff" from "S&H on a filter cutoff that does not click".