Project Overview
This project brings life back in to old Coldplay LED Wristbands (PIXMOB) by interfacing with them over IR (in this case via a Broadlink IR Blaster), and allowing for custom light sequences to be programmed for different songs.
I built this in just a few hours, leveraging the incredible reverse engineering work of developers interested in the PIXMOB wristband control protocol. This project provides an accessible Python wrapper to program lightshows that synchronize with audio files, making it easy for anyone with basic Python knowledge to use themselves.
Project Highlights
- Synchronized Light Shows: Create custom shows perfectly timed to your favorite songs
- Easy Pattern Definition: Simple API for defining color sequences, fades, and pulses
- BPM-Based Timing: Musical beat-accurate control with latency compensation
- Multiple Color Effects: Single colors, random patterns, and multi-beat sequences
- Community-Driven: Built on reverse-engineered IR codes from the PIXMOB community
- Extensible Framework: Easy to add new songs and custom effects
Demo: A Sky Full of Stars
The project includes a fully implemented light show for Coldplay's "A Sky Full of Stars", demonstrating the synchronization capabilities and various color effects possible with the system. Unfortunately I can't provide a sample audio file or video due to copyright.
Technical Implementation
The system uses IR communication to control PIXMOB wristbands through a Broadlink RM4 Pro device, with Python orchestrating the timing and color sequences.
Hardware Requirements
- Broadlink RM4 Pro: IR blaster for transmitting signals to the wristbands
- PIXMOB IR Wristbands: Any PIXMOB-branded LED wristbands that respond to IR signals
- Computer: Any system capable of running Python 3.12+ and controlling the Broadlink device
Software Architecture
- Song Class: Base class for defining songs with BPM, audio file, and beat offset
- SongSection Helpers: Convenient methods for creating beat-synced color patterns
- IR Code Management: Pre-defined color codes based on community reverse engineering
- Audio Synchronization: BPM-based timing system with latency compensation
- Broadlink Integration: Python interface for sending IR signals via the RM4 Pro
Creating Custom Light Shows
The system provides five main helper methods for defining light show patterns:
- single_beat: Pulse a specific color on one beat
- multiple_beats_single_colour: Maintain a color across a range of beats
- multiple_beats_random_colour: Randomly select from colors for each beat
- every_nth_beat_single_colour: Pulse on every nth beat with one color
- every_nth_beat_multiple_colours: Pulse on every nth beat with random colors
Each method supports fade effects for smooth color transitions, and the framework handles all timing calculations automatically based on the song's BPM and first beat offset.
Example Implementation
Creating a custom light show is straightforward. Here's an example of how to define a simple synchronized show:
from song import Song, SongSection
from ircodes import red, green, blue
class MyCustomShow(Song):
def __init__(self):
super().__init__(
"audio/my_song.wav",
bpm=120,
first_beat_offset_seconds=1.0
)
def beat_instructions(self):
return [
SongSection.single_beat(1, red),
SongSection.multiple_beats_single_colour(2, 8, green),
SongSection.every_nth_beat_multiple_colours(
9, 32, 4, [red, green, blue]
),
]
# Play the show
player = SongPlayer(latency_compensation=0.12)
player.play(MyCustomShow())
The latency compensation parameter helps account for the delay between sending an IR signal and the wristband LED actually illuminating—typically around 100-200ms depending on your setup.
Built on Community Work
This project stands on the shoulders of giants—the PIXMOB reverse engineering community who decoded the IR protocol. Special thanks to:
- Base64 GitHub Issue: Initial discussion and documentation of IR code structure and Base64 encoding
- Flipper Zero PixMob IR Codes: Comprehensive collection of PIXMOB IR codes for Flipper Zero device
- Initial PixMob Reverse Engineering: Foundational work that first decoded the PIXMOB protocol
This project provides a Python wrapper that makes this work accessible to anyone interested in creating custom light shows, without needing to understand the low-level IR protocol details.
Contributing
The project welcomes contributions, particularly:
- Newly Discovered IR Codes: Additional colors or effects discovered in the wild
- Light Show Refactoring: Better ways to define and structure shows
- Music Responsiveness: Automated show generation based on audio analysis
- Custom Light Shows: Example shows for different songs to share with the community
Lessons Learned
Despite being completed in just a few hours, this project provided valuable insights into hardware control, timing systems, and API design:
Technical Skills Gained
- IR Communication: Understanding infrared protocols and signal transmission
- Timing Precision: Creating accurate BPM-based synchronization with latency compensation
- API Design: Building intuitive helper methods for complex timing patterns
- Community Research: Leveraging existing reverse engineering work effectively
- Hardware Integration: Interfacing with consumer IoT devices (Broadlink)
Future Improvements
Several enhancements could expand the project's capabilities:
- Audio Analysis: Automatic beat detection and show generation from audio files
- Real-time Effects: Live music responsiveness using microphone input
- Visual Editor: GUI for designing light shows without coding
- Effect Library: Pre-built effect patterns (strobes, waves, gradients)
- Multiple IR Blaster Support: Extend beyond Broadlink to support Flipper Zero, Arduino-based IR blasters, and other IR devices
- Multiple Device Support: Control multiple IR blasters for larger venues
- Web Interface: Browser-based show designer and controller