Sinewave.js won't play several notes when the new frequency is set
<p>I am having a problem trying to get sinewave.js-plugin to play several notes in succession. </p>

<p><a href="https://github.com/0xfe/experiments/tree/master/www/tone" rel="nofollow">Link to the sinewave.js Github page</a></p>

<p>Here is my code.</p>

<pre><code>scalePlayer = function(){
var command = arguments[0]; 

if (command == 'play'){
    sinewave.setFrequency(261.63); // C4
    sinewave.play();
}else if (command == 'pause'){
    sinewave.pause();
}else if (command == 'cmajor'){
    // C major scale
    var scale=[
        "130.81",
        "146.83",
        "164.81",
        "174.61",
        "196.00",
        "220.00",
        "246.94",
        "261.63"];
    s = scale.length;
    i=0;
    while (i&lt;=s){
        setTimeout("sinewave.setFrequency("+parseFloat(scale[i])+")", 1000);
        console.log(parseFloat(scale[i]));
      i++;
     }  

}else if (command == 'test'){
        setTimeout("sinewave.setFrequency(300)", 1000);
        setTimeout("sinewave.setFrequency(500)", 1000);
}
}
</code></pre>

<p>The "test" command only plays the first note of the two, and the one that actually goes through the scale frequencies plays nothing, but prints the correct tones from the array. </p>

<p>What I am trying to achieve is that the "cmajor" command would play a scale, one note every 1 seconds. </p>

<p>I feel like the setTimeout is causing problems, and I can't understand why the "test" command won't play two different notes. </p>
