Patch nodes
The 24 node kinds available inside graph { } of an instrument with model patch. Ports are given by name; a port left out takes its default.
sine
Sine — source, audio rate. Sine oscillator with a phase-modulation input.
| Port | Unit | Range | Default | Constant only | Description |
|---|---|---|---|---|---|
freq |
Hz | 0 to 24000 | 0 | Frequency in Hz. 0 (the default) follows the note, pitch bend included. | |
pm |
number | -100 to 100 | 0 | Phase modulation in radians. | |
amp |
number | -16 to 16 | 1 | Output amplitude. |
saw
Sawtooth — source, audio rate. Band-limited (polyBLEP) sawtooth.
| Port | Unit | Range | Default | Constant only | Description |
|---|---|---|---|---|---|
freq |
Hz | 0 to 24000 | 0 | Frequency in Hz. 0 (the default) follows the note, pitch bend included. | |
amp |
number | -16 to 16 | 1 | Output amplitude. |
square
Square — source, audio rate. Band-limited (polyBLEP) square.
| Port | Unit | Range | Default | Constant only | Description |
|---|---|---|---|---|---|
freq |
Hz | 0 to 24000 | 0 | Frequency in Hz. 0 (the default) follows the note, pitch bend included. | |
amp |
number | -16 to 16 | 1 | Output amplitude. |
pulse
Pulse — source, audio rate. Band-limited pulse with variable width, DC removed.
| Port | Unit | Range | Default | Constant only | Description |
|---|---|---|---|---|---|
freq |
Hz | 0 to 24000 | 0 | Frequency in Hz. 0 (the default) follows the note, pitch bend included. | |
width |
0–1 or % | 0.02 to 0.98 | 0.5 | Duty cycle. | |
amp |
number | -16 to 16 | 1 | Output amplitude. |
triangle
Triangle — source, audio rate. Band-limited (polyBLAMP) triangle.
| Port | Unit | Range | Default | Constant only | Description |
|---|---|---|---|---|---|
freq |
Hz | 0 to 24000 | 0 | Frequency in Hz. 0 (the default) follows the note, pitch bend included. | |
amp |
number | -16 to 16 | 1 | Output amplitude. |
noise
White Noise — source, audio rate. Uniform white noise, seeded per note.
| Port | Unit | Range | Default | Constant only | Description |
|---|---|---|---|---|---|
amp |
number | -16 to 16 | 1 | Output amplitude. |
pink
Pink Noise — source, audio rate. Pink (-3 dB/octave) noise, seeded per note.
| Port | Unit | Range | Default | Constant only | Description |
|---|---|---|---|---|---|
amp |
number | -16 to 16 | 1 | Output amplitude. |
wavetable
Wavetable — source, audio rate. Alias-free mip-mapped wavetable oscillator.
| Port | Unit | Range | Default | Constant only | Description |
|---|---|---|---|---|---|
freq |
Hz | 0 to 24000 | 0 | Frequency in Hz. 0 (the default) follows the note, pitch bend included. | |
shape |
integer | 0 to 2 | 0 | yes | Table: 0 sawtooth (1/n), 1 square (odd 1/n), 2 soft (1/n^2). |
amp |
number | -16 to 16 | 1 | Output amplitude. |
fm
FM Operator — source, audio rate. Sine operator at freq * ratio with phase modulation and self-feedback.
| Port | Unit | Range | Default | Constant only | Description |
|---|---|---|---|---|---|
freq |
Hz | 0 to 24000 | 0 | Frequency in Hz. 0 (the default) follows the note, pitch bend included. | |
ratio |
number | 0 to 64 | 1 | Frequency multiplier. | |
pm |
number | -100 to 100 | 0 | Phase modulation in radians. | |
feedback |
number | 0 to 6 | 0 | Self-modulation in radians. | |
amp |
number | -16 to 16 | 1 | Output amplitude. |
adsr
ADSR Envelope — envelope, control rate. Envelope from 0 to 1. Times are read at note start and every 32 samples.
| Port | Unit | Range | Default | Constant only | Description |
|---|---|---|---|---|---|
gate |
number | -1 to 1 | -1 | Opens above 0.5. A negative constant (the default) follows the note's gate. | |
attack |
time (s, ms or a duration) | 0 to 20 | 0.01 | Attack time. | |
decay |
time (s, ms or a duration) | 0 to 20 | 0.1 | Decay time (60 dB). | |
sustain |
0–1 or % | 0 to 1 | 0.7 | Sustain level. | |
release |
time (s, ms or a duration) | 0.001 to 30 | 0.2 | Release time (60 dB). |
lfo
LFO — modulator, control rate. Low-frequency oscillator in [-amp, amp], restarted at each note.
| Port | Unit | Range | Default | Constant only | Description |
|---|---|---|---|---|---|
rate |
Hz | 0 to 200 | 5 | Rate. | |
shape |
integer | 0 to 4 | 0 | yes | 0 sine, 1 triangle, 2 rising saw, 3 square, 4 sample and hold. |
amp |
number | -100000 to 100000 | 1 | Output amplitude. |
lowpass
Low-pass — filter, audio rate. 12 dB/octave state-variable low-pass.
| Port | Unit | Range | Default | Constant only | Description |
|---|---|---|---|---|---|
in |
number | -1000 to 1000 | 0 | Input signal. | |
cutoff |
Hz | 5 to 24000 | 1000 | Cutoff frequency. | |
q |
number | 0.3 to 40 | 0.707 | Resonance (Q). |
highpass
High-pass — filter, audio rate. 12 dB/octave state-variable high-pass.
| Port | Unit | Range | Default | Constant only | Description |
|---|---|---|---|---|---|
in |
number | -1000 to 1000 | 0 | Input signal. | |
cutoff |
Hz | 5 to 24000 | 1000 | Cutoff frequency. | |
q |
number | 0.3 to 40 | 0.707 | Resonance (Q). |
bandpass
Band-pass — filter, audio rate. State-variable band-pass (peak gain Q).
| Port | Unit | Range | Default | Constant only | Description |
|---|---|---|---|---|---|
in |
number | -1000 to 1000 | 0 | Input signal. | |
cutoff |
Hz | 5 to 24000 | 1000 | Centre frequency. | |
q |
number | 0.3 to 40 | 2 | Resonance (Q). |
svf
State-Variable Filter — filter, audio rate. State-variable filter with a selectable response.
| Port | Unit | Range | Default | Constant only | Description |
|---|---|---|---|---|---|
in |
number | -1000 to 1000 | 0 | Input signal. | |
cutoff |
Hz | 5 to 24000 | 1000 | Cutoff frequency. | |
q |
number | 0.3 to 40 | 0.707 | Resonance (Q). | |
mode |
integer | 0 to 3 | 0 | yes | 0 low-pass, 1 band-pass, 2 high-pass, 3 notch. |
gain
Gain — math, audio rate. Scales the input by a level in decibels.
| Port | Unit | Range | Default | Constant only | Description |
|---|---|---|---|---|---|
in |
number | -1000 to 1000 | 0 | Input signal. | |
db |
dB | -120 to 36 | 0 | Gain in dB. |
add
Add — math, audio rate. a + b.
| Port | Unit | Range | Default | Constant only | Description |
|---|---|---|---|---|---|
a |
number | -1000000 to 1000000 | 0 | First operand. | |
b |
number | -1000000 to 1000000 | 0 | Second operand. |
sub
Subtract — math, audio rate. a - b.
| Port | Unit | Range | Default | Constant only | Description |
|---|---|---|---|---|---|
a |
number | -1000000 to 1000000 | 0 | First operand. | |
b |
number | -1000000 to 1000000 | 0 | Second operand. |
mul
Multiply — math, audio rate. a * b (amplitude modulation, envelopes, scaling).
| Port | Unit | Range | Default | Constant only | Description |
|---|---|---|---|---|---|
a |
number | -1000000 to 1000000 | 0 | First operand. | |
b |
number | -1000000 to 1000000 | 1 | Second operand. |
mix
Crossfade — math, audio rate. a (1 - t) + b t.
| Port | Unit | Range | Default | Constant only | Description |
|---|---|---|---|---|---|
a |
number | -1000000 to 1000000 | 0 | Signal at t = 0. | |
b |
number | -1000000 to 1000000 | 0 | Signal at t = 1. | |
t |
0–1 or % | 0 to 1 | 0.5 | Crossfade position. |
delay
Delay — delay, audio rate. Interpolated delay line with internal feedback. The only node whose in may read a later node: a feedback loop must pass through it.
| Port | Unit | Range | Default | Constant only | Description |
|---|---|---|---|---|---|
in |
number | -1000 to 1000 | 0 | Input signal. | |
time |
time (s, ms or a duration) | 0 to 4 | 0.01 | Delay time; at least one sample, at most max. |
|
feedback |
number | -0.999 to 0.999 | 0 | Internal feedback gain. | |
max |
time (s, ms or a duration) | 0.001 to 4 | 1 | yes | Memory reserved per voice, in seconds. |
saturate
Saturate — shaper, audio rate. tanh(drive * in): soft saturation, bounded to [-1, 1]. Not oversampled.
| Port | Unit | Range | Default | Constant only | Description |
|---|---|---|---|---|---|
in |
number | -1000 to 1000 | 0 | Input signal. | |
drive |
number | 0 to 100 | 1 | Input gain before the curve. |
clip
Clip — shaper, audio rate. Hard limits the input to [lo, hi].
| Port | Unit | Range | Default | Constant only | Description |
|---|---|---|---|---|---|
in |
number | -1000000 to 1000000 | 0 | Input signal. | |
lo |
number | -1000000 to 1000000 | -1 | Lower bound. | |
hi |
number | -1000000 to 1000000 | 1 | Upper bound. |
modal
Modal Resonator — resonator, audio rate. Two-pole resonator with unit peak gain: one mode of a vibrating body.
| Port | Unit | Range | Default | Constant only | Description |
|---|---|---|---|---|---|
in |
number | -1000 to 1000 | 0 | Input signal. | |
freq |
Hz | 0 to 24000 | 0 | Frequency in Hz. 0 (the default) follows the note, pitch bend included. | |
decay |
time (s, ms or a duration) | 0.001 to 60 | 0.5 | Decay time of the mode (60 dB). | |
gain |
number | -1000 to 1000 | 1 | Output gain. |