bufferop~ Reference

Apply an expression to a buffer.

bufferop~

Examples

Arguments

buffername [symbol]

Sets the buffer that the object will operate on when triggered.

Inlets

trigger [bang]

Sending a bang to the inlet evaluates the expression or apply method and applies it on the buffer specified using the buffername attribute.

Fixed Attributes

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

apply [symbol]

The apply attribute provides support for Max-style buffer functions and must be declared directly in the object box. These functions operate on the existing contents of a buffer and are destructive operations, meaning they alter the internal contents of the buffer on which they operate. Apply operations are cumulative and any number of them can operate on a given buffer.

The available functions are gain, for scaling the gain of the entire buffer by a certain amount, and the windowing functions blackman , hamming , hanning , triangle , and welch . All windowing functions support the optional half argument, which must be declared as argument after the name of the function. When used, half applies the function only to the second half of the buffer.

buffername [symbol]

Sets the buffer that the object will operate on when triggered.

expr [symbol]

The expression that will be used to fill the associated buffer. Supports the full rnbo expression language and library of operators. Some extra variables are provided to allow better access to the buffer:

  1. x = 0 <= x <= 1,
  2. value = the current value at the position,
  3. index = current sample index,
  4. bufsize = buffer size. You can also access the buffer directly via buffer[i].

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].

channels [list]

If a channel or list of channels is specified, the operation will only work on the specified channels. If none are specified, the operation will affect all channels in the associated buffer.

trigger [bang]

Sending a bang to the inlet evaluates the expression or apply method and applies it on the buffer specified using the buffername attribute.

See Also

Name Description
buffer~ Store audio samples
buffer~ A data buffer for holding audio (or potentially some other) data.
multibuffer~ multibuffer~
lookup~ Index a buffer object using a signal, for waveshaping.
dim~
channels Output channel count of a buffer.