Audio equalizer

Moderator: flatmax

Audio equalizer

Postby Marc_Eberhard » Thu Apr 13, 2017 1:13 am

Hi,

I'm thinking about buying an AudioInjector hat to build an equalizer on a RaspberryPi. Has something like this been done before? The idea is to stream the input into an FFT, multiply with the filter settings and then transform back with an IFFT and output back through the hat. So, the RPi would be an audio device plugged in between the audio source and the amplifier. I'm not planning to use the RPi for any other task to have all computing power available for just that task. Does this sound feasible? Is there example C code available for reading data in from the ADC and writing data out to the DAC? I'm familiar with FFTW, so as long as I can get some simple C code to pipe the input to the output I can do the rest myself. All suggestions and comments greatly appreciated!

All the best,
Marc
Marc_Eberhard
 
Posts: 3
Joined: Thu Apr 13, 2017 1:00 am

Re: Audio equalizer

Postby flatmax » Thu Apr 13, 2017 9:38 am

Sounds like a good plan !

You could use the JackClient with gtkiostream and jackd to do this, check out this example :
http://www.flatmax.org/gtkiostream/html ... ample.html

You can use FFTW with that approach.

Matt
flatmax
 
Posts: 205
Joined: Sat Jul 23, 2016 11:39 pm

Re: Audio equalizer

Postby Marc_Eberhard » Thu Apr 20, 2017 3:19 am

Hi Matt,

received my audio hat and the output is working fine. The input loops through fine when I use the Output Mixer Line Bypass. Is there an easy way to "digitally" pipe the input through to the output? Like arecord -parameter | aplay -parameters for testing?

Also, had a look at gtkiostream. Looks fine, but I'm worried that the RPi will be too loaded. I'd probably prefer something that doesn't pull in the full GTK suite. JACK and a virtual ALSA device would be ideal I guess. Any idea or links?

Thanks,
Marc
Marc_Eberhard
 
Posts: 3
Joined: Thu Apr 13, 2017 1:00 am

Re: Audio equalizer

Postby Marc_Eberhard » Thu Apr 20, 2017 3:36 am

Hi Matt,

to answer my first question:

arecord -c 2 -f S32_LE -r 96000 | aplay -c 2 -f S32_LE -r 96000

works fine. Are these the correct parameters, especially S32_LE?

All the best,
Marc
Marc_Eberhard
 
Posts: 3
Joined: Thu Apr 13, 2017 1:00 am

Re: Audio equalizer

Postby flatmax » Thu Apr 20, 2017 9:40 am

Yes - those parameters look good.

Regarding gtkIOStream, they only link against Jackd - so the GTK libs aren't used - actually it is very lightweight, everything happening in libjack, because you only need the header files from gtkiostream for code which links against jackd.

Matt
flatmax
 
Posts: 205
Joined: Sat Jul 23, 2016 11:39 pm


Return to Stereo soundcard for the Raspberry Pi

Who is online

Users browsing this forum: No registered users and 1 guest

cron