//PENDELUM SWING: veloc = 10; //how fast it swings amplitude = 50; //how high decay = .999; amplitude*Math.sin(veloc*time)/Math.exp(decay*time);
———————————————————————————— //PENDULUM SWING ON MARKER EVENT(put in rotation): n = 0; if (marker.numKeys > 0){ n = marker.nearestKey(time).index; if (marker.key(n).time > time){ n--; } } if (n == 0){ value; } else { veloc = 10; //how fast it swings amplitude = 100; //how high decay = 4; t = time - marker.key(n).time; s= amplitude*Math.sin(veloc*t)/Math.exp(decay*t); value + s; }