Pure Nim FFT library

2023-10-12 Thread arnetheduck
> publish eh I guess I'll get to it eventually but feel free to PR it yourself in the meantime ;)

Pure Nim FFT library

2023-10-11 Thread didlybom
Arne, would it be possible for you to publish this library in the nimble directory? Currently you cannot just do `nimble install fftr`.

Pure Nim FFT library

2023-10-10 Thread arnetheduck
> signal = (0..length) btw, you have an off-by-one in normalisation due to the unfortunate design in nim that intervals are closed.. the length of this signal is 457 elements.

Pure Nim FFT library

2023-10-10 Thread arnetheduck
> When going back from the frequency domain to signal, I have to divide the > real part of the result by the length of the signal. Is it the convention > that I do that, or should the library? Looks like every library does its own thing here - ie scale, not scale, offer options to scale - for n

Pure Nim FFT library

2023-09-22 Thread tcheran
I'm not sure, but I would expect that division by N should included in the outcome, without your intervention. I would look at the "competitor" implementation. Y = fft(X) X = iftt(Y)

Pure Nim FFT library

2023-09-21 Thread ingo
Just playing with fftr I noticed two things, When going back from the frequency domain to signal, I have to divide the real part of the result by the length of the signal. Is it the convention that I do that, or should the library? It seems that depending on the length of the signal, the `ifft`

Pure Nim FFT library

2023-09-21 Thread ingo
> # false for forward FFT, true for inverse (TODO flip it? separate names?) i.m.h.o separate names: fft, ifft

Pure Nim FFT library

2023-09-21 Thread arnetheduck
Now 2x faster ;) > small issue in your example. fixed, thanks > friendly license "Add MIT license" button clicked to appease those that find this .. important.

Pure Nim FFT library

2023-08-31 Thread oyster
nice It could be more nice if a friendly license is supplied

Pure Nim FFT library

2023-08-31 Thread didlybom
> Yes, though it would be fun to add GPU as well and have it auto-select That would be pretty cool, let us know if you do it! :-) BTW, there is a small issue in your example. It is missing an import of std/sequtils (to be able to use mapIt). Also, do you plan to add this library to the nimble p

Pure Nim FFT library

2023-08-31 Thread arnetheduck
> Do you have any performance measurements? They're in the readme along with similar benches for `fftw` > CPU only Yes, though it would be fun to add GPU as well and have it auto-select

Pure Nim FFT library

2023-08-31 Thread didlybom
This is awesome! Do you have any performance measurements? I assume it is CPU only?

Pure Nim FFT library

2023-08-31 Thread arnetheduck
I recently had reason to revisit the FFT math and realized that I've never written an FFT library really, so here goes: let signal = (0..1023).mapIt( complex64(sin(TAU * 0.1 * float64(it # abs gets us back into real space # false for forward FFT,