Hello,<br><br>Wondering if someone can explain STK Modulate to me; I just don't seem to get it!<br><br>The code below is just a little test to try and figure it out -- works as expected if you comment out all the Modulate related bits, but as is, makes a muddy hum... Obviously I'm doing something wrong!<br>
<br>Can anyone shine some light on this for me?<br><br>Thanks<br><br>-----------------------------------<br>// SinOsc m => dac;<br><br>// the offending portion! <br>SinOsc m => Modulate modu => dac;<br>60 => modu.vibratoRate;<br>
1 => modu.vibratoGain;<br>1 => modu.randomGain;<br><br>// fine from here... <br>200 => float freq;<br>0.3 => m.gain;<br> <br>while (true) {<br> // just to keep it interesting...<br> Std.rand2(1, 4) => int multipler;<br>
((freq * 2) - freq) / 12 => float step;<br> step * multipler => float newfreq;<br> <br> if (freq > 2000.0 || freq < 150.0) {<br> if (freq < 150.0) {<br> freq + newfreq => freq;<br>
} else {<br> freq - newfreq => freq;<br> }<br> } else {<br> if ( maybe ) {<br> freq + newfreq => freq;<br> } else {<br> freq - newfreq => freq;<br>
}<br> }<br> freq => m.freq;<br> 250::ms => now;<br> <br>}<br><br>