Haunted Garden How it works: Lights

Keys map to color
wheel
Mapping from keys to color wheel using circle of fifths.
Key determines hue; Certainty factor for each key determines saturation and value.

The software takes the note stream and determines what musical key the most recent notes are likely to be in. Then it changes the color of lights based on the key. Since it is very difficult to exactly determine the key from a small number of notes, it runs heuristics to guess which key a set of notes is in, coming up with a certainty factor for each key. The three top "guesses" drive the hue, value and saturation of three different lights. This is done for short, medium, and long window on the stream of notes (7, 15, and 35 notes, respectively). This means the system can drive up to 9 different lights independently.

The hue is determined for each light by mapping the keys to the color wheel using the circle of fifths. This means that when sounds are related harmonically, the resulting colors are related chromatically. The saturation and value are determined by the strength of the heuristic guess. So if the sounds the system hears are chaotic and not really in any key, the lights will be light pastels, tending towards dim white. If the sounds are definitely in a particular key, the colors will be bright and saturated.

Currently the system drives a set of RGB LEDs built by Jeremy Lutes.