nnirror/facet

feature: "bouncing ball" effect

Closed this issue · 1 comments

Implement the well-known "bouncing ball" type of descending stutter/echo.
Parameters could be: total delay time, number of repeats, "gravity" (rate of descension, positive or negative), pitch.

This can be done with the iter() method. Here's an example with a noise transient that continually gets smaller each iteration by using the i variable which is accessible inside the iter() method. So in the first iteration, i starts at 0 and increases by 1 each iteration. So the stretchto() starts out being n4/2, and ends up being n4/32.

$('bounce').noise(n4).times(_.ramp(1,0,n4)).iter(31,()=>{
  this.append(_.noise(n4).times(_.ramp(1,0,n4)).stretchto(n4/(i+2)))
}).play().once();