var AudioChannel = function(args) {
  this.context = AudioContext ? new AudioContext() : new webkitAudioContext();
  this.oscill = this.context.createOscillator();
  this.gain = this.context.createGain();

  this.oscill.connect(this.gain);
  this.gain.connect(this.context.destination);

  if(args) {
    this.oscill.frequency.value = args.freq ? args.freq : 220;
    this.oscill.type = args.wave ? args.wave : "triangle";
    this.gain.gain.value = args.gain ? args.gain : 0.05;
  }
}
AudioChannel.prototype.playSong = function(song) {
  this.oscill.start();
  var playNextNote = function(song) {
    this.oscill.frequency.value = song[0].freq;
    if(song[1]) {
      setTimeout(playNextNote.bind(this, song.slice(1)), song[0].length);
    }
    else {
      setTimeout(function() {
        this.gain.gain.value = 0;
      }.bind(this), song[0].length);
    }
  }.bind(this);
  playNextNote(song);
}

@@ -199,16 +199,323 @@
 ain();%0A%0A
+  if(args) %7B%0A    this.frequency = args.freq ? args.freq : 220;%0A    this.wave = args.wave ? args.wave : %22triangle%22;%0A    this.volume = args.gain ? args.gain : 0.05;%0A  %7D%0A%7D%0AAudioChannel.prototype.setNodes = function() %7B%0A  this.oscill = this.context.createOscillator();%0A  this.gain = this.context.createGain();%0A%0A
   this.o
@@ -584,39 +584,24 @@
 tination);%0A%0A
-  if(args) %7B%0A  
   this.oscil
@@ -624,100 +624,58 @@
 e = 
-arg
+thi
 s.freq
- ? args.freq : 220;%0A    this.oscill.type = args.wave ? args.wave : %22triangle%22
+uency;%0A  this.oscill.type = this.wave
 ;%0A  
- 
- 
 this
@@ -697,43 +697,23 @@
 e = 
-args.gain ? args.gain : 0.05;%0A  %7D%0A%7D
+this.volume;%0A%7D;
 %0AAud
@@ -1124,9 +1124,10 @@
 song);%0A%7D
+;
 %0A

Update AudioChannel to create nodes in member function instead of constructor