adsr(gate, attack, decay, sustain, release)
signal → signalGated ADSR envelope. Rises while the gate is positive, releases when it returns to zero. Times are in seconds; sustain is a level in 0..=1.
The unit generators — oscillators, filters, envelopes and effects — that lower to nodes in the audio graph.
Gated ADSR envelope. Rises while the gate is positive, releases when it returns to zero. Times are in seconds; sustain is a level in 0..=1.
Asymmetric parameter follower. Smooths rising segments over attack and falling ones over release (halfway response times, in seconds).
Allpass filter. Passes all frequencies but shifts their phase around the center frequency.
First-order allpass filter with a configurable delay at DC, in samples (must be > 0).
Bandpass filter. Keeps frequencies near the center, attenuating either side.
Resonant two-pole bandpass filter.
Bell equalizer. Boosts or cuts a band around the center frequency by gain (an amplitude multiplier, not dB).
Arbitrary biquad filter with coefficients in normalized form. All five coefficients must be constants.
Brown noise: -6 dB per octave. Darker than pink.
Second-order Butterworth lowpass. Maximally flat passband, no resonance control.
Five-voice mono chorus, mixed with the dry signal. Stack two with different seeds for stereo. All parameters except the audio input are constants.
Hard-clip the signal to -1..=1.
Hard-clip the signal to minimum..=maximum. Both bounds are constants.
Remove DC offset, keeping the signal zero-centered. Cutoff is 10 Hz.
Fade the signal in over 10 ms from time zero, suppressing the click at the start of a graph.
Fixed delay of time seconds, rounded to the nearest sample. The time is a constant — use tap for a modulatable delay.
Saw-like discrete summation formula oscillator. roughness in 0..=1 sets how much successive partials are attenuated.
Square-like discrete summation formula oscillator. roughness in 0..=1 sets how much successive partials are attenuated.
Time-based ADSR for one-shot voices. Attack, decay and sustain fill duration; the release starts where that ends and rings on for its own time past it, so the note is held for duration and the voice lasts duration + release. Pass the voice-bound dur as the duration — legato shortens the held part and leaves the release alone. All arguments are constants.
Three-point symmetric FIR filter, specified by its gain (>= 0) at the Nyquist frequency. A gain below 1 gives a gentle lowpass.
Parameter follower. Smooths the signal with the given halfway response time, in seconds.
Hammond organ wavetable oscillator. Emphasizes the first three partials.
Resonant highpass filter.
First-order one-pole one-zero highpass. No resonance.
High shelf filter. Scales everything above the center frequency by gain (an amplitude multiplier).
Sample-and-hold. Samples the signal at frequency Hz; variability in 0..=1 jitters the sampling interval and is a constant.
A single one followed by silence. Useful for exciting pluck or measuring an impulse response.
Look-ahead limiter holding the signal to -1..=1. Look-ahead equals the attack time. Times are constants, in seconds.
One straight segment: start to end over duration seconds, held at end after that. Measured from the onset — the note's in a voice, the eval's in the persistent graph — so it needs no note length and works in either: sin(line(880, 220, 0.05)) is a kick's pitch drop. Unlike perc it ends at a level rather than at silence, so it holds a voice open past its note only when end is 0 and the shape really finishes. All three arguments are constants; for a sweep between signals, scale it — start + (end - start) * line(0, 1, d).
Lorenz chaotic oscillator. The frequency input has only a slight effect on the output.
Resonant lowpass filter.
First-order one-pole lowpass. No resonance.
Resonant two-pole lowpass filter.
Low shelf filter. Scales everything below the center frequency by gain (an amplitude multiplier).
Maximum length sequence noise: a repeating pseudorandom run of -1 and 1.
Maximum length sequence noise from an n-bit sequence (1..=31). More bits means a longer period before it repeats. Constant.
Moog-style resonant lowpass ladder filter.
Filter that morphs continuously between modes: morph runs -1 (lowpass) to 0 (peak) to 1 (highpass).
White noise.
Notch filter. Removes a narrow band around the center frequency.
Organ wavetable oscillator. Emphasizes octave partials.
Peaking filter.
Self-contained percussive envelope: rise, fall, silence. Needs no note length, so it works in a voice or the persistent graph — and in a voice the shape is measured from the onset and always finishes, so a drum longer than the step it sits on rings on into the next rather than being cut off. Both times are constants.
Pink noise: -3 dB per octave.
Pinking filter: -3 dB per octave. Turns white noise into pink.
Karplus-Strong plucked string. Feed it a burst — impulse() or a short noise envelope — as the excitation. Frequency, gain and damping (0..=1) are constants.
PolyBLEP pulse wave. Fast and fairly bandlimited; width in 0..=1 is the duty cycle.
PolyBLEP saw wave. Fast and fairly bandlimited.
PolyBLEP square wave. Fast and fairly bandlimited.
Bandlimited pulse wave oscillator. width in 0..=1 is the duty cycle.
Rising ramp from 0 to 1 at the given repetition frequency, starting at 0. Not bandlimited — useful as a phasor, not as audio. Its zero is the start of its own period, which is what lets it drive sample: sample(b, ramp(1 / b.secs)) reads a buffer once, end to end.
Constant-gain bandpass resonator.
Reverb (32-channel FDN). room_size is in meters (10 is an average room), time is the decay to -60 dB in seconds, damping in 0..=1 rolls off the highs. Wet only: x + reverb(x, 10, 3, 0.5) * 0.2. All parameters except the audio input are constants.
Hybrid FDN reverb — richer and more expensive than reverb. room_size is in meters and clamps to 10..=30, diffusion in 0..=1 thickens the tail, modulation around 1 adds movement (higher goes audibly Doppler), and damping_cutoff is the lowpass applied to each loop pass, in hertz. Wet only. All parameters except the audio input are constants.
Allpass-loop reverb, with no room size — just time to -60 dB, diffusion in 0..=1, and a damping_cutoff in hertz applied to each loop pass. Wet only. All parameters except the audio input are constants.
Reverb with a slow fade-in, for swells rather than rooms. room_size is in meters and is treated as at least 15; below that the delay times stop sounding like a space. Wet only. Both room_size and time are constants.
Rossler chaotic oscillator, with peaks at multiples of the frequency input.
Bandlimited saw wavetable oscillator.
Sine oscillator.
Soft saw wavetable oscillator. Contains all partials but falls off like a triangle wave.
Bandlimited square wavetable oscillator.
Tapped delay line with cubic interpolation. Unlike delay, the delay time is a signal, so it can be modulated — it must stay within the constant min_delay..=max_delay bounds, in seconds.
Single-sample delay. The building block for feedback and comb filters.
Bandlimited triangle wavetable oscillator.
64names in Signals. All categories.