| 1 |
<CsoundSynthesizer> |
| 2 |
<CsOptions> |
| 3 |
-odac ; activates real time sound output |
| 4 |
</CsOptions> |
| 5 |
<CsInstruments> |
| 6 |
sr = 44100 |
| 7 |
ksmps = 32 |
| 8 |
nchnls = 2 |
| 9 |
0dbfs = 1 |
| 10 |
|
| 11 |
; initialize zak space - one a-rate and one k-rate variable. |
| 12 |
; We will only be using the a-rate variable. |
| 13 |
zakinit 1, 1 |
| 14 |
|
| 15 |
instr 1 ; sound generating instrument - sparse noise bursts |
| 16 |
kEnv loopseg 0.5,0, 0,1,0.003,1,0.0001,0,0.9969,0,0; amp. env. |
| 17 |
aSig pinkish kEnv ; pink noise pulses |
| 18 |
outs aSig, aSig ; send audio to outputs |
| 19 |
iRvbSendAmt = 0.8 ; reverb send amount (0 - 1) |
| 20 |
; write to zak audio channel 1 with mixing |
| 21 |
zawm aSig*iRvbSendAmt, 1 |
| 22 |
endin |
| 23 |
|
| 24 |
instr 5 ; reverb - always on |
| 25 |
aInSig zar 1 ; read first zak audio channel |
| 26 |
kFblvl init 0.88 ; feedback level - i.e. reverb time |
| 27 |
kFco init 8000 ; cutoff freq. of a filter within the reverb |
| 28 |
; create reverberated version of input signal (note stereo input and output) |
| 29 |
aRvbL,aRvbR reverbsc aInSig, aInSig, kFblvl, kFco |
| 30 |
outs aRvbL, aRvbR ; send audio to outputs |
| 31 |
zacl 0, 1 ; clear zak audio channels |
| 32 |
endin |
| 33 |
|
| 34 |
</CsInstruments> |
| 35 |
<CsScore> |
| 36 |
i 1 0 10 ; noise pulses (input sound) |
| 37 |
i 5 0 12 ; start reverb |
| 38 |
</CsScore> |
| 39 |
</CsoundSynthesizer> |
| 40 |
;example by Iain McCurdy |