gausstrig
Prev | Orchestra Opcodes and Operators | Next

## gausstrig

gausstrig — Random impulses around a certain frequency.

## Description

Generates random impulses around a certain frequency.

## Syntax

    ares gausstrig kamp, kcps, kdev [, imode]

    kres gausstrig kamp, kcps, kdev [, imode]

## Initialization

imode (optional, default=0) -- imode > 0 means better frequency modulation. If the frequency changes, the delay before the next impulse is calculed again. With the default mode we have the classic behavior of the GaussTrig ugen in SuperCollider, where the frequency modulation is bypassed during the delay time that precedes the next impulse.

## Performance

kamp -- amplitude.

kcps -- the mean frequency over which random impulses are distributed.

kdev -- random deviation from mean (0 <= dev < 1).

## Examples

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

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

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

    instr 1

    kdev line 0, p3, 0.9
    seed 20120125
    aimp gausstrig 0.5, 10, kdev
    aenv filter2 aimp, 1, 1, 0.993, 0.993
    anoi fractalnoise 0.2, 1.7
    al   = anoi*aenv
    ar   delay al, 0.02
    outs al, ar

    endin
    </CsInstruments>
    <CsScore>
    i1 0 10
    e
    </CsScore>
    </CsoundSynthesizer>

Here is an example of the gausstrig opcode with imode = 1. It uses the file gausstrig-2.csd.

Example 314. Example of the gausstrig opcode with imode = 1.

    <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 oscil.wav -W ;;; for file output any platform
    </CsOptions>
    <CsInstruments>

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

    instr 1

    kfrq0 oscil 8, 0.25, 1
    ktrig metro 1
    kfrq  samphold kfrq0+8, ktrig
    seed 20120125
    aimp gausstrig 0.5, kfrq, 0.5, 1
    aenv filter2 aimp, 1, 1, 0.993, 0.993
    anoi fractalnoise 0.2, 1.7
    al   = anoi*aenv
    ar   delay al, 0.02
    outs al, ar

    endin
    </CsInstruments>
    <CsScore>
    f1 0 8192 10 1
    i1 0 16
    e
    </CsScore>
    </CsoundSynthesizer>

## See Also

dust dust2 mpulse

## Credits

Based on Bhob Rainey's GaussTrig ugen (SuperCollider)
Author: Tito Latini
January 2012

New in Csound version 5.16

Prev | Up | Next
gaussi | Home | gbuzz