Gate

Noise gate and downward expander with a sidechain key input, range, hold, lookahead, detector filtering and channel linking.

  • Dynamics
  • Since 0.2.0
  • dynamics
  • gate
  • expander
  • noise
  • sidechain
  • key
  • lookahead

Open in TuneToys

Gate as the Patch draws it, at default values: inlets on the left, outlets on the right.

A gate turns a signal down while it is quiet: hiss between notes, spill between drum hits, or anything below a level you choose.

What it does#

A detector follows each channel's peak level. While it is above Threshold the gate is open and the audio passes unchanged. When it falls below, the gate waits for Hold, then closes over Release; when the level returns it opens over Attack. Closed means turned down by Range: −80 dB is near silence, −10 dB only softens the gaps. With Ratio below its top value the node is a downward expander: below threshold, every decibel the level falls takes Ratio − 1 more decibels off the output, never more than Range. At the top of the Ratio range, 20, it is a gate and closes fully.

The key input is a sidechain. While something is connected to it, the key's level opens and closes the gate and the main input is what is heard: a beat on the key chops a sustained pad into a rhythm. The key carries one channel, which then drives every channel of the main input, or exactly as many channels as the main input. Left unconnected, the main input drives the detector. The detector high-pass filters only what the detector measures, and Listen plays that filtered signal so you can hear what opens the gate.

Lookahead delays the audio by up to 10 ms while the detector reads it undelayed, so the gate is already open when an onset arrives. The node reports a fixed processing latency equal to the largest Lookahead its control can reach, and the rest of the graph is delayed to match; a smaller Lookahead inside that range moves only the detector, never the latency.

When to use it#

Use it to clean up noise between phrases, tighten drums, or, with a key, to gate one sound with the rhythm of another. To turn loud parts down rather than quiet parts, use the Compressor; to change the attack and decay of hits without a threshold, use the Transient shaper.

Ports#

PortDirectionSignalLanes
audioInputAudioInferred from the cable
keyInputAudioInferred from the cable
audioOutputAudioInferred from the cable

Parameters#

ParameterLabelRangeDefaultUnitScaleNotes
thresholdThreshold-80 to 0-40dBFSlinearThe gate is open while the detector level is above this.
rangeRange-80 to 0-80dBlinearAttenuation when fully closed; 0 dB leaves the audio untouched.
ratioRatio1 to 2020:1linearDownward expansion below threshold; 20 closes fully, a gate.
attackAttack0.01 to 1000.5mslogHow quickly the gate opens.
holdHold0 to 50020mslinearHow long the gate stays open after the level falls below threshold.
releaseRelease1 to 200080mslogHow quickly the gate closes after the hold.
lookaheadLookahead0 to 100mslinearDelays the audio so the gate opens before an onset; adds latency equal to its largest admitted value.
detector_hpDetector high-pass0 to 20000HzlinearHigh-pass only in the detector (on the key when it is connected); zero bypasses it.
listenListen0 to 10linearOutputs the filtered detector signal instead of the gated audio. Choices: 0 Off, 1 On.
linkChannel link0 to 11linearBlends independent detectors with the strongest detector across the bundle.

Threshold (threshold)#

The detector level, from −80 to 0 dBFS, above which the gate is open.

Range (range)#

How far the gate turns the audio down when fully closed, from 0 dB (no change) to −80 dB. A closed gate attenuates by exactly this amount.

Ratio (ratio)#

Downward expansion below the threshold, from 1:1 (none) to 20, which closes fully like a classic gate. In between, the further the level falls below the threshold, the more it is turned down, until Range stops it.

Attack (attack)#

How quickly the gate opens, from 0.01 to 100 ms. Very short attacks can click on low notes; Lookahead lets you keep them short without losing the onset.

Hold (hold)#

How long, up to 500 ms, the gate stays open after the level falls below the threshold, so it does not chatter on short dips.

Release (release)#

How quickly the gate closes after the hold, from 1 to 2000 ms.

Lookahead (lookahead)#

Delays the audio by up to 10 ms so the gate opens before each onset. It adds latency equal to its largest reachable value.

Detector high-pass (detector_hp)#

