Monthly Archive for June, 2011

ACRIS — Automatically-Controlled Room Illumination System

I’ve been interested in lighting effects and visualization of sensory input for quite some time. LEDs are spectacular devices because they are so incredibly versatile. I’ve specifically become interested in RGB LEDs, which have 3 dies in one package, one for each color. Furthermore, I find the high power LEDs to be particularly amazing. I’ve done a lot of work with these LEDs, which can do 350mA per channel. They’re extraordinarily bright.

A year ago, I came up with the concept of ACRIS (Audio-Controlled Room Illumination System). The first design would use an FPGA for sound processing and wasn’t going to modular at all. However, I never had the time to work out the long development cycles associated with using FPGAs for large-scale projects.

Now, using what I learned from my design of the electronics for the Next House Party Lighting System, I’ve designed generic, modular LED controllers that are very easy to interface with. They can be controlled by a computer, an FPGA, a microcontroller, etc.

ACRIS has been reborn as “Automatically-Controlled Room Illumination System”. It will have sensory input from a variety of factors. I’m still trying to come up with creative ideas for styles of illumination, but I have the majority of the electronics ready.

Namely, I’ve designed the LED driver board and the communications board, which contain all of the electronics necessary to run the system.

These boards are extremely generic. I’m trying to make them such that people can use them for their own DIY projects — I want to take all of the tough technical problems out of the process so that people will have more time to explore their creativity and design interesting lights.

Controlling a Mouse with a MIDI Controller

I’ve been doing a lot of editing of large documents recently and some of them require lots of scrolling in either horizontal or vertical directions. Scrolling vertically is pretty easy thanks to my Logitech MX Revolution, which has an inertial scroll wheel — quite possibly the best invention ever. But quickly scrolling horizontally is basically impossible because it just has a rocker.

I glanced over at my MIDI controller and thought that it would be pretty great if I could use it to emulate scrolling. The Numark TotalControl has two jog wheels that can spin freely in an inertial manner.

I then discovered PyMouse and PyGame’s MIDI module. Using these two libraries, I cooked up this example, which uses the left wheel to scroll vertically and the right wheel to scroll horizontally.

The script simply initializes and finds a suitable MIDI controller. Then, it connects to that controller and periodically polls to see if there have been any events. If so, it processes the event to see if it’s something to scroll with. I implemented an overly-simple “low pass filter” which doesn’t even take advantage of the fact that the TotalControl outputs a number that increases as you scroll faster on the jog wheels, but it works well enough. Future iterations will have more complicated algorithms. Theoretically, this script is cross-platform since the libraries it uses are.

At any rate when you run this script, you can use the jog wheels to scroll. You need to patch PyMouse though. The developer forgot to include support for horizontal scrolling, but this patch changes a whopping two lines to add it (in reality, all of that code needs to be redone because it isn’t very well designed, but I’m lazy).

I’m sure MIDI mappers have been made before, but I’d like to make one where you can just script the controller in Python. You would just register a bunch of hooks (functions based on controller and control number) with calls to whatever functions you want to design. A project for when I’m bored and without internet access, I guess.