# Build Hollow Pulse Bass in Csound

[SuperCollider version](/tutorials/hollow-pulse-bass/supercollider/): the same sound interpreted with stock SuperCollider synthesis units.

Hollow Pulse Bass in Csound follows the sound-shaping ideas of the [Ableton Operator version](/tutorials/hollow-pulse-bass/), 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 — Establish the strong second harmonic

Set `giStage init 1` in the full script. A sine at ratio 2 carries the body, with 2 ms attack, 1 s decay to −3.5 dB and 25 ms release. Velocity contributes 35% of its level multiplier. The root will arrive later, leaving the octave deliberately strongest.

| Csound control | Value |
| --- | --- |
| A | Sine, ratio 2, 0 dB |
| Amplitude | 2 ms / 1 s / −3.5 dB / 25 ms |
| Instrument | −12 dB |

<audio controls preload="none" aria-label="Csound Hollow Pulse Bass 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 — Replace the sine with a bright saw

Set `giStage init 2` in the full script. Change A to a band-limited saw at the same ratio and level. Its upper harmonics brighten the second-harmonic body. This interprets Saw 64 without fixing the source to exactly 64 harmonics at every pitch.

| Csound control | Value |
| --- | --- |
| A waveform | Band-limited saw, ratio 2 |

<audio controls preload="none" aria-label="Csound Hollow Pulse Bass 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 the quieter root and third-harmonic layer

Set `giStage init 3` in the full script. Add ratio-3 saw at −6.5 dB and ratio-1 sine at −15 dB. Their 2 ms / 1 s / −2.5 dB / 25 ms contour keeps them close to the main body while allowing the root to remain quieter than the octave.

| Csound control | Value |
| --- | --- |
| B | Saw, ratio 3, −6.5 dB |
| C | Sine, ratio 1, −15 dB |
| B/C sustain | −2.5 dB |

<audio controls preload="none" aria-label="Csound Hollow Pulse Bass 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)

## Step 4 — Let the fourth harmonic swell and recede

Set `giStage init 4` in the full script. Add a ratio-4 sine at −10 dB with a 280 ms rise, 120 ms fall to zero and 25 ms release. Its independent envelope produces a rounded middle without a repeating LFO.

| Csound control | Value |
| --- | --- |
| D | Sine, ratio 4, −10 dB |
| D envelope | 280 ms / 120 ms / zero / 25 ms |

<audio controls preload="none" aria-label="Csound Hollow Pulse Bass after step 4"><source src="audio/steps/step-04.webm" type="audio/webm"></audio>

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

## Step 5 — Close the spectral ceiling

Set `giStage init 5` in the full script. Use a 280 Hz Butterworth lowpass with a 480 ms envelope moving it by 3.3 octaves at the beginning. This explicit sweep interprets the source 55% modulation amount; no key or velocity tracking is added.

| Csound control | Value |
| --- | --- |
| Filter | 280 Hz base; 3.3 octave opening |
| Filter decay / release | 480 / 50 ms |

<audio controls preload="none" aria-label="Csound Hollow Pulse Bass after step 5"><source src="audio/steps/step-05.webm" type="audio/webm"></audio>

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

## Step 6 — Add the small downward tuning drift

Set `giStage init 6` in the full script. Move every source from −5 to −18 cents over 500 ms and use −8 dB instrument gain. The movement is intentionally cents, not a many-semitone fall. The output remains centered and contains no external effects.

| Csound control | Value |
| --- | --- |
| Pitch | −5 → −18 cents in 500 ms |
| Instrument | −8 dB |

<audio controls preload="none" aria-label="Csound Hollow Pulse Bass after step 6"><source src="audio/steps/step-06.webm" type="audio/webm"></audio>

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

## Downloads and settings

[Finished sound — WebM/Opus](audio/Hollow-Pulse-Bass.webm) · [Complete settings](ALL_PARAMETERS.md) · [Ableton version](/tutorials/hollow-pulse-bass/)

## Full Csound script

This document contains the complete Hollow Pulse Bass source, shared effects and example score. `giStage` selects the cumulative stages from 1 to 6; 6 is the finished sound.

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

giStage init 6
giOutputScale init 0.2711521
giSine ftgen 0, 0, 16384, 10, 1
gaLeft init 0
gaRight init 0

instr 1
  iHz = cpsmidinn(p4)
  iVelocity = limit(p5, 0, 1)
  kCents = 0
  if giStage >= 6 then
    kCents linseg -5,0.5,-18,1,-18
  endif
  kHz = iHz*pow(2,kCents/1200)
  aA oscili 1,kHz*2,giSine
  if giStage >= 2 then
    aSaw vco2 1,kHz*2,0
    aA = aSaw
  endif
  kA linsegr 0, 0.002, 1, 1, 0.6683439175686147, 0.025, 0
  aSource = aA*kA*(0.65+0.35*iVelocity)
  if giStage >= 3 then
    aB vco2 ampdb(-6.5),kHz*3,0
    aC oscili ampdb(-15),kHz,giSine
  kBC linsegr 0, 0.002, 1, 1, 0.7498942093324559, 0.025, 0
    aSource = aSource+(aB+aC)*kBC*(0.65+0.35*iVelocity)
  endif
  if giStage >= 4 then
  kD linsegr 0, 0.28, 1, 0.12, 0, 0.025, 0
    aD oscili ampdb(-10),kHz*4,giSine
    aSource = aSource+aD*kD*(0.65+0.35*iVelocity)
  endif
  if giStage >= 5 then
    kFilter linsegr 1,0.480,0,0.05,0
    aSource butterlp aSource,280*pow(2,3.3*kFilter)
  endif
  kGain = ampdb(-12)
  if giStage >= 6 then
    kGain = ampdb(-8)
  endif
  aL = aSource*kGain
  aR = aL
  gaLeft = gaLeft+aL
  gaRight = gaRight+aR
endin
instr 90
  aL = gaLeft
  aR = gaRight
  outs aL*giOutputScale, aR*giOutputScale
  clear gaLeft, gaRight
endin
</CsInstruments>
<CsScore>
; p3 held seconds, p4 MIDI pitch, p5 velocity
i 1 0 0.8 36 0.9
i 1 1.5 0.8 39 0.55
i 1 3 0.8 43 0.9
i 90 0 6.85
e
</CsScore>
</CsoundSynthesizer>
```

[Read on playgrid.cc](https://playgrid.cc/tutorials/hollow-pulse-bass/csound/)
