playgrid.ccRead tutorial

Tutorial 002 / Csound

Build Hollow Pulse Bass in Csound

Build Hollow Pulse Bass in Csound with harmonic bass synthesis, explicit contours and the sound-shaping chain explained in the guide.

6 stepsHarmonic BassCsound 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 / 6

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

Sound after step 1 — WebM/Opus

Next: Replace the sine with a bright saw →

Step 02 / 6

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

Sound after step 2 — WebM/Opus

Next: Add the quieter root and third-harmonic layer →

Step 03 / 6

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

Sound after step 3 — WebM/Opus

Next: Let the fourth harmonic swell and recede →

Step 04 / 6

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

Sound after step 4 — WebM/Opus

Next: Close the spectral ceiling →

Step 05 / 6

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

Sound after step 5 — WebM/Opus

Next: Add the small downward tuning drift →

Step 06 / 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

Sound after step 6 — WebM/Opus

Audio & settings ↓

Audio & settings

Audio recordings and settings for this tutorial.

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.

<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>