-
-
-
-
I'm trying to experiment with audio analysis on the Pico and am running into slower than expected performance.
I've specifically picked this board because it runs on the Cortex M4 MCU with accelerated DSP via CMSIS. (It is unclear if it has an FPU, but I'm not using it here, so...) I've run some timings and am getting ~44ms to run E.FFT() on a 128 16-bit data:
var w = new Waveform(128, {doubleBuffer:true, bits:16}); var a = new Uint16Array(128); w.on("buffer", function(buf) { LED1.reset(); var l = buf.length; a.set(buf); var start = Date.now(); E.FFT(a); console.log(Date.now() - start); LED1.set(); }); w.startInput(B1, 44100, {repeat:true});
At best, this is 1000/44 = 22.72 FFTs per second.
According to benchmarks done in http://openaudio.blogspot.com/2016/09/benchmarking-fft-speed.html, Arduino M0, which has a slower chip with no DSP unit does 639 FFTs per second, while a Teensy 3.2, which runs a similarly specced NXP chip manages 7156 FFTs per second when not using accelerated DSP and 14286 when doing so.So, what's going on? Am I reading it wrong or calling it wrong?
I get that their benchmark is in C while Pico is running interpreted JS, but E.FFT() just calls into the C library function, so there shouldn't be much overhead there. Looking at the GitHub sources, I do see that on the Pico, E.FFT() supposedly calls into CMSIS, so this should be really fast. -
-
Gordon, thank you for your contributions!
I've just recently gotten into Arduino et al. and have gotten a Puck.js - what a fun little device, and a JS-based web IDE is so easy and fun to use.Do you have any plans for a follow-up? Ideally, something a little more powerful and with some more built-in sensors (IMU) and connectivity, while retaining a small-ish size and being wrapped up in a neat little self-contained package.
I ordered the MDBT42 module, but then realized that it'd be pretty useless to me without the breakout board. I saw it on one of the product photos and assumed that it'd be included, but now I don't think that's the case.