Skip to content
This repository has been archived by the owner on May 11, 2024. It is now read-only.

Java application for controlling 5V Addressable LED Strip With MIDI Input Via USB Serial Connection

License

Notifications You must be signed in to change notification settings

serifpersia/pianolux-arduino

Repository files navigation

image

Release License Discord

**PianoLux** is a user-friendly Java-based GUI application that empowers you to control an LED strip using an Arduino. This versatile tool is designed for use with 88, 76, 73, or other key-sized pianos, where you can choose between a 2m/144 or 2m/72 LED strip. For smaller keyboards, a 1m LED strip is sufficient.

Demo

PianoLED.Demo.mp4

MIDI Visualization

MIDI.Visualization.Demo.mp4

Join Our Community

Be part of the PianoLux Discord Server Community where you can connect with fellow users, ask questions, and share your experiences:

Discord Server

LED Strip Compatibility

PianoLux is compatible with officially supported strips by FastLED library default are NeoPixels/WS2812B. Density must be 144 which is supported on all modes of the app and 72 density for few basic modes. You can find list of FastLED supported leds below:

*Main arduino code ino has to be modified to align with strip you will use

LED Type Configuration
Clockless Types
WS2812
WS2852
WS2812B
SK6812 RGB non RGBW variant
WS2811
WS2813
WS2811_400
GW6205
GW6205_400
LPD1886
LPD1886_8BIT
Clocked (SPI) Types
LPD6803
LPD8806
WS2801
WS2803
SM16716
P9813
DOTSTAR
APA102
SK9822
12V Strips like WS2815 configured as WS2812 GRB or RGB
RGBW Not Supported SK6812W or any other RGBW

*Make sure you check latest FastLED github repo for updates on supported led chipsets

PianoLux currently requires native USB Arduino boards with an Atmega32U4 CPU, such as:

  • Arduino Leonardo
  • Pro Micro

Some arm32 based native usb boards will also work latest arduino code needs to be adapted to work with them.

  • Arduino Due
  • *Serial lines should be replaced with SerialUSB and native usb port should be used
  • Arduino Zero

ESP32 platform boards also are supported

  • ESP32 S2/S3

Download

You can download the latest release of PianoLux here:

Release

Connecting the LED Strip and Arduino

To set up PianoLux, follow the connection diagram below:

LED Strip + Arduino Leonardo Connection Diagram

Enhance Brightness with External Power

For maximum brightness, consider using an external power source. Here's how you can do it:

  1. Use a minimum 3A 5V-capable USB charger.
  2. Cut a spare USB cable and connect the positive (usually red) and negative (usually black) wires to the LED strip's red and white wires, respectively. Don't forget to link this ground connection to arduino's ground pin. This to to avoid ground loop issues since we are using two power sources we need to link both grounds together.
  3. Adjust the current limit to match the power supply's current rating in mA (1A = 1000mA, so 3A = 3000mA).

External Power Setup

Mounting the LED Strip

For an 88-key piano, align the third LED with the first black key, as shown below:

image

Instructions for Windows OS

To use PianoLux on Windows, follow these steps:

  1. Run the included Download Java_Script.bat file to download and install the necessary Java JRE for running the PianoLux app.

  2. You will need the Arduino IDE application to upload the .ino file to your Arduino board. Ensure that you install the Arduino drivers and the FastLED library. If you're using Arduino IDE 1 or haven't installed the AVR Boards drivers, you may need to manually select the Arduino COM port as the "Refresh" button may not work. To install drivers, use Arduino IDE 2 and follow these steps. For other IDEs, refer to online resources on how to load drivers from the ARDUINO IDE folder in the Device Manager.

Arduino IDE and Drivers

  1. Once you see the "Upload Complete" prompt, you are ready to use the PianoLux app.

For Windows users who encounter conflicts when using both PianoLux and other MIDI programs concurrently, consider following this guide to split one MIDI connection into two virtual ones using loopMIDI.

32 Bit

Use 32 bit zip(x86) and 32 bit versions of JRE and Arduino IDE

Instructions for Linux & MacOS

To use PianoLux on Linux, follow these steps:

  • Install Arduino IDE 2 and upload the PianoLux code to your Arduino board.

  • Install the jre17 package, depending on your Linux distribution:

    • For Arch-based distros: sudo pacman -S jre17-openjdk
    • For Debian-based distros: sudo apt install openjdk-17-jdk
  • To run the app:

    • Download and extract the Linux zip file.
    • Open the Terminal, navigate to the extracted PianoLux directory, and run the following command: sudo java -jar "pianolux jar name.jar"

To use PianoLux on MacOS, follow these links:

About

Java application for controlling 5V Addressable LED Strip With MIDI Input Via USB Serial Connection

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Languages