You are reading a single comment by @Gordon and its replies. Click here to read the full conversation.
  • Does the following work for you:

    var w = new Waveform(512,{doubleBuffer:true,bits:16}­);
    var a = new Uint16Array(512);
    w.on("buffer", function(buf) {
      a.set(buf);
      E.FFT(a);
      var m=0,n=-1;
      for (var i=50;i<250;i++)if(a[i]>n)n=a[m=i];
      console.log((m*2).toFixed(0)+"Hz @ "+n);
    });
    w.startInput(D2,1024,{repeat:true});
    
About

Avatar for Gordon @Gordon started