To automate file creation of similarly named stereo sound files (for example, soundbite1, soundbite 2, etc), this patch allows you to send the desired file name into the left inlet, then a 1 message to start recording into sfrecord~ and a 0 to stop recording. The audio you want to record is expected in the second and third inlets.
This example is essentially the same as "Basic RAM recording into buffer~", except that it's designed for recording and playing back a stereo signal instead of a single channel of audio. The buffer~ object has an additional argument to specify 2 channels of storage.
To record a sound into RAM, you must first allocate/designate a place in RAM into which to record. The buffer~ object creates a named buffer in memory large enough to store the specified duration of audio data. In this example, the buffer is named "theholdingplace" and holds up to 60,000 milliseconds (one minute) of audio. The incoming audio signal from the adc~ object goes into a record~ object that refers to that memory buffer.
This patch shows a way to capture and play back excerpts of live video. It uses jit.matrixset as a circular buffer to hold selected frames of live video from jit.grab, and it uses the decide and random objects to make arbitrary decisions regarding when to record and which excerpt to play back.