How to learn music with DIY lighted keys
May 5, 2009 12:00 PM   Subscribe

Is there a way to output midi data from MAC or PC so that I can have one in a series of LED lights light up when the corresponding note is played? I would like to learn playing keyboard by example, have seen the casio lighted keyboards, but I heard these keyboards cannot play midi's that I download online.
posted by mikesmeta to Computers & Internet (7 answers total)
 
It seems like it would be possible. You could load the MIDI file onto a microcontroller and "play" the file by driving an LED whenever a musical note should occur. The MIDI file structure is online everywhere and it seems straightforward enough to parse. You'd have to be reasonably good at coding and circuit hacking to figure out how to do this. Plus you'd have to build a nice harness for the LEDs to sit on top of a keyboard. It's hard to say if the result will be worth it in terms of instructional utility but it would be a fun project.
posted by PercussivePaul at 12:24 PM on May 5, 2009


Response by poster: Yes, I've been toying with this idea for years (hoping I guess for that " here's one we made earlier" moments)
posted by mikesmeta at 12:37 PM on May 5, 2009


j-omega (in the UK) makes boards that turn MIDI into on-off signals -- they're intended for retrofitting old pipe organs and the like, but they would work just fine with LEDs. They're not cheap but could save a lot of time over inventing your own. I've used several of them.
posted by moonmilk at 12:50 PM on May 5, 2009


If I were tasked with doing this I would use an atmel (nothing fancy, let's say an atmega168), use something like AVRLib to set up a uart running at 31250 bps, 8-N-1 on the serial input, wire in the MIDI (don't forget your opto-isolator, see any old MIDI in circuit on the net-- PAIA usually has good schematics for this part) and then have a real simple event loop read the MIDI bytes from the uart. MIDI is a pretty simple format, you wait for a high 8th bit to signal a control, then get the control and the next two bytes to figure out the message (e.g. note on channel 2, then note #, then velocity -- three bytes in a row.) If you really want 88 LEDs good luck wiring it, but the electronics are easy enough-- a simple multiplexer will do that.

The Arduino project might be nice as there's a bigger easier to work with community out there -- for example, here's a multiplexer -- but of course all an Arduino is is an Atmel with a custom bootloader and niceties like USB programming etc.
posted by neustile at 12:59 PM on May 5, 2009


If you're handy with a soldering iron, Highly Liquid's MIDI Decoders would provide an good starting point.
posted by lekvar at 2:57 PM on May 5, 2009


Take a look at this. It shows someone doing almost exactly what you're asking.

I've been playing around with an Arduino myself today, working with shift registers to multiplex an array of LEDs - my project is more of an art piece, with patterns of lights that change depending on data from a website, but doing something similar with a MIDI signal wouldn't be too difficult for someone with a basic understanding of programming and the ability to solder.

I suppose it really depends on whether you're the kind of person who'd be interested in rolling your own solution to the problem. As neustile implies, the wiring for all the LEDs is the real headache...
posted by le morte de bea arthur at 2:57 PM on May 5, 2009


What sort of keyboard do you think you can't play internet MIDIs on (model numbers please) and why do you think they won't work with standard MIDI files? There may be a free/cheap way to convert those "common" MIDI files to a format that will play nice with your lighted keyboard.

What I'd do is: get a file that is known to work, get an internet file that is known to not work, and get a free MIDI editor to find (and eliminate) the delta between the two. Then go and find someone with a lighty-uppy-Casio, email the file (slightly modified) to them, and if they light up, you're in business. Then head over to eBay and...well, you know.

If you are not interested and somewhat proficient in electronic systems I wouldn't go down the micro road. But if you DO.. let's just say there's a lot of fun to be had with sensors, MIDI (in and out), lights, bells, whistles, lasers, motors etc., etc., think of a real-life version of "Animusic." I saw a project video online a while back where a guy rigged solenoids to his exposed pipes in his apartment, and put them as digital outputs on a MIDI-controlled Arduino to turn his building into a resonating drum machine. And so on and so forth.
posted by ostranenie at 12:34 PM on May 6, 2009


« Older Where to find updated info on (graphic design)...   |   I need an antidote for Caliban. Newer »
This thread is closed to new comments.