javascript - JQuery knob, input slider and web audio oscillator connecting but not working -


i have web audio api , jquery knob library kind of working... not quite. knob slider controls input slider value doesn't seem passed param want affect.

for simple example see here:

http://jsfiddle.net/rkh35/1/

code:

<input  id="gain1" type="range" class="dial" >   <script>  document.getelementbyid('gain1').addeventlistener('change', function() { gainnode.gain.value = this.value; });   $(function() {          var  value = document.getelementbyid("gain1").value;         $(".dial").knob({ change : function (value) {    }                   }) });   context = new webkitaudiocontext();        //create oscillator object & params        oscillator = context.createoscillator(),         oscillator.type = 2;      oscillator.frequency.value = 200;   //create gain object & params gainnode = context.creategainnode();       gainnode.gain.value = 1;     //connect devices oscillator.connect(gainnode);  gainnode.connect(context.destination); oscillator.start(0);   </script> 

$(".dial").knob({      change : function (value) {         gainnode.gain.value = value;     }  }) 

Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -