The Alternative Csound Reference Manual
Previous |  | Next

# alpass

alpass -- Reverberates an input signal with a flat frequency response.

## Description

Reverberates an input signal with a flat frequency response.

## Syntax

ar alpass asig, krvt, ilpt [, iskip] [, insmps]

## Initialization

ilpt -- loop time in seconds, which determines the "echo density" of the reverberation. This in turn characterizes the "color" of the filter whose frequency response curve will contain ilpt * sr/2 peaks spaced evenly between 0 and sr/2 (the Nyquist frequency). Loop time can be as large as available memory will permit. The space required for an n second loop is 4n*sr bytes. The delay space is allocated and returned as in delay.

iskip (optional, default=0) -- initial disposition of delay-loop data space (cf. reson). The default value is 0.

insmps (optional, default=0) -- delay amount, as a number of samples.

## Performance

krvt -- the reverberation time (defined as the time in seconds for a signal to decay to 1/1000, or 60dB down from its original amplitude).

This filter reiterates the input with an echo density determined by loop time ilpt. The attenuation rate is independent and is determined by krvt, the reverberation time (defined as the time in seconds for a signal to decay to 1/1000, or 60dB down from its original amplitude). Output will begin to appear immediately.

## Examples

Here is an example of the alpass opcode. It uses the files alpass.orc and alpass.sco.

Example 1. Example of the alpass opcode.

    /* alpass.orc */
    ; Initialize the global variables.
    sr = 44100
    kr = 4410
    ksmps = 10
    nchnls = 1

    ; Initialize the audio mixer.
    gamix init 0

    ; Instrument #1.
    instr 1
      ; Generate a source signal.
      a1 oscili 30000, cpspch(p4), 1
      ; Output the direct sound.
      out a1

      ; Add the source signal to the audio mixer.
      gamix = gamix + a1
    endin

    ; Instrument #99 (highest instr number executed last)
    instr 99
      krvt = 1.5
      ilpt = 0.1

      ; Filter the mixed signal.
      a99 alpass gamix, krvt, ilpt
      ; Output the result.
      out a99

      ; Empty the mixer for the next pass.
      gamix = 0
    endin
    /* alpass.orc */

    /* alpass.sco */
    ; Table #1, a sine wave.
    f 1 0 128 10 1

    ; p4 = frequency (in a pitch-class)
    ; Play Instrument #1 for a tenth of a second, p4=7.00
    i 1 0 0.1 7.00
    ; Play Instrument #1 for a tenth of a second, p4=7.02
    i 1 1 0.1 7.02
    ; Play Instrument #1 for a tenth of a second, p4=7.04
    i 1 2 0.1 7.04
    ; Play Instrument #1 for a tenth of a second, p4=7.06
    i 1 3 0.1 7.06

    ; Make sure the filter remains active.
    i 99 0 5
    e
    /* alpass.sco */

## See Also

comb, reverb, valpass, vcomb

## Credits

Author: William "Pete" Moss (vcomb and valpass)
University of Texas at Austin
Austin, Texas USA
January 2002

Example written by Kevin Conder.

Previous | Home | Next
alinrand | Up | ampdb