timer

Live capture in buffer~

This shows how to record into a RAM (random-access memory) buffer, and how to play back the contents of the buffer at any rate (even backward by using a negative rate) starting at any point in the buffer. A timer is used to keep track of the duration of the recording. The example also demonstrates how one might use a quick fade-in and fade-out to avoid clicks when doing realtime capture during a performance.

Notify when a certain time has elapsed

When we want to measure how much time something took, we use a stopwatch. We click once at the beginning of the time we want to measure, click once at the end, and get a reading of the elapsed time. When we want a notification that a particular amount of time has elapsed we use a timer. We set the amount of time in the future that we want to be notified, start the timer, and the timer notifies us when that amount of time has passed.