You are reading a single comment by @Gordon and its replies. Click here to read the full conversation.
  • Are you using the up to date (1v92) firmware?

    If it still fails I'd try and simplify things a bit... if you have a massive buffer already, why not just write into it directly - for example:

    var clipSeconds = 3;
    var w = new Waveform(512*clipSeconds,{bits:16});
    w.on("finish", function(buf) {
      var a = buf;
      E.FFT(a);
      var m=0,n=-1;
      for (var i=150;i<250;i++)if(a[i]>n)n=a[m=i];
      console.log(m.toFixed(0)+"Hz @ "+n);
    });
    w.startInput(D2,512);
    

    It is possible that the buffer size is too large for E.FFT, but there are checks in place to avoid that kind of problem and to throw an error if there isn't enough memory available.

    Failing that, is there a reason you don't want to perform the FFT in smaller chunks and average the result?

About

Avatar for Gordon @Gordon started