[chuck-users] noob: change ADSR release/floor value

Kassen signal.automatique at gmail.com
Mon May 21 19:54:46 EDT 2012


On Mon, May 21, 2012 at 07:39:08PM -0400, George Locke wrote:
> Hi,

Hey George!
> 
> The signal path I have right now looks like this:
> 
> SinOsc m => ADSR modEnv => Gain g1 => SinOsc c => dac;
> m => Gain g2 => c;
> 
> If I set g1's gain to maxIndex - minIndex, and g2's gain is set to
> minIndex, I achieve the desired result, but I just want to make sure I'm
> not making my life unnecessarily complicated by doing it this way.  (I'm
> used to max/msp where there's a +~ object.)

With regard to summing this is totally fine; multiple signals are send
to c and c's input, like all UGen inputs, defaults to summing.

You could save yourself one "Gain", being g1. Instead of setting

g1.gain(My_gain_index);

you could set it to modEnv directly like;

modEnv(my_gain_index);

This is because all UGens have a .gain() member which sets their
output gain. In this case we can't do that for the second signal-path
as substituting g2 by calling m.gain() would affect the signal-path in
the first line as well.

That -useful- detail aside you seem well on your way to creating a
nice FM synth!

Yours,
Kas.


More information about the chuck-users mailing list