GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - HariComputes/ledvis: Led music visualizer experiment

BranchesTags
Open more actions menu
 
 

Latest commit

 

History

110 Commits
110 Commits

Folders and files

NameName
Last commit message
Last commit date
Services
Services
 
 
data
data
 
 
old
old
 
 
testing
testing
 
 
web
web
 
 
.gitattributes
.gitattributes
 
 
.gitignore
.gitignore
 
 
README.md
README.md
 
 
__init__.py
__init__.py
 
 
auddev.py
auddev.py
 
 
config.py
config.py
 
 
config.pyc
config.pyc
 
 
generate_page.py
generate_page.py
 
 
masker.py
masker.py
 
 
masker.pyc
masker.pyc
 
 
pi.screenrc
pi.screenrc
 
 
pyaudio_test.py
pyaudio_test.py
 
 
run.py
run.py
 
 
smoother_plotter.py
smoother_plotter.py
 
 
sound_processing.py
sound_processing.py
 
 
sound_processing.pyc
sound_processing.pyc
 
 
strips.py
strips.py
 
 
strips.pyc
strips.pyc
 
 
test.wav
test.wav
 
 
usb_test.py
usb_test.py
 
 
util.py
util.py
 
 
util.pyc
util.pyc
 
 
visualizer.py
visualizer.py
 
 
visualizer.pyc
visualizer.pyc
 
 

Repository files navigation

ledvis install

(Excuse me for the unordered readme. it's a mix of previous owner and me)

Install all requirements & dependencies @ https://github.com/TheDeadGuy/ledvis#requirements first

cd ~
git clone https://github.com/TheDeadGuy/ledvis.git
cd ledvis
cd ~/ledvis/Services
sed -i -e "s/<username>/"$USER"/g" ledvis.service flask.service
sudo cp * /etc/systemd/system/

To run use following command:

sudo systemctl start ledvis.service

sudo is needed because this we are starting a system service

Requirements

This is meant to run on a Raspberry Pi. (original author used pi 3. I'm using pi 4)

  • rpi_ws281x
  • adafruit-ads1x15
  • screen
  • Flask

Run this to install the rpi_ws281x (LED) driver library (Be aware that this goes against best practices. If you want this done correctly. the package needs to be done under venv)

sudo pip3 install rpi_ws281x --break-system-packages

And run this to install the other dependencies - (Be aware that this goes against best practices. If you want this done correctly. the package needs to be done under venv)

pip install adafruit-ads1x15 --user --break-system-packages	# install the ADS1015 i2c library
sudo apt install screen python3-matplotlib python3-pyaudio python3-requests python3-flask		# get screen

We also need to disable audio taking ownership of PWM. to do this run this command

echo "blacklist snd_bcm2835" | sudo tee /etc/modprobe.d/alsa-blacklist.conf

Repo Organization

  • run.py contains execture three processes: one to sample the ADC, one to process the data, and one to write to the LEDs
  • visualizer.py contains classes the define how to process a sample array into color values to be displayed
  • sound_processing.py contains functions for normalizing and smoothing the incoming audio signal
  • masker.py contains functions for create a color mask given an amplitude (used in VooMeter in visualizer.py)
  • config.py does what is sounds like it does

To get it to run automatically on the Pi

Run the following commands:

sudo systemctl enable ledvis.service

I also found that one of the PWM channels wasn't initializing properly. To fix this i used the following entry in \boot\config.txt dtoverlay=pwm-2chan,pin=12,func=4,pin2=13,func2=4

refer to: https://forums.raspberrypi.com/viewtopic.php?t=311130 or /boot/overlays/README for dtoverlay settings applicable for you pins

If you have issues with it complaining about audio channels. it may be that the default audio device is being used. run "pyaudio_test.py" to get the device number and remember to put that in your config.py file

About

Led music visualizer experiment

Topics

adafruit-neopixelads1015ledledsledstripledstripsmusicmusic-visualizerrgbrgb-colorrgb-ledrgb-ledsrgb-ledstripvisualizationvisualizerws2811ws2811bws2811sws281x

Resources

Readme
Activity

Stars

6 stars

Watchers

0 watching

Forks

1 fork
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.