| 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 |
instr 1 |
| 12 |
; -- create an input signal: short 'blip' sounds -- |
| 13 |
kEnv loopseg 0.5,0,0,0,0.0005,1,0.1,0,1.9,0,0; repeating envelope |
| 14 |
kCps randomh 400, 1000, 0.5 ; 'held' random values |
| 15 |
aEnv interp kEnv ; a-rate envelope |
| 16 |
aSig poscil aEnv, kCps ; generate audio |
| 17 |
|
| 18 |
; -- create a delay buffer -- |
| 19 |
aBufOut delayr 0.5 ; read audio end buffer |
| 20 |
aTap1 deltap 0.1373 ; delay tap 1 |
| 21 |
aTap2 deltap 0.2197 ; delay tap 2 |
| 22 |
aTap3 deltap 0.4139 ; delay tap 3 |
| 23 |
delayw aSig + (aTap3*0.4) ; write audio into buffer |
| 24 |
|
| 25 |
; send audio to the output (mix the input signal with the delayed signals) |
| 26 |
aOut linen aSig + ((aTap1+aTap2+aTap3)*0.4), .1, p3, 1 |
| 27 |
out aOut/2, aOut/2 |
| 28 |
endin |
| 29 |
|
| 30 |
</CsInstruments> |
| 31 |
<CsScore> |
| 32 |
i 1 0 25 |
| 33 |
</CsScore> |
| 34 |
</CsoundSynthesizer> |
| 35 |
;example by Iain McCurdy |