title: JS AudioContext oscillator - play more than one note at the same time (polyphony)
body: <p>I created an oscillator, it actually can play single notes, but does not support two or more notes at the same time... how can I make it polyphonic?<br></p>
  
  <pre><code>$(window).load(function(){
  
  window.AudioContext = window.AudioContext || window.webkitAudioContext;
  ctx = new AudioContext();
  
  
  $('path').on('touchstart mousedown', function(){
      $(this).css('fill','lime');
      noteON( $(this).attr('data-noteKEY') );
  });
  $('path').on('touchend mouseup', function(){
      $(this).css('fill','');
      noteOFF();
  });
  
  
  function noteON(noteKEY){
      osc = ctx.createOscillator();
      osc.type = 'sine';
      osc.frequency.value = noteKEY;
  
      osc.connect(ctx.destination);
      osc.start(0);
      //osc.connect(ctx.destination);
  }
  
  function noteOFF(){
       osc.stop(0);
  }
  
  
  
  
  });
  </code></pre>