A UGen which reads a single sample value from a buffer at a given index.
It uses the in
argument as index into the buffer, truncating that argument to
an integer. Out-of-range index values are "folded" inside the valid range.
Folding means reflecting the excess at the valid range's boundaries.
For example, if the buffer has four samples, index 4 is wrapped to index 2 (the excess beyond the maximum index of 3 is 4 - 3 = 1, and the excess is folded so that and 3 - 1 = 2), index 5 is folded to index 1, index -1 is folded to index 1, index -2 is folded to index 2, etc.
While designed for monophonic buffers, it works with multi-channel buffers by
treating them as de-interleaved. See the Index
UGen for details.
- Value Params
- buf
The buffer to read from.
- in
The sample index into the buffer. This is truncated to an integer automatically.
- See also
- Companion
- object