Skip to content

Opcodes

Generated by niminal docs. Call an opcode as lpf(x, cutoff: 1khz) or as a method, x.lpf(cutoff: 1khz), where the receiver is the first argument. A ? marks an optional argument.

Waveforms: sine, saw, square, tri.

Absolute value of a signal.

abs(x: number)

A band-pass filter: lets frequencies around cutoff through. res narrows the band.

bpf(x: number, cutoff: hz, res?: number)

Cosine of a signal (radians).

cos(x: number)

A delay line. time is how long to wait, feedback feeds the output back in. A changing time needs max: to size the line (at most 30 seconds).

delay(x: number, time: time, feedback?: number, max?: time)

e raised to a signal.

exp(x: number)

Scales a signal by a gain in db or a plain factor.

gain(x: number, gain: gain)

A high-pass filter: lets frequencies above cutoff through. res adds resonance.

hpf(x: number, cutoff: hz, res?: number)

A low-pass filter: lets frequencies below cutoff through. res adds resonance.

lpf(x: number, cutoff: hz, res?: number)

A notch filter: removes frequencies around cutoff. res narrows the notch.

notch(x: number, cutoff: hz, res?: number)

An oscillator: osc(saw, 440hz). The waveform is sine, saw, square or tri; phase_mod bends the phase for FM.

osc(wave: wave, freq: hz, phase_mod?: number)

Places a signal in the master layout. azimuth is in degrees (0 is straight ahead, positive is right); spread widens it.

pan(x: number, azimuth?: angle, spread?: number)

A reverb: room sets its size and damp how quickly the highs die away.

reverb(x: number, room?: number, damp?: number)

Sine of a signal (radians).

sin(x: number)

Soft-clips a signal into -1..1; a classic saturator.

tanh(x: number)

Converts a signal to a channel layout such as stereo.

to_layout(x: number, layout: layout)