# Hi. Looking to create an Audio Synced Light Projector

**URL:** <https://in-thread.sonic-pi.net/t/hi-looking-to-create-an-audio-synced-light-projector/3461>\
**Category:** Introductions & Stories\
**Created:** [March 18, 2020, 3:39am UTC](https://in-thread.sonic-pi.net/t/hi-looking-to-create-an-audio-synced-light-projector/3461 "2020-03-18T03:39:57Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![robin.newman](https://avatars.discourse-cdn.com/v4/letter/r/76d3ee/32.png) [@robin.newman](https://in-thread.sonic-pi.net/u/robin.newman)\
**Post date:** [March 18, 2020, 10:04pm UTC](https://in-thread.sonic-pi.net/t/hi-looking-to-create-an-audio-synced-light-projector/3461/2 "2020-03-18T22:04:03Z")

</div>

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)

> <https://gist.github.com/rbnpi/1bb941ee211c0a6ee071f91eb67e2e90>

previously I did a similar project for the monochrome version.

> [@Sonic Pi controls The PiHut Christmas Tree](http://in-thread.sonic-pi.net/t/sonic-pi-controls-the-pihut-christmas-tree/491):
>
> Three years ago at Christmas 1974 I produced a medley of carols for Sonic Pi. During the last week I acquired one of the PiHut Christmas Trees, which gave me a good test of my soldering skills in assembling it. Having built it, I thought that it would be nice to get Sonic Pi to control it, and to get the lights to flash in time to the carol pieces. This was similar to other projects I had previously done, and I wrote a small python OSC server to which Sonic Pi 3 could be a client, sending OSC me…

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.

> **[LightshowPi drives a sensehat using Sonic Pi](https://rbnrpi.wordpress.com/2017/12/04/lightshowpi-drives-a-sensehat-using-sonic-pi/)**
>
> EDIT corrected faulty link to my code Two years ago I produced a video showing the then Sonic Pi 2.7 driving the leds on a sense-hat using hacked lightshowPi software using the then current version…

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.

---

_[View the full topic](https://in-thread.sonic-pi.net/t/hi-looking-to-create-an-audio-synced-light-projector/3461)._
