Lua FFT

Has anyone had a go at making this work in Renoise? http://www.mindfarming.de/luafft/

I’m trying to use it to make a script that find the harmonics in a sample but can’t get the results to match up with the built in spectrogram. However my understanding of the maths behind FFT is quite limited, I wondered if any scripters out there understand this kind of thing better than I do?

Cheers

From inside renoise scripting terminal?

I actually played with LuaFFT quite a bit.

Processing stuff in frequency domain requires some preliminary cooking: overlap-splitting and windowing. This is absolutely mandatory. You have to process the audio in small (and preferably windowed) chunks for more or less accurate results. Then you can start looking at the magnitudes. I think I still have the windowing code somewhere and if you’re interested, I can dig that up.

No, from within a tool, I want to create a function that will return the fundamental and harmonic frequencies of a sample. For example in this tool i could use it to do better pitch detection.

Yes, code examples would be awesome I tried using the example code that comes with Lua FFT but the output didn’t really make much sense to me. I want to be able to test it with a sine wave and see the fundamental frequency but the example code didn’t let me do this, any help is great.

Cheers

shared on github, hope this helps!


B)

Nice!!!
Thank you so much for this, looks like just what I need…

Did you get this to work, or know how to interpret its output?

I am trying it out but get the wrong peak frequency returned when trying it out on a normal sine. (peak frequency: 21.533203125).

No, never got around to really understand FFT and the all the complex number stuff. In the end I wrote my own pitch detection algo, turns out I didn’t need FFT for that anyway.