gendy
Prev | Orchestra Opcodes and Operators | Next

## gendy

gendy — Dynamic stochastic approach to waveform synthesis conceived by Iannis Xenakis.

## Description

Implementation of the Génération Dynamique Stochastique (GENDYN), a dynamic stochastic approach to waveform synthesis conceived by Iannis Xenakis.

## Syntax

    ares gendy kamp, kampdist, kdurdist, kadpar, kddpar, kminfreq, kmaxfreq, \
               kampscl, kdurscl [, initcps] [, knum]

    kres gendy kamp, kampdist, kdurdist, kadpar, kddpar, kminfreq, kmaxfreq, \
               kampscl, kdurscl [, initcps] [, knum]

## Initialization

initcps (optional, default=12) -- max number of control points.

## Performance

kamp -- amplitude.

kampdist -- choice of probability distribution for the next perturbation of the amplitude of a control point. The valid distributions are:

- 0 - LINEAR

- 1 - CAUCHY

- 2 - LOGIST

- 3 - HYPERBCOS

- 4 - ARCSINE

- 5 - EXPON

- 6 - SINUS (external k-rate signal)

If kampdist=6, the user can use an external k-rate signal through kadpar.

kdurdist -- choice of distribution for the perturbation of the current inter control point duration. See kampdist for the valid distributions. If kdurdist=6, the user can use an external k-rate signal through kddpar.

kadpar -- parameter for the kampdist distribution. Should be in the range of 0.0001 to 1.

kddpar -- parameter for the kdurdist distribution. Should be in the range of 0.0001 to 1.

kminfreq -- minimum allowed frequency of oscillation.

kmaxfreq -- maximum allowed frequency of oscillation.

kampscl -- multiplier for the distribution's delta value for amplitude (1.0 is full range).

kdurscl -- multiplier for the distribution's delta value for duration.

knum (optional, default=initcps) -- current number of utilized control points.

The waveform is generated by knum - 1 segments and is repeated in the time. The vertexes (control points) are moved according to a stochastic action and they are limited within the boundaries of a mirror formed by an amplitude barrier and a time barrier.

A repetition of the generated waveform with knum=12.

## Examples

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

Example 316. Example of the gendy 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

    aout gendy 0.7, 1, 1, 1, 1, 20, 1000, 0.5, 0.5
    outs aout, aout

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

Here is an example of the gendy opcode with some modulations. It uses the file gendy-2.csd.

Example 317. Example of the gendy opcode with some modulations.

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

    kenv expseg 0.01, p3*0.1, 1, p3*0.8, 1, p3*0.1, 0.001
    kosc oscil 0.1, 3/p3, 1
    seed 20120123
    kdis bexprnd kosc
    knum linseg 3, p3*0.75, 10, p3*0.20, 12, p3*0.05, 5
    asig gendy 0.2, kosc*60, 6, 0.7, kdis, 500*kenv, 4800, 0.23, 0.3, 12, knum
    aflt resonz asig, 1400, 400
    aout comb kenv*aflt*0.1, 0.9, 0.1
    outs aout, aout

    endin
    </CsInstruments>
    <CsScore>
    f1 0 8192 10 1 0 .8 0 0 .3 0 0 0 .1

    i1 0 20
    e
    </CsScore>
    </CsoundSynthesizer>

## References

1. Formalized Music (1992, Stuyvesant, NY: Pendragon Press), pp. 246 - 254, 289 - 322.

## See Also

gendyc gendyx

## Credits

Based on Nick Collins's Gendy1 ugen (SuperCollider)
Author: Tito Latini
January 2012

New in Csound version 5.16

Prev | Up | Next
gbuzz | Home | gendyc