resony
Prev | Orchestra Opcodes and Operators | Next

## resony

resony — A bank of second-order bandpass filters, connected in parallel.

## Description

A bank of second-order bandpass filters, connected in parallel.

## Syntax

    ares resony asig, kbf, kbw, inum, ksep [, isepmode] [, iscl] [, iskip]

## Initialization

inum -- number of filters

isepmode (optional, default=0) -- if isepmode = 0, the separation of center frequencies of each filter is generated logarithmically (using octave as unit of measure). If isepmode not equal to 0, the separation of center frequencies of each filter is generated linearly (using Hertz). Default value is 0.

iscl (optional, default=0) -- coded scaling factor for resonators. A value of 1 signifies a peak response factor of 1, i.e. all frequencies other than kcf are attenuated in accordance with the (normalized) response curve. A value of 2 raises the response factor so that its overall RMS value equals 1. (This intended equalization of input and output power assumes all frequencies are physically present; hence it is most applicable to white noise.) A zero value signifies no scaling of the signal, leaving that to some later adjustment (e.g. balance). The default value is 0.

iskip (optional, default=0) -- initial disposition of internal data space. Since filtering incorporates a feedback loop of previous output, the initial status of the storage space used is significant. A zero value will clear the space; a non-zero value will allow previous information to remain. The default value is 0.

## Performance

asig -- audio input signal

kbf -- base frequency, i.e. center frequency of lowest filter in Hz

kbw -- bandwidth in Hz

ksep -- separation of the center frequency of filters in octaves

resony is a bank of second-order bandpass filters, with k-rate variant frequency separation, base frequency and bandwidth, connected in parallel (i.e. the resulting signal is a mix of the output of each filter). The center frequency of each filter depends of kbf and ksep variables. The maximum number of filters is set to 100.

## Examples

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

Example 844. Example of the resony opcode.

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

    <CsoundSynthesizer>
    <CsOptions>
    ; Select audio/midi flags here according to platform
    -odac   ;;;realtime audio out
    ;-iadc    ;;;uncomment -iadc if realtime audio input is needed too
    ; For Non-realtime ouput leave only the line below:
    ; -o resonx.wav -W ;;; for file output any platform
    </CsOptions>
    <CsInstruments>

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

    instr 1	; unfiltered noise

    kenv	linseg	0, p3*.5, 1, p3*.5, 0	;envelope
    asig	rand	0.7			;white noise
    	outs	asig*kenv, asig*kenv

    endin

    instr 2	; filtered noise

    ksep	= p4				;vary seperation of center frequency of filters in octaves
    kenv	linseg	0, p3*.5, 1, p3*.5, 0	;envelope
    asig	rand	0.7
    kbf	line	300, p3, 2000		;vary base frequency
    afilt	resony	asig, kbf, 300, 4, ksep
    asig	balance afilt, asig
    	outs	asig*kenv, asig*kenv

    endin
    </CsInstruments>
    <CsScore>

    i 1 0 2
    i 2 3 2 1
    i 2 6 2 3

    e
    </CsScore>
    </CsoundSynthesizer>

## Credits

Author: Gabriel Maldonado
Italy
1999

New in Csound version 3.56

Prev | Up | Next
resonxk | Home | resonz