Audio spectrum analyzer

Status
Not open for further replies.

microtoad

Newbie level 4
Joined
Mar 29, 2008
Messages
6
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,317
dspic audio spectrum analyzer

hi everyone!!

i'm new in dspic and i want to make a project. i want to make a audio spectrum analyzer like this :



or like this :



there are several project on the net but they use atmel microcontroleur. why i choose dsPIC ? because i have already a pickit2 at my home (awesome device !!! better than ICD2 !!! so this isn't the subject ...).
i want to use C language like C30 ( for dsPIC ). i know there is already some library for FFT process publish by microchip but i don't know how to use it to do my project.
and i wan't to use a 2*16 or 2*20 graphic lcd if possible.

so i wanna know if you have a dsPIC to advice to me for my project .

with witch function of FFT library can i "filter frequencies" of my input signal ?

i hope that you can help me .
thanks
 

audio spectrum analyzer dspic

the first project you show is available open source here :

**broken link removed**

it is dspic based so no problem for you ?
best regards.
 

    microtoad

    Points: 2
    Helpful Answer Positive Rating
lcd audio spectrum analyzer

Hello!

In that kind of problem, I guess you don't care about accuracy, so I guess
even a careless FFT implementation will be fine.
I mean: you don't care if the processing is not continuous because nobody
will notice, so skipping audio frames is not a problem.

How to use the FFT:
First it will be easier to display 16 bands than 20.
If you want to display 16 bands, you have to make a 32-sample long FFT
and display the first half of the power spectrum.
The advantage with a 32 point FFT is that it will be extremely fast.
160 multiplications for the FFT itself, 32 multiplications for the power spectrum
calculation (since you want only half of it). This means 6 multiplications per
sample only.
I don't know the dspic library, so I cannot tell you which function you should
use, but I would guess it is called fft. And you will also need to calculate the
power. But since you need a square root for power, you should use a lookup
table. Anyway you don't need accuracy, so a 8-bit square root table is fine.

Now what I don't understand: what do you mean by "2 x 16 graphic display"?
For me a graphic display is meant to display... graphics, so 2 pixel by 16 or
even 20 sounds strange to me. The display you show in your post looks like
a character display.

By the way, FFT does not "filter frequencies". Filtering would mean that you
alter the spectrum contents. FFT does only the transform from time domain
to frequency spectrum.

Another example of FFT implementation: (the graphic display used there
is 160 x 128 pixels).


Dora.

 

    microtoad

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…