SOUND box is the main object used to manipulate both audio files and audio buffers.
The first input (
self) of the box is used to initialize the internal audio buffer of the
SOUND object. This can be either from another
SOUND object, from an
internal-sound (e.g. output from sound processing operators), or from a pathname.
When nothing is connected (and if the box is not locked) a file-chooser dialog opens when evaluating the
Once initialized, a few attributes from the sound (number of channels, number of samples, sample rate, file pathname) can be read on the box (in “text” visualization mode) or from the corresponding box outputs.
Note: These attributes can not be “set” directly. Connecting values to the corresponding inputs has no effect.
When specified as input, the
:file-pathname attribute stores or copies the incoming sound to the designated file.
:access-from-file attribute of the sound determines whether the sound data should be accessed from the disk (when available) or loaded and accessed as an internal buffer.
Sound file access from disk is slower in general, but uses less RAM from the program.
:gain attributes applies when playing the sound. It can be set through the box input, or in the sound editor.
:markers attributes is a list of markers (time in milliseconds) that can be set, displayed, and extracted from the sound.
Note: A marker can also be a list
(time "label") where “label” is a string displayed with the time marker.
→ See Markers.
Use the standard play controls to play/stop a
SOUND. (Space-bar from a patch editor).
→ See Player
Double-click on the
SOUND box to open the sound in the Sound editor.