playgrid.ccRead tutorial

Tutorial 006 / Csound

Build Detuned Room Pad in Csound

Build Detuned Room Pad in Csound with detuned saw pad synthesis, explicit contours and the sound-shaping chain explained in the guide.

4 stepsDetuned Saw PadCsound 6

Listen to the finished sound

Download WEBM ↓

Follow the synthesis steps in order. Use the audio examples and device settings alongside the instructions.

Step 01 / 4

Blend the slowly beating saws

Set giStage init 1 in the full script. Mix three saws at frequency ratios 1, 1.001 and 1.008 with gains −6, −10 and −6.7 dB. Use 885 ms attack, full sustain and 3 s release at −9 dB instrument gain. The explicit ratio offsets interpret Operator Fine values, which are not cents. Velocity does not alter this source.

Csound control Value
Ratios 1 / 1.001 / 1.008
Levels −6 / −10 / −6.7 dB
Amplitude 885 ms attack; full sustain; 3 s release
Instrument −9 dB

Sound after step 1 — WebM/Opus

Next: Open a gentle tracked filter →

Step 02 / 4

Open a gentle tracked filter

Set giStage init 2 in the full script. Use a 2800 Hz ladder lowpass with 0.01 resonance and full pitch tracking. Its contour rises in 92 ms, decays over 4.3 s to 0.72 and releases over 3 s. A chosen 0.9-octave depth interprets the source 15% amount. The filter opens before the slower amplitude peak, then settles into a softer sustained spectrum.

Csound control Value
Cutoff / resonance 2800 Hz base / 0.01
Contour 92 ms / 4.3 s / 0.72 / 3 s
Envelope / tracking 0.9 octaves / 1 octave per octave

Sound after step 2 — WebM/Opus

Next: Add moving stereo chorus →

Step 03 / 4

Add moving stereo chorus

Set giStage init 3 in the full script. Move two delay taps around 15 ms by ±9 ms at 0.6 Hz, with opposite phases and 52% wet mix. The wet inputs remain full-band. Scale side information by 1; tap feedback is 0. These explicit tap depths interpret the source Amount and ensemble movement rather than copy the internal algorithm. Sustained notes reveal slow pitch interference.

Csound control Value
Tap center / excursion 15 / ±9 ms
Rate / wet 0.6 Hz / 52%
Wet highpass Off
Width / feedback 1 / 0
Warmth shaping 0% smooth-drive interpretation

Sound after step 3 — WebM/Opus

Next: Surround the tone with a damped room →

Step 04 / 4

Surround the tone with a damped room

Set giStage init 4 in the full script. Feed the preceding signal through 8 ms predelay into reverbsc, with feedback 0.8276, 4500 Hz damping and 50% wet mix. Predelay leaves the initial articulation in front; feedback prolongs the tail, while damping darkens repeated circulation. The source room decay setting is 3.7 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 3.7 s (not a measured Csound decay)
Predelay / feedback 8 ms / 0.8276
Damping / wet 4500 Hz / 50%
Room side multiplier 1
Room input cuts Off

Sound after step 4 — WebM/Opus

Audio & settings ↓

Audio & settings

Audio recordings and settings for this tutorial.

Full Csound script

This document contains the complete Detuned Room Pad source, shared effects and example score. giStage selects the cumulative stages from 1 to 4; 4 is the finished sound.

<CsoundSynthesizer>
<CsOptions>
-odac -d
</CsOptions>
<CsInstruments>
sr = 48000
ksmps = 16
nchnls = 2
0dbfs = 1

giStage init 4
giOutputScale init 0.6247424
giSine ftgen 0, 0, 16384, 10, 1
gaLeft init 0
gaRight init 0

instr 1
  iHz = cpsmidinn(p4)
  iVelocity = limit(p5, 0, 1)
  aA vco2 ampdb(-6), iHz*1, 0, 0.5, 0
  aB vco2 ampdb(-10), iHz*1.001, 0, 0.5, 0
  aC vco2 ampdb(-6.7), iHz*1.008, 0, 0.5, 0
  aSource = aA+aB+aC
  if giStage >= 2 then
  kFilter linsegr 0, 0.092, 1, 4.3, 0.72, 3, 0
  kCut = limit(2800*pow(2,.9*kFilter+(p4-60)/12),30,18000)
  aSource moogladder aSource,kCut,0.01
  endif
  kAmp linsegr 0, 0.885, 1, 1.21, 1, 3, 0
  aL = aSource*kAmp*ampdb(-9)
  aR = aL
  gaLeft = gaLeft+aL
  gaRight = gaRight+aR
endin
instr 90
  aL = gaLeft
  aR = gaRight
  if giStage >= 3 then
    aChFbL init 0
    aChFbR init 0
    aChInL = aL
    aChInR = aR
    kCh oscili 1, 0.6, giSine
    aChTimeL interp 15+9.0*kCh
    aChTimeR interp 15-9.0*kCh
    aTapL vdelay3 aChInL+aChFbL*0, aChTimeL, 80
    aTapR vdelay3 aChInR+aChFbR*0, aChTimeR, 80
    aChFbL = aTapL
    aChFbR = aTapR
    aL = aL*0.48+aTapL*0.52
    aR = aR*0.48+aTapR*0.52
    aChMid = (aL+aR)*0.5
    aChSide = (aL-aR)*0.5*1
    aL = aChMid+aChSide
    aR = aChMid-aChSide
  endif
  if giStage >= 4 then
    aRoomInL = aL
    aRoomPreL delay aRoomInL, 0.008
    aRoomInR = aR
    aRoomPreR delay aRoomInR, 0.008
    aRoomL, aRoomR reverbsc aRoomPreL, aRoomPreR, 0.8276, 4500, sr, 0.4
    aRoomMid = (aRoomL+aRoomR)*0.5
    aRoomSide = (aRoomL-aRoomR)*0.5*1
    aL = aL*0.5+(aRoomMid+aRoomSide)*0.5
    aR = aR*0.5+(aRoomMid-aRoomSide)*0.5
  endif
  outs aL*giOutputScale, aR*giOutputScale
  clear gaLeft, gaRight
endin
</CsInstruments>
<CsScore>
; p3 held seconds, p4 MIDI pitch, p5 velocity
i 1 0 4 48 0.8
i 1 8 4 55 0.9
i 1 16 4 60 0.72
i 90 0 35
e
</CsScore>
</CsoundSynthesizer>