How to raise frequency of sounds - javascript -


i trying raise frequency of every node in sound. have tried many ways. here small code work, it's not working. please help. in advance.

<script src="./wad.js"></script> <script src="./tuna.js"></script> <script> var countaudio = 1; var voice = new wad({source : 'mic'}); var tuner = new wad.poly(); tuner.add(voice); voice.play({volume  : 1}); logpitch(); function logpitch() {     tuner.updatepitch()     localstorage.setitem(countaudio, tuner.pitch)     countaudio = countaudio + 1;     if (countaudio < 1000) {     settimeout(logpitch, 5)   } else {     tuner.stopupdatingpitch()     voice.stop()     highvoice(countaudio)   } }; = 1; var audioctx = new (window.audiocontext || window.webkitaudiocontext)(); function playnote(frequency, duration) { 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); } function highvoice(amount) {   if (!(i = amount)) {     item = localstorage.getitem(i);     playnote(item,10);     = + 1;     settimeout(highvoice(amount), 10);   } else {     = 1;   } } </script> 


Comments

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -