John Oden

Personal Project · Embedded Systems · Music Technology

MIDI-Synchronized Studio Lighting

A custom 315-LED lighting system that turns MIDI events programmed in Cakewalk into synchronized lighting sequences throughout my music workspace.

C++ FastLED MIDI WS2812B Cakewalk Electronics
The Project

Treating lighting as another instrument in the song.

I wanted the lighting in my music room to do more than react automatically to sound. I wanted lighting events to be intentionally programmed alongside the music and triggered at specific moments during playback.

315 Addressable LEDs
Embedded Systems

Connecting Music, Software and Electronics

I built a controller that allowed MIDI events programmed into a Cakewalk project to trigger lighting behavior during song playback. The lighting became another sequenced element of the production rather than an independent sound-reactive effect.

The completed installation used individually addressable WS2812B LEDs distributed throughout the room. I divided those LEDs into logical physical zones so different parts of the installation could respond independently.

Embedded C++ MIDI Addressable LEDs Custom Electronics
Finished System

Lighting synchronized with the performance.

The completed system allowed lighting sequences to be programmed into the same timeline used for music playback, with MIDI cues controlling when lighting changes occurred.

System Architecture

From the DAW timeline to the physical room.

Each part of the system had a specific job. Cakewalk determined when an event happened, MIDI carried the command, and the controller translated that command into a physical lighting effect.

01

Cakewalk

Lighting cues were sequenced alongside the song at specific points in the timeline.

02

MIDI

MIDI messages carried the programmed events from the DAW to the lighting controller.

03

Controller

Embedded C++ interpreted incoming commands and selected the requested lighting behavior.

04

FastLED

FastLED generated colors, palettes, gradients and procedural animation.

DAW Integration

The lighting was programmed with the song.

Instead of trying to detect musical events after the fact, I could decide exactly where lighting changes should happen and place the corresponding MIDI events directly into the Cakewalk project.

Cakewalk project showing MIDI lighting cues programmed alongside the song
MIDI Sequencing

Lighting Cues in Cakewalk

Lighting events lived in the same project as the music. This allowed effects to be placed at exact musical moments and remain synchronized whenever the song was played.

MIDI provided a simple event-based interface between the music production environment and the embedded lighting controller.

Cakewalk MIDI Sequencing DAW Integration
Controller Hardware

From prototype to a dedicated controller.

I assembled the supporting electronics myself, moving from prototype wiring to soldered protoboard and a dedicated enclosure containing the controller, power conversion, wiring and external connections.

Custom controller board for the MIDI lighting system Controller

Custom Interface Board

The controller and interface circuitry were assembled by hand as part of the custom lighting system.

Underside of the soldered controller board Hand-Built Electronics

Soldered Protoboard

The supporting circuitry was moved from prototype wiring to a permanent hand-soldered board.

Controller electronics installed inside the project enclosure Final Assembly

Project Enclosure

Power conversion, controller hardware and supporting wiring were installed into a dedicated enclosure.

Embedded Software

Mapping the physical room in code.

Rather than treating all 315 LEDs as one strip, the software mapped LED address ranges to the physical areas where they were installed.

5 Lighting Zones
Physical Mapping

Address Ranges Became Physical Zones

The guitar stand, left and right speakers, desk and keyboard were represented by defined ranges of LED addresses. Reusable functions could then operate on specific parts of the room.

napalm.h Zone Configuration
#define NUM_LEDS 315
#define GUITAR_STAND_SIZE 132
#define LEFT_SPEAKER_SIZE 31
#define RIGHT_SPEAKER_SIZE 31
#define KEYBOARD_SIZE 25
#define DESK_ROW_SIZE 89

#define GUITAR_STAND_START 0
#define LEFT_SPEAKER_START 133
#define DESK_ROW_START 164
#define RIGHT_SPEAKER_START 255
#define KEYBOARD_START 286
                        
26 Color Palettes
Procedural Effects

Animation Generated in Real Time

FastLED noise functions generated changing palette positions and brightness values based on LED position and elapsed time.

This produced continuously animated patterns without storing individual animation frames or manually specifying the state of every LED.

FastLED / C++ Procedural Effect
void fillAllP(CRGB *leds, CRGBPalette16 p)
{
    for (uint16_t i = 0; i < NUM_LEDS; i++)
    {
        int brightness =
            inoise16(i * 20 << 8,
                     millis() / 7 << 8) >> 8;

        int index =
            inoise16(i * 20 << 8,
                     millis() / 12 << 8) >> 8;

        leds[i] =
            ColorFromPalette(p, index, brightness);
    }
}
Physical Installation

One system distributed throughout the workspace.

The LED installation was divided around the physical layout of the room, allowing effects to move between areas or operate across the complete installation.

132 LEDs

Guitar Stand

The largest individual lighting area, covering the guitar storage and display section.

31 + 31 LEDs

Speakers

Separate left and right speaker zones that could operate independently or together.

89 LEDs

Desk

A long addressable section used for gradients, palettes and animated effects.

25 LEDs

Keyboard

A separately addressable section surrounding the keyboard area of the workstation.

Physical Control

Brightness

An analog input allowed overall brightness to be adjusted directly from the controller.

Physical Control

Animation Speed

A second analog input allowed effect speed to be adjusted without modifying the software.

Effect Engine

Palette Control

The software supported 26 color palettes for generating different visual styles and animated effects.

The Result

The interesting part was connecting the systems.

A DAW sequenced the events. MIDI carried the instructions. Embedded C++ interpreted them. FastLED generated the visual behavior. Custom electronics connected the software to a physical 315-LED installation.

It was a project where programming, electronics and music all had to work together to produce something I could actually use.

C++ FastLED MIDI Electronics DAW Integration