Sample & hold

ATMOSYNTH built-in module

A value taken at a moment and kept until the next one. Left alone it is the random source every synthesiser with an S&H on its LFO has: a new number each step, unrelated to the last and held flat until the next. It makes no sound of its own. Patch it into a filter's Cutoff for the bubbling it is famous for, into an oscillator's Detune for a line that never repeats, or into a pan for a sound that will not sit still. How far it moves what it arrives at is set there, as it is for the LFO. Rate is how often a new value is taken. Clock is that question asked by something else: whatever is patched there takes the step over from the rate, on its rising zero crossings, so an LFO steps it once a cycle. An input with nothing in it never crosses, so the rate keeps the job. In is what gets sampled, and Random is how much of the module's own dice is mixed into it. At nothing it holds the input alone, which is the sample and hold a modular patch means — a slow wave turned into a staircase. At everything it holds its own number and ignores the input, which is the random LFO. Length makes the dice repeat. Off, every step rolls afresh. At a number, that many values are rolled when the module starts and played round in order: at a slow rate a random phrase that loops, and with a clock at a note's pitch a tone with a timbre of its own rather than noise, pitched that many times below the clock. Per note every note rolls its own; shared, the patch keeps one. Glide is how much of each step is spent travelling to the new value. At nothing the output steps; at one it is still on its way when the next value lands, which is the smooth random a filtered S&H makes and will not click. It is a fraction of the step, so it means the same at every rate. Scale rounds each value to a note before it is held. With it on the output counts in octaves, so into an oscillator's Detune at a Detune amount of 1200 cents every value is a note of the scale, counted from the note played: a random melody rather than a random tuning. Off rounds nothing. The rounding comes before Glide, so a glide travels from note to note. Declared shared it wanders once for the whole patch; per note each note rolls its own, which is what makes a chord shimmer rather than move together. This module carries code because nothing in the vocabulary holds a value from one sample to the next. The bitcrusher does, but on a clock of its own that nothing can tick and never below 200 Hz — too fast to be a modulation rather than a texture.

Four notes played on Keys, a filter over them opened by it.

What it is made of

Ports: audio input ‘In’, audio input ‘Clock’, audio output ‘Out’.

  • ‘gen’: Worklet (your own code) · processor name atmosynth-sample-hold · inputs 0 · outputs 1 · runs its author’s code · into ‘out’ · rate turned by ‘Rate (Hz)’ · random turned by ‘Random’ · length turned by ‘Length’ · glide turned by ‘Glide’ · scale turned by ‘Scale’
  • ‘inin’: audio input · port in · modulates the source of ‘gen’
  • ‘clockin’: audio input · port clock · modulates the clock of ‘gen’
  • ‘out’: audio output · port out
  • ‘Rate (Hz)’: knob, 0.01 to 40
  • ‘Random’: knob, 0 to 1
  • ‘Length’: knob, off / 2 / 3 / 4 / 5 / 6 / 7 / 8 / 12 / 16 / 32 / 64
  • ‘Glide’: knob, 0 to 1
  • ‘Scale’: knob, off / chromatic / major / minor / major pentatonic / minor pentatonic / octaves

Patches built on it

3 published patches