Visualization of live audio using gifs. This is based on Scott W Harden's "Realtime FFT Audio Visualization with Python".
Use ImageMagick:
convert -coalesce image.gif image.jpg
Create a directory in the frames
subdirectory and copy the image frames into it.
If you found a cool gif, please send me a message/pull request. Thanks!
- pygame
- scipy
- numpy
- pyaudio
apt-get install python-pygame python-scipy python-numpy python-pyaudio
On windows, use splitGif.bat script to split all gif contains in the gifToSplit directory. Just copy new folders create in gifToSplit in "frames" folder.
Just add "dance" in the name of a gif to have a smooth result on this gif when python script play it.
Play some audio and run visualizer.py. Press F11 to toggle full-screen mode. Use Escape to exit.
Visualization moves but no audio playing?
I had to use pavucontrol (PulseAudio Volume Control apt-get install pavucontrol
) to select "Analog Stereo Output" instead of "Analog Stereo Duplex" (Configuration tab). If you want to use an external input device (like a microphone) use "Analog Stereo Input".
I uploaded some demos to YouTube.
Read the corresponding blog post for further details.