olabuffer — Sum overlapping frames of audio as k-rate arrays and read as an audio signal


Plugin opcode in framebuffer.

olabuffer This opcode takes 1 dimensional k-rate arrays that contain sequential frames of audio and sums them based on an overlap factor resulting in an audio signal output. This is useful for frame based audio processing such as spectral analysis/synthesis.


aout olabuffer kin, ioverlap


ioverlap -- The amount of overlaps per k-array input frame sample size. For example for an input window size of 1024, and a hop size of 256 the overlap factor would be 4. The overlap factor must be larger than or equal to ksmps and must also be an integer multiple of the input k-rate array sample count.


aout -- The resulting audio signal from the added input frames. kin -- A k-rate array containing sequential frames of audio.


Here is a simple example of the olabuffer opcode. It uses the file framebuffer.csd.

Example 695. Example of the olabuffer opcode.

See the sections Real-time Audio and Command Line Flags for more information on using command line flags.

nchnls = 2
0dbfs = 1
ksmps = 128
sr = 44100

instr 1
    isize init 1024
    ioverlaps init 4

    asig diskin2 "fox.wav", 1, 0, 1
    kframe[] framebuffer asig, isize
    kwindowedFrame[] window kframe, isize

    aout olabuffer kwindowedFrame, ioverlaps
    aout = aout / 2

    outs aout, aout

i 1 0 400

See Also

Array-based spectral opcodes


Author: Edward Costello;
NUIM, 2015

New in version 6.06