Cabbage Logo
Back to Cabbage Site

Delay

And again one very stupid question,

while looking at csounds exaples for delay i figured out that delaytime and feedback uses i-variables. As i understand, they are only initialised once, when the instrument starts. As i try to code a simple delay that can read user inputs, i was wondering how to get around this i-variable “problem” ?

Thank you so much
cheers

There are multiple opcodes for delay in the csound manual. The variable types vary there in the syntax.

@Man_in_the_gutter, there are quite a few. You might look at vdelay which gives a variable delay time, but if you plan on changing delay times in realtime you will need to make sure you smoothen the delay times are you change them to avoid clicks and pops.

Thank you very much again for your reply. Wow, you are a really nice and welcoming community. Do you have an example how one can possibly smoothen the delay ? Thank you

If you use a slider you can do something like this:

kTime chnget "delayTimeSlider"     ;// get slider value
aTime upsamp kTime                 ;// upsample to audio rate
aTime tone aTime, 10               ;// low pass filter to smoothen signal
aSig vdelay aIn, aTime, 5000.      ;// use smoothened delay time in vdelay
1 Like

Thank you so much, i hop i dont annoy you to much as i have a very essential question coming up. :wink:

Of course not, that’s what the forum is for. :slight_smile: