moogvcf

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

Description

A digital emulation of the Moog diode ladder filter configuration.

Syntax

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

Initialization

iscale (optional, default=1) -- internal scaling factor. Use if asig is not in the range +/-1. Input is first divided by iscale, then output is mutliplied iscale. Default value is 1. (New in Csound version 3.50)

iskip (optional, default=0) -- if non zero skip the initialisation of the filter. (New in Csound version 4.23f13 and 5.0)

Performance

asig -- input signal

xfco -- filter cut-off frequency in Hz. As of version 3.50, may i-,k-, or a-rate.

xres -- amount of resonance. Self-oscillation occurs when xres is approximately one. As of version 3.50, may a-rate, i-rate, or k-rate.

moogvcf 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.

[Warning] Warning

Before version 6.02 this filter required that the input signal be normalized to one. This can be easily achieved using 0dbfs, like this:

ares moogvcf asig, kfco, kres, 0dbfs

You can also use moogvcf2 which defaults scaling to 0dbfs.

Examples

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

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

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

instr 1
; iscale does not need to be set here because already 0dbfs = 1  
aout vco .3, 220, 1	; Use a nice sawtooth waveform.
kfco line 200, p3, 2000	; filter-cutoff frequency from .2 to 2 KHz
krez init p4
asig moogvcf aout, kfco, krez
     outs asig, asig

endin
</CsInstruments>
<CsScore>
;a sine wave
f 1 0 16384 10 1

i 1 0 3 .1
i 1 + 3 .7
i 1 + 3 .95
e
</CsScore>
</CsoundSynthesizer>


See also

Standard Filters: Resonant Low-pass filters

Credits

Author: Hans Mikelson
October 1998

New in Csound version 3.49