# Cirrus Window — complete Csound settings

## Signal flow

Three detuned saw/pulse voices → serial bandpass and lowpass → three modulated delay taps → stereo reverb → bass narrowing and DC removal.

This is an interpretation of the [Ableton version](/tutorials/cirrus-window/). Csound's saw/pulse oscillators, pitch drift and filters approximate Basic Shapes, Pulse PW and Shimmer; the envelope curves and effect algorithms also differ. The modulation wheel route is not implemented. Envelope-to-filter depth is expressed in octaves rather than Ableton matrix units.

## Note and effect controls

Instrument 1 uses p3 as held duration in seconds, p4 as MIDI pitch and p5 as velocity from 0 to 1. Release adds 2.4 seconds. Instrument 90 is the shared effect path and must remain active while notes and their tails sound. Its global LFO runs continuously across notes. The global audio buses accumulate notes before the effects and clear once per control block.

| Sound control | Value | Audible role |
| --- | --- | --- |
| Saw / pulse gains | −13 / −16 dB | Saw body and hollow pulse color |
| Voice detuning | −7, 0, +7 cents | Slow beating across stereo voices |
| Pulse detuning / width | +5 cents / 0.29 ± 0.025 | Adds beating and subtle vowel movement |
| Pitch drift | ±2.2 cents, about 0.17–0.226 Hz | Loosens sustained tuning |
| Amplitude envelope | 0.85 s attack, 2.5 s decay, −2 dB sustain, 2.4 s release; power 1.6 | Soft onset and curved fade |
| Filter envelope | 1.8 s attack, 3 s decay, 0.6 sustain, 2.4 s release | Opens the bandpass by up to 0.8 octaves |
| Bandpass / lowpass | 850 Hz base, bandwidth cutoff/0.85 / 6200 Hz | Focused midrange, softened upper edge |
| Filter key tracking | 0.15 octaves per keyboard octave | Keeps higher notes slightly brighter |
| Pulse LFO | 0.09 Hz | Continuous slow timbre movement |
| Velocity | 0.55 + 0.45 × velocity | Softer notes retain body |
| Instrument gain | −8 dB × 0.65 | Sets level into ensemble and reverb |
| Ensemble | 220 Hz highpass; 20 ms ± 3.6 ms; 0.24 Hz; 22% wet | Spreads the filtered pad |
| Ensemble width | 1.05 × side signal | Slightly widens the chorus |
| Hall | 28 ms predelay; 0.84 feedback; 3300 Hz damping; 25% wet | Diffuse, dark tail |
| Output | Side highpass 180 Hz; +10.9 dB; DC removal | Centers low frequencies and restores level |

## Complete orchestra

The following orchestra contains the voice opcode, note instrument and shared effects. It uses Csound 6 syntax, a 48 kHz sample rate, 32-sample control blocks and stereo output. The initialization declarations establish the signal rates and shared buses; the synthesis controls are explained in the numbered guide.

