Hi. Looking to create an Audio Synced Light Projector

Hi, I’m Tim. I’m a developer. My brother and his wife are expecting their first and I’m trying to win the coolest uncle game title right out of the gates. so I had this overly ambitious idea.

At a work code share session one of the developers on our team demoed a project they had been working on with Sonic Pi and I thought it was fascinating.

I wanted to create some sort of projector that would cast colored lights on a ceiling corresponding with notes in a programable song. Think a child’s mobile, meets ceiling projector, meets laser light show.

but you know… simple… :smile:

I know I’m trying to take a big bite here, but that’s kind of how I roll. I have experience with Arduino and Raspberry Pi’s and competently fluent in a couple of programming language, so the code writing portion doesn’t really intimidate me.

Wondering if anyone had worked on a similar project, or could point me in the direction of something that rings a bell. I’m super excited to work with and support this community.

Thanks!

Here’s the code for a recent project I did to drive the Pihut Christmas triee from Sonic Pi. (This is the new colour version)

previously I did a similar project for the monochrome version.

I hav also done several other projects on driving led displays from the Raspberry Pi, including PiBorg’s TroPI board, and a hack of the lightshowpi project to work with Sonic Pi.

Note if you want to use a Pi4, you will need to build your own Sonic Pi on it, as the current version contained on Raspbian doesn’t support MIDI or OSC.
You can of course use a Pi3 or earlier with Sonic Pi 3.0.1 with the earlier projects here.

Thanks @robin.newman! I’m getting cracking on this tonight.

@robin.newman I’ve downloaded your code for syncing the RGB Xmas tree/sonic pi but I get an error when trying to run the tree server.

I thought it was just because I didn’t have the Python osc library installed. So I installed it with sudo pip install python-osc rebooted the pi but still getting the same error. Any ideas what I’m missing?

try
sudo pip3 install python-osc

should work

Yeah just found the pip3 version from your other code for the old version of the tree and got it running. I’m just looking at the code to see if I can change it to my own song. I managed to write the 12 day of xmas in sonic pi before so going to see if I can swap it in and update the pattern.

Hi @TFischer.

A protocol widely used in professional lighting is DMX-512 there is a lot of hardware you can easily find, some lights already do what you want directly. But if you want more control you can use Arduino with a DMX hat and control everything by code.

Here you can download the library to control DMX with arduino.

I hope you find it useful.
Greetings.