Skip to content

Instantly share code, notes, and snippets.

@corbanbrook
Created November 19, 2009 16:41
Show Gist options
  • Save corbanbrook/238879 to your computer and use it in GitHub Desktop.
Save corbanbrook/238879 to your computer and use it in GitHub Desktop.
zetagun:~ corban$ ruby FFT.rb 128 square 1720Hz
user system total real
FFT: 0.020000 0.000000 0.020000 ( 0.022661)
64
[FFT] 1720Hz squarewave / 44100.0Hz samplerate / 128 sample timesize
. - 41.9
.
. - 33.5
.
.. - 25.1
...
... - 16.8
. ... .
. ... . . - 8.4
. . . ... . ... . . .
----------------------------------------------------------------- 0.0
^ * ^ ^ ^ ^ ^ ^
0kHz 34kHz 69kHz 103kHz 138kHz 172kHz 207kHz
zetagun:~ corban$ ruby DFT.rb 128 square 1720Hz
user system total real
DFT: 0.020000 0.000000 0.020000 ( 0.018601)
[DFT] 1720Hz squarewave / 44100.0Hz samplerate / 128 sample timesize
. - 0.6
.
. - 0.5
.
. - 0.4
.
. - 0.3
. .
. . . . . . - 0.1
. . . . . .
----------------------------------------------------------------- 0.0
^ * ^ ^ ^ ^ ^ ^
0kHz 34kHz 69kHz 103kHz 138kHz 172kHz 207kHz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment