atone
Prev | Orchestra Opcodes and Operators | Next

## atone

atone — A hi-pass filter whose transfer functions are the complements of the tone opcode.

## Description

A hi-pass filter whose transfer functions are the complements of the tone opcode.

## Syntax

    ares atone asig, khp [, iskip]

## Initialization

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.

khp -- the response curve's half-power point, in Hertz. Half power is defined as peak power / root 2.

atone is a filter whose transfer functions is the complement of tone. atone is thus a form of high-pass filter whose transfer functions represent the “filtered out” aspects of their complements. However, power scaling is not normalized in atone but remains the true complement of the corresponding unit. Thus an audio signal, filtered by parallel matching tone and atone 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.

## Examples

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

Example 59. Example of the atone 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 atone.wav -W ;;; for file output any platform
    </CsOptions>
    <CsInstruments>

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

    instr 1 ;white noise

    asig	rand 1
    	outs asig, asig

    endin

    instr 2 ;filtered noise

    asig	rand 1
    khp	init 4000
    asig	atone asig, khp
    	outs asig, asig

    endin

    </CsInstruments>
    <CsScore>

    i 1 0 2
    i 2 2 2
    e

    </CsScore>
    </CsoundSynthesizer>

## See Also

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

Prev | Up | Next
aresonk | Home | atonek