record~
Audio in RAM — buffer~ and related objects
Preloading sound into random-access memory (RAM)—as opposed to reading it off of a hard disk—allows you more easily to access any point in the sound file instantaneously, read backwards as well as forwards, access different points in the sound simultaneously, etc.
Play random clips (in reverse) from a RAM buffer
This example demonstrates creating a RAM buffer to hold a 10-second stereo recording, recording live audio into it (with input volume adjustment), and then playing randomly chosen backward clips of that sound, with a trapezoidal window to taper the beginning and ending of each clip to avoid clicks.
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.