Go Down

Topic: IFFT - Is anybody use the library to do an IFFT ? (Read 1 time) previous topic - next topic

matamicen

Hello everybody,

I've seen somo code about FFT using the FFT library, but I dodn't see any code using IFFT.

I want to do the following:

- Once I have the FFT array with my Bins, I want to do an IFFT of some Bins, for example I want to generate my analog signal of my bin 19,20 and 21 that could be the 1400-1500 hz (this is an example).

So does anyone could did this before? Does anyone has the code of how to use the library with IFFT ?

Thanks.

Matt.

Magician

I did  some testing with both direction FFT.
http://coolarduino.wordpress.com/2012/04/09/voice-pitch-shifting-scrambler/
Code build on Radix-4 FFT,  though Napoleon's plan was make real-time speech compression, but don't have time to continue.
Other things, it's not a library, to do so and than update it regularly to keep up with new software releases (1.00, 1.01, 1.02, 2.0a ...) till the end of my life  drive my cortex from normal 65 ppm (pulse per minute) to 360 -);
Other things, library usually put a constrain on data format, size arrays etc via API specification.
What is your application, could you tell more on requirements: data format (8/16/32 bits), frame rate, pass-band?

matamicen

Magician, thanks for your soon answer.

I am far away to be an expert in electronic , so be pacient with me and my novice questions :)... I have been reading the code that you wrote for Radix-4 of the PitchShifting project and of course I watched your video on youtube and let me tell you that did a Great Job! that video is awsome with a 8bit Micro, congratulations and thanks for share the code with us.

I will explain what do i want to do and you can tell me if it possible:

I have an audio of 4 khz, this audio signal has different tones (one tone of 1000 hz, another of 1300 hz and another of 1600 hz ) just tones, there is no human voice.
The think I want to do is to filter the tones, I mean I want just the tone of 1000 hz as output to a speaker as you did in the PitchShifting (but I dont want to shift the signal, i want to have the same signal of 1000 hz as output), so do you think that I could do that if I execute de FFT funcions and then I  delete or put in 0 the bin of 1300 hz and the bin of 1600 hz and then execute the iFFT ?

Do you think it will work, I will have just the 1000 hz signal as output?

Thanks!!!

Matias.

 

Magician

Quote
that video is awsome with a 8bit Micro, congratulations and thanks for share the code with us.
:smiley-red: You are welcome.
Quote
so do you think that I could do that if I execute de FFT funcions and then I  delete or put in 0 the bin of 1300 hz and the bin of 1600 hz and then execute the iFFT ?

Do you think it will work, I will have just the 1000 hz signal as output?

Technically, yes. You could just "0" - zeroing whatever bins you don't need at the output, ( in both part real, and imaginary), than run reverse and get your "cleaning" process done. (If not zeroing, just multiply with coefficients, it's possible to get nice equilizer).
So short answer yes.
But, as always, there are some "but's and if's". In first, for voice running iFFT is computationally efficient way to restore waveform, as all bins has to be processed back to output.  For your application it's not true, simple wave table synthesis (with LUT sinewave) would be much more efficient for single-tone generation.
Second, manipulation with data "in-between"  (shifting, zeroing, or multiplying as I mention for equalizer) would create distortion at the output, if you try to do it in straight forward approach, w/o overlap-add technics . Frame's boundary discontinuity would be unacceptable "hearable" as modulation by 62.5 Hz.
Long answer: no, better way via wavetable synthesis.

matamicen

Magician,

thank you very much for yout support :)

I think next week I'll try your code with my project ... I will give you the feedback :)

Thanks, it was very helpfull your support.

Matias.

Go Up