What is sample-and-hold?
Synthesis & Sound DesignA circuit or process that captures the value of a signal at a trigger moment and holds that value until the next trigger. It is commonly used to generate stepped modulation patterns.
A circuit or process that captures the value of a signal at a trigger moment and holds that value until the next trigger. It is commonly used to generate stepped modulation patterns.
Sample-and-hold captures an input value at a trigger time and maintains that value until the next capture. In synthesis, it produces a stepped control signal that can drive oscillator pitch, filter cutoff or another destination. The input supplies the values; a clock or trigger determines when new values are taken.
Sampling noise gives apparently random steps, a familiar use of the process. Sampling a regular waveform instead can produce an organized staircase or repeating pattern, depending on the timing relationship. A separate slew or smoothing stage can soften the jumps, changing the result from abrupt steps into gliding transitions.
For a strictly increasing sequence of trigger instants t_k < t_{k+1}, the ideal output y(t) equals the input x sampled at t_k throughout the half-open interval [t_k, t_{k+1}). At the next trigger the held value is replaced immediately. For example, if t_0 = 0 ms, t_1 = 10 ms, x(t_0) = 2 V and x(t_1) = −1 V, then y(t) = 2 V from 0 to just before 10 ms and −1 V from 10 ms until the next trigger. Both time variables use the same units and x and y use the same signal units. Trigger spacing may vary. This zero-order-hold idealization excludes aperture time, switching transients, droop, and any smoothing or reconstruction filter.
Sample-and-hold is not inherently a random generator: randomness comes from the sampled input or timing. It differs from track-and-hold, which follows the input during a tracking phase before holding it. In this control context, sample means a captured value, not necessarily a recorded audio fragment.