Questions tagged [kissfft]

KissFFT is a lightweight FFT implementation in C. The emphasis was put on making the code small, and able to be implemented quickly. It isn't the fastest computationally, but the time lost crunching numbers is more than made up for by how easy it is to use.

70 questions
3
votes
2 answers

fftshift before calculating fourier transform: Matlab

I am looking at some FFT code in a matlab project and the FFT and inverse FFT is computed this way: % Here image is a 2D image. image_fft = fftshift(image,1); image_fft = fftshift(image_fft,2); image_fft = fft(image_fft,[],1); image_fft =…
Luca
  • 10,458
  • 24
  • 107
  • 234
3
votes
3 answers

KissFFT (kiss_fftr to kiss_fftri) - How to reconstruct the original signal?

I'm having some trouble understanding how to use KissFFT (1.2.9) correctly. All I am trying to achieve for now is to perform an FFT and then immediately perform an iFFT to reconstruct the original signal again. The code snippet below demonstrates…
protectedmember
  • 349
  • 5
  • 20
2
votes
1 answer

FFT - Applying window on PCM data

I'm currently trying to reproduce the getSpectrum function of the FMOD audio library. This function read the PCM data of the currently playing buffer, apply a window on this data and apply a FFT to get the spectrum. It returns an array of float…
Lowip
  • 441
  • 6
  • 15
2
votes
1 answer

Understanding a makefile recipe

I'm working on an android project that involves native code and I'm trying to use the Kiss FFT library with the NDK. However, I'm having difficulty understanding the portion listed below of a makefile used by Kiss FFT. Can someone explain this to…
2
votes
1 answer

Why is the kiss_fft's forward and inverse radix-4 calculation different, part 2?

Part 1 - why the code below checks st_inverse in the first place The kiss_fft code has this branch inside a loop: do { if(st->inverse) { Fout[m].r = scratch[5].r - scratch[4].i; Fout[m].i = scratch[5].i + scratch[4].r; …
MSalters
  • 173,980
  • 10
  • 155
  • 350
2
votes
1 answer

Error in running KissFFT on Beaglebone black

I am trying to use KissFFT on BeagleBone Black, running Debian 7.5 with 3.8 kernel. The program gets compiled yet when I try to run it, It shows error Real FFT optimization must be even . The same program run properly on Ubuntu laptop. I also…
rathin2j
  • 99
  • 1
  • 9
2
votes
0 answers

Wrong result when using kiss_fftnd on 3D matrix?

I'm trying to use Kiss FFT on some 3D matrices, but my results do not match those I get when using Matlab. I was wondering if anyone could help me determine if I'm using the library wrong. If doing fftn on the following 2x3x2 matrix in Matlab A2…
larsjr
  • 665
  • 7
  • 17
2
votes
1 answer

Why is the kiss_fft's forward and inverse radix-4 calculation different?

I've been spending time understanding and implementing my own mixed radix decimation-in-time fast fourier transform. I've mostly been using kiss_fft and http://www.briangough.com/fftalgorithms.pdf to understand what's happening. From what I've read,…
JodiTheTigger
  • 415
  • 5
  • 7
2
votes
1 answer

Real FFT output

I have implemented fft into at32ucb series ucontroller using kiss fft library and currently struggling with the output of the fft. My intention is to analyse sound coming from piezo speaker. Currently, the frequency of the sounder is 420Hz which I…
Jin
  • 119
  • 7
2
votes
1 answer

How do I get most accurate audio frequency data possible from real time FFT on android?

So I'm trying to build an android app which acts as a real time audio analyzer as a precursor to a project that will involve detecting and filtering out certain sounds. So I think I've got the basics of discrete Fourier transforms down, however I'm…
mthiffau
  • 123
  • 1
  • 10
2
votes
2 answers

Compiling and Linking KISSFFT

I have a newb problem with compiling and linking the kissfft library 'out of the box'. I've downloaded the kissfft library and extracted it to a test directory. Upon entering the directory and running 'make testall' I get the following errors,…
user1352331
  • 91
  • 1
  • 7
1
vote
1 answer

In kiss_fft, why does kf_bfly2 take an array as argument? The argument seems to be a scalar

Kiss_fft is a pretty simple FFT implementation; it's almost textbook. It breaks down larger DFT's into repeated smaller FFT's, by factoring the FFT size. It has optimized butterfly functions for radix 2,3,4 and 5. The 2,3 and 5 butterflies are small…
MSalters
  • 173,980
  • 10
  • 155
  • 350
1
vote
0 answers

Kiss FFT on TI MSP430FR6989

I am trying to run Kiss FFT (Kiss FFT github) on an MSP430FR6989 Launchpad. For now, I'm just trying to get the kiss_fftr test shown here to work. I am running into an issue with kiss_fftr_alloc(int nfft,int inverse_fft,void * mem, size_t * lenmem).…
1
vote
2 answers

kiss FFT bin amplitude

I have been spending quite a bit of time studying FFT's. I am in particular interesting in using KISSFFT because it is a very portable C implementation. I am still very unclear how to turn i[x] and r[x] into a frequency bin's amplitude. So created…
RW.
  • 637
  • 6
  • 14
1
vote
1 answer

Element-wise multiplication results between 2D arrays in KISSFFT are different than SciPy FFT

I'm experimenting with KISSFFT in C++ after being discouraged to use FFTPACK to process 2D arrays. I wrote an element-wise multiplication function to multiply two 2D arrays after they've been transformed with kiss_fftnd(). The result of the…
karlphillip
  • 92,053
  • 36
  • 243
  • 426