Hi,

I am trying to make a simple FM patch.  I want the modulation index to change by ADSR, but I'm not sure what the best way to set the ADSR's gain to a range besides 0-1.  (I am new to ChucK, but not to computer music and not to computer programming.)  

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.)

Thanks,
George