2 summary:: Envelope generator for polling values from an InterplEnv
3 categories:: UGens>Envelopes
4 related:: Classes/InterplEnv
7 Envelope generator for polling values from an InterplEnv. IEnvGen plays back break point envelopes from the code::index:: point. The envelopes are instances of the link::Classes/InterplEnv:: class.
10 private:: categories, new1
15 an instance of InterplEnv (this is static for the life of the UGen)
17 a point to access within the InterplEnv
20 private:: init, argNamesInputsOffset
25 SynthDef(\test, {arg gate = 1;
27 sin = SinOsc.ar(440, 0, 1);
28 env = InterplEnv([0, 0.6, 0.3, 1.0, 0], [0.1, 0.02, 0.4, 1.1], [\lin, \exp, -6, \sin]).plot;
30 // use MouseX to index into the InterplEnv to control amps
31 IEnvGen.kr(env, MouseX.kr(0, env.times.sum)) *
32 EnvGen.kr(Env.asr(0.01, 1, 0.01), gate, doneAction: 2);
36 s = Server.internal.boot;
39 s.sendMsg(\s_new, \test, a = s.nextNodeID, 0, 1);
40 s.sendMsg(\n_set, a, \gate, 0);
42 // index with an SinOsc ... mouse controls amplitude of SinOsc
45 sin = SinOsc.ar(440, 0, MouseX.kr(0, 1));
46 // use offset so negative values of SinOsc will map into the InterplEnv
47 env = InterplEnv([-1, -0.7, 0.7, 1], [ 0.8666, 0.2666, 0.8668 ], \lin, -1.0);
48 Out.ar(0, IEnvGen.ar(env, sin))
51 s.sendMsg(\s_new, \test, a = s.nextNodeID, 0, 1);
52 s.sendMsg(\n_free, a);
55 // index with Amplitude of input, control freq of SinOsc
56 SynthDef(\test, {arg inbus;
58 point = Amplitude.ar(In.ar(inbus), 0.01, 0.2);
59 // use offset so negative values of SinOsc will map into the InterplEnv
60 env = InterplXYC([[0, 330, \exp], [0.5, 440, \exp], [1.0, 1760]]);
61 Out.ar(1, SinOsc.ar(IEnvGen.kr(env, point), 0, 0.2))
64 s.sendMsg(\s_new, \test, a = s.nextNodeID, 0, 1, \inbus, s.options.numOutputBusChannels);
65 s.sendMsg(\n_free, a);