freeverb
Prev | Orchestra Opcodes and Operators | Next

## freeverb

freeverb — Opcode version of Jezar's Freeverb

## Description

freeverb is a stereo reverb unit based on Jezar's public domain C++ sources, composed of eight parallel comb filters on both channels, followed by four allpass units in series. The filters on the right channel are slightly detuned compared to the left channel in order to create a stereo effect.

## Syntax

    aoutL, aoutR freeverb ainL, ainR, kRoomSize, kHFDamp[, iSRate[, iSkip]]

## Initialization

iSRate (optional, defaults to 44100): adjusts the reverb parameters for use with the specified sample rate (this will affect the length of the delay lines in samples, and, as of the latest CVS version, the high frequency attenuation). Only integer multiples of 44100 will reproduce the original character of the reverb exactly, so it may be useful to set this to 44100 or 88200 for an orchestra sample rate of 48000 or 96000 Hz, respectively. While iSRate is normally expected to be close to the orchestra sample rate, different settings may be useful for special effects.

iSkip (optional, defaults to zero): if non-zero, initialization of the opcode will be skipped, whenever possible.

## Performance

ainL, ainR -- input signals; usually both are the same, but different inputs can be used for special effect

| Note
It is recommended to process the input signal(s) with the denorm opcode in order to avoid denormalized numbers which could significantly increase CPU usage in some cases

aoutL, aoutR -- output signals for left and right channel

kRoomSize (range: 0 to 1) -- controls the length of the reverb, a higher value means longer reverb. Settings above 1 may make the opcode unstable.

kHFDamp (range: 0 to 1): high frequency attenuation; a value of zero means all frequencies decay at the same rate, while higher settings will result in a faster decay of the high frequency range.

## Examples

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

Example 327. An example of the freeverb 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 freeverb.wav -W ;;; for file output any platform
    </CsOptions>
    <CsInstruments>
    sr      =  44100
    ksmps   =  32
    nchnls  =  2
    0dbfs   =  1

            instr 1
    a1      vco2 0.75, 440, 10
    kfrq    port 100, 0.008, 20000
    a1      butterlp a1, kfrq
    a2      linseg 0, 0.003, 1, 0.01, 0.7, 0.005, 0, 1, 0
    a1      =  a1 * a2
            denorm a1
    aL, aR  freeverb a1, a1, 0.9, 0.35, sr, 0
            outs a1 + aL, a1 + aR
            endin

    </CsInstruments>
    <CsScore>
    i 1 0 5
    e

    </CsScore>
    </CsoundSynthesizer>

## Credits

Author: Istvan Varga
2005

Prev | Up | Next
framebuffer | Home | ftchnls