Homework 2 is about synthesizing an auditory streaming illusion using FM tones.

Play it (the entire piece...)

Just click the start button. The IsoRhythm class gets preloaded, a single instance of it gets played once. Then experiment with the suggestion below. The code creates a group of multiple instances that play as overlapping layers (polyphony) and then creates another group.

////////////////////////////////////////////////////
suggestion (copy this whole and replace the live code)
IsoRhythm iso[3]; spork ~iso[0].play(30::second, 0.97, 160::ms); 1::second => now; spork ~iso[1].play(29::second, 0.96, 150::ms); 1::second => now; spork ~iso[2].play(48::second, 0.95, 140::ms); 30::second => now; IsoRhythm iso2[3]; spork ~iso2[0].play(30::second, 0.97, 160::ms); 1::second => now; spork ~iso2[1].play(29::second, 0.96, 150::ms); 1::second => now; spork ~iso2[2].play(28::second, 0.95, 140::ms); 30::second => now;
////////////////////////////////////////////////////
live code
IsoRhythm iso; // instantiate an IsoRhythm object spork ~ iso.play(15::second, 0.9, 40::ms); 20::second => now; 1::week => now;