# Random Filter Keys — complete Csound settings

## Note and effect connections

Instrument 1 uses p3 for held seconds, p4 for MIDI pitch and p5 for velocity from 0 to 1. Its left and right outputs accumulate on shared buses. Instrument 90 processes the buses once per control block, clears the inputs and keeps effect memories active through the tails. Envelopes with release segments extend the note automatically. The score is an audible pitch-and-touch example; the synthesis controls are independent of its particular notes.

## Csound interpretation

These are explicit Csound models, not identical implementations of the Ableton devices. Wavetable positions, proprietary oscillator engines, physical-model macros, filter circuits, envelope slopes and effect algorithms can differ. Modulation depths are specified in octaves, cents or milliseconds rather than treated as universally interchangeable matrix values. Controller inputs such as pitch bend, modulation wheel, pressure and per-note expression are not mapped. Independent score notes do not implement Live's monophonic note-priority or legato system. Any pitch memory or drift included in this instrument is described in its steps.



## Signal path and controls

### Stage 1 — Build the two-octave resonant body

Blend two saws at −6 dB each: one at the note plus two cents, the other an octave down. Add an octave-down sine at −15 dB. A 300 Hz tracked ladder lowpass uses resonance 0.67 and +3 dB smooth drive. The amplitude has 57 ms attack, decay and release with −2.3 dB sustain; instrument gain is −19 dB with 50% touch response.

| Csound control | Value |
| --- | --- |
| Saw / sub | −6/−6 dB saws; octave-down sine −15 dB |
| Filter | 300 Hz, full tracking, 0.67 resonance, +3 dB drive |
| Amplitude | 57 ms / 57 ms / −2.3 dB / 57 ms |
| Instrument | −19 dB |

### Stage 2 — Jump between random filter states

A sample-and-hold random value changes at 2.67 Hz. Use it for ±1 octave of cutoff and ±3 dB of input drive. Positive values brighten and push the resonant filter, while negative values darken it. Each note has its own random generator; the exact source noise waveform and modulation scale differ.

| Csound control | Value |
| --- | --- |
| Random rate | 2.67 Hz |
| Cutoff / drive movement | ±1 octave / ±3 dB |

### Stage 3 — Add filtered stereo echoes

Use 750 ms left and 775 ms right, 25% feedback and 30% wet. Feed each channel back into itself, keeping the unequal timing paths independent. Filter each echo around 900 Hz, with a 7-octave interval between highpass and lowpass cutoffs. Feedback values are updated once per 16-sample block, adding that small delay to the recirculating path. Held notes leave older colors behind the current tone.

| Csound control | Value |
| --- | --- |
| Times | 750 / 775 ms |
| Feedback / wet | 25% / 30% |
| Routing | Independent channels |
| Filter center / width | 900 Hz / 7 octaves |
| Time LFO | 0 Hz, ±0% |

### Stage 4 — Surround the tone with a damped room

Feed the preceding signal through 5 ms predelay into `reverbsc`, with feedback 0.9512, 1800 Hz damping and 15% wet mix. Predelay leaves the initial articulation in front; feedback prolongs the tail, while damping darkens repeated circulation. The source room decay setting is 14 seconds, but Csound feedback is not a decay-time control: this is an interpretation of that space, with different diffusion and modulation. 

| Csound control | Value |
| --- | --- |
| Source decay target | 14 s (not a measured Csound decay) |
| Predelay / feedback | 5 ms / 0.9512 |
| Damping / wet | 1800 Hz / 15% |
| Room side multiplier | 1 |
| Room input cuts | Off |

## Output and signal rates

The script uses 48000 Hz, 16-sample control blocks and stereo output. The fixed output-scale control is `4.070113` and follows the whole chain at every stage, separate from any final gain step. DC-removal blocks, where enabled, use order 2048 to limit low-note attenuation; they add processing delay.

[Build guide and full script](BUILD_GUIDE.md#full-csound-script) · [Starting settings](STARTING_STATE.md)

[Read on playgrid.cc](https://playgrid.cc/tutorials/random-filter-keys/csound/settings/)
