I have some code below to create an echo ping pong delay the effect I’ve generated creates a stereo ping pong delay but only while the midi note is on how do I change this to get the delay to gradually fade away even after the note has been released the effect seems to provide some sort of stereo widening which although I do want in the future is not the exact effect I am looking to get now I am looking to get a standard vst delay type effect that you would find on most vst subtractive synths in the effect mods am I possibly missing something in the score
instr 1
aEnv expon 1, 0.2, 0.001
aIn poscil aEnv, 440
kTime = 0.2 ; delay time
kFB = 0.8 ; feedback ratio
iMaxTime = 4
aInDel vdelay aIn, a(kTime)*1000, iMaxTime*1000
aBufL delayr iMaxTime
aTapL deltapi a(kTime) * 2 ; n.b. delay time doubled
delayw aIn + (aTapL * kFB)
aBufR delayr iMaxTime
aTapR deltapi a(kTime) * 2
delayw aInDel + (aTapR * kFB)
outs aIn + aTapL, aIn + aTapR + aInDel
endin