freq = 1; //oscillations per second
amplitude = 80; //amplitude peak value
decay = 0; //no decay amplitude*Math.sin(freq*time*2*Math.PI)/Math.exp(decay*time);
Each layer has random offset:
freq = 1; //oscillations per second
amplitude = 20;
decay = 0; //no decay
seedRandom(index,true); // random seed based on layer index
offset = random(2*Math.PI); // offset amount for this layer
value+amplitude*Math.sin(freq*time*2*Math.PI+offset)/Math.exp(decay*time)