or Connect
AVS › AVS Forum › Audio › Audio theory, Setup and Chat › Specific Audio Filtering
New Posts  All Forums:Forum Nav:

Specific Audio Filtering

post #1 of 9
Thread Starter 
Hi,

I have some doubts about how to implement a solution for the app that I explain below:
  • I want to filter specific audio sounds (truck, trumpet...) with an arduino and a microphone (amplifier + microphone).
  • The main idea is taking samples for a short time (a few seconds), analyze the sound in frequency, and know if it is from an audio source or another.
  • I have characterized my target sounds in three frequencial components (Hz), with their amplitude (dB). And I only want to compare the sound measured with these components but I can't split them from audio samples I have taken.

I read about doing it with 'ffft' library, but for the moment I don't know how to implement it. Could someone tell me how to do it?

Is there another solution for this app?

Regards.
post #2 of 9
Quote:
Originally Posted by Yolco View Post

Hi,

I have some doubts about how to implement a solution for the app that I explain below:
  • I want to filter specific audio sounds (truck, trumpet...) with an arduino and a microphone (amplifier + microphone).
  • The main idea is taking samples for a short time (a few seconds), analyze the sound in frequency, and know if it is from an audio source or another.
  • I have characterized my target sounds in three frequencial components (Hz), with their amplitude (dB). And I only want to compare the sound measured with these components but I can't split them from audio samples I have taken.

I read about doing it with 'ffft' library, but for the moment I don't know how to implement it. Could someone tell me how to do it?

.

The Arduino appears to be a DSP on a board with basic support circuitry. In order to exploit it, it appears that you need to be familiar with basic electronics, signals and systems analysis, DSP capabilities and programming.

If you understand basic electronics and signals and systems analysis then terms like FFT would not be a mystery to you.

http://wiki.openmusiclabs.com/wiki/ArduinoFFT



If you have less familiarity with these topics you have a big learning curve ahead of you. If you are already expert in these areas then all you have to learn is the Arduino itself.
post #3 of 9
^^ It's an embedded micro controller not particularly suited to DSP work, though it could be made to do it, albeit slowly.

Yolco: A Raspberry Pi might be a better solution as it runs Linux natively, is a lot faster and I'm sure there are a lot more libraries and or support for DSP.

I use a number of networked Mega2560 in my home and am just starting to play with the R Pi as a GUI interface.
post #4 of 9
Thread Starter 
Hi,

thanks everyone!

@arnyk: I have some knowledge about DSP, also I have tried FFT library for arduino, now my doubt is how can I read, save and compare the sound measured with a 'pre-defined' one?

@A9X-308: I know there are several best options for doing this task, but I want to try doing it with Arduino. I'm not looking for doing a perfect system, only one which allow me to compare sounds and give a positive detection if sound is similar.

I know there are a lot of parameters to take in mind, but for this application I want to abstract the most I can from them.

Regards.
post #5 of 9
Quote:
Originally Posted by Yolco View Post

Hi,

thanks everyone!

@arnyk: I have some knowledge about DSP, also I have tried FFT library for arduino, now my doubt is how can I read, save and compare the sound measured with a 'pre-defined' one?

@A9X-308: I know there are several best options for doing this task, but I want to try doing it with Arduino. I'm not looking for doing a perfect system, only one which allow me to compare sounds and give a positive detection if sound is similar.

I know there are a lot of parameters to take in mind, but for this application I want to abstract the most I can from them.

If you wish to create a signal that focuses on a certain instrument, bandpass filtering can work. If there are multiple instruments with fundamentals and the first 2-3 harmonics in the same range, then separating them will be very difficult.
post #6 of 9
I recently saw a demo in a college engineering lab doing essentially this, using National Instruments SW. It was for an Engineer's Day event and was something the freshmen could do.

I agree with Arny that if you don't understand FFTs and basic filtering you have some research to do. Just sampling and generating FFTs (Fast Fourier Transforms) will provide the spectral content of the signals, then you can process the FFT data to look at specific frequency bands. An FFT allows you to move from time-domain samples to frequency-domain analysis.

IME/IMO sound discrimination usually requires a combination of time- and frequency-domain processing.
post #7 of 9
It would help to know what you want to happen once the comparison has been made.

1) Illuminate an indicator
2) Extract the audio of interest
3) other
post #8 of 9
Thread Starter 
Hi,

thanks all!!

I'm going to try for better explanation of my task.

I want to be available of taking samples for a while (1 second or less), do the FFT of these samples, and compare them with a pattern previouslyu stored in memory (EEPROM or FLASH). If a true check is given back, I have to switch on a led. It's a way of doing a sound security system (password).

I've been reading more about DSP and FFT, but know I have to implement it on code, and although I know how to do it, it's being hard to me doing it.

Regards.
post #9 of 9
Most systems that I have seen (very few) or read about use proprietary algorithms and capture several training records to provide some measure of both confidence and rejection criteria. This sounds like a fairly hard project. Deciding on a valid response when the subject may vary the password from day to day or when under stress, and a bad response when someone tries to trick the system, may be challenging. But, voiceprints are not something I really know anything about.

Most C cookbooks as well as texts like Oppenheim et. al. have descriptions and algorithms with code/pseudocode to implement FFTs. For that matter, most signal processing chips have it built-in as a function call, either in the HW or the compiler.
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Audio theory, Setup and Chat
AVS › AVS Forum › Audio › Audio theory, Setup and Chat › Specific Audio Filtering