See Gendy1 help file for background. This variant of GENDYN normalises the durations in each period to force oscillation at the desired pitch. The breakpoints still get perturbed as in Gendy1 .

There is some glitching in the oscillator caused by the stochastic effects - control points as they vary cause big local jumps of amplitude. Put `ampscale`

and `durscale`

low to minimise the rate of this.

SuperCollider implementation by Nick Collins

### Gendy3.ar(ampdist: 1, durdist: 1, adparam: 1.0, ddparam: 1.0, freq: 440, ampscale: 0.5, durscale: 0.5, initCPs: 12, knum, mul: 1.0, add: 0.0)

### Gendy3.kr(ampdist: 1, durdist: 1, adparam: 1.0, ddparam: 1.0, freq: 440, ampscale: 0.5, durscale: 0.5, initCPs: 12, knum, mul: 1.0, add: 0.0)

#### Arguments:

ampdist |
Choice of probability distribution for the next perturbation of the amplitude of a control point.
The distributions are (adapted from the GENDYN program in Formalized Music):
0: | LINEAR. | 1: | CAUCHY. | 2: | LOGIST. | 3: | HYPERBCOS. | 4: | ARCSINE. | 5: | EXPON. | 6: | SINUS. |
Where the sinus (Xenakis' name) is in this implementation taken as sampling from a third party oscillator. See example below. |

durdist |
Choice of distribution for the perturbation of the current inter control point duration. |

adparam |
A parameter for the shape of the amplitude probability distribution, requires values in the range 0.0001 to 1 (there are safety checks in the code so don't worry too much if you want to modulate!). |

ddparam |
A parameter for the shape of the duration probability distribution, requires values in the range 0.0001 to 1. |

freq |
Oscillation frequency. |

ampscale |
Normally 0.0 to 1.0, multiplier for the distribution's delta value for amplitude. An ampscale of 1.0 allows the full range of -1 to 1 for a change of amplitude. |

durscale |
Normally 0.0 to 1.0, multiplier for the distribution's delta value for duration. An ampscale of 1.0 allows the full range of -1 to 1 for a change of duration. |

initCPs |
Initialise the number of control points in the memory. Xenakis specifies 12. There would be this number of control points per cycle of the oscillator, though the oscillator's period will constantly change due to the duration distribution. |

knum |
Current number of utilised control points, allows modulation. |

mul | |

add | |

#### Discussion:

All parameters can be modulated at control rate except for `initCPs`

which is used only at initialisation.