DSPark 1.6.1
Header-only audio DSP framework in pure C++20 — zero dependencies
Loading...
Searching...
No Matches
SampleAndHold.h File Reference

Sample-and-hold processor for stepped modulation and bit-crushing. More...

#include "DspMath.h"
#include <cmath>
#include <limits>
Include dependency graph for SampleAndHold.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  dspark::SampleAndHold< T >
 Holds a sample value for N samples or until externally triggered. More...
 

Namespaces

namespace  dspark
 Main namespace for the DSPark framework.
 

Detailed Description

Sample-and-hold processor for stepped modulation and bit-crushing.

Captures an input sample and holds it for a configurable number of samples or until an external trigger fires. This introduces deliberate spectral imaging (aliasing) due to its Zero-Order Hold (ZOH) nature, making it ideal for creative bit-crushing and classic stepped LFO synthesis.

Threading: owner-managed. Not internally thread-safe: call setters and process methods from the owning (audio) thread, or synchronise externally.

Note
This is an effect/modulator, not a band-limited Sample Rate Converter (SRC).

Dependencies: DspMath.h (FloatType concept).

Definition in file SampleAndHold.h.