On Thu, Feb 19, 2009 at 06:48:12AM +0100, karim hamidou wrote:
I've been toying recently with the X window test
extension (which
allows the user to simulate input events) and I've decided to create a
bigger project that uses it. My project idea would be a unix daemon
that reads data from the sound card, gets the dominant frequency and
then reports a key corresponding to this data.
Unfortunately, I don't know the theory of spectrum analysis and I
don't think I could come up with a high-performance spectrum analyzer
in reasonable time.
So, my question is : do you know a good spectrum analyzer, preferably
written in C that I could modify ?
I don't want to discourage you to explore any
aspect of programming, but just think a moment
before you continue with this project:
1. What you want to write is a 'pitch extractor'.
It's not an easy thing and will involve a lot
more than just spectrum analysis. If you are
not familiar with general DSP it will be quite
difficult.
2. Such an app would be most useful as a Jack
client or as an LV2 plugin, outputting MIDI,
not as a daemon.
3. A daemon, by definition, does not use any
visual output. So you don't need X at all, and
in fact a daemon should never use anything X
and be able to run without X even being
installed or running.
4. The basics of spectrum analysis is the FFT,
for which you can use the fftw3 library.
What happens after that is usually quite
application dependent, so there could be
little to re-use.
Ciao,
--
FA
Laboratorio di Acustica ed Elettroacustica
Parma, Italia
O tu, che porte, correndo si ?
E guerra e morte !