Repository Public
1<!--2ORIX Sonata3File: Documentation/manual/reference/patch-nodes.md4Generated file — do not edit. Regenerate with Scripts/gen-reference.sh5Author: Simon-Pierre Boucher6Contact: contact@spboucher.ai7-->8# Patch nodes910The 24 node kinds available inside `graph { }` of an instrument with `model patch`. Ports are given by name; a port left out takes its default.1112## sine1314**Sine** — source, audio rate. Sine oscillator with a phase-modulation input.1516| Port | Unit | Range | Default | Constant only | Description |17|---|---|---|---|---|---|18| `freq` | Hz | 0 to 24000 | 0 | | Frequency in Hz. 0 (the default) follows the note, pitch bend included. |19| `pm` | number | -100 to 100 | 0 | | Phase modulation in radians. |20| `amp` | number | -16 to 16 | 1 | | Output amplitude. |2122## saw2324**Sawtooth** — source, audio rate. Band-limited (polyBLEP) sawtooth.2526| Port | Unit | Range | Default | Constant only | Description |27|---|---|---|---|---|---|28| `freq` | Hz | 0 to 24000 | 0 | | Frequency in Hz. 0 (the default) follows the note, pitch bend included. |29| `amp` | number | -16 to 16 | 1 | | Output amplitude. |3031## square3233**Square** — source, audio rate. Band-limited (polyBLEP) square.3435| Port | Unit | Range | Default | Constant only | Description |36|---|---|---|---|---|---|37| `freq` | Hz | 0 to 24000 | 0 | | Frequency in Hz. 0 (the default) follows the note, pitch bend included. |38| `amp` | number | -16 to 16 | 1 | | Output amplitude. |3940## pulse4142**Pulse** — source, audio rate. Band-limited pulse with variable width, DC removed.4344| Port | Unit | Range | Default | Constant only | Description |45|---|---|---|---|---|---|46| `freq` | Hz | 0 to 24000 | 0 | | Frequency in Hz. 0 (the default) follows the note, pitch bend included. |47| `width` | 0–1 or % | 0.02 to 0.98 | 0.5 | | Duty cycle. |48| `amp` | number | -16 to 16 | 1 | | Output amplitude. |4950## triangle5152**Triangle** — source, audio rate. Band-limited (polyBLAMP) triangle.5354| Port | Unit | Range | Default | Constant only | Description |55|---|---|---|---|---|---|56| `freq` | Hz | 0 to 24000 | 0 | | Frequency in Hz. 0 (the default) follows the note, pitch bend included. |57| `amp` | number | -16 to 16 | 1 | | Output amplitude. |5859## noise6061**White Noise** — source, audio rate. Uniform white noise, seeded per note.6263| Port | Unit | Range | Default | Constant only | Description |64|---|---|---|---|---|---|65| `amp` | number | -16 to 16 | 1 | | Output amplitude. |6667## pink6869**Pink Noise** — source, audio rate. Pink (-3 dB/octave) noise, seeded per note.7071| Port | Unit | Range | Default | Constant only | Description |72|---|---|---|---|---|---|73| `amp` | number | -16 to 16 | 1 | | Output amplitude. |7475## wavetable7677**Wavetable** — source, audio rate. Alias-free mip-mapped wavetable oscillator.7879| Port | Unit | Range | Default | Constant only | Description |80|---|---|---|---|---|---|81| `freq` | Hz | 0 to 24000 | 0 | | Frequency in Hz. 0 (the default) follows the note, pitch bend included. |82| `shape` | integer | 0 to 2 | 0 | yes | Table: 0 sawtooth (1/n), 1 square (odd 1/n), 2 soft (1/n^2). |83| `amp` | number | -16 to 16 | 1 | | Output amplitude. |8485## fm8687**FM Operator** — source, audio rate. Sine operator at `freq * ratio` with phase modulation and self-feedback.8889| Port | Unit | Range | Default | Constant only | Description |90|---|---|---|---|---|---|91| `freq` | Hz | 0 to 24000 | 0 | | Frequency in Hz. 0 (the default) follows the note, pitch bend included. |92| `ratio` | number | 0 to 64 | 1 | | Frequency multiplier. |93| `pm` | number | -100 to 100 | 0 | | Phase modulation in radians. |94| `feedback` | number | 0 to 6 | 0 | | Self-modulation in radians. |95| `amp` | number | -16 to 16 | 1 | | Output amplitude. |9697## adsr9899**ADSR Envelope** — envelope, control rate. Envelope from 0 to 1. Times are read at note start and every 32 samples.100101| Port | Unit | Range | Default | Constant only | Description |102|---|---|---|---|---|---|103| `gate` | number | -1 to 1 | -1 | | Opens above 0.5. A negative constant (the default) follows the note's gate. |104| `attack` | time (s, ms or a duration) | 0 to 20 | 0.01 | | Attack time. |105| `decay` | time (s, ms or a duration) | 0 to 20 | 0.1 | | Decay time (60 dB). |106| `sustain` | 0–1 or % | 0 to 1 | 0.7 | | Sustain level. |107| `release` | time (s, ms or a duration) | 0.001 to 30 | 0.2 | | Release time (60 dB). |108109## lfo110111**LFO** — modulator, control rate. Low-frequency oscillator in [-amp, amp], restarted at each note.112113| Port | Unit | Range | Default | Constant only | Description |114|---|---|---|---|---|---|115| `rate` | Hz | 0 to 200 | 5 | | Rate. |116| `shape` | integer | 0 to 4 | 0 | yes | 0 sine, 1 triangle, 2 rising saw, 3 square, 4 sample and hold. |117| `amp` | number | -100000 to 100000 | 1 | | Output amplitude. |118119## lowpass120121**Low-pass** — filter, audio rate. 12 dB/octave state-variable low-pass.122123| Port | Unit | Range | Default | Constant only | Description |124|---|---|---|---|---|---|125| `in` | number | -1000 to 1000 | 0 | | Input signal. |126| `cutoff` | Hz | 5 to 24000 | 1000 | | Cutoff frequency. |127| `q` | number | 0.3 to 40 | 0.707 | | Resonance (Q). |128129## highpass130131**High-pass** — filter, audio rate. 12 dB/octave state-variable high-pass.132133| Port | Unit | Range | Default | Constant only | Description |134|---|---|---|---|---|---|135| `in` | number | -1000 to 1000 | 0 | | Input signal. |136| `cutoff` | Hz | 5 to 24000 | 1000 | | Cutoff frequency. |137| `q` | number | 0.3 to 40 | 0.707 | | Resonance (Q). |138139## bandpass140141**Band-pass** — filter, audio rate. State-variable band-pass (peak gain Q).142143| Port | Unit | Range | Default | Constant only | Description |144|---|---|---|---|---|---|145| `in` | number | -1000 to 1000 | 0 | | Input signal. |146| `cutoff` | Hz | 5 to 24000 | 1000 | | Centre frequency. |147| `q` | number | 0.3 to 40 | 2 | | Resonance (Q). |148149## svf150151**State-Variable Filter** — filter, audio rate. State-variable filter with a selectable response.152153| Port | Unit | Range | Default | Constant only | Description |154|---|---|---|---|---|---|155| `in` | number | -1000 to 1000 | 0 | | Input signal. |156| `cutoff` | Hz | 5 to 24000 | 1000 | | Cutoff frequency. |157| `q` | number | 0.3 to 40 | 0.707 | | Resonance (Q). |158| `mode` | integer | 0 to 3 | 0 | yes | 0 low-pass, 1 band-pass, 2 high-pass, 3 notch. |159160## gain161162**Gain** — math, audio rate. Scales the input by a level in decibels.163164| Port | Unit | Range | Default | Constant only | Description |165|---|---|---|---|---|---|166| `in` | number | -1000 to 1000 | 0 | | Input signal. |167| `db` | dB | -120 to 36 | 0 | | Gain in dB. |168169## add170171**Add** — math, audio rate. a + b.172173| Port | Unit | Range | Default | Constant only | Description |174|---|---|---|---|---|---|175| `a` | number | -1000000 to 1000000 | 0 | | First operand. |176| `b` | number | -1000000 to 1000000 | 0 | | Second operand. |177178## sub179180**Subtract** — math, audio rate. a - b.181182| Port | Unit | Range | Default | Constant only | Description |183|---|---|---|---|---|---|184| `a` | number | -1000000 to 1000000 | 0 | | First operand. |185| `b` | number | -1000000 to 1000000 | 0 | | Second operand. |186187## mul188189**Multiply** — math, audio rate. a * b (amplitude modulation, envelopes, scaling).190191| Port | Unit | Range | Default | Constant only | Description |192|---|---|---|---|---|---|193| `a` | number | -1000000 to 1000000 | 0 | | First operand. |194| `b` | number | -1000000 to 1000000 | 1 | | Second operand. |195196## mix197198**Crossfade** — math, audio rate. a (1 - t) + b t.199200| Port | Unit | Range | Default | Constant only | Description |201|---|---|---|---|---|---|202| `a` | number | -1000000 to 1000000 | 0 | | Signal at t = 0. |203| `b` | number | -1000000 to 1000000 | 0 | | Signal at t = 1. |204| `t` | 0–1 or % | 0 to 1 | 0.5 | | Crossfade position. |205206## delay207208**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.209210| Port | Unit | Range | Default | Constant only | Description |211|---|---|---|---|---|---|212| `in` | number | -1000 to 1000 | 0 | | Input signal. |213| `time` | time (s, ms or a duration) | 0 to 4 | 0.01 | | Delay time; at least one sample, at most `max`. |214| `feedback` | number | -0.999 to 0.999 | 0 | | Internal feedback gain. |215| `max` | time (s, ms or a duration) | 0.001 to 4 | 1 | yes | Memory reserved per voice, in seconds. |216217## saturate218219**Saturate** — shaper, audio rate. tanh(drive * in): soft saturation, bounded to [-1, 1]. Not oversampled.220221| Port | Unit | Range | Default | Constant only | Description |222|---|---|---|---|---|---|223| `in` | number | -1000 to 1000 | 0 | | Input signal. |224| `drive` | number | 0 to 100 | 1 | | Input gain before the curve. |225226## clip227228**Clip** — shaper, audio rate. Hard limits the input to [lo, hi].229230| Port | Unit | Range | Default | Constant only | Description |231|---|---|---|---|---|---|232| `in` | number | -1000000 to 1000000 | 0 | | Input signal. |233| `lo` | number | -1000000 to 1000000 | -1 | | Lower bound. |234| `hi` | number | -1000000 to 1000000 | 1 | | Upper bound. |235236## modal237238**Modal Resonator** — resonator, audio rate. Two-pole resonator with unit peak gain: one mode of a vibrating body.239240| Port | Unit | Range | Default | Constant only | Description |241|---|---|---|---|---|---|242| `in` | number | -1000 to 1000 | 0 | | Input signal. |243| `freq` | Hz | 0 to 24000 | 0 | | Frequency in Hz. 0 (the default) follows the note, pitch bend included. |244| `decay` | time (s, ms or a duration) | 0.001 to 60 | 0.5 | | Decay time of the mode (60 dB). |245| `gain` | number | -1000 to 1000 | 1 | | Output gain. |246247