wguide1
Prev | Orchestra Opcodes and Operators | Next

## wguide1

wguide1 — A simple waveguide model consisting of one delay-line and one first-order lowpass filter.

## Description

A simple waveguide model consisting of one delay-line and one first-order lowpass filter.

## Syntax

    ares wguide1 asig, xfreq, kcutoff, kfeedback

## Performance

asig -- the input of excitation noise.

xfreq -- the frequency (i.e. the inverse of delay time) Changed to x-rate in Csound version 3.59.

kcutoff -- the filter cutoff frequency in Hz.

kfeedback -- the feedback factor.

wguide1 is the most elemental waveguide model, consisting of one delay-line and one first-order lowpass filter.

Implementing waveguide algorithms as opcodes, instead of orc instruments, allows the user to set kr different than sr, allowing better performance particulary when using real-time.

wguide1.

## Examples

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

Example 436. Example of the wguide1 opcode.

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

    ; Instrument #1 - a simple noise waveform.
    instr 1
      ; Generate some noise.
      asig noise 20000, 0.5

      out asig
    endin

    ; Instrument #2 - a waveguide example.
    instr 2
      ; Generate some noise.
      asig noise 20000, 0.5

      ; Run it through a wave-guide model.
      kfreq init 200
      kcutoff init 3000
      kfeedback init 0.8
      awg1 wguide1 asig, kfreq, kcutoff, kfeedback

      out awg1
    endin
    /* wguide1.orc */

    /* wguide1.sco */
    ; Play Instrument #1 for 2 seconds.
    i 1 0 2
    ; Play Instrument #2 for 2 seconds.
    i 2 2 2
    e
    /* wguide1.sco */

## See Also

wguide2

## Credits

Author: Gabriel Maldonado
Italy
October 1998

Example written by Kevin Conder.

New in Csound version 3.49

Prev | Up | Next
wgpluck2 | Home | wguide2