philips-hue-midi
Overview
Control your Philips Hue lights with your piano. This project is inspired by the perceptual phenomenon of Synesthesia. See it in action below:
Getting Started
What You'll Need
- Philips Hue Lights & Bridge
- A MIDI Keyboard
Installation & Setup
-
Connect your MIDI Keyboard: Attach your MIDI keyboard to your computer and ensure it's powered on.
-
Configuration: Copy the
config.example.tomlasconfig.toml. Setlightsunderchannels.0(master channel) to the list of Philips Hue Lights you want to control. See full-config.example.toml for a full list of configuration options. -
Run Program: Navigate to project root and install the necessary dependencies using uv:
uvx philips-hue-midi [config.toml]
Technical Details
The program samples incoming MIDI events sixty times per second (defined by SAMPLE_RATE). Controllers are responsible
for taking this list of midi events (of variable size, M)
and converting them to a list of midi events of size N, where N is the number of channels. These channels are
defined in the config.toml file and are collections of lights and their configurations.
Currently, the default controller is the note_controller which takes in M notes and maps to 12 channels, based on
pitch class. For example, the first channel will be activated if the note C is played, the second channel for C#,
and so forth. Therefore, your configuration should have 12 channels.
Note that channel 0 is the master channel and is used for turning lights on or off and is the default fallback channel if the controller outputs a channel not configured. All lights you wish to control should be included in this channel.
Notes
You may have to set the MIDO_DEFAULT_INPUT environment variable to the name of your MIDI device if the correct
midi device is not automatically detected. You can find the name of your MIDI device by running:
bash uv run mido-ports.
Metadata
Release files for philips-hue-midi 2.1.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| philips_hue_midi-2.1.4.tar.gz | 11.8 kB | Without provenance | Details for philips_hue_midi-2.1.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| philips_hue_midi-2.1.4-py3-none-any.whl | Python 3 | none | any | Details for philips_hue_midi-2.1.4-py3-none-any.whl |
Total release size: 25.9 kB
Release files / philips_hue_midi-2.1.4.tar.gz
| Download URL | philips_hue_midi-2.1.4.tar.gz |
|---|---|
| Size | 11.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bff0b9fd33b4b7cdd060e80663db5e969c5bb55ce57a3533d3f9038c2a9e16c1
|
|
BLAKE2b-256 checksum How to use checksums |
7d5579b85ca3b86ff2e495611b93e7917f680cddbd58bfced5cd90a6fdb2d6c0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.7.8
|
Release files / philips_hue_midi-2.1.4-py3-none-any.whl
| Download URL | philips_hue_midi-2.1.4-py3-none-any.whl |
|---|---|
| Size | 14.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b834a9f2b20383a631bcb147e438cd974c39cd0df039b738a7278a5f9214eae4
|
|
BLAKE2b-256 checksum How to use checksums |
60514d0497ba343e252fa4daa1913d6fda9b4c5fe7cb324ca3d0488fbf198d49
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.7.8
|
Security for philips-hue-midi 2.1.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.