re-implemented RingBuffer to support templates;
added configurable damping filter function to enable smoother damping