Skip to content

Latest commit

 

History

History
48 lines (35 loc) · 1.63 KB

File metadata and controls

48 lines (35 loc) · 1.63 KB

gif-music-visualizer

Visualization of live audio using gifs. This is based on Scott W Harden's "Realtime FFT Audio Visualization with Python".

Prepare gif

You can use dough, watermelon or add a new gif like this:

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!

Dependencies

  • pygame
  • scipy
  • numpy
  • pyaudio

Debian:

apt-get install python-pygame python-scipy python-numpy python-pyaudio

Automatic gif spliter

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.

Usage

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".

Demo

I uploaded some demos to YouTube.

Links

Read the corresponding blog post for further details.