gtadsr Signal Generators:Envelope Generators gtadsr gtadsr A gated linear attack-decay-sustain with exponential release. Description This opcode can work either as a signal generator or as a signal processor. It is controlled by a gate k-rate signal (0 or > 0) which switches the envelope attack-decay-sustain phase on/off. With gate > 0 (high), the envelope cycles through the attack and decay phases, and is sustained at the sustain level. Whenever gate is 0 (low), the envelope enters the release phase, decaying exponentially to 0. The attack and decay times are fixed with gate > 0, but can be changed once the gate is zero. Syntax ares gtadsr asig, katt, kdec, ksus, krel, kgate xres gtadsr kamp, katt, kdec, ksus, krel, kgate Performance x/ares -- output signal (k or a-rate) asig -- input signal (envelope as an amplitude processor) kamp -- maximum amplitude (envelope as a signal generator) katt -- duration of attack phase kdec -- duration of decay ksus -- level for sustain phase (in the range 0 - 1) krel -- duration of release phase kgate -- gate signal (0 = low, > 0 high). The length of the sustain is calculated from the length of the note. This means gtadsr is not suitable for use with MIDI events. Examples Here is an example of the gtadsr opcode. It uses the file gtadsr.csd. Example of the gtadsr opcode. See the sections Real-time Audio and Command Line Flags for more information on using command line flags. See Also Envelope Generators Credits Author: Victor Lazzarini; New in version 6.17