I made a variable that you can pass to a function, and a delay line which can be adjusted with that variable.
The freq1 -slot controls the length of the delay line. It determines the frequency by which the string oscillates.
The ad1 is the delay line itself, it advances only if you give it argument, so you can get the value with ad1() and feed it back into it.
The karplus strong algorithm is described like this with these units:
var freq = Slot(0.0);
var delay = AdjustableDelay(1.0, freq);
var lowpass = LowPass();
return function(x, frequency) {
freq(1/frequency);
x = x + delay()*gain;
delay(lowpass(x, cutoff));
return x;
}
Sounds like a spring inside wooden casing.