RNBO Objects & Operators sample~
Open Help

sample~

Linear interpolated multi-channel lookup of a buffer.

Description

The sample~ object is a linear interpolated multi-channel lookup object which references the audio information stored in a buffer~ object having the same name.

Arguments

buffername [symbol]

Name of the buffer to read samples from

channels [number]

Optional

Sets the number of output channels, which determines the number of outlets that the sample~ object will have. If the buffer~ object being played by sample~ has more channels than the number of outputs of sample~ , the extra channels are not played. If the buffer~ object has fewer channels, the extra sample~ signal outputs are 0.

Inlets

value [auto]

Read through the buffer used by sample~ by sending values between 0. and 1. to the input. This can be acheived by using an object like phasor~ .

offset [auto]

The buffer channel to read samples from, if a multichannel buffer is in use (starting from 0).

Outlets

out [signal]

The output signal read from the wavetable.

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: ignore)

Set the bound mode for input sample values Possible values:

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

buffername [symbol]

Name of the buffer to read samples from

channelmode [enum] (default: ignore)

Set the bound mode for input channel values Possible values:

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

channels [number] (default: 1)

Sets the number of output channels, which determines the number of outlets that the sample~ object will have. If the buffer~ object being played by sample~ has more channels than the number of outputs of sample~ , the extra channels are not played. If the buffer~ object has fewer channels, the extra sample~ signal outputs are 0.

indexmode [enum] (default: phase)

Set the lookup mode for values in the buffer Possible values:

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

interp [enum] (default: linear)

Set the type of interpolation to use when reading samples from the buffer. Possible values:

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

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]

The buffer channel to read samples from, if a multichannel buffer is in use (starting from 0).

value [auto]

Read through the buffer used by sample~ by sending values between 0. and 1. to the input. This can be acheived by using an object like phasor~ .

See Also

Name Description
buffer~ A data buffer for holding audio (or potentially some other) data.
nearest~ Non-interpolated multi-channel lookup of a buffer.
groove~ Variable-rate looping sample playback of a sized buffer
poke~ Write a sample into an audio buffer.