Cole1717
Posts: 29
Joined: Mon Mar 16, 2015 10:44 pm

Real-time FFT analysis

Thu Feb 18, 2016 4:46 pm

I am trying to input audio into my soundcard, analyze it with a FFT (for a LED spectrum analyzer) and then output the audio through the soundcard in real time.

Can anyone suggest software tools that can accomplish this? I am aware of gstreamer, but the python documentation is minimal or outdated. Does anyone know of decent alternatives or decent documentation?

I am familiar with python and a little C++.

Thanks!

User avatar
RaTTuS
Posts: 10406
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK

Re: Real-time FFT analysis

Thu Feb 18, 2016 4:48 pm

How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe

User avatar
PeterO
Posts: 4938
Joined: Sun Jul 22, 2012 4:14 pm

Re: Real-time FFT analysis

Thu Feb 18, 2016 7:52 pm

Cole1717 wrote:I am trying to input audio into my soundcard, analyze it with a FFT (for a LED spectrum analyzer) and then output the audio through the soundcard in real time.

Can anyone suggest software tools that can accomplish this? I am aware of gstreamer, but the python documentation is minimal or outdated. Does anyone know of decent alternatives or decent documentation?

I am familiar with python and a little C++.

Thanks!
Use ALSA to read samples from the sound card. At audio rates FFTW will be fine for the transforms (esp on a PI2).

PeterO
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson

Cole1717
Posts: 29
Joined: Mon Mar 16, 2015 10:44 pm

Re: Real-time FFT analysis

Thu Feb 18, 2016 8:39 pm

Thanks! It looks like I will need to become familiar with C.

Return to “Graphics, sound and multimedia”