I'd be curious to know, are you using the 8-bit FFT code that was posted on the Arduino forum? Or some other software/hardware to analyze the tones?
No other hardware, one ULN2003 to switch led matrix columns.
Initially I get 16-bit FFT code from: http://www.jjj.de/fft/fftpage.html
(I think, it's the same version someone modify to 8-bit and posted on the forum. )
I did a lot of optimization to source code, and also turn it to 8 -bit. Since then I write my own FFT code, but couldn't get better performance (yet), even it's pretty close (-10%). I already used code in other project:http://fftarduino.blogspot.com/2011/02/color-organ-spectrum-analyzer-on.html
You mention 23 msec of work, and then 40 msec waiting for the next array. I'm running some code that takes 45 msec to do a 16-bit FFT, n=256, & it takes 25 msec to fill the array at 10 KHz sampling rate. Since there's only one array the tasks can't be done in parallel.
23 msec is for 8-bit. I'd expect 60 msec on 16-bit, but there is no way I can test it on Uno:
array is 1024, real/imaginary 512/512, output 256 bins (only half real part, other half is mirror).
16 bit 1024 would take all 2K memory.
Sampling rate 4 kHz, upper note 1976 Hz on yellow right side led. ( there is no antialising filter yet, probably this is why it unstable in upper notes).
I'm doing parallel: Sampling array 256 - 16 bit, dynamicaly "scaling" down to 8-bit to get better SNR of input data. When it's full (256 x 0.25 msec = 64 msec) it's transfered to processing array 1024, missing 256 real sample is "zero padded", and sampling continue w/o interruption (transfer time less than 250 usec)
I did zero padding on a purpose to get "response time" led matrix as fast as possible, so real time 1/16 note could be visually distinguish the same time as they sound.
But as always you can't get both, zero padding is not for free, it degrade sensitivity/snr in two, plus degrade resolution to 16 Hz compare to design 8 Hz. I'm able to get tone on lower end only if two "neighboring" tone not played simultaneously ( it should happened really ocasionaly, I think). So it's compromise version between speed/accuracy.
Later I would turn on accuracy road, and it wouldn't be too hard to decode 7.5 octave grand acoustic only it' wouldn't be real-time anymore
Should correct last sentence:
"wouldn't be too hard to decode 7.5 octave grand acoustic - on Mega or with additional memory chip. "only it' wouldn't be real-time anymore" , hmm , why not? I have an idea...