areson
Prev | Orchestra Opcodes and Operators | Next

## areson

areson — A notch filter whose transfer functions are the complements of the reson opcode.

## Description

A notch filter whose transfer functions are the complements of the reson opcode.

## Syntax

    ares areson asig, kcf, kbw [, iscl] [, iskip]

    ares areson asig, acf, kbw [, iscl] [, iskip]

    ares areson asig, kcf, abw [, iscl] [, iskip]

    ares areson asig, acf, abw [, iscl] [, iskip]

## Initialization

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/acf 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 (see 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

ares -- the output signal at audio rate.

asig -- the input signal at audio rate.

kcf/acf -- the center frequency of the filter, or frequency position of the peak response.

kbw/abw -- bandwidth of the filter (the Hz difference between the upper and lower half-power points).

areson is a filter whose transfer functions is the complement of reson. Thus areson is a notch filter whose transfer functions represents the “filtered out” aspects of their complements. However, power scaling is not normalized in areson but remains the true complement of the corresponding unit. Thus an audio signal, filtered by parallel matching reson and areson units, would under addition simply reconstruct the original spectrum.

This property is particularly useful for controlled mixing of different sources (see lpreson). Complex response curves such as those with multiple peaks can be obtained by using a bank of suitable filters in series. (The resultant response is the product of the component responses.) In such cases, the combined attenuation may result in a serious loss of signal power, but this can be regained by the use of balance.

| Warning
When used with iscl this opcode is not a notch filter but similar to reson.

## Examples

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

Example 60. Example of the areson 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     ;;;RT audio out
    ;-iadc    ;;;uncomment -iadc if RT audio input is needed too
    ; For Non-realtime ouput leave only the line below:
    ; -o areson.wav -W ;;; for file output any platform
    </CsOptions>
    <CsInstruments>

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

    instr 1	; unfiltered noise

    asig rand 0.5		; white noise signal.
         outs asig, asig
    endin

    instr 2 ; filtered noise

    kcf  init 1000
    kbw  init 100
    asig rand 0.5
    afil areson asig, kcf, kbw
    afil balance afil,asig 	; afil = very loud
         outs afil, afil
    endin

    </CsInstruments>
    <CsScore>

    i 1 0 2
    i 2 2 2
    e

    </CsScore>
    </CsoundSynthesizer>

## See Also

aresonk, atone, atonek, port, portk, reson, resonk, tone, tonek

## Credits

Audio rate parameters introduced in version 6.02

October 2013.

Prev | Up | Next
arduinoStop | Home | aresonk