Adding the true fixed it. But I’m still unsure how the seedRandom(index,true); give each layer a different starting point without being in the actual formula. Normally I’ve seen where you would have a variable like “seed” then you put seedRandom(seed,true); to give that seed a random value to be inserted in into other another formula like “segStart = seed*segDur;” but your code seems to be a function not associated with the sine function.
freq = .5; //oscillations per second
amplitude = 20;
decay = 0; //no decay
seedRandom(index,true); // random seed based on layer index but how does it give each layer a different starting point?
offset = random(2*Math.PI); // offset amount for this layer
amplitude*Math.sin(freq*time*2*Math.PI+offset)/Math.exp(decay*time)