SinOsc modulator => ADSR menv => SinOsc carrier => ADSR cenv => dac; 2 => carrier.sync; // setup carrier input for FM cenv.set(0.1 :: second, 0.1 :: second, 0.5, 1.0 :: second); menv.set(0.1 :: second, 0.2 :: second, 0.3, 1.0 :: second); 1000.0 => carrier.freq; // roughly the spectral center 100.0 => modulator.freq; // roughly the "pitch", or inharmonic 500.0 => modulator.gain; // make this enough to do good modulation 1 => cenv.keyOn => menv.keyOn; 0.2 :: second => now; 1 => cenv.keyOff => menv.keyOff; 2.0 :: second => now; 200.0 => modulator.freq; // octave higher, but "formant" still at 1K 1 => cenv.keyOn => menv.keyOn; 0.2 :: second => now; 1 => cenv.keyOff => menv.keyOff; 2.0 :: second => now; 117.3 => modulator.freq; // inharmonic 1 => cenv.keyOn => menv.keyOn; 0.2 :: second => now; 1 => cenv.keyOff => menv.keyOff; 2.0 :: second => now;