Giter Site home page Giter Site logo

philips-hue-midi's Introduction

philips-hue-midi

Overview

philips-hue-midi allows you to control your Philips Hue lights with your piano. It 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

  1. Connect your MIDI Keyboard: Attach your MIDI keyboard to your computer and ensure it's powered on.

  2. Configuration: Copy the config.example.toml as config.toml. Set lights under channels.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.

  3. Install Python Dependencies: Navigate to project root and install the necessary dependencies using pipenv:

    pipenv install
    
  4. Run the Program: Execute the following command:

    pipenv run python -m philips_hue_midi.main 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.

philips-hue-midi's People

Contributors

aru-py avatar

Stargazers

 avatar  avatar Botond Kuti avatar Peter Florijn avatar Emmanuel Arop avatar

Watchers

Peter Florijn avatar  avatar  avatar

philips-hue-midi's Issues

Can't find settings.py file

Hello, I'd really like to get this working.

I followed the instructions from the read me but I can't find where I should replace the placeholders, there's no settings.py that I can see.

Config for use with a Mixer type MIDI controller such as the KORG nanoKONTROL Studio

Hi,

I'm to stumble on your project, especially seeing the owner being a fellow piano player :).

I want to say right from the start, I'm not a programmer, so I won't be able to do any development type of work needed for this. The readme still feels lacking to someone with my knowledge, so I decided to try my luck with a request. I hope you like my idea and that it's a reasonable ask for you to create it:).

The reason I was looking to control my lights with my nanokontrol is, because I happen to have one anyway, and it would be so awesome to control my room lights with the faders and buttons.

In the past, with the help of a youtube video, I was able to run a python script using phue, with the press of a key, but combining that with MIDI capabilities I feel is beyond my level for now.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.