
Getting Midi into Flash has always been on the todo list and finally this weekend it all came together.
I started by googling different methods, all of which involved setting up some kind of Flash Server and running an application which communicated with MIDI devices, and relaying MIDI messages to flash through a NetConnection.
I came across the work of John Grden and his impressive papervision guitar demo, very cool. John used Red5 as his Flash Server which I’ve come across on many occasions but never had a chance to properly explore. Red5 is an Open Source Flash Server written in Java, they have a load of tutorials and examples to get you started. I personally recommend the Getting started with Red5 Server tutorial which is your first logical step in getting MIDI into flash, and you can make sure that your Red5 server is working and communication with Flash.
So I borrowed my mates USB MIDI keyboard and got cracking. A whole day of trials and tribulations followed due to keyboard driver issues. If you have USB MIDI device and a Logitech webcam installed on the same machine, beware! Finally solved the problem by clearing some values in the registry which always makes me nervous.
Anyhoo, I won’t be regurgitating what John already outlined in his blog entry, instead here is my working source.
You will have to set your own MIDI-IN and MIDI-OUT devices, whpich you should see come up when the application initialises. Once that is done, start hitting those keys and you should see the MIDI data being traced out. Here is helpful link that will explain the MIDI data coming through. Basically the second value in the array is your note which corresponds to the key you just hit and the third value in the array is your velocity, the strength with which you hit that note. All values range from 0-127.
So with all those MIDI messages pouring into my machine I got a bit excited and went out and bought the Akai MPD24 which includes an assortment of slides, rotary knobs and velocity pads, perfect for an external hardware interface into Flash. So far I’ve built a little app that visually represents each one of the MIDI buttons. Looking forward to plugging it into papervision and hopefully getting it going with some music software, so it controls audio and visuals simultaneously.
Hello,
Im desperately trying to connect a flash animation with an external midi sequencer like Ableton Live, Cubase, etc.
Could you please shed me some light on how to mount this setup? Ive looked at the source you posted here, but I dont understand what else is needed. I am not familiar with setting up Red5, in fact im trying to figure this out and constantly get stuck. Id a apreciate your help very much. Thanks!
badass article, and really appreciate you sharing the source to boot.
many flashy thanks.
Hello! I’m trying to build a visualization tool for harmonic table instruments:
http://www.soundonsound.com/newspix/image/axis49.jpg
So that, not only can I stop looking down at the keyboard, but I can capture clean demonstrations of techniques to include in tutorial videos.
1. This Red5 server you mention: I couldn’t find it following the link you have (and everywhere else it seems, for that matter) – it looks like the page was deleted.
I did find a copy here though:
http://www.osflash.org/red5/063final
2. Someone has a working on alternative java+actionscript tool working and is working on javascript version, though the proof of concept doesn’t work for me. I had hoped to do something with javascript, but it’s not quite there yet it seems.
http://www.abumarkub.net/abublog/
Regards and thanks.
hi,im trying to do exactly the same, but just sending out program changes and bank changes to my synth on different midi channels, the shell is done (graphics) but need some help on the clever stuff. ie action scripts, java scripts and c++. could you please help me out, it would be a heaven to use flash as a programmable interface for my gear and setup.
i would even go as far as paying someone to sort it out for me.
hope you reply and look forward to your email
many thanx – rob