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

peek Reference

Read values from a data/buffer object

peek

Examples

Constructors

  • { arguments={name, channels}, inlets={index, channel_offset} }
  • { arguments={name}, inlets={index, channel_offset} }
  • { arguments={name, channels}, inlets={phase, channel_offset} }
  • { arguments={name}, inlets={phase, channel_offset} }
  • { arguments={name, channels}, inlets={signal, channel_offset} }
  • { arguments={name}, inlets={signal, channel_offset} }
  • { arguments={name, channels}, inlets={wave_phase, wave_start, wave_end, channel_offset} }
  • { arguments={name}, inlets={wave_phase, wave_start, wave_end, channel_offset} }

Inlets

wave_phase

Typefloat

phase to read (between start and end indices)

wave_start

Typefloat

wave start index (samples)

wave_end

Typefloat

wave end index (samples)

channel_offset

Typeint

channel_offset (zero-based)

index

Typefloat

sample index to read

phase

Typefloat

phase to read (between 0 and 1)

signal

Typefloat

value to lookup (between -1 and 1)

Attributes

boundmode [enum] (default: ignore)

g/s(set)

Handle out-of-range indices: "ignore" returns zero, "wrap" wraps the indices back into the range of the buffer, "fold" and "mirror" wrap the indices back into range by alternating direction, "clip" and "clamp" constrain the indices to the buffer limits.

Possible values:

0 = 'clamp'
1 = 'ignore'
2 = 'wrap'
3 = 'clip'
4 = 'fold'
5 = 'mirror'

channelmode [enum] (default: ignore)

g/s(set)

Handle invalid channel indices: "ignore" returns zero, "wrap" wraps the indices back into channels of the buffer, "fold" and "mirror" wrap the indices back into range by alternating direction, "clip" and "clamp" constrain the indices to the channels available.

Possible values:

0 = 'clamp'
1 = 'ignore'
2 = 'wrap'
3 = 'clip'
4 = 'fold'
5 = 'mirror'

channels [int] (default: 1)

g/s(set)

Specify the number of channels to read

index [enum] (default: samples)

g/s(set)

Specify how to index the buffer: "samples" indexes by sample offset into the buffer, "phase" converts a signal in the range of 0..1 to span the whole buffer, "lookup" or "signal" converts a signal in the range -1..1 to span the whole buffer, "wave" uses two additional inlets to specify start and end indices of a section of the buffer (in samples), and converts a signal in the range of 0..1 to span this section.

Possible values:

0 = 'phase'
1 = 'wave'
2 = 'samples'
3 = 'lookup'
4 = 'signal'

interp [enum] (default: none)

g/s(set)

Specify the interpolation mode: "none" and "step" perform no interpolation, "linear" performs two-point linear interpolation, "cosine" performs two-point cosine interpolation, "cubic" performs four-point cubic interpolation, "spline" performs four-point Catmull-Rom spline interpolation, and "spline6" performs six-point (5th order) B-spline interpolation.

Possible values:

0 = 'none'
1 = 'spline6'
2 = 'step'
3 = 'cosine'
4 = 'cubic'
5 = 'fastcubic'
6 = 'linear'
7 = 'spline'

Common Box Attributes

See Also

Name Description
buffer
channels
cycle
data
dim
lookup
nearest
peek
poke
sample
splat
wave