playgrid.ccRead tutorial

Tutorial 007 / Csound

Build Lo-Fi Bell in Csound

Build Lo-Fi Bell in Csound with triangle bell synthesis, explicit contours and the sound-shaping chain explained in the guide.

4 stepsTriangle BellCsound 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

Tune the three bell components

Set giStage init 1 in the full script. Use triangles at +28 st/+30 cents and +30 st/−15 cents, at −21 and −24 dB. Add a sine one octave below the played pitch at −6 dB. Those unequal high intervals against the low foundation establish the bell character. The sine sub omits the source 12% tone coloration. Use 1 ms attack, 4.3 s decay to −38 dB and 350 ms release.

Csound control Value
High tones +28 st +30 cents / +30 st −15 cents
Levels −21 / −24 / sub −6 dB
Sub Sine, octave down
Amplitude 1 ms / 4.3 s / −38 dB / 350 ms
Instrument / touch −7 dB / 50%

Sound after step 1 — WebM/Opus

Next: Round the high tones with a fixed filter →

Step 02 / 4

Round the high tones with a fixed filter

Set giStage init 2 in the full script. Use a 1650 Hz ladder lowpass at 0.34 resonance, with no note tracking or envelope movement. Higher bell components become softer as they rise beyond the fixed cutoff. This replaces PRD with a different resonant response.

Csound control Value
Lowpass 1650 Hz, resonance 0.34
Tracking / modulation Off

Sound after step 2 — WebM/Opus

Next: Surround the tone with a damped room →

Step 03 / 4

Surround the tone with a damped room

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

Sound after step 3 — WebM/Opus

Next: Add panning and digital grain →

Step 04 / 4

Add panning and digital grain

Set giStage init 4 in the full script. Move the left and right gains oppositely at 1 Hz by ±22%. This moves the bell and preceding room together. The simple complementary gain model interprets Auto Pan without its additional shape controls. Hold incoming samples at 16000 Hz and round their amplitudes to 12 signed bits, then blend 40% of that branch with the direct tone. The held samples add staircase texture and the rounding roughens quieter portions. This simple clocked quantizer interprets Redux without its proprietary jitter or shaping behavior. No pre- or post-filter is added.

Csound control Value
Panning 1 Hz sine; ±22% opposite channel gain
Hold rate 16000 Hz
Signed bits / wet 12 / 40%

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 Lo-Fi Bell 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 1.752863
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(-21), iHz*pow(2,28/12+30/1200), 12, 0.5, 0
  aB vco2 ampdb(-24), iHz*pow(2,30/12-15/1200), 12, 0.5, 0
  aSub oscili ampdb(-6), iHz*0.5, giSine, 0
  aSource = aA+aB+aSub
  if giStage >= 2 then
  aSource moogladder aSource,1650,0.34
  endif
  kAmp linsegr 0, 0.001, 1, 4.3, 0.012589254117941675, 0.35, 0
  aL = aSource*kAmp*ampdb(-7)*(0.5+0.5*iVelocity)
  aR = aL
  gaLeft = gaLeft+aL
  gaRight = gaRight+aR
endin
instr 90
  aL = gaLeft
  aR = gaRight
  if giStage >= 3 then
    aRoomInL = aL
    aRoomPreL delay aRoomInL, 0.008
    aRoomInR = aR
    aRoomPreR delay aRoomInR, 0.008
    aRoomL, aRoomR reverbsc aRoomPreL, aRoomPreR, 0.6271, 4500, sr, 0.4
    aRoomMid = (aRoomL+aRoomR)*0.5
    aRoomSide = (aRoomL-aRoomR)*0.5*1
    aL = aL*0.56+(aRoomMid+aRoomSide)*0.44
    aR = aR*0.56+(aRoomMid-aRoomSide)*0.44
  endif
  if giStage >= 4 then
    kPan oscili 0.22,1,giSine
    aL = aL*(1+kPan)
    aR = aR*(1-kPan)
    aDigitalClock mpulse 1, 6.25e-05
    aHeldL samphold aL, aDigitalClock
    aQuantL = round(aHeldL*2048)/2048
    aL = aL*0.6+aQuantL*0.4
    aHeldR samphold aR, aDigitalClock
    aQuantR = round(aHeldR*2048)/2048
    aR = aR*0.6+aQuantR*0.4
  endif
  outs aL*giOutputScale, aR*giOutputScale
  clear gaLeft, gaRight
endin
</CsInstruments>
<CsScore>
; p3 held seconds, p4 MIDI pitch, p5 velocity
i 1 0 1.8 48 0.8
i 1 4 1.8 55 0.9
i 1 8 1.8 60 0.7
i 90 0 19.15
e
</CsScore>
</CsoundSynthesizer>