tonex
Prev | Orchestra Opcodes and Operators | Next

## tonex

tonex — Emulates a stack of filters using the tone opcode.

## Description

tonex is equivalent to a filter consisting of more layers of tone with the same arguments, serially connected. Using a stack of a larger number of filters allows a sharper cutoff. They are faster than using a larger number instances in a Csound orchestra of the old opcodes, because only one initialization and k- cycle are needed at time and the audio loop falls entirely inside the cache memory of processor.

## Syntax

    ares tonex  asig, khp [, inumlayer] [, iskip]

## Initialization

inumlayer (optional) -- number of elements in the filter stack. Default value is 4.

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 -- input signal

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

## Examples

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

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

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

    instr 1

    asig diskin2 "beats.wav", 1
         outs asig, asig
    endin

    instr 2

    aton line 10000, p3, 0		;all the way down to 0 Hz
    asig diskin2 "beats.wav", 1
    asig tonex asig, aton, 8	;8 filters
         outs asig, asig
    endin
    </CsInstruments>
    <CsScore>

    i 1 0 2
    i 2 3 2

    e
    </CsScore>
    </CsoundSynthesizer>

## See Also

atonex, resonx

## Credits

Author: Gabriel Maldonado (adapted by John ffitch)
Italy

New in Csound version 3.49

Prev | Up | Next
tonek | Home | trandom