Hey folks,
I'm looking into writing a Reaper CS extension to control the Phillips HUE lights in my studio (and if it works I'll put the code up on the Reaper Stash).
What I'd like to do is:
1. Have the light groups briefly flash red when the transport is in record+play...'on air' lamp. I've seen examples of this already, and it seems pretty straightforward
2. Have light groups respond to the signal level present on different busses. For example, when the drums play, shift the light colour towards red, and vary brightness as a function of level.
3. Have the light group intensity vary as a function of beat division...a little like a visual metronome.
It's function (2 + 3) that I'm really interested in. Basically, looking to help inspire live playing into Reaper by adding some dynamic lights.
I figure a CS extension will be needed to gain access to the transport functions as well as the level meters. But I also imagine that I will need a companion VST plugin that would sit on the busses, and communicate with the main program. The VST companion would set the parameters such as the colour bias for the instrument as well as the 'sensitivity', as well as what light group its being applied towards.
Here's what I'm thinking for an extension concept:
1. Link against the functions in the Hue plus library ->
https://github.com/enwi/hueplusplus
2. On project load, parse the list of Track FX for instances of the VST companion plugin. Maybe to make things easier I could limit myself to looking at tracks with a specific naming convention (e.g. HueBuss##). I'm thinking the latter to start.
3. Register the Busses from (2) for level meter polling
4. Read the light control parameters from the VST's into an area of shared memory
5. In the main loop, calculate the desired colour/brightness for each colour group by reading the peak meters (probably will need to do some averaging too), and send the light commands off to the HUE bridge.
6. Have a companion web server that allows for a 'panic button' to either kill the lights, or bring them up to some default state (e.g. bright white). This could be handy when you need to stop and read something, or find something you dropped on the floor
I'll probably get started on this adventure late next week, but in the meantime, if there's any input that folks would like to make, whether that's features, or suggestions about the approach, I'm all ears!
Or, if by some chance some clever person has already coded this sort of thing up, please point me there!!!
Cheers
K