[Clam-devel] spectrogram in NE

Pau Arumí parumi at iua.upf.edu
Tue Dec 4 10:16:33 PST 2007


wow that was simple. absolutely great!

i think will use it right away for my work. is it commited?

pau


On dt, 2007-12-04 at 15:08 -0300, Hernán Ordiales wrote:
> 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)
> 
> cheers,
> _______________________________________________
> Clam-devel mailing list
> Clam-devel at llistes.projectes.lafarga.org
> https://llistes.projectes.lafarga.org/cgi-bin/mailman/listinfo/clam-devel





More information about the clam-devel mailing list