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

snapshot~

Convert signal values to numbers

Description

snapshot~ outputs a value from the most recent input signal vector when it receives a bang. This object uses the Max time format syntax; the auto-reporting time interval used in the snapshot~ object can be be set to fixed or tempo-relative output.

Arguments

Name Type Opt Description
internal-clock-interval and sample-number int opt The first argument sets the internal clock interval. If it is 0, the internal clock is not used, so snapshot~ will only output data when it receives a bang message. By default, the interval is 0. The second argument sets the sample number within a signal vector that is reported.

Messages

bang Sends out a report of a sample from the most recent signal vector. The index of the sample within the vector is specified by an offset that can be set using the offset message.
int internal-clock-enable-flag (0 or nonzero) [int]
In left inlet: Any non-zero number turns on the object's internal clock, 0 turns it off. The internal clock is on initially by default, if a positive clock interval has been provided.
In right inlet: Sets the interval in milliseconds for the internal clock that triggers the automatic output of values from the input signal. If the interval is 0, the clock stops. If it is a positive integer, the interval changes the rate of data output.
float internal-clock-enable-flag (0 or nonzero) [float]
Converted to int.
list ITM-time-list [list]
In right inlet: A list may be used to specify time in one of the Max time formats.
anything ITM-time-list [list]
Eqivalent to list.
offset sample-offset [int]
The word offset, followed by a number, sets the number of the sample within a signal vector that will be reported when snapshot~ sends its output. The number is constrained between 0 (least recent, the default) and the current signal vector size minus one (most recent).
sampleinterval internal-clock-interval (samples) [int]
In right inlet: Sets the interval in samples for the triggered automatic output of values from the input signal.
signal In left inlet: The signal whose values will be sampled and sent out the outlet.
start The word start will start the output triggered by the internal clock.
stop The word stop will stop the output triggered by the internal clock.

Attributes

Name Type g/s Description
active int Toggles the active mode for the snapshot~ object.
interval atom Sets the sampling interval for the object. The sampling interval can be specified in any of the time formats used in Max.

Information for box attributes common to all objects

Output

float: When snapshot~ receives a bang, or its internal clock is on, sample values from the input signal are sent out its outlet.

Examples

See a sample of a signal at a given moment

See Also

Name Description
capture~ Store a signal to view as text
sig~ Constant signal of a number
MSP Tutorial 23: Viewing Signal Data MSP Tutorial 23: Viewing Signal Data