tonek
Prev | Orchestra Opcodes and Operators | Next

## tonek

tonek — A first-order recursive low-pass filter with variable frequency response.

## Description

A first-order recursive low-pass filter with variable frequency response.

## Syntax

    kres tonek ksig, 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

kres -- the output signal at control-rate.

ksig -- the input signal at control-rate.

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

tonek is like tone except its output is at control-rate rather than audio rate.

## Examples

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

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

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

    gisin ftgen 0, 0, 2^10, 10, 1

    instr 1

    ksig	randomh	400, 1800, 150
    aout	poscil	.2, 100+ksig, gisin
    	outs	aout, aout
    endin

    instr 2

    ksig	randomh	400, 1800, 150
    khp	line	1, p3, 100	;vary high-pass
    ksig	tonek	ksig, khp
    aout	poscil	.2, 100+ksig, gisin
    	outs	aout, aout
    endin

    </CsInstruments>
    <CsScore>

    i 1 0 5
    i 2 5.5 5
    e
    </CsScore>
    </CsoundSynthesizer>

## See Also

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

## Credits

Author: Robin Whittle
Australia
May 1997

Prev | Up | Next
tone | Home | tonex