var audio_context, oscillator, gainNode, volController;

var initialVol = 0.8;
var currentVol = initialVol;
var finalVol = 0;

  function stopSound() {
    clearInterval(volController);
    currentVol = initialVol;
    
    //oscillator.noteOff(0);
    gainNode.disconnect(audio_context.destination);
  }

  function playSound(freq) {
          if(gainNode != undefined){ stopSound(); }
          oscillator = audio_context.createOscillator();
          gainNode = audio_context.createGain();
          
          oscillator.connect(gainNode);
          gainNode.connect(audio_context.destination);
          
          oscillator.type = "triangle";
          oscillator.frequency.value = freq;
          oscillator.start();
          gainNode.gain.value = $("#oscillator-gain").val();
          
            $("#oscillator-gain").change(function(){
            gainNode.gain.value = $("#oscillator-gain").val();
          });
  }
  
 (function init(g){
 	try{
 		audio_context = new(g.AudioContext || g.webkitAudioContext);
 		oscillator = audio_context.createOscillator();
 	} catch(e){
 		alert("No web audio oscillator support in this browser. Use Chrome, fool!");
 		soundIssues = true;
 	}
 }(window));

@@ -920,16 +920,379 @@
     %7D);%0A
+          %0A          $(%22input%5Btype='radio'%5D%5Bname='oscillator-gain'%5D%22) // select the radio by its id%0A            .change(function()%7B // bind a function to the change event%0A                if( $(this).is(%22:checked%22) )%7B // check if the radio is checked%0A                    var oscillator.type = $(this).val(); // retrieve the value%0A                %7D%0A            %7D);%0A
   %7D%0A  %0A 

Update sound.js