Ruby Complex FFT CPU speed
Posted: Fri Jan 17, 2020 1:13 pm
Hi!
The last days i made some tests about doing FFTs and iFFTs in ruby.
I've tested those FFT codes in ruby:
https://github.com/CompScienceClub/ruby-fft
https://rosettacode.org/wiki/Fast_Fouri ... sform#Ruby
http://www.gregfjohnson.com/fftruby/
All seem pretty to be the same - the fist is a little faster because it creates a storage-map
Both are also reversible - so calculating an iFFT brings up most the original signal.
BUT:
If i run the for example for rate 44100 as a buffer of 512 signals (so i need to do 44100/512 FFTs) results in taking about 3-4 seconds for 1 second of a signal (mono).
So i found this here (Something that i've seen impossible in SynthMaker times):
viewtopic.php?f=4&t=1510&start=0
And this thing is pretty fast
So just a question to the ruby-freaks here if there is a better code for ruby?
The goal is to read a wav-file in ruby, do some fft operations and write it to another wav-file. This already worked but with speeds that are quite sad.
(As i multithreaded the script it is just for testing proposes loaded in FlowStone)
kind regards, chackl
The last days i made some tests about doing FFTs and iFFTs in ruby.
I've tested those FFT codes in ruby:
https://github.com/CompScienceClub/ruby-fft
https://rosettacode.org/wiki/Fast_Fouri ... sform#Ruby
http://www.gregfjohnson.com/fftruby/
All seem pretty to be the same - the fist is a little faster because it creates a storage-map
Both are also reversible - so calculating an iFFT brings up most the original signal.
BUT:
If i run the for example for rate 44100 as a buffer of 512 signals (so i need to do 44100/512 FFTs) results in taking about 3-4 seconds for 1 second of a signal (mono).
So i found this here (Something that i've seen impossible in SynthMaker times):
viewtopic.php?f=4&t=1510&start=0
And this thing is pretty fast
So just a question to the ruby-freaks here if there is a better code for ruby?
The goal is to read a wav-file in ruby, do some fft operations and write it to another wav-file. This already worked but with speeds that are quite sad.
(As i multithreaded the script it is just for testing proposes loaded in FlowStone)
kind regards, chackl