<CsoundSynthesizer>
<CsOptions>
-odac -m0
</CsOptions>
<CsInstruments>
sr = 44100
ksmps = 32
nchnls = 2
0dbfs = 1

instr 1
 prints "Playing %d Hertz!\n", p4
 asig poscil .2, p4
 aout linen asig, 0, p3, p3
 outs aout, aout
endin

instr 2
 prints  "Adding %d Hertz to %d Hertz!\n", p5, p4
 asig    poscil  .2, p4+p5
 aout linen asig, 0, p3, p3
 outs aout, aout
endin

instr 3
 prints  "Applying the ratio of %f (adding %d Hertz) to %d Hertz!\n",
         p5, p4*p5, p4
 asig    poscil  .2, p4*p5
 aout linen asig, 0, p3, p3
 outs aout, aout
endin

</CsInstruments>
<CsScore>
;adding a certain frequency (instr 2)
i 1 0 1 100
i 2 1 1 100 100
i 1 3 1 400
i 2 4 1 400 100
i 1 6 1 800
i 2 7 1 800 100
;applying a certain ratio (instr 3)
i 1 10 1 100
i 3 11 1 100 [3/2]
i 1 13 1 400
i 3 14 1 400 [3/2]
i 1 16 1 800
i 3 17 1 800 [3/2]
</CsScore>
</CsoundSynthesizer>
;example by joachim heintz
