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

lookup~ Reference

Index a buffer object using a signal, for waveshaping.

lookup~

Examples

Arguments

buffername [symbol]

The named buffer~ to lookup sample values from.

channels [Index]

Optional

The number of channels from the buffer~ to lookup sample values from.

Inlets

value [auto]

In the left inlet, a signal value between -1.0 and 1.0 sets the position value to lookup the sample value. The range of -1.0 to 1.0 is scaled and bound to the sample length of the buffer~ .

offset [auto]

In the right inlet, setting an integer value will increment or decrement the output of the channels read from the buffer~ . For example, an integer value of 2 to the right inlet of lookup~ will read channel 1 from a buffer~ , and output the signal out the third outlet of channel 3.

A negative value will decrement the offset value.

Outlets

out [signal]

The signal value at the lookup position.

outindex [signal]

Index (in samples).

Fixed Attributes

These attributes must be set in the object box and determine the behavior of the object at runtime.

boundmode [enum] (default: clamp)

Set the bound mode for input values that are outside the range of the index.(default = "clamp")

Possible values:

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

buffername [symbol]

The named buffer~ to lookup sample values from.

channelmode [enum] (default: clamp)

Setting channel mode determines how channels will offset outside the number of channels. (default = "clamp"). The mode will implement when the channel offset value is greater than or less than the number of channels set by the channels attribute.

Possible values:

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

channels [Index] (default: 1)

The number of channels from the buffer~ to lookup sample values from.

indexmode [enum] (default: lookup)

Sets how lookup~ scales and indexes sample position values of a named buffer~ . (default : "lookup")

Possible values:

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

interp [enum] (default: linear)

Set an interpolation function values for input sample values. (default = "linear")

Possible values:

0 = 'linear'
1 = 'cubic'
2 = 'spline'
3 = 'cosine'
4 = 'step'
5 = 'none'

Dynamic Attributes

These attributes can be modified in the code during execution using the set object

buffer [number] (default: 0)

If multiple buffer names are declared to be used, this sets the currently active buffer using an index [0 based].

offset [auto]

In the right inlet, setting an integer value will increment or decrement the output of the channels read from the buffer~ . For example, an integer value of 2 to the right inlet of lookup~ will read channel 1 from a buffer~ , and output the signal out the third outlet of channel 3.

A negative value will decrement the offset value.

value [auto]

In the left inlet, a signal value between -1.0 and 1.0 sets the position value to lookup the sample value. The range of -1.0 to 1.0 is scaled and bound to the sample length of the buffer~ .

See Also

Name Description
buffer~ A data buffer for holding audio (or potentially some other) data.
sample~ Linear interpolated multi-channel lookup of a buffer.
dim Output dimensions of a buffer.
channels Output channel count of a buffer.