olabuffer

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

Description

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.

Syntax

aout olabuffer kin, ioverlap

Initialization

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.

Performance

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

Examples

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

Example 558. Example of the olabuffer opcode.

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

<CsoundSynthesizer>
<CsOptions>
-odac
</CsOptions>
<CsInstruments>
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
endin

</CsInstruments>
<CsScore>
i 1 0 400
</CsScore>
</CsoundSynthesizer>


See Also

olabuffer shiftin shiftout

Credits

Author: Edward Costello;
NUIM, 2015

New in version 6.06