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 files moog.orc, moog.sco, mandpluk.aiff, and impuls20.aiff.

Example 230. Example of the moog opcode.

    /* moog.orc */
    ; Initialize the global variables.
    sr = 22050
    kr = 2205
    ksmps = 10
    nchnls = 1

    ; Instrument #1.
    instr 1
      kamp = 30000
      kfreq = 220
      kfiltq = 0.81
      kfiltrate = 0
      kvibf = 1.4
      kvamp = 2.22
      iafn = 1
      iwfn = 2
      ivfn = 3

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

      ; It tends to get loud, so clip moog's amplitude at 30,000.
      a1 clip am, 2, 30000
      out a1
    endin
    /* moog.orc */

    /* moog.sco */
    ; Table #1: the "mandpluk.aiff" audio file
    f 1 0 8192 1 "mandpluk.aiff" 0 0 0
    ; Table #2: the "impuls20.aiff" audio file
    f 2 0 256 1 "impuls20.aiff" 0 0 0
    ; Table #3: a sine wave
    f 3 0 256 10 1

    ; Play Instrument #1 for three seconds.
    i 1 0 3
    e
    /* moog.sco */

## Credits

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

Example written by Kevin Conder.

New in Csound version 3.47

Prev | Up | Next
MixerClear | Home | moogladder