playgrid.ccRead tutorial

Tutorial 013 / Csound

Build Submerged Pulse Horn in Csound

Build Submerged Pulse Horn in Csound with pulse horn synthesis, explicit contours and the sound-shaping chain explained in the guide.

4 stepsPulse HornCsound 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

Build the low body and reedy upper edge

Set giStage init 1 in the full script. Use a 10% pulse at −8 dB and a quiet upper sine at +16 st/−14 cents, −21 dB. A mild tanh shape interprets the upper source warp. Bandpass the main pair at 400 Hz and notch near 805 Hz, while allowing the octave-down sine to bypass those filters and preserve the low anchor. That explicit sub bypass is a Csound interpretation of the source balance. Use a 24 ms opening, full sustain and 3.3 s release.

Csound control Value
Main / upper Pulse width 0.10 at −8 dB; sine +16 st/−14 cents at −21 dB
Sub Octave-down sine, 0 dB, bypasses main filters
Filters 400 Hz bandpass, bandwidth = center; 805 Hz notch, bandwidth = 15% center
Tracking Bandpass 70%; notch 100%
Amplitude 24 ms / 1.28 s / full / 3.3 s
Touch 0.2 + 0.8 × velocity

Sound after step 1 — WebM/Opus

Next: Let the bandpass rise after the attack →

Step 02 / 4

Let the bandpass rise after the attack

Set giStage init 2 in the full script. Open the bandpass by 0.4 octaves under a 510 ms / 1.81 s / zero / 1.35 s contour. The amplitude arrives much earlier than the filter peak, making the color swell over the established low body. The modulation depth and bandwidth interpret the source matrix and resonance values rather than copy its circuits.

Csound control Value
Filter contour 510 ms / 1.81 s / zero / 1.35 s
Filter motion +0.4 octaves

Sound after step 2 — WebM/Opus

Next: Round the signal with saturation →

Step 03 / 4

Round the signal with saturation

Set giStage init 3 in the full script. Use +3 dB drive with 100% shaped signal and -3 dB output trim. The smooth curve is tanh(input × 3 × ampdb(drive)) / 3; the other portion stays clean. Louder peaks enter its curved region more strongly, adding harmonics and rounding the envelope. This interprets the source saturation curve rather than implementing its proprietary transfer function.

Csound control Value
Drive / output 3 / -3 dB
Shaped mix 100%
Input DC removal Off

Sound after step 3 — WebM/Opus

Next: Widen a dark room around the horn →

Step 04 / 4

Widen a dark room around the horn

Set giStage init 4 in the full script. Feed the preceding signal through 10 ms predelay into reverbsc, with feedback 0.9252, 2500 Hz damping and 40% wet mix. Predelay leaves the initial articulation in front; feedback prolongs the tail, while damping darkens repeated circulation. The source room decay setting is 9 seconds, but Csound feedback is not a decay-time control: this is an interpretation of that space, with different diffusion and modulation. The room input is highpassed at 275 Hz and lowpassed at 4400 Hz, leaving the direct body separate. Use 1.5 dB gain after the effects. Scale the side signal by 3, preserving the center. Leave final DC removal off. The fixed output-scale control at the end of instrument 90 remains a separate Csound gain setting. Clear the shared note buses only after processing them; effect memories continue carrying their own tails.

Csound control Value
Source decay target 9 s (not a measured Csound decay)
Predelay / feedback 10 ms / 0.9252
Damping / wet 2500 Hz / 40%
Room side multiplier 1
Room input cuts 275 / 4400 Hz
Final gain 1.5 dB
Width 3 × side
Bass side cutoff Off
DC removal 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 Submerged Pulse Horn 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.3749665
giSine ftgen 0, 0, 16384, 10, 1
gaLeft init 0
gaRight init 0

instr 1
  iHz = cpsmidinn(p4)
  iVelocity = limit(p5, 0, 1)
  aPulse vco2 ampdb(-8),iHz,2,0.10
  aUpper oscili ampdb(-21),iHz*pow(2,16/12-14/1200),giSine
  aUpper = tanh(aUpper*1.6)/1.6
  aMains = aPulse+aUpper
  aSub oscili 1,iHz*0.5,giSine
  kFilter = 0
  if giStage >= 2 then
  kF linsegr 0, 0.51, 1, 1.81, 0, 1.35, 0
    kFilter = kF
  endif
  kBand = limit(400*pow(2,0.7*(p4-60)/12+0.4*kFilter),30,11000)
  kNotch = limit(805*pow(2,(p4-60)/12),30,18000)
  aMains butterbp aMains*ampdb(3),kBand,kBand
  aMains butterbr aMains,kNotch,kNotch*0.15
  aSource = aMains+aSub
  kAmp linsegr 0, 0.024, 1, 1.28, 1, 3.3, 0
  aL = aSource*kAmp*(0.2+0.8*iVelocity)
  aR = aL
  gaLeft = gaLeft+aL
  gaRight = gaRight+aR
endin
instr 90
  aL = gaLeft
  aR = gaRight
  if giStage >= 3 then
    aCleanL = aL
    aShapeL = tanh(aCleanL*3*ampdb(3))/3
    aL = (aCleanL*0+aShapeL*1)*ampdb(-3)
    aCleanR = aR
    aShapeR = tanh(aCleanR*3*ampdb(3))/3
    aR = (aCleanR*0+aShapeR*1)*ampdb(-3)
  endif
  if giStage >= 4 then
    aRoomInL = aL
    aRoomInL butterhp aRoomInL, 275
    aRoomInL butterlp aRoomInL, 4400
    aRoomPreL delay aRoomInL, 0.01
    aRoomInR = aR
    aRoomInR butterhp aRoomInR, 275
    aRoomInR butterlp aRoomInR, 4400
    aRoomPreR delay aRoomInR, 0.01
    aRoomL, aRoomR reverbsc aRoomPreL, aRoomPreR, 0.9252, 2500, sr, 0.4
    aRoomMid = (aRoomL+aRoomR)*0.5
    aRoomSide = (aRoomL-aRoomR)*0.5*1
    aL = aL*0.6+(aRoomMid+aRoomSide)*0.4
    aR = aR*0.6+(aRoomMid-aRoomSide)*0.4

    aEndMid = (aL+aR)*0.5
    aEndSide = (aL-aR)*0.5*3
    aL = (aEndMid+aEndSide)*ampdb(1.5)
    aR = (aEndMid-aEndSide)*ampdb(1.5)
  endif
  outs aL*giOutputScale, aR*giOutputScale
  clear gaLeft, gaRight
endin
</CsInstruments>
<CsScore>
; p3 held seconds, p4 MIDI pitch, p5 velocity
i 1 0 2 36 0.75
i 1 6 2 43 0.85
i 1 12 2 40 0.7
i 90 0 43.3
e
</CsScore>
</CsoundSynthesizer>