IndexInBetween

object IndexInBetween extends ProductReader[IndexInBetween]

A UGen which determines the (lowest) index in a buffer at which the two neighboring values contain a given input signal. The output index is a decimal whose fractional part is suitable for linearly interpolating between the buffer slot values.

For example, if the Buffer contains values 3, 21, 25, 26 and the input signal has the value 22, then the output will be 1.25, because the value 22 is in-between the values stored at indices 1 and 2 and the linear location of 22 is one-quarter of the way along the interval between them: 21 * (1 - 0.25) + 25 * (1 - 0.75) = 22.

If the input value is smaller than the first sample, the output will be zero. If the input value is larger than any sample in the buffer, the output will be the buffer size minus one.

While designed for monophonic buffers, it works with multi-channel buffers by treating them as de-interleaved. For example, if the buffer has two frames and two channels, and the algorithm finds the frame 1 in channel 0, the reported index is 2 (frame * numChannels + channel).

IndexInBetween is the complement of the IndexL UGen.

See also
Companion
class
trait Product
trait Mirror
trait ProductReader[IndexInBetween]
class Object
trait Matchable
class Any

Type members

Inherited types

type MirroredElemLabels <: Tuple

The names of the product elements

The names of the product elements

Inherited from
Mirror
type MirroredLabel <: String

The name of the type

The name of the type

Inherited from
Mirror

Value members

Concrete methods

def ar(buf: GE, in: GE): IndexInBetween
Value Params
buf

The buffer to search in.

in

The input signal whose value is looked up in the buffer.

def ir(buf: GE, in: GE): IndexInBetween
Value Params
buf

The buffer to search in.

in

The input signal whose value is looked up in the buffer.

def kr(buf: GE, in: GE): IndexInBetween
Value Params
buf

The buffer to search in.

in

The input signal whose value is looked up in the buffer.

def read(in: RefMapIn, key: String, arity: Int): IndexInBetween