Debian Codegraph @

src/Examples/FLOSS Manual Examples/05 Sound Modification/05D02_delay_feedback.csd

raw
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, 600, 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 iFdback = 0.7 ; feedback ratio
20 aBufOut delayr 0.3 ; read audio from end of buffer
21 ; write audio into buffer (mix in feedback signal)
22 delayw aSig+(aBufOut*iFdback)
23
24 ; send audio to output (mix the input signal with the delayed signal)
25 aOut = aSig + (aBufOut*0.4)
26 out aOut/2, aOut/2
27 endin
28
29 </CsInstruments>
30 <CsScore>
31 i 1 0 25
32 </CsScore>
33 </CsoundSynthesizer>
34 ;example by Iain McCurdy