Amplitude contour

ATMOSYNTH built-in module

Shapes the level of whatever passes through it, as a Moog’s amplifier contour does: it opens from nothing to full and closes again, each stage a capacitor charging or emptying rather than a straight line. It is the Contour module working a gain, with the same knobs. Delay waits before it opens. Attack is the time from nothing to full: fast off the mark and still moving when it arrives, which is the snap a hardware envelope has and a straight line lacks. Hold keeps it full. Decay falls to the Sustain level, which it holds while the key is down, and Release closes it once the key is let go, from wherever it had got to, mid-attack included. The note lasts as long as its release and no longer. Decay and Release are the time a whole fall from full to nothing takes. What each sets is how fast the level falls, as on an analog envelope, so a decay to a sustain of a half, or a release from below full, arrives sooner than its knob says. Loop, while the key is held, takes the decay back round to the delay and the attack rather than resting at the sustain, so a held note pulses in the contour’s own shape. Let go, it closes from wherever it was. It has no Velocity knob, because every note is already as loud as it was struck, whatever it passes through: a second strength here would count the first twice. A note slid into under a glide is the same note moved, so the level carries on where it was; a new note opens from nothing. This module carries code because an envelope the vocabulary can draw is laid down by the clock at the moment a key goes down: it cannot stop an attack where it reaches full from wherever it began, nor go round again for as long as a key nobody can see the end of is held.

Four notes played on Keys, passing through it on their way out.

What it is made of

Ports: note input ‘Note’, audio input ‘In’, audio output ‘Out’.

  • ‘note’: note input · port midi
  • ‘in’: audio input · port in · into ‘vca’
  • ‘gate’: Constant · modulates the gate of ‘contour’ · value set by ‘Gate’
  • ‘contour’: DSP JS (your own code) · runs its author’s code · modulates the level of ‘vca’ · delay turned by ‘Delay (ms)’ · attack turned by ‘Attack (ms to full)’ · hold turned by ‘Hold (ms at full)’ · decay turned by ‘Decay (ms for a full fall)’ · sustain turned by ‘Sustain level’ · release turned by ‘Release (ms for a full fall)’ · loop turned by ‘Loop’
  • ‘vca’: Gain · into ‘out’
  • ‘out’: audio output · port out
  • ‘Gate’: envelope, 3 points, on the value of ‘gate’ · holds at point 1
  • ‘Delay (ms)’: knob, 0 to 10000
  • ‘Attack (ms to full)’: knob, 1 to 10000
  • ‘Hold (ms at full)’: knob, 0 to 10000
  • ‘Decay (ms for a full fall)’: knob, 1 to 10000
  • ‘Sustain level’: knob, 0 to 1
  • ‘Release (ms for a full fall)’: knob, 1 to 10000
  • ‘Loop’: knob, off / on

Patches built on it

10 published patches