title: How to play a specific frequency with Javascript?
body: <p>I want a function that works like this:</p>
  
  <pre><code>playSound(345, 1000)
  </code></pre>
  
  <p>Which would play a tone of 345 hz for 1000 milliseconds. What is the simplest way to achieve this in JavaScript? I don't mind if it uses a sample (maybe of a sin wave, or piano), or uses the computer's hardware to generate the sound.</p>