Clear Delay Line in gen~?

allyn's icon

Hello --

Is there a way to clear the memory in a feedback path within gen~, using the basic delay line below? Similar to a "clear" message into tapin~? I couldn't seem to find anything here in the forums, nor in the reference.

Max Patch
Copy patch and select New From Clipboard in Max.

Thanks in advance!

Valery_Kondakoff's icon

I'm interested in this question too. Any ideas?

Valery_Kondakoff's icon

Thank you, Raja!

jvkr's icon

Maybe with a for loop it would be possible. But that requires codebox.
Something like:

Data del(48000);
History pointer(0);
Param size(600);
if (in2>0) {
    for(i=0;i<size;i+=1) {
        poke(del, 0, i);
    }
}
out1 = peek(del, pointer);
poke(del, in1, pointer);
pointer = wrap(pointer+1, 0, size);
enrico wiltsch's icon

Also here
https://cycling74.com/forums/how-to-reset-delay