5 Dec 2011 07:42

## [CLAM] Beginner basics

I'm attempting to do some Spectral Analysis and I've found the SpectralAnalysis class and have been playing with the Network Editor as well as libclam and associated classes. I'm now trying to make sense out of the Spectrum class and the data produced by it. What I am looking to discover is what frequencies have what values and I can't quite make heads nor tails of the output. I've been playing with FFT_example.cxx and Spectrum_example.cxx as starting points. Now, can anyone direct me to a good resource for figuring out what Magnitude and Phase really mean to the uninitiated? Thanks!
```_______________________________________________
clam-users mailing list
clam-users@...
http://clam-project.org```
5 Dec 2011 18:41

### Re: [CLAM] Beginner basics

```On Monday 05 December 2011 07:42:08 Sean Walker wrote:
> I'm attempting to do some Spectral Analysis and I've found the
> SpectralAnalysis class and have been playing with the Network Editor as
> well as libclam and associated classes. I'm now trying to make sense out of
> the Spectrum class and the data produced by it. What I am looking to
> discover is what frequencies have what values and I can't quite make heads
> nor tails of the output. I've been playing with FFT_example.cxx and
> Spectrum_example.cxx as starting points. Now, can anyone direct me to a
> good resource for figuring out what Magnitude and Phase really mean to the
> uninitiated? Thanks!

The spectrum is an array of coefficients which are not just simple real numbers
but complex numbers. So they have a real part and an imaginary part. They can
be plotted as a point in the XY plane being the X the real and the Y the
imaginary part. See: http://en.wikipedia.org/wiki/Complex_number
If you had a vector to that point, the complex magnitude is the length of the
vector and the phase is the angle from the X axis.

What you usually see in an spectrum view is just the magnitude. Not enough to
reconstruct the original sound but it gives a nice idea of the 'energy' that
the sound provides for such frequency.

Much more on fft: http://www.dsprelated.com/dspbooks/mdft/

David.
```

Gmane