```csound
sr = 48000
ksmps = 32
nchnls = 2
0dbfs = 1

; Cirrus Window: Csound interpretation of the documented Ableton chain.
; Basic Shapes / Pulse PW -> serial BP/LP -> Ensemble -> Reverb -> Utility.
; Wavetable morphing, Shimmer, modulation scaling and effects are approximated.
giSine ftgen 0, 0, 16384, 10, 1
gaL init 0
gaR init 0
gkPosition init 0

; One of three unison voices. At 66%, Basic Shapes is near its saw stage.
opcode CirrusVoice, a, ikii
  iHz, kPW, iCents, iPhase xin
  kShimmer oscili 2.2, 0.17 + abs(iCents)*0.008, giSine, iPhase
  kHz = iHz * pow(2, (iCents+kShimmer)/1200)
  aBasic vco2 ampdb(-13), kHz, 0, 0.5, iPhase
  aPulse vco2 ampdb(-16), kHz*pow(2,5/1200), 2, kPW, iPhase+0.13
  xout aBasic + aPulse
endop

; p3 = held seconds (release is added); p4 = MIDI pitch; p5 = velocity 0..1.
instr 1
  iHz = cpsmidinn(p4)
  iVelocity = limit(p5,0,1)
  xtratim 2.4
  ; Linear attack; gently curved decay/release, matching the slow pad contour.
  kAmp linsegr 0, 0.85, 1, 2.5, ampdb(-2), 2.4, 0
  kAmp = kAmp^1.6
  kFilterEnv linsegr 0, 1.8, 1, 3, 0.6, 2.4, 0
  ; Free-running 0.09 Hz LFO, shared between notes rather than retriggered.
  kPW = 0.29 + 0.025*gkPosition
  aLeft CirrusVoice iHz, kPW, -7, 0.08
  aCenter CirrusVoice iHz, kPW, 0, 0.41
  aRight CirrusVoice iHz, kPW, 7, 0.73
  aL = (aLeft*0.87 + aCenter*0.5 + aRight*0.13)/1.5
  aR = (aRight*0.87 + aCenter*0.5 + aLeft*0.13)/1.5

  ; 850 Hz, 12 dB/oct bandpass; Env 2 opens it slowly.
  ; Matrix amounts are translated to a modest octave sweep/key tracking.
  kCutoff = 850 * pow(2, 0.8*kFilterEnv + 0.15*(p4-60)/12)
  aBpL butterbp aL, kCutoff, kCutoff/0.85
  aBpR butterbp aR, kCutoff, kCutoff/0.85
  aLpL butterlp aBpL, 6200
  aLpR butterlp aBpR, 6200
  ; Balance the filtered oscillator output before the effects.
  kGain = kAmp * (0.55+0.45*iVelocity) * ampdb(-8) * 0.65
  gaL = gaL + aLpL*kGain
  gaR = gaR + aLpR*kGain
endin

; Always-on global LFO, ensemble, reverb and output stage.
instr 90
  gkPosition oscili 1, 0.09, giSine
  ; Ensemble: 220 Hz highpass, 20 ms center delay, slow 0.24 Hz movement.
  aHpL butterhp gaL, 220
  aHpR butterhp gaR, 220
  kMod1 oscili 3.6, 0.24, giSine, 0
  kMod2 oscili 3.6, 0.24, giSine, 0.333333
  kMod3 oscili 3.6, 0.24, giSine, 0.666667
  aTap1 vdelay3 aHpL, 20+kMod1, 40
  aTap2 vdelay3 (aHpL+aHpR)*0.5, 20+kMod2, 40
  aTap3 vdelay3 aHpR, 20+kMod3, 40
  aEnsL = gaL*0.78 + (aTap1*0.75+aTap2*0.25)*0.22
  aEnsR = gaR*0.78 + (aTap3*0.75+aTap2*0.25)*0.22
  aMid = (aEnsL+aEnsR)*0.5
  aSide = (aEnsL-aEnsR)*0.5*1.05
  aChL = aMid+aSide
  aChR = aMid-aSide

  ; Diffuse, modulated hall: 28 ms predelay, roughly 3.6 s midband tail.
  ; Csound's feedback/damping controls differ from Ableton's decay/shelf.
  aPreL delay aChL, 0.028
  aPreR delay aChR, 0.028
  aRevL, aRevR reverbsc aPreL, aPreR, 0.84, 3300
  aMixL = aChL*0.75 + aRevL*0.25
  aMixR = aChR*0.75 + aRevR*0.25

  ; Utility: bass mono below 180 Hz, DC removal and +10.9 dB gain.
  aMid = (aMixL+aMixR)*0.5
  aSide = (aMixL-aMixR)*0.5
  aSide butterhp aSide, 180
  aOutL dcblock2 (aMid+aSide)*ampdb(10.9)
  aOutR dcblock2 (aMid-aSide)*ampdb(10.9)
  outs aOutL, aOutR
  clear gaL, gaR
endin
```

## Opcode reference

[Csound vco2](https://csound.com/docs/manual/vco2.html) documents the band-limited waveforms. [Csound reverbsc](https://csound.com/docs/manual/reverbsc.html) documents feedback and damping; its feedback value is not a decay time in seconds.

[Build guide](BUILD_GUIDE.md) · [Starting settings](STARTING_STATE.md)

[Read on playgrid.cc](https://playgrid.cc/tutorials/cirrus-window/csound/settings/)
