Try this one test.csd (1.2 KB)
<Cabbage>
form caption("Untitled") size(400, 300), colour(58, 110, 182), pluginid("def1")
keyboard bounds(0, 8, 400, 100)
rslider bounds(24, 132, 60, 60) range(0, 1, 0, 1, 0.001), channel("revFdbk") text("Rev Fdbk")
</Cabbage>
<CsoundSynthesizer>
<CsOptions>
-n -d -+rtmidi=NULL -M0 -m0d --midi-key-cps=4 --midi-velocity-amp=5
</CsOptions>
<CsInstruments>
; Initialize the global variables.
ksmps = 32
nchnls = 2
0dbfs = 1
;instrument will be triggered by keyboard widget
instr 1
aEnv madsr .1, .5, .5, 1
aOsc oscili aEnv*p5, p4
; use chnmix because you may have several
; instances of this instrument playing at any one time
chnmix aOsc, "output"
endin
;always on reverb instrument
instr REVERB
;get audio from channel
aIn chnget "output"
aL, aR reverbsc aIn, aIn, chnget:k("revFdbk"), 10000
; perform crude mixing of wet/dry signal
aMix ntrpol aIn, aL+aR, chnget:k("revFdbk")
out aMix, aMix
; clear signal so it's doesn't
; accumulate over time and produce
; unwanted audio
chnclear "output"
endin
</CsInstruments>
<CsScore>
;causes Csound to run for about 7000 years...
i1 0 z
i"REVERB" 0 z
</CsScore>
</CsoundSynthesizer>