title: Setting volume level in dB in javascript
body: <p>How can I set the volume level in dB using this function?
  Can I also control laterality (R/L volumes)?</p>
  
  <pre><code>function playNote1(frequency, duration) {
      // create Oscillator node
      var oscillator = audioCtx.createOscillator();
  
      oscillator.type = 'square';
      oscillator.frequency.value = frequency; // value in hertz
      oscillator.connect(audioCtx.destination);
      oscillator.start();
      setTimeout(function(){oscillator.stop();}, duration);   
  
  }
  </code></pre>