## Forums Search for: FFTW

## fftw_complex cast problem

inHi everybody I'm trying to adopt the new interface in FFTW3 (it's 3.1 now) to my routine written in C++ (I am using VC++ 7.0) I have used...

Hi everybody I'm trying to adopt the new interface in FFTW3 (it's 3.1 now) to my routine written in C++ (I am using VC++ 7.0) I have used earlier versions of FFTW in C programs, and everything was fine. The problem with the new interface is fftw_complex appears to be totally incompatible with complex template class, infact it seems incompatible with anything and I am unable to cast a

## MDCT with KBD window

is any source code (especially in C/C++) to MDCT encode and IMDCT decode ? How pre-process and post-process windowed data to compute with DFT...

is any source code (especially in C/C++) to MDCT encode and IMDCT decode ? How pre-process and post-process windowed data to compute with DFT (for example one from www.fftw.org) ? Opus source has clt_mdct_forward,clt_mdct_backward but other window than KBD.

## FFT and IFFT in C/C++

inHello All! I want to built fast routine of FFT in C/C++, eg. void fft(double *xr, double *xi, double *yr, double *yi, int n ) n =...

Hello All! I want to built fast routine of FFT in C/C++, eg. void fft(double *xr, double *xi, double *yr, double *yi, int n ) n = 2^m; however I don't have a lot of experience in this. Should I use FFTW (Fastest Fourier Transform in the West)? Can it be really the fastest in double precision floating point? And Why? Any comments are apprecialted. Thanks, Andrzej

## Magnitudes drop when adding more

inHi, I've just "restarted" my interest in DSP and mainly FFT. I'm using FFTW which I think is absolutely amazingly good! :) I was playing...

Hi, I've just "restarted" my interest in DSP and mainly FFT. I'm using FFTW which I think is absolutely amazingly good! :) I was playing around with FFT a few years back and I think I remember stumbled on this problem back then too. The sad part is - I don't remember if I solved it or not back then. (what good memory, eh? hehe) Anyway, I'm troubled with something I quite can't figure ...

## how to scale magnitude

inI want to normalize a spectrum of a digital audio signal. I made FFT of the signal and converted the img/real values in polar coordinates...

I want to normalize a spectrum of a digital audio signal. I made FFT of the signal and converted the img/real values in polar coordinates (magnitude, phase) (Im using FFTW implementation). Now I want to scale the magnitude ... Is there an equation to find out the highest possible value of the magnitude? I have read that it depends on the length of the FFT?! Regards Philipp --

## Using FFTW to do analysis of a WAV file

inThanks for the advice on the other fronts, i.e. Matlab for gaining a better understanding of FFT and DSP. > To answer your question directly,...

Thanks for the advice on the other fronts, i.e. Matlab for gaining a better understanding of FFT and DSP. > To answer your question directly, if you're looking to add "filter > effects" to a WAV file, then I will assume you mean running the audio > signal through a linear filter. To do this, you can read in the file > (Google for the WAV format header) and get the raw samples into an > array.

## Cepstrum Help

inHi Guys, I'm trying to calculate the cepstrum of a signal to see if I can find some similarities between it and another signal. I am doing...

Hi Guys, I'm trying to calculate the cepstrum of a signal to see if I can find some similarities between it and another signal. I am doing the following, but I'm not sure the data coming out looks quite right. I have an 8000hz signal and 512 sample window. I am passing this to FFTW and then on each result, doing... float sample = (float)Math.Sqrt(Math.Pow(complex...

## Single Bit Fast Fourier

inHello everyone! I have a simple question: I have a large number of large images, but with a "color" depth of just 1 bit: my signal can just be...

Hello everyone! I have a simple question: I have a large number of large images, but with a "color" depth of just 1 bit: my signal can just be "on" or "off". I'm using fftw, that uses double precision floating point numbers! Isn't it a waste of cpu time and memory? What I need is an FFT subroutine optimised for one bit numbers. Of course the result must be float or double. I've always...

## FFT vs DCT

inHi All, I'm trying to understand the differences between FFT and DCT and was hoping someone may be able to help me with a couple of...

Hi All, I'm trying to understand the differences between FFT and DCT and was hoping someone may be able to help me with a couple of questions. 1. Is DCT basically the same as an FFT that operates on real numbers? 2. I keep reading about 'real-odd' and 'real-even'. What does this mean? 3. The fftw documentation also talks about being 'shifted by half a sample'. If by sample it's ta...

## FFTW3 fftw_plan_dft_r2c_1d and its inverse question

inHello, I am running FreeBSD. I installed FFTW3 from the ports. I am not a native english speaker so I apolozige for the mistakes. The goal...

Hello, I am running FreeBSD. I installed FFTW3 from the ports. I am not a native english speaker so I apolozige for the mistakes. The goal of my program is to perform the FFT in order to extract all the required informations from the audio signal (frequencies, amplitudes, phases) , same them in a file , and then rebuild the original audio signal from the file. A) I try the FFTW c2r to go...

## looking for straightforward pruned IDFT algorithm reference

inHi, I need to IDFT a large column array where only something like 0.00001% of the FFT coefficients are non-zero. I've tried using the...

Hi, I need to IDFT a large column array where only something like 0.00001% of the FFT coefficients are non-zero. I've tried using the definition IDFT but find that Matlab (or, FFTW) IFFT function is still faster. As both of these methods are still too slow, I wonder if anyone could recommend a pruned IDFT algorithm to speed things up while maintaining accuracy. My largest array size would b...

## interpretting FFT results

inI've been programming a long time and I recently decided to write software to detect pitch in an audio stream in real time. I have tried a few...

I've been programming a long time and I recently decided to write software to detect pitch in an audio stream in real time. I have tried a few FFT implementations (including FFTW), however, I don't really understand how to interpret the results. I have a WAV file that plays a continuous tone, middle C (~260hz). I grab a number of samples (eg 256) and apply a hamming window, then put it through ...

## Derivative of 2d function with fftw

inI wont to calulate the derivative of the function f(x,y)=sin(x)*cos(y) in [0,6.28]x[0,6.28] (or any other function). I make the fft of f I...

I wont to calulate the derivative of the function f(x,y)=sin(x)*cos(y) in [0,6.28]x[0,6.28] (or any other function). I make the fft of f I make the product of the coefficient for the frequency,and calculate the inverse fft but there are strange oscillation in the derivative in the contour of the domain. I think i don't understand the allocation of the fourier coefficient(real and imaginay) ...

## Highest possible speed algo in Vb or C or Pseudocode

inI am trying to implement a fast 256 to 2048 (in 2's)algorithm in ASM (DLL)not to compete with FFTW for versatility but SPEED in...

I am trying to implement a fast 256 to 2048 (in 2's)algorithm in ASM (DLL)not to compete with FFTW for versatility but SPEED in specialised medias . I am at the moment (using the best I could find) getting 36 usecs(1024 pts) on a 1800Mhz clocked AMD 32 bits and 78 uSec for 2048 points I have "lifted some stuff (articles Pdfs)but the articles sources are incomplete or unavailable and the pdfs ar...

## 2D FFTW3 vs. MATLAB difference only near center place

inDear friends, Here I have a problem to re-produce same results with MATLAB and FFTW during 2 dimensional FFT. I'm trying to do FFT with...

Dear friends, Here I have a problem to re-produce same results with MATLAB and FFTW during 2 dimensional FFT. I'm trying to do FFT with Gaussian convolution which coordinates varies from negative to positive, FFTW3 seems not to calculate the values correctly. It happens only near center place. And it affects IFFT and it's shifted results seriously in my calculation. ---------------------...

## some old, easy to read, FFT code of mine

inHello, I've put online some easy to read FFT C code here: Maybe usefull for self contained project not striving the level of performance...

Hello, I've put online some easy to read FFT C code here: Maybe usefull for self contained project not striving the level of performance you can get with FFTW or Intel libs. http://www.philou.ch/libdsp.html It has an awfull hungarian-like notation used all other the place, aaahem when you're a beginner in C... ugly, but otherwise very easy to read code. Regards.

## About some problem in 2D FFTW

inI use r2c function to transfer a Guassian distribution. But the image part of the result are all zero. Is this correct? array[nx][ny]=> ...

I use r2c function to transfer a Guassian distribution. But the image part of the result are all zero. Is this correct? array[nx][ny]=> nx=ny=even; the result is http://vda.ee.nctu.edu.tw/~zues/1.bmp but the result should be (I run in matlab) http://vda.ee.nctu.edu.tw/~zues/1.bmp Appreciate your help!!!

## Low frequency component from FFT?

inAs a DFT/FFT newbie I have a (probably naive) question: I was asked to use an FFT to find the low frequency term in data collected from...

As a DFT/FFT newbie I have a (probably naive) question: I was asked to use an FFT to find the low frequency term in data collected from an accelerometer. I used the routines in FFTW appropriate for 1D real- valued data. Looking at "out" - the array of complex-valued coefficients for F - assuming the zero-th indexed value corresponds to the lowest frequency, which is guaranteed to have a zero...

## FFTW Power Spectrum

inDear all, for quite a while I struggle with the following problem : Having a 3-D Array of equally data in X,Y & Z , I want to calculate...

Dear all, for quite a while I struggle with the following problem : Having a 3-D Array of equally data in X,Y & Z , I want to calculate the power spectra. ============= #include "fftw3.h" #include #include #include #include using namespace blitz; main(int argc,char **argv) { // Blitz++ is an c++ class for faciliating array ha

## Strange results from zero padded FFT

inHi. I use FFTW for FFT analysis. Padded my data with zeros. Before padding my data, my fft looked like what is expected with some frequencies...

Hi. I use FFTW for FFT analysis. Padded my data with zeros. Before padding my data, my fft looked like what is expected with some frequencies showing stronger power than others. After I padded my data, the resulting plot showed a decreasing exponential trend interleaved with the actual expected data. I spent hours but couldnt figure out a reason except to conclude that there is something I'm m...