gendyx
Prev | Orchestra Opcodes and Operators | Next

## gendyx

gendyx — Variation of the dynamic stochastic approach to waveform synthesis conceived by Iannis Xenakis.

## Description

gendyx (gendy eXtended) is an implementation of the Génération Dynamique Stochastique (GENDYN), a dynamic stochastic approach to waveform synthesis conceived by Iannis Xenakis, using curves instead of segments.

## Syntax

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

    kres gendyx kamp, kampdist, kdurdist, kadpar, kddpar, kminfreq, kmaxfreq, \
                kampscl, kdurscl, kcurveup, kcurvedown [, 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.

kcurveup -- controls the curve for the increasing amplitudes between two points; it has to be non negative.

- 0: step function (like a sample & hold)

- <1: concave

- 1: linear (like gendy)

- >1: convex

kcurvedown -- controls the curve for the decreasing amplitudes between two points; it has to be non negative.

- 0: step function

- <1: convex

- 1: linear

- >1: concave

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

The waveform is generated by knum - 1 curves 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.

Extract of a waveform generated with gendyx.

## Examples

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

Example 319. Example of the gendyx 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 gendyx 0.7, 1, 1, 1, 1, 20, 1000, 0.5, 0.5, 4, 0.13
    outs aout, aout

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

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

Example 320. Example of the gendyx 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.001, p3*0.05, 0.5, p3*0.9, 0.5, p3*0.05, 0.001
    kc1  linseg 1, p3/2, 12, p3/2, 3
    kc2  random 0, 4
    seed 20120124
    asig gendyx kenv, 1, 3, 0.7, 0.8, 120, 4300, 0.2, 0.7, kc1, kc2, 12, kc1
    aout dcblock asig
    outs aout, aout

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

## References

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

## See Also

gendy gendyc

## Credits

Variation of the Nick Collins's Gendy1 ugen (SuperCollider)
Author: Tito Latini
January 2012

New in Csound version 5.16

Prev | Up | Next
gendyc | Home | getcfg