Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // time measures
- 0.5::second => dur beat;
- 4::beat => dur measure;
- // audio oscillators
- SawOsc fbOsc => dac;
- 110 => float OscFrequency => fbOsc.freq; // 110Hz, or "A -1" musical note
- // audio controls
- 0.15 => fbOsc.gain;
- // variables for looping
- now + 16::measure => time stop; // 64 beats
- 1 => int stepCounter;
- 0 => float freqCounter;
- // start loop
- while ( now < stop ) {
- ( OscFrequency + 1 ) - ( Math.pow ( 1, ( OscFrequency / 12 ) ) ) => float stepExponent;
- <<< "-----" >>>;
- <<< "stepExponent: ", stepExponent >>>;
- <<< "Result: ", stepCounter >>>;
- <<< "OscFrequency: ", OscFrequency >>>;
- OscFrequency + stepExponent => OscFrequency => fbOsc.freq;
- beat +=> now;
- 1 +=> stepCounter;
- }
- <<< "end program" >>>;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement