second/samp => float srate; // use the logistic map polynomial function, with r term as the "heat" variable // y = rx - rx^2 fun float poly( float x, float r) { return r * x * (1.0 - x); } TriOsc t => Gain sm => blackhole; Step s => sm; t.freq(0.05); // 20 second period sm.gain(0.5); // 0 - 1 range 1::samp => now; // tick one sample to initialize t.last() Clarinet c => dac; 0.1 => float state; while (true) { sm.last() => float r; // get slow-changing control value (2.8 + r*1.2) => r; // put in range for this polynomial map (2.8 to 4.0) <<<"r",r>>>; 0.1 => c.stopBlowing; // note off 50::ms => now; // wait a tiny bit poly(state,r) => state; // iterate the map 440.0 + (state * 220.0) => float f; // use state as a frequency f => c.freq; // to clarinet 0.8 => c.startBlowing; // note on 100::ms => now; // tone for 100ms }