redilysis/README.md

71 lines
1.4 KiB
Markdown
Raw Normal View History

2019-06-20 20:28:00 +00:00
# Redilysis = Redis + Audio Analysis
2019-06-20 20:20:46 +00:00
2020-09-27 19:02:19 +00:00
Redilysis sends audio analysis to a redis server.
The idea is to share a single audio analysis to many Visual Jockey filters, in our case for lasers.
Two modes exist for now, you need to run two processes to get the complete experience!
### Spectrum Mode
This is the default mode.
It performs some frequency analysis (Fast Fourier Transform) to detect "energy" in the human audition bandwidths.
It will record if there is sound and at which frequencies.
It can run at sub-second frequency (100ms) with no problem.
It reports realistic data: spectrum analysis is the easy part.
### BPM Mode
This mode is more experimental.
It attempts to detect beats based on the
## Keys and contents in Redis
bpm_time : (milliseconds integer timestamp) last update time
onset
bpm
beats
spectrum_time
2019-06-20 20:20:46 +00:00
2019-06-20 20:28:00 +00:00
## Installation
2019-06-20 20:20:46 +00:00
```python
2020-09-27 19:02:19 +00:00
sudo apt install python-pyaudio python3
2019-06-20 20:20:46 +00:00
git clone https://git.interhacker.space/tmplab/redilysis.git
cd redilysis
pip install -r requirements.txt
python3 redilysis.py --help
```
2019-06-20 20:28:00 +00:00
## Guide
2019-06-20 20:20:46 +00:00
There are two available modes.
**One is the slow mode with BPM recognition:**
python3 redilysis.py -m bpm -s 1 -f 44100
Pushes following keys in redis:
* onset
* bpm
* beats
**The other is a fast mode with spectrogram analysis**
python3 redilysis.py -m spectrum -s 0.1 -f 4410
Pushes following keys in redis:
* rms
* spectrum
* tuning