resonbnk
Prev | Orchestra Opcodes and Operators | Next

## resonbnk

resonbnk — A resonator filter bank.

## Description

This opcode takes an array of filter paramerers in frequency-bandwidth pairs and construct a bank of second-order resonators, in either parallel or serial connections.

## Syntax

    asigresonbnk ain,
        kPar[],kmin,kmax,iper[,imode,iscal,iskip]

## Initialization

iper -- filter parameter interpolation period (in samples).

imode -- filter connection mode (0 = serial, 1 = parallel, defaults to 1).

iscal -- filter scaling mode (0 = no scaling, 1 and 2 modes as in reson, defaults to 0).

iskip -- skip initialisation if non-zero (defaults to 0).

## Performance

asig -- output signal

asig -- input signal

kPar[] -- filter parameters in freq-bandwidth pairs.

kmin -- minimum filter frequency.

kmax -- maximum filter frequency.

This opcode is part of a suite of streaming linear prediction opcodes. It takes in an array of filter parameters in frequency/bandwidth pairs and creates a bank of filters. The minimum and maximum filter frequencies used in the filterbank are set by kmin and kmax, and any filters whose frequencies are outside this range are excluded from the filterbank. Filter coefficients are computed every iper samples and linearly interpolated throughout.

## Examples

Here is an example of the resonbnk opcode using an audio input signal as lpc source. It uses the file resonbnk.csd.

Example 883. Example of the resonbnk opcode.

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

    <CsoundSynthesizer>
    <CsOptions>
    -odac -d
    </CsOptions>
    <CsInstruments>

    sr = 44100
    ksmps = 64
    nchnls = 1
    0dbfs = 1

    gifw ftgen 0,0,1024,20,2,1
    instr 1
    a1 diskin "fox.wav",1,0,1
    kcfs[],krms,kerr,kcps lpcanal a1,1,512,1024,50,gifw
    a2 rand 0dbfs
    kpar[] apoleparams kcfs
    kmin expseg 8000,p3/4,200,3*p3/4,600
    a3 resonbnk a2*krms*kerr/4,kpar,kmin,16000-kmin,512,1
      out a3
    endin

    </CsInstruments>
    <CsScore>

    i1 0 32
    </CsScore>
    </CsoundSynthesizer>

## See Also

lpcanal, resonbnk

Prev | Up | Next
reson | Home | resonk