Skip to main content

Python Piano LED Visualizer

Project description

pyanoled

Piano LED visualizer based in Python 3.x. Inspired by the onlaj/Piano-LED-Visualizer project.

Table of Contents

Hardware Setup

Setup instructions for the hardware are covered in onlaj/Piano-LED-Visualizer. It lists out all of the parts and equipment, and references a lot of other sites with useful information on how to setup and configure the hardware. Here are some of my takeaways:

LED

For a standard 88-key piano, the distance from lowest and highest key is just 4 meters. The WS2818B LEDs have enough LED density to align with every key, so 4 meters of that will be around 172 LEDs.

  • It is recommended to purchase the longer-lengthed strip and cut it down to 4 meters. Soldering two shorter strips together is more tedious. Here is a good instructional video on how to do that.
  • Finding vendors selling 4 meter long aluminum casing was also troublesome. Here is a vendor that offers custom-length cases and lids.
  • Get a 5V power supply that draws 10A of current.

Raspberry Pi

The instructions for setting up the Raspberry Pi are pretty straight forward, but here are some issues that I ran into:

  1. Installing Rasbian

    • To enable wifi: do not need to set country code value in wap_supplicant.conf if you have Raspbery Pi Zero
  2. Configuring Raspbian to work with WS2128

    • To disable sound: if /etc/modprobe.d/alsa-base.conf is not found, try /usr/share/alsa/alsa.conf
  3. Enabling SPI

  4. Configuring MIDI

    • Missing Jack module errors: sudo apt-get install libjack-dev
    • Python 3 packages: libatlas-base-dev
  5. Additional packages that might be needed

    • sudo apt-get install libjpeg-dev zlib1g-dev

Install/Run

  1. Setup your virtual environment

    virtualenv <path to env>
    source <path to env>/bin/activate
    
  2. Install project from package or source

    • To install from pypi:

      # in raspberry pi, install the project from pypi
      pip3 install pyanoled
      
    • To install from source:

      # in raspberry pi, clone repository
      git clone <repository>
      
      # in project root directory, run setuptools
      # note: some dependencies (like numpy) can take a long time to install this way. can install those
      # dependencies through pip first before running this step
      python3 setup.py develop
      
  3. Run project

    # console script setup as entrypoint
    pyanoled
    

TODO

  • Persist PyanoLED app configuration changes
  • Dockerize PyanoLED
  • MIDI playback
  • Synthesia support
  • Additional color schemes and effects
  • Additional configuration exposed in UI

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyanoled-1.0.0.tar.gz (18.9 kB view details)

Uploaded Source

Built Distribution

pyanoled-1.0.0-py3-none-any.whl (28.9 kB view details)

Uploaded Python 3

File details

Details for the file pyanoled-1.0.0.tar.gz.

File metadata

  • Download URL: pyanoled-1.0.0.tar.gz
  • Upload date:
  • Size: 18.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.7.8

File hashes

Hashes for pyanoled-1.0.0.tar.gz
Algorithm Hash digest
SHA256 df86ad37c56c3de67a16f87ce0c0b7e093c6102bb04347b2060d089502c9eb3a
MD5 1de1ad9e34be81bd374bab8094808fd0
BLAKE2b-256 6a132fb705259f7f24901d6f06fbea36cc7c19c9a30b2b0a37b76209494b38fb

See more details on using hashes here.

File details

Details for the file pyanoled-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: pyanoled-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 28.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.7.8

File hashes

Hashes for pyanoled-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0d5f81e5c553400a3d0e0696f46ea6efb9df83342ec1c182b5e1e204b9330300
MD5 4d22f73e20298566659434eca839b6ac
BLAKE2b-256 92e56d202fd04a85f95fd5d56533dd4f3b447cfce669f421cbc790f95711b05a

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page