dctinv
Prev | Orchestra Opcodes and Operators | Next

## dctinv

dctinv — Inverse Discrete Cosine Transform of a sample array (type-III DCT)

## Description

Applies an Inverse Discrete Cosine Transform to an input 1-dimensional array producing an array of the same size containing the transform. Currently only power-of-two sizes are implemented. Available in i-time or perf (k-rate) versions.

## Syntax

    kout[] dctinv kin[]

    iout[] dctinv iin[]

## Initialization

iout[] -- output array containing the IDCT. It will be created if it does not exist.

iin[] -- input array containing the input

## Performance

kout[] -- output array containing the IDCT. It will be created if it does not exist.

kin[] -- input array containing the input

## Examples

Here is an example of the dctinv opcode. It uses the file dctinv.csd.

Example 189. Example of the dctinv opcode.

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

    <CsoundSynthesizer>
    <CsOptions>
    </CsOptions>
    <CsInstruments>

    instr 1

    iArr[] fillarray 1,2,3,4
    iDCT[] dct iArr
    iiDCT[] dctinv iDCT

    prints "%.1f %.1f %.1f %.1f => %.1f %.1f %.1f %.1f\n",
            iArr[0], iArr[1], iArr[2], iArr[3],
            iiDCT[0], iiDCT[1], iiDCT[2], iiDCT[3]

    endin
    </CsInstruments>
    <CsScore>
    i1 0 0
    </CsScore>
    </CsoundSynthesizer>

## See Also

Vectorial opcodes, array opcodes, dct

## Credits

Author: Victor Lazzarini
NUI Maynooth
2014

New in version 6.04

Prev | Up | Next
dct | Home | delay