[gst-devel] fftw3 plugin?
leif at ambient.2y.net
Mon Jan 19 14:33:04 CET 2004
Hi Shanat -
On Mon, 19 Jan 2004, Shanat Krishnamurti wrote:
> i was wondering if there is a plugin that uses the fftw3 library to convert
> the audio data stream from the time domain to the ferquency domain and vice
> versa, ( time2freq, freq2time ), so i can use it for analysis ( EQ ) i.e. the
> pipeline looks like this:
> osssrc ! time2freq ! analysis ! freq2time ! osssink
Having time2freq and freq2time elements sounds great to me ; there was
someone on IRC talking about this recently. Note that you'll probably
have to come up with a new GStreamer MIME type for this frequency-domain
audio ; maybe something like audio/x-raw-float-freq ?
> for the fft plugin, would it be better to convert all data into a float
> stream, process it, and then covert it back to int ? i.e:
> src ! int2float ! fft-t2f ! analysis ! fft-f2t ! float2int ! sink
> ( where fftw3 does the fast fourier transform ).
> Or, should I keep separate pads for each form of data?
I would highly recommend supporting only float audio, since the FFT
stuff will require float anyway. You can rely on using the float2int and
int2float elements for conversion to and from int audio, as you
> would the best way be to put it all into 1 big analysis plugin?
> i.e ( src->FFT->EQ->FFT->sink )
I'd recommend having smaller, single-task elements (t2f, f2t, eq) rather
than one big element ; one of the main advantages of having elements is
being able to recombine them in different pipelines. Perhaps some other
folks on the list would have different perspectives, though.
Leif Morgan Johnson : http://ambient.2y.net/leif/
More information about the gstreamer-devel