# Build Lo-Fi Bell in Csound

[SuperCollider version](/tutorials/lo-fi-bell/supercollider/): the same sound interpreted with stock SuperCollider synthesis units.

Lo-Fi Bell in Csound follows the sound-shaping ideas of the [Ableton Wavetable version](/tutorials/lo-fi-bell/), 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 — 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% |

<audio controls preload="none" aria-label="Csound Lo-Fi Bell 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 — 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 |

<audio controls preload="none" aria-label="Csound Lo-Fi Bell 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 — 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 |

<audio controls preload="none" aria-label="Csound Lo-Fi Bell 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 — 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% |

<audio controls preload="none" aria-label="Csound Lo-Fi Bell 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)

## Downloads and settings

[Finished sound — WebM/Opus](audio/Lo-Fi-Bell.webm) · [Complete settings](ALL_PARAMETERS.md) · [Ableton version](/tutorials/lo-fi-bell/)

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

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

[Read on playgrid.cc](https://playgrid.cc/tutorials/lo-fi-bell/csound/)
