dimdog / visualization

a music visualizer

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

NEXT STEPS:

continue to turn this into a multithreaded affair

3 processes

~1) Audioprocessor connects the wires, runs the audio, doesn't fucking crash. Puts a signal to a redis queue on beat with information~
2)~ body manager loops and bodies listen and whatever,~ they output a list of ray and color coords to redis on a regular basis
3) game checks redis every loop, assembles vertex list and draws

To run now:
in one terminal: `redis-server` to start the redis server
in another terminal: `python audioprocessor.py` - and set your sound to output through Soundflower (2 ch)
in another terminal `python body.py 1280 720` - sets the bounds of the body simulation and starts it listening to the output from the audio processor
in a final terminal `python pyg.py 1280 720` - sets the bounds of the window to match the body simulation


Outline:
    Inspiration
    Initial efforts - let's find a graphics tool!
        Pygame - known and popular
        Fabric - interesting, but audio...omg...
        Pyglet - low level enough, some quirks, but we can do audio
    Audio, by the way
        Fuck
        LibROSA
        Aubio to the rescue
    Hitting limits:
        Refactoring (04/27/19)
        Multithreading - Multiprocessing, ZMQ?
        Redis MOFO
        
    

http://sites.music.columbia.edu/cmc/MusicAndComputers/chapter1/01_02.php
things to try to detect:

How loud is it?
What is its pitch?
What is its spectrum?
What frequencies are present?
How loud are the frequencies?
How does the sound change over time?
Where is the sound coming from?
What’s a good guess as to the characteristics of the physical object that made the sound?

The frequency range of sound (or, more accurately, of human hearing) is usually given as 0 Hz to 20 kHz, but our ears don’t fuse very low frequency oscillations (0 Hz to 20 Hz, called the infrasonic range) into a pitch. Low frequencies just sound like beats. These numbers are just averages: some people hear pitches as low as 15 Hz; others can hear frequencies significantly higher than 20 kHz. A lot depends on the amplitude, the timbre, and other factors. The older you get (and the more rock n’ roll you listened to!), the more your ears become insensitive to high frequencies (a natural biological phenomenon called presbycusis).
(source - http://sites.music.columbia.edu/cmc/MusicAndComputers/chapter1/01_03.php)

About

a music visualizer


Languages

Language:Python 75.7%Language:JavaScript 20.9%Language:HTML 2.2%Language:CSS 1.2%Language:Go 0.0%