// FM synthesis by hand // Modified by Brian Durocher 2009 // Distributed under the Creative Commons License // Share Alike. Please feel free to use this file for // non-commercial use. // carrier SinOsc c => dac; // modulator SinOsc m => blackhole; Noise n => blackhole; // carrier frequency 220 => float cf; // modulator frequency 550 => float mf => m.freq; // index of modulation 200 => float index; //initialize nf 200 => float nf; // time-loop while( true ) { Std.rand2f(1, 500) => float ac; Std.rand2f(10, 150) => nf; // modulate cf / ac + (nf * m.last()/ac) => c.freq; // advance time by 1 samp 1::ms => now; }