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, and beats.wav.

Example 436. 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
    ; Audio out   Audio in    No messages
    -odac           -iadc     -d     ;;;RT audio I/O
    ; For Non-realtime ouput leave only the line below:
    ; -o resony.wav -W ;;; for file output any platform
    </CsOptions>
    <CsInstruments>

    ; Initialize the global variables.
    sr = 44100
    kr = 4410
    ksmps = 10
    nchnls = 1

    ; Instrument #1.
    instr 1
      ; Use a nice sawtooth waveform.
      asig vco 32000, 220, 1

      ; Vary the base frequency from 60 to 600 Hz.
      kbf line 60, p3, 600
      kbw = 50
      inum = 2
      ksep = 1
      isepmode = 0
      iscl = 1

      a1 resony asig, kbf, kbw, inum, ksep, isepmode, iscl

      out a1
    endin

    </CsInstruments>
    <CsScore>

    ; Table #1, a sine wave for the vco opcode.
    f 1 0 16384 10 1

    ; Play Instrument #1 for two seconds.
    i 1 0 2
    e

    </CsScore>
    </CsoundSynthesizer>

## Credits

Author: Gabriel Maldonado
Italy
1999

Example written by Kevin Conder.

New in Csound version 3.56

Prev | Up | Next
resonxk | Home | resonz