A newer version of Max is available. Click here to access the latest version of this document.

capture~

Store a signal to view as text

Description

capture collects signal values (rather than incoming integers) and is designed for signal debugging or investigation (for recording, use record~ or sfrecord~).

Arguments

Name Type Opt Description
behavioral-flag (f) symbol opt If the first argument is the letter f, capture~ stores the first signal samples it receives, and then ignores subsequent samples once its storage buffer is full. If the letter f is not present, capture~ stores the most recent signal samples it has received, discarding earlier samples if necessary.
maximum-samples int opt Limits the number of samples (and thus the length of the excerpt) that can be held by capture~. If no number is typed in, capture~ stores 4096 samples. The maximum possible number of samples is limited only by the amount of memory available to the Max application. A second number argument may be typed in to set the precision (the number of digits to the right of the decimal point) with which samples will be shown in the editing window.
signal-vector-indices (up to 10 ints) list opt A list of up to 10 indices within a signal vector. If no indices present, capture~ records the entire vector.

Messages

(mouse) Double-clicking on capture~ opens a window for viewing and editing its contents. The numbers in the editing window can be copied and pasted into a graphic buffer~ editing window.
clear Erases the contents of capture~.
open Causes an editing and viewing window for the capture~ object to become visible. The window is also brought to the front.
signal An excerpt of the signal is stored as text for viewing, editing, or saving to a file. (The length of the excerpt can be specified as a typed-in argument to the object.)
wclose Closes the window associated with the capture~ object.
write filename [symbol]
Saves the contents of capture~ into a text file. A standard file dialog is opened for naming the file. The word write, followed by a symbol, saves the file, using the symbol as the filename, in the same folder as the patch containing the capture~. If the patch has not yet been saved, the capture~ file is saved in the same folder as the Max application.

Information for box attributes common to all objects

Output

(text): capture~ outputs nothing and has no outlet but the signal which it captures into text can be saved to a file or copied and pasted elsewhere for editing.

Examples

Capture a portion of a signal as text to view save copy and paste etc.

See Also

Name Description
scope~ Signal oscilloscope
MSP Tutorial 23: Viewing Signal Data MSP Tutorial 23: Viewing Signal Data
MSP Tutorial 25: Using the FFT MSP Tutorial 25: Using the FFT