# Willow Arc — complete SuperCollider settings

## Signal flow and implementation

`~soundStage` is compiled into the SynthDefs. Re-evaluate the complete block after changing it; source and effects are then replaced together. The fixed output multiplier `~soundOutputScale` is 0.7348151 and applies after the whole chain at every stage. It is separate from any final gain step.

`EnvGen` supplies the explicit linear or exponential contours. Exponential floors stay positive. Closing the gate begins each release; a separate silent lifetime envelope frees the note after the longest source release. Shared effects continue independently.

`MoogFF` replaces the ladder filter. Its gain argument is four times the source 0–1 resonance amount, limited to 3.95; it is a different circuit. Cutoffs are limited to 20–18000 Hz.

`LeakDC` uses coefficient 0.995. It replaces the longer-window Csound DC blocker, with a different low-frequency response and latency.

`~pgTriangle` builds an odd-partial sine sum through harmonic 31. It replaces the source triangle oscillator; components at or above 22 kHz are muted.

## Synthesis and effect controls

### Stage 1 — Shape the drifting bass body

Select `~soundStage = 1` and evaluate the full script at the end of this guide. Wait for the instrument-ready message before playing. The triangle source is an explicit odd-harmonic sine sum through partial 31, with components at or above 22 kHz muted.

Set `~soundStage = 1` in the full script. Use triangle at -10 dB, with ±0.4 cents of slow note-local pitch drift. Set attack 0.00987 s, decay 0.687 s, sustain 0.85 and release 0.144 s. Keep the source centered. This replaces Drift's irregular oscillator instability with a small sine drift; glide and mono note-priority are not implemented.

| SuperCollider control | Value |
| --- | --- |
| Wave / gain | Triangle / -10 dB |
| Amplitude A/D/S/R | 0.00987 / 0.687 / 0.85 / 0.144 |
| Instrument / velocity | -8.0 dB / 45 % |
| Drift | ±0.4 cents at 0.19 Hz |

### Stage 2 — Add the sub and lowpass movement

Set `~soundStage = 2` in the full script. Add an octave-down sine at -6.0 dB. Route both sources through a 151 Hz ladder lowpass with 0.12 resonance, followed by the 24 Hz highpass. The second envelope moves cutoff by 0.36 octaves; keyboard and velocity amounts add their own opening. The filter type and modulation scaling interpret the source rather than copy its Type II circuit.

| SuperCollider control | Value |
| --- | --- |
| Sub | Octave down, -6.0 dB |
| Cutoff / resonance | 151 Hz / 0.12 |
| Filter A/D/S/R | 0.004 / 0.38 / 0.15 / 0.16 |
| Envelope / key / velocity depth | 0.36 / 0.7 / 0.16 octaves |

For `MoogFF`, multiply the stated source resonance amount by four to obtain its 0–4 gain argument (limited to 3.95). The complete script gives this gain expression beside each cutoff.

### Stage 3 — Round the signal with saturation

Set `~soundStage = 3` in the full script. Use +2.8 dB drive with 55% shaped signal and -2 dB output trim. The smooth curve is `tanh(input × 3 × drive.dbamp) / 3`; the other portion stays clean. Louder peaks enter its curved region more strongly, adding harmonics and rounding the envelope. This interprets the source saturation curve rather than implementing its proprietary transfer function.

| SuperCollider control | Value |
| --- | --- |
| Drive / output | 2.8 / -2 dB |
| Shaped mix | 55% |
| Input DC removal | LeakDC, coefficient 0.995 |

### Stage 4 — Set the final width and gain

Set `~soundStage = 4` in the full script. Use 7.43 dB gain after the effects. Average the channels for identical mono outputs. Apply `LeakDC` DC removal with coefficient 0.995. The fixed `~soundOutputScale` gain follows the complete effect chain at every stage. The effects Synth reads the stereo bus after the note group, and continues through note releases.

| SuperCollider control | Value |
| --- | --- |
| Final gain | 7.43 dB |
| Width | Mono |
| Bass side cutoff | Off |
| DC removal | LeakDC, coefficient 0.995 |

## Connected instrument

The [full SuperCollider script](/tutorials/willow-arc/supercollider/#full-supercollider-script) contains the complete voice, shared effects, bus ordering and note helper. No external sample or third-party unit is required.

[Read on playgrid.cc](https://playgrid.cc/tutorials/willow-arc/supercollider/settings/)