A high-pass, 0 to 2000 Hz, applied only to the detector (on the key when it is connected). Zero bypasses it. Raising it keeps bass from opening the gate.

Listen (listen)#

On replaces the output with the signal the detector measures, after its high-pass. The gate keeps working underneath.

From independent detectors per channel (0) to one detector that follows the loudest channel across the bundle (1), so every channel opens and closes together.

Tips#

  • Set Threshold just above the noise you want gone, then lower Range until the gaps are as quiet as you like.
  • Raise Hold before raising Release when a gate flutters on decaying notes.
  • Use a Ratio of 2 to 4 for a natural expander that softens noise instead of cutting it.
  • A keyed gate on a pad, driven by a kick or a hi-hat, is a quick trance gate.

See also#

Compressor, Transient shaper, Envelope, Filter.

Help patches

Each help patch is an ordinary Toy that teaches one idea. The diagram shows the Patch; the preview shows its Frame. Open it in TuneToys to play and edit it.

1. Clean up between hits

beginner Teaches: threshold, range, attack, hold, release

A gate removes the hiss between repeating plucks.

Patch: Oscillator audio output connected to Envelope audio input. Envelope audio output connected to Mixer pluck.in input. Noise audio output connected to Mixer hiss.in input. Mixer audio output connected to Gate audio input. Gate audio output connected to Patch outputs audio input.
Connections as text
  • Oscillator audio output connected to Envelope audio input
  • Envelope audio output connected to Mixer pluck.in input
  • Noise audio output connected to Mixer hiss.in input
  • Mixer audio output connected to Gate audio input
  • Gate audio output connected to Patch outputs audio input
  • Below Threshold the gate closes and turns the hiss down by Range.
  • Hold keeps it open through a short dip; Release sets how gently it closes.
Frame preview: Clean up between hitsFrame “Clean up between hits” with 6 elements: knob Attack, text heading, knob Hold, knob Range, knob Release, knob Threshold.0.5 msAttackCLEAN UP BETWEEN HITS30 msHold-60 dBRange60 msRelease-30 dBFSThreshold
Frame preview (static). Controls show their default values.

Open in TuneToys

2. Key a pad from a beat

intermediate Teaches: listen, ratio, lookahead, detector_hp, link

A kick on the gate's key input chops a sustained pad into a rhythm.

Patch: Oscillator “pad” audio output connected to Filter audio input. Filter audio output connected to Gate audio input. Oscillator “kick” audio output connected to Envelope audio input. Envelope audio output connected to Gate key input. Gate audio output connected to Mixer gate.in input. Envelope audio output connected to Mixer beat.in input. Mixer audio output connected to Patch outputs audio input.
Connections as text
  • Oscillator “pad” audio output connected to Filter audio input
  • Filter audio output connected to Gate audio input
  • Oscillator “kick” audio output connected to Envelope audio input
  • Envelope audio output connected to Gate key input
  • Gate audio output connected to Mixer gate.in input
  • Envelope audio output connected to Mixer beat.in input
  • Mixer audio output connected to Patch outputs audio input
  • The beat on the key opens the gate; the pad itself never does.
  • Below 20 the ratio expands instead of shutting, so some pad stays between hits. Lookahead opens the gate before each hit, at the cost of latency.
Frame preview: Key a pad from a beatFrame “Key a pad from a beat” with 6 elements: knob Detector high-pass, text heading, knob Channel link, segmented Listen, knob Lookahead, knob Ratio.0 HzDetector high-p…KEY A PAD FROM A BEAT1Channel linkOffOnListen0 msLookahead20 :1Ratio
Frame preview (static). Controls show their default values.

Open in TuneToys

  • Compressor Peak/RMS compression with a sidechain key input, detector filtering, hold, adaptive release and channel linking.
  • Transient shaper Boosts or softens the attack and sustain of each hit, independent of level, with a floor, mix and output trim.
  • Envelope Curved AD, AR and ADSR gain envelopes with looping and explicit retrigger behavior.
  • Filter Low-pass, high-pass, band-pass, notch, all-pass or morphing filter with resonance, 12/24 dB slopes, curve editing and output RTA.

Edit this page on GitHub

esc

↑ ↓ move↩ open⌘↩ new tabesc close