https://github.com/defuse/fft-anything
Tool for generating fourier transform animations
https://github.com/defuse/fft-anything
Last synced: 12 months ago
JSON representation
Tool for generating fourier transform animations
- Host: GitHub
- URL: https://github.com/defuse/fft-anything
- Owner: defuse
- Created: 2020-05-17T01:47:29.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-05-18T06:57:04.000Z (about 6 years ago)
- Last Synced: 2025-03-18T02:36:04.037Z (over 1 year ago)
- Language: Rust
- Homepage:
- Size: 999 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# fft-anything
This Rust code for making fourier transform visualizations from arbitrary WAV files (as long as they're 44100Hz stereo).
**Dependencies:** You will need SDL2 libraries, including SDL2_ttf installed on your system.
There is no documentation! To use it, try:
```
cargo run --release -- -w -r -n 20000 -z 1.0 -s 0.0002 skrillex-1s.wav
```
This will show you how 1s of a Skrillex track can be approximated by 20,000 complex exponentials.
You could also try:
```
cargo run --release -- -r -w -n 1000 -p frames/ -s 0.02 4s.wav
... wait for it to finish (it's writing .png files into ./frames/) ...
./compile-video.sh # (requires ffmpeg)
```
This will generate an animation of how some ~20Hz sine pulses are approximated by complex exponentials. It saves a .png file for each frame into the `frames/` directory, and then `./compile-video.sh` uses ffmpeg to stitch them together into a video.
