1 IEnvGen : UGen { // envelope index generator
3 *ar { arg envelope, index, mul = 1, add = 0;
4 envelope = this.convertEnv(envelope);
5 ^this.multiNewList(['audio', index, envelope]).madd(mul, add)
8 *kr { arg envelope, index, mul = 1, add = 0;
9 envelope = this.convertEnv(envelope);
10 ^this.multiNewList(['control', index, envelope]).madd(mul, add)
13 *convertEnv { arg env;
14 if(env.isSequenceableCollection) { ^env.reference }; // raw envelope data
15 ^env.asArrayForInterpolation.collect(_.reference).unbubble
18 *new1 { arg rate, index, envArray;
19 ^super.new.rate_(rate).addToSynth.init([index] ++ envArray.dereference)
23 // store the inputs as an array
26 argNamesInputsOffset { ^2 }