moog
Prev | Orchestra Opcodes and Operators | Next

## moog

moog — An emulation of a mini-Moog synthesizer.

## Description

An emulation of a mini-Moog synthesizer.

## Syntax

    ares moog kamp, kfreq, kfiltq, kfiltrate, kvibf, kvamp, iafn, iwfn, ivfn

## Initialization

iafn, iwfn, ivfn -- three table numbers containing the attack waveform (unlooped), the main looping wave form, and the vibrato waveform. The files mandpluk.aiff and impuls20.aiff are suitable for the first two, and a sine wave for the last.

| Note
The files “mandpluk.aiff” and “impuls20.aiff” are also available at ftp://ftp.cs.bath.ac.uk/pub/dream/documentation/sounds/modelling/.

## Performance

kamp -- Amplitude of note.

kfreq -- Frequency of note played.

kfiltq -- Q of the filter, in the range 0.8 to 0.9

kfiltrate -- rate control for the filter in the range 0 to 0.0002

kvibf -- frequency of vibrato in Hertz. Suggested range is 0 to 12

kvamp -- amplitude of the vibrato

## Examples

Here is an example of the moog opcode. It uses the file moog.csd, mandpluk.aiff, and impuls20.aiff.

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

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

    instr 1

    kfreq  = cpspch(p4)
    kfiltq = p5
    kfiltrate = 0.0002
    kvibf  = 5
    kvamp  = .01
    ;low volume is needed
    asig moog .15, kfreq, kfiltq, kfiltrate, kvibf, kvamp, 1, 2, 3
         outs asig, asig

    endin
    </CsInstruments>
    <CsScore>

    f 1 0 8192 1 "mandpluk.aiff" 0 0 0
    f 2 0 256 1 "impuls20.aiff" 0 0 0
    f 3 0 256 10 1	; sine

    i 1 0 3 6.00 .1
    i 1 + 3 6.05 .89
    i 1 + 3 6.09 .50
    e
    </CsScore>
    </CsoundSynthesizer>

## Credits

Author: John ffitch (after Perry Cook)
University of Bath, Codemist Ltd.
Bath, UK

New in Csound version 3.47

Prev | Up | Next
monitor | Home | moogladder