Constellatia is a simple audio visualizer built in Python, inspired by the stars and space in general.
Demo: https://youtu.be/4_a7V3886Vs
You'll need to install pygame, scipy, and pydub in order for the visualizer to run.
Simply run python main.py
in the constellatia directory to start the visualizer.
You can determine what audio is played/visualized by setting FILENAME
to the path to an audio file.
Currently, it runs immediately after processing, and will automatically stop after playing through the song.
This repo comes with some songs in the audio
folder:
- Deep Blue by The Midnight
- Missing by Orax
- Reckoner by Radiohead
- Something Memorable by Kn1ght
- They Might As Well Be Dead by Chris Christodoulou
as well as two test files, one of a sine wave and one of a square wave.
You can configure the visualizer before running by editing the config variables at the top of the file.
note: WINDOW_SIZE
refers to the number of samples that are processed at a time (in other words, how many dots make up the wavy stuff),
NOT the size of the visualizer - SCREEN_WIDTH
and SCREEN_HEIGHT
determine that.
Controls:
- p: pause/unpause the visualizer and music
- q: quit the visualizer
- r: start/stop recording
I HIGHLY discourage recording right now, since the current setup is super janky and I'm still working on it.
It will absolutely destroy your memory if you record for more than ~40 seconds.
However, if you do want to record, make sure the imgs
folder is empty; otherwise, frames from previous recordings might get mixed in.
You can start recording right away by setting RECORDING = True
, or press r to toggle recordings as you like.