Giving audio-input to a C program
-
Hi, I want to give audio-input to a FFT code (KissFFT) written in C, on a real-time basis. While I can give a simple test signal (like sine wave) by writing the sine function as input, I am not sure how I should convert an audio-signal (e.g.: song) into a form that can be taken as input by the KissFFT C code. Thank you.
-
Hi, I want to give audio-input to a FFT code (KissFFT) written in C, on a real-time basis. While I can give a simple test signal (like sine wave) by writing the sine function as input, I am not sure how I should convert an audio-signal (e.g.: song) into a form that can be taken as input by the KissFFT C code. Thank you.
As you say 'real time' then I guess you'll need some electronics to convert audio to a form suitable for input into your FFT system. I once built the circuitry to utilize an Analog To Digital (A/D) chip to take an external electrical signal, buffer and interface it to a PCs data-bus and then had to write a simple device driver to enable my C++ program to acquire the sampled data and plot it in real time. With a microphone on the front that's the very basics I suppose. I guess if you really mean real time you'll need the equivalent of a sound card or A/D card, i.e. some Audio interface device that you can use to convert the real time audio to your required format so that you can grab it.
-
Hi, I want to give audio-input to a FFT code (KissFFT) written in C, on a real-time basis. While I can give a simple test signal (like sine wave) by writing the sine function as input, I am not sure how I should convert an audio-signal (e.g.: song) into a form that can be taken as input by the KissFFT C code. Thank you.