Why this feedbacking Shaper produces sound?

Hello,

I am trying to understand why the following code produces sound.

The way I see it (obviously wrong) is that index starts silent waiting for a signal from LocalOut, then used inside Shaper where - since it still waits for LocalOut - does not read the buffer (so outputs nothing), and finally LocalOut sends this silent sig back to LocalIn.

Shouldn’t this code produce nothing/silence? What am I missing?

(
~wt = Signal.sineFill(8193, [1], [0]);
b = Buffer.loadCollection(s, ~wt.asWavetableNoWrap);
)

(
x = {
	var sig, index;
	index = LocalIn.ar(2);
	sig = Shaper.ar(b, index);
	LocalOut.ar(sig);
	sig * 0.1;
}.play;
)

x.release(2);

Here is the issue.

Essentially, all ugens always have a value on the server, nothing ‘waits’ or does nothing.

LocalIn has a default value, its second argument. This is the value it outputs before it gets a signal. In this case it is zero.

Shaper takes as an input values between -1 and 1, and uses them to lookup the value of from the table. Where -1 is the first value in the buffer, 1 the last, and zero the middle.

The middle value of that buffer is not zero, and it is basically impossible due to floating point round for the value to ever be exactly zero.

~wt[8193/2] 
-> 0.00038344837957993

Therefore, Shaper makes sound.

Makes sense, thanks!