# Build Slow Harmonic Pad in Csound

[SuperCollider version](/tutorials/slow-harmonic-pad/supercollider/): the same sound interpreted with stock SuperCollider synthesis units.

Slow Harmonic Pad in Csound follows the sound-shaping ideas of the [Ableton Operator version](/tutorials/slow-harmonic-pad/), using the explicit oscillators, contours and effects below.

[Starting settings](STARTING_STATE.md) · [Complete settings](ALL_PARAMETERS.md). The complete script follows the final step and related sounds.

## Step 1 — Draw the high ringing center

Set `giStage init 1` in the full script. Use the three-partial A table at ratio 9 and global transposition −14 semitones. Its partials have levels 0, −2.3 and −10.5 dB. A opens over 2.057 seconds and releases over 4.3 seconds. The high ratio supplies the ringing center; table amplitudes remain unnormalized.

| Csound control | Value |
| --- | --- |
| A partials | 1: 0 dB; 2: −2.3 dB; 3: −10.5 dB |
| A ratio / transpose | 9 / −14 st |
| A envelope | 2.057 s attack; full sustain; 4.3 s release |
| Instrument | −33 dB |

<audio controls preload="none" aria-label="Csound Slow Harmonic Pad after step 1"><source src="audio/steps/step-01.webm" type="audio/webm"></audio>

[Sound after step 1 — WebM/Opus](audio/steps/step-01.webm)

## Step 2 — Fill in the lower harmonic spectra

Set `giStage init 2` in the full script. Add the documented B and C spectra through partial 38, with different attacks and a B frequency ratio of 1.003. Add D with its quiet low odd harmonics. The exact partial coefficients are written in the full script. Their different onset and release times make the texture change as it grows and fades; B fine tuning is an explicit ratio interpretation.

| Csound control | Value |
| --- | --- |
| B | −1.9 dB; 2.294 s attack; 3.7 s release; ratio 1.003 |
| C | −9.1 dB; 2.8 s attack; 4.1 s release; ratio 1 |
| D | −6 dB; 2.38 s attack; 4 s release; ratio 1 |
| Tables | Unnormalized GEN10; unlisted partials zero |

<audio controls preload="none" aria-label="Csound Slow Harmonic Pad after step 2"><source src="audio/steps/step-02.webm" type="audio/webm"></audio>

[Sound after step 2 — WebM/Opus](audio/steps/step-02.webm)

## Step 3 — Add moving stereo chorus

Set `giStage init 3` in the full script. Also apply source amplitude movement `0.82 + 0.18 × sine(0.35 Hz)`. The explicit 0.35 Hz rate interprets the source displayed LFO rate 35. Move two delay taps around 7 ms by ±3.4 ms at 0.9 Hz, with opposite phases and 100% wet mix. The wet inputs remain full-band. Scale side information by 1.3; tap feedback is -0.02. 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 | 7 / ±3.4 ms |
| Rate / wet | 0.9 Hz / 100% |
| Wet highpass | Off |
| Width / feedback | 1.3 / -0.02 |
| Warmth shaping | 0% smooth-drive interpretation |
| Source amplitude LFO | 0.35 Hz; multiplier 0.82 + 0.18 × sine |

<audio controls preload="none" aria-label="Csound Slow Harmonic Pad after step 3"><source src="audio/steps/step-03.webm" type="audio/webm"></audio>

[Sound after step 3 — WebM/Opus](audio/steps/step-03.webm)

## Downloads and settings

[Finished sound — WebM/Opus](audio/Slow-Harmonic-Pad.webm) · [Complete settings](ALL_PARAMETERS.md) · [Ableton version](/tutorials/slow-harmonic-pad/)

## Full Csound script

This document contains the complete Slow Harmonic Pad source, shared effects and example score. `giStage` selects the cumulative stages from 1 to 3; 3 is the finished sound.

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

giStage init 3
giOutputScale init 1.128653
giSine ftgen 0, 0, 16384, 10, 1
gaLeft init 0
gaRight init 0
giPartA ftgen 0,0,16384,-10,1,0.767361489,0.298538262,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
giPartB ftgen 0,0,16384,-10,0,0.0462381021,0,0.0518800039,0,0.0446683592,0,0.0298538262,0,0.0812830516,0.199526231,0.167880402,0.221309471,0.201836636,0.136458314,0.103514217,0.0776247117,0,0.192752491,0.266072506,0.221309471,0.216271852,0.171790839,0.0699841996,0.0575439937,0.0891250938,0,0.147910839,0.28840315,0.0812830516,0.221309471,0.0323593657,0.0758577575,0.034673685,0.181970086,0.0416869383,0.167880402,0.0653130553
giPartC ftgen 0,0,16384,-10,0,0.0462381021,0,0.0518800039,0,0.0446683592,0,0.0298538262,0,0.0812830516,0.199526231,0.167880402,0.221309471,0.201836636,0.136458314,0.103514217,0.0776247117,0,0.192752491,0.266072506,0.221309471,0.216271852,0.171790839,0.0699841996,0.0575439937,0.0891250938,0,0.147910839,0.28840315,0.0812830516,0.221309471,0.0323593657,0.0758577575,0.034673685,0.181970086,0.0416869383,0.167880402,0.0653130553
giPartD ftgen 0,0,16384,-10,0.120226443,0,0.24266101,0,0.254097271,0,0.144543977,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
instr 1
  iHz = cpsmidinn(p4)
  iVelocity = limit(p5, 0, 1)
  kHz = iHz*pow(2,-14/12)
  kA linsegr 0, 2.057, 1, 0.5, 1, 4.3, 0
  aA oscili kA,kHz*9,giPartA
  aSource = aA*(0.6+0.4*iVelocity)
  if giStage >= 2 then
  kB linsegr 0, 2.294, 1, 0.5, 1, 3.7, 0
  aB oscili kB*ampdb(-1.9),kHz*1.003,giPartB
  aSource = aSource+aB*(1+0*iVelocity)
  kC linsegr 0, 2.8, 1, 0.5, 1, 4.1, 0
  aC oscili kC*ampdb(-9.1),kHz*1,giPartC
  aSource = aSource+aC*(1+0*iVelocity)
  kD linsegr 0, 2.38, 1, 0.5, 1, 4, 0
  aD oscili kD*ampdb(-6),kHz*1,giPartD
  aSource = aSource+aD*(0.65+0.35*iVelocity)
  endif
  if giStage >= 3 then
  kTrem oscili 1,0.35,giSine
  aSource = aSource*(0.82+0.18*kTrem)
  endif
  aL = aSource*ampdb(-33)
  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.9, giSine
    aChTimeL interp 7+3.4000000000000004*kCh
    aChTimeR interp 7-3.4000000000000004*kCh
    aTapL vdelay3 aChInL+aChFbL*-0.02, aChTimeL, 80
    aTapR vdelay3 aChInR+aChFbR*-0.02, aChTimeR, 80
    aChFbL = aTapL
    aChFbR = aTapR
    aL = aL*0+aTapL*1
    aR = aR*0+aTapR*1
    aChMid = (aL+aR)*0.5
    aChSide = (aL-aR)*0.5*1.3
    aL = aChMid+aChSide
    aR = aChMid-aChSide
  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 9.3 4 55 0.9
i 1 18.6 4 60 0.72
i 90 0 32.9
e
</CsScore>
</CsoundSynthesizer>
```

[Read on playgrid.cc](https://playgrid.cc/tutorials/slow-harmonic-pad/csound/)
