[Clam-devel] spectrogram in NE

Hernán Ordiales h at ordia.com.ar
Tue Dec 4 10:08:40 PST 2007

the other day i wanted (after a friend asked me if it's possible to do
this kind of thing in realtime with clam) to see the specgram view of
one audio input in the NE, then i noticed that the only input of the
specgram processing is std::vector<TData>

the only working example that i found is one that connects the "Pitch
Profile" output of the TonalAnalysis to the spectrogram processing...
but i'm not sure what kind of data "Pitch Profile" has...

then i made a simple processing (like a plugin) to convert one
spectrum input to a TData vector one, but i'm not sure what is the
specgram processing expecting (has no documentation at all), i mean
what kind of data should be

for test i made a vector of magnitude of one fft, but i also have to
invert the order of it to have something similar to one specgram view

a Do() function like this:
bool Do(const Spectrum& in, std::vector<TData>& out)
	DataArray& peaksMagArray = in.GetMagBuffer();
	int size = peaksMagArray.Size();

	out.resize( size );
	for ( int i=0; i< size; i++ )
		out[ i ] = peaksMagArray[ size-1-i ];

i attach one screenshots, looks like specgram but i think should be
improved, i would like to know more of what kind of data is the
spectrogram expecting to have an easy way to see the specgram of one
audio input.

other questions:
to change the window size i think i should to change the audio size
(at configure) of the FFT, and to change de overlap factor? (i'm
thinking in the 'spegram' function of matlab that is what i know)

GnuPG: 0xEE8A3FE9
-------------- next part --------------
A non-text attachment was scrubbed...
Name: specgram.png
Type: image/png
Size: 165540 bytes
Desc: not available
URL: <http://lists.clam-project.org/pipermail/clam-devel-clam-project.org/attachments/20071204/b40fa607/attachment-0003.png>

More information about the clam-devel mailing list