title: Generating sound on the fly with javascript/html5
body: <p>Is it possible to generate a constant sound stream with javascript/html5? For example, to generate a perpetual sine wave, I would have a callback function, that would be called whenever the output buffer is about to become empty:</p>
  
  <pre><code>function getSampleAt(timestep)
  {
      return Math.sin(timestep);
  }
  </code></pre>
  
  <p>(The idea is to use this to make an interactive synth. I don't know in advance how long a key will be pressed, so I can't use a fixed length buffer)</p>