Saturday, November 24, 2012

GE35 MIDI Arduino stuff.

The nerdy details of my GE35 Midi control build v1. Each bulb is assigned a midi note starting at 0 (C -2 I think) and three CC controls to send Red Green and Blue values. I send the CC value, the controller stores the value for the bulb. When the Note On is received the controller reads the velocity attribute for the note and sends tells the string to turn on the associated bulb with the brightness set to the note velocity and the stored color values.

The DAW has the midi commands synched to the music. I have to put the CC commands in the tracker and then I am sending the notes to control the bulbs.  

For this build I set the power and midi data to go over CAT5 ethernet cable to power the string and an arduino to receive the midi and control the light string.

Here are some instagramed pictures to show that you plug in the midi and power in one box and the bulbs and arduino are at the other end.  Some thoughts on v2 after the pictures.

So, always seeing how things could be different, maybe better but perhaps not is the mind killer. I could fight my self on each decision or wait for a new material or technique I don't know but I would never finish anything. Next time:

Punch the light string directly into the keystone jack.

More lights! Addressable by MIDI channel.

Set the arduino up to connect as an USB MIDI device.

Figue out a better control protocol in midi. I chose what I did because I understood it, but it is laborious to input the control codes in Rosegarden. I need to find if Rosegarden or another DAW might have better options with scene or sequence triggering. Sysex might be easier to send color information or the color values might be packed into the velocity information. It would be nice to send aftertouch and set up a more synth like Attack Decay Sustain Release for brightness.

Make an arduino based hardware controller or use Processing or other software app for programing the DAW.

Replace the arduino with a RaspberryPi and use it to play the sounds and use GPIO directly to control the lights and custom software and app based control.



I'll have code and video up when I have something to show other than me pushing a note on the keyboard and a cat sniffing the bulb that just lit up.

WIP(it), Work in Progress (real good)

I bought a set of GE35 LED Holiday lights. They are nifty color shifting bulbs, individually addressable and relatively cheep and available. The stock controller has some okay programs that impressively blinkey. I of course was interested in making my own controller and making a light display synched to Trans-Siberian Orchestra's Wizards In Winter. (Take a minute to look this up on YouTube if you haven't seen these masterpieces of lighting)

I read up on the line protocol Deep Darc reverse engineered. I servered the controller and was able to make some lights turn on and change colors with some clumsy arduino code. Then I set out to make a library. It was on the order of 100 times too slow to work correctly. Then I did something unusual for me. I found someone's CC library, installed it and read the readme.txt and ran the hello world program. It worked. It worked really well and did a better job than I could do in a year of playing with it.

I downloaded a MIDI library and looked at the schematic and ran some sample code and that worked too. I put the two libraries together and made some mistakes, re-factored and that worked too.

Now I have lights that I can control from a DAW, synched to music. I took the prototype of aligator clips and twisted wires and soldered it down. There was a day of learning the digital tool of Rosegarden DAW and setting up the environment. Now all that is left to do is art.