In the category of experimentation, I wonder what could be done with frequency analysis--i.e., with an algorithm that extracts the fundamental of a plucked string, or even the set of fundamentals of multiple strings. Arduino can do FFT analysis for instance. I've been playing with a 16-bit integer FFT algorithm that will do a 256-byte FFT in about 45msec (atmega328). There's an 8-bit FFT algorithm posted in this forum that presumably would be twice as fast. More optimizations may be possible (e.g., real-valued FFT).Just to pick some numbers, say the signal is band-limited to 700 Hz and sampled at 1.4 KHz. A length 256 FFT would give a frequency resolution of 1400/256 or about 5 Hz. That might be enough to distinguish notes above E3 anyway (E3 = 165 Hz, F3 = 175 Hz). It might be interesting to see.Joe
I wonder what could be done with frequency analysis
QuoteI wonder what could be done with frequency analysisDo you think that has not been tried?It has and is not successful.
For musical instruments the problem of reverberation dueto slow decay of previous notes renders the analysis more or less polyphonic. Due to thepossibilities to restrict the analysis to limited frequency ranges and to threshold spectralamplitudes it appears that for musical instruments spectral domain preprocessing is helpfulsuch that spectral domain evaluation of the acf is more appropriate. For the harmonicinstruments the error is below 1% if less than a quarter note of deviation is excepted.
isn't the idea to investigate and have fun?
Quoteisn't the idea to investigate and have fun?It is but also I feel I should let some one know when they are wasting their time trying to do something on an 8 bit micro that has proved to be imposable on much more powerful DSP orientated processors. But hey it's your life if you want to waste it trying to reinvent a broken wheel then feel free. You never know you might just end up redefining success and so succeed.
Mike may be "Grumpy", but he is right. "Progress, far from consisting in change, depends on retentiveness. When change is absolute there remains no being to improve and no direction is set for possible improvement: and when experience is not retained, as among savages, infancy is perpetual. Those who cannot remember the past are condemned to repeat it." - George Santayana (1905)
PO1 - The Intermediate ImpossibleThis process can be said to be an extremely powerful variant of the word suppose. It is built upon the concept that wrong and/or impossible ideas can be used as gateways or stepping stones to ideas that are not wrong. It is a way to jump over the barrier of judgement, and continue in a seemingly wrong direction. This tool is often used as provocative statements. From a graphic design point of view, an example might be "PO this copy should not be readable". The objective is to explore unfamiliar landscape, and see where the provocation is leading. Results of this PO could be to have the text presented in the braille system, a feature for audio playback of the same text, communicating the same message purely pictorial, or special glasses that make the copy readable.
It can be a cure for grumpiness!
There's a book by a Dr. Edward Bon
what do you think about the claims of the German researchers above (<1% error for harmonic instruments)?
Have a look:http://arduino.cc/forum/index.php?topic=70857.new;topicseen#newI haven't completed all test yet, as SNR goes down with more key struck simultaneously ( energy divided between individual bins), I'm hoping to get 1% error rate for 10 notes so far.
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?
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.