sniperprof1
Posts: 4
Joined: Wed Mar 05, 2014 11:21 am

Raspberry pi party light show controller

Wed Mar 05, 2014 11:43 am

Hello,
I'm a newb to raspberry but I know some Java and Python and I had an idea for making something out of my raspberry which is lying arround the house.
So what i want to do is to meke a light show controller out of my raspberry with the help of some relay modules. So my requirements are:
1. play music on my laptop/PC (mainly because i dont think the pi is capable playing music, converting and controlling the lights at the same time)
2. control the lights with the raspberry so that they are synced with the music (the problem is that i don't know what music I'm going to play so I can't just play the midi file on the raspberry an control the lights with Light organ or sth. like that)

Is there already a project that does something like this? My main problem is how to convert mp3's that are playing on the PC to midi in real time and how to stream that data to the raspberry so that it can control the lights.

danjperron
Posts: 3379
Joined: Thu Dec 27, 2012 4:05 am
Location: Québec, Canada

Re: Raspberry pi party light show controller

Fri Mar 07, 2014 12:54 am

Hi sniperprof1,

Have a look at this

http://www.raspberrypi.org/archives/5776

Daniel

User avatar
Douglas6
Posts: 4711
Joined: Sat Mar 16, 2013 5:34 am
Location: Chicago, IL

Re: Raspberry pi party light show controller

Fri Mar 07, 2014 3:00 am

My two cents. Converting mp3 (or any PCM) to MIDI is pretty much a non-starter, unless you're really determined. Better an FFT approach like danjperron pointed out.

Paul Moir
Posts: 46
Joined: Wed Dec 04, 2013 7:25 pm
Location: Nova Scotia, Canada

Re: Raspberry pi party light show controller

Fri Mar 07, 2014 5:04 am

Holy Cramolie, is that how you do a colour organ in 2014? FFT on a 700MHz processor probably running PWM to a bunch of amplifiers to switch the lights, and no doubt some 16 bit 44.1KHz A /D for some retro gear? I've got a fist full of TRIACs and capacitors that would like to have a word with you! :)
Seriously, I guess I'm officially old. Didn't even make it over the hill... :)

sniperprof1
Posts: 4
Joined: Wed Mar 05, 2014 11:21 am

Re: Raspberry pi party light show controller

Fri Mar 07, 2014 9:28 pm

Yes I've already seen the LED strip equalizer but in that project everything runs on the pi. the main problem as I said before is that I need to play the music on my pc where I have a DJ program (you've guessed it... Virtual DJ) and I want the lights to respond to any music I play. I tought I could find some software that converts to midi in real time or maybe write a litle java program that will sample the output of the pc and write commands in the ssh terminal. Is that even possible? Or maybe is there a way to stream the music to the pi and than use FFT? Basicaly I want to make a light controller out of my pi.

Raspberry Pi Rules!
Posts: 14
Joined: Thu Mar 06, 2014 8:32 pm

Re: Raspberry pi party light show controller

Fri Mar 07, 2014 9:39 pm

I'd just like to chime in and say that the Pi can play MP3s fine and controlling LEDs shouldn't really use all that much processing power. If your LED thing happens to be extremely complicated and fast-paced then maybe an Arduino would be more suited for the job (minus the playing music part).

sniperprof1
Posts: 4
Joined: Wed Mar 05, 2014 11:21 am

Re: Raspberry pi party light show controller

Fri Mar 07, 2014 9:55 pm

well as we can see in the video about the LED equalizer the pi can play music and control the lights, but can it only control the lights, this is my question/problem? i want a separete source of music not the pi. and as far as the arduino goes...well i have a raspberry at home so i'll use the raspberry

danjperron
Posts: 3379
Joined: Thu Dec 27, 2012 4:05 am
Location: Québec, Canada

Re: Raspberry pi party light show controller

Sat Mar 08, 2014 1:22 am

Hi Paul, nice to learn another canadian experience.

I did the same thing in the 70s . Building light chaser and light control by music beat using texas triac TIC- something.

B.T.W. You could use the RPi with a cheap usb audio adapter and use the audio in.

I do have one but I never try to make it work with the Raspberry Pi.


So I plug it in and I got

Code: Select all

[email protected] ~ $ dmesg
...
...
[176048.225609] usb 1-1.2.1.2: new full-speed USB device number 9 using dwc_otg
[176048.362985] usb 1-1.2.1.2: New USB device found, idVendor=1130, idProduct=f211
[176048.363022] usb 1-1.2.1.2: New USB device strings: Mfr=0, Product=2, SerialNumber=0
[176048.363043] usb 1-1.2.1.2: Product: USB  AUDIO  
[176048.378746] usbmixer: volume control quirk for Tenx TP6911 Audio Headset
[176048.378813] usbmixer: volume control quirk for Tenx TP6911 Audio Headset
[176048.394865] input: USB  AUDIO   as /devices/platform/bcm2708_usb/usb1/1-1/1-1.2/1-1.2.1/1-1.2.1.2/1-1.2.1.2:1.3/input/input1
[176048.399073] hid-generic 0003:1130:F211.0001: input,hidraw0: USB HID v1.10 Device [USB  AUDIO  ] on usb-bcm2708_usb-1.2.1.2/input3
[176048.410401] input: USB  AUDIO   as /devices/platform/bcm2708_usb/usb1/1-1/1-1.2/1-1.2.1/1-1.2.1.2/1-1.2.1.2:1.4/input/input2
[176048.413541] hid-generic 0003:1130:F211.0002: input,hidraw1: USB HID v1.10 Device [USB  AUDIO  ] on usb-bcm2708_usb-1.2.1.2/input4

[email protected] ~ $ lsusb
Bus 001 Device 002: ID 0424:9512 Standard Microsystems Corp. 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 009: ID 1130:f211 Tenx Technology, Inc. TP6911 Audio Headset

The one I got as only MIC input so you will need to decrease the audio signal and remove the voltage offset using a capacitor.

http://www.epanorama.net/circuits/line_to_mic.html


I don't know How hard it will be but it is a possibility. The other method will be to use a fast A/D converter on the SPI and feed the data using pipe to the FFT.

Daniel

sniperprof1
Posts: 4
Joined: Wed Mar 05, 2014 11:21 am

Re: Raspberry pi party light show controller

Sun Mar 09, 2014 2:25 pm

Yes that's my idea and it seems i'm not the first to have an idea like this. I'v found a promissing thread, hope this guy figures it out. https://plus.google.com/app/basic/strea ... uikd5whshg
Thank you guys for your time, gl

Armenian1
Posts: 4
Joined: Sun Aug 31, 2014 2:28 pm

Re: Raspberry pi party light show controller

Sun Aug 31, 2014 2:39 pm

Any ideas to use that to create this?
https://www.youtube.com/watch?v=m6xWGVhZl1g

ccrom1
Posts: 1
Joined: Sun Dec 07, 2014 6:39 pm

Re: Raspberry pi party light show controller

Sun Dec 07, 2014 6:41 pm

You should check out that Google Plus Link you posted earlier. Check out https://bitbucket.org/togiles/lightshowpi/wiki/Home :ugeek: :ugeek: :ugeek: :ugeek:

Return to “Automation, sensing and robotics”