Archive: Write spectrum analyzer values per frame to a file


16th February 2007 23:01 UTC

Write spectrum analyzer values per frame to a file
Hi.

I need a plugin that will write into a file the spectrum analyzer values to a file. I want to reproduce the spectrum analyzer of a mp3 in a bar chart.

So, the file should be something like this:

FRAME, VAL1, VAL2, ..., VALx
1, 34, 56, ...., 75
2, 12, 43, ...., 9
3, 4, 183, ...., 23

Is there something available for this?

Thanks


17th February 2007 12:50 UTC

AVS cant do this without modification (bear in mind that it is a visualisation plugin). However if you did wish to do this in avs you could write an APE very easily, it would consist of about 5 lines of c++.

Why exactly do you want to do this though? If you want a bar chart visualisation this can be done in AVS. Just writing spec values down per frame to a file is unlinkely to be useful for anything else I can think of, you can't analyse the results because you dont know the frame rate (it can be variable)


17th February 2007 17:16 UTC

I just need a plugin to do that or anything that can produce the file. I posted here because I believe that here I can find the right people to help me.

The final result is this: I want to play an mp3 and simulate the "Spectrum analyzer" from Winamp into my own program using a Bar Chart.

I need a file with bar values at a constant time frame. The syncronization with the mp3 must be perfect.

Any ideeas ?


17th February 2007 19:08 UTC

You cant do this with AVS then, because you would need a fixed frame rate and that isnt something you can guarantee.

If you want the effect you have described just write some code to play back MP3's and take an FFT of the samples you are playing every frame, and format them into a bar chart.

If you need an fft library I would recommend http://www.fftw.org/ I have used it before and its fairly straightforward.

Given that you are going to write your own program I fail to see the connection to winamp. You will require the ability to play a music file (you have apparently chosen MP3 but I would recommend OGG since it is not licenced) it is only a small amount of extra effort to analyse the signal for a spectrum analyser.


17th February 2007 19:50 UTC

Thnx for the help, but I don't know C. I use Delphi. Any other suggestion?


18th February 2007 00:17 UTC

There is the powerful software called Ahead Nero and you can get it at.
http://www.oldversion.com


18th February 2007 23:00 UTC

If you are using delphi there are probably components which will allow you to play MP3's, and components containing FFT functions for you to use. Try searching for them, one good source is http://www.torry.net/

To be honest this would be easier in c++ given the wide variety of libraries on the web at your disposal. However the component system in Delphi has a fairly large and active community so you shouldn't have too much trouble finding something.


3rd March 2007 23:10 UTC

New program found
I did some research for you and discovered a program called audacity and it has a spectrum analyser that can export to text files.

search here
just search for audacity and you'll find it.


30th March 2007 15:45 UTC

Re: New program found
Thanks. I'll try it.