moogvcf2
Prev | Orchestra Opcodes and Operators | Next

## moogvcf2

moogvcf2 — A digital emulation of the Moog diode ladder filter configuration.

## Description

A digital emulation of the Moog diode ladder filter configuration.

## Syntax

    ares moogvcf2 asig, xfco, xres [,iscale, iskip]

## Initialization

iscale (optional, default=0dBfs) -- internal scaling factor, as the operation of the code requires the signal to be in the range +/-1. Input is first divided by iscale, then output is mutliplied by iscale.

iskip (optional, default=0) -- if non zero skip the initialisation of the filter.

## Performance

asig -- input signal

xfco -- filter cut-off frequency in Hz. which may be i-,k-, or a-rate.

xres -- amount of resonance. Self-oscillation occurs when xres is approximately one. May be a-rate, i-rate, or k-rate.

moogvcf2 is a digital emulation of the Moog diode ladder filter configuration. This emulation is based loosely on the paper “Analyzing the Moog VCF with Considerations for Digital Implementation” by Stilson and Smith (CCRMA). This version was originally coded in Csound by Josep Comajuncosas. Some modifications and conversion to C were done by Hans Mikelson and then adjusted.

moogvcf2 is identical to moogvcf, except that the iscale parameter defaults to 0dbfs instead of 0, guaranteeing that amplitude will usually be OK.

## Examples

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

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

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

    instr 1

    aout diskin2 "beats.wav", 1, 0, 1
    kfco line 100, p3, 10000		;filter-cutoff
    krez init p4
    asig moogvcf2 aout, kfco, krez
         outs asig, asig

    endin
    </CsInstruments>
    <CsScore>

    i 1 0 4 .1
    i 1 + 4 .6
    i 1 + 4 .9
    e
    </CsScore>
    </CsoundSynthesizer>

## See Also

moogvcf, biquad, rezzy

## Credits

Author: Hans Mikelson and John ffitch
October 1998/ July 2006

New in Csound version 5.03

Prev | Up | Next
moogvcf | Home | moscil