Getting MIDI and OSC into Flash

Getting MIDI and OSC into Flash

Following up on my post about Controlling Flash with a Monome, I’ve done a bit more research on the ways to get controller data in and out of Flash.

My current conclusion: Oscar for OSC, Red5 for MIDI. Read on for the details.


In Short: OSC to Flash, one-way, Mac-only.
Details: The slickest of the controller translation apps, this one is great for connecting up the Monome and any other controllers that support OSC natively. Additionally, if none of the MIDI solutions are working for your setup, you can convert your MIDI to OSC using Quartz Composer and then route it through Oscar and into Flash. Perhaps a forthcoming post on this?

Red5 Flash Server

In Short: Open source Flash Server, includes MIDI functions.
Details: This Java server supports streaming audio, video, and lots of extra stuff. It seems like it’s perhaps overkill if you just want to get MIDI into flash, but hey, it works! The newest stable release (0.8) is available for OSX, Windows, or as source to build on your own box. Unfortunately, the Mac 0.8 installable version needs Java 1.6, which was never released for 32-bit Mac systems. Thankfully, you can download the 0.6 release pre-compiled, and it works just fine. Last updated June 2009.
Starter Code: Lukasz Karluk put together a great starting point: AS3 Code for Red5


In Short: A Java applet and bridge that enables MIDI input into Flash, including through a webserver.
Details: I really wish I could have gotten this to work. He’s got an online example that worked for me, but I couldn’t get my local version to connect properly. After messing about with it, I can no longer get his example to see my MIDI messages either (though my devices still show up properly). To be fair, I updated my OS in between the working and not-working tries, so it could be that, or something else I messed up. Let me know if you’ve had success with this project – there’s lots of possibility for fun multi-player MIDI games here.


In Short: MIDI input and output from Flash, last updated 2005.
Details: Assumed abandoned, this was a plug-in based on some sort of undocumented feature. It allowed MIDI control, as well as playback of MIDI files. It was mostly Windows-Only, though there was an Alpha version of a Mac plug-in made.


In Short: Max/MSP external allows bi-directional communication- last updated 2006
Details: Assumed abandoned, this was an external for Max/MSP (so you need to write a Max/MSP program that would use it). Mac and PC versions still available for download, current compatibility unknown (written for Flash 5).


In Short: A Java server that creates a bi-directional channel for communication between OSC devices and Flash.
Details: I did get it working, but Oscar is much slicker. If you’re on a PC, this is a great (perhaps the only) solution for OSC to Flash communication. There’s a new flOSC by tranxete, but like Red5 0.8, it requires Java 1.6, so it’s a non-starter for me.
Starter Code: From tim, based on the fwiidom classes: flOSC As3 Classes.

Tim, of the flOSC classes above, also has a good round-up on using MIDI in Flash.


  1. Posted by adrock the h.dotter, at Reply

    you should look at remote shared objects in flash too. Using a wowza streaming server on amazon ec2, I have set up a remote control application with remote shared objects that can control things across the world. perty neet stuff

    • Posted by Zack De Santos, at Reply

      Hi I could really do with some help with this, how hard is it to set up?

  2. Posted by tim, at Reply

    Hey man, thanks for the mention. Did you find a way of sending midi CC data via Red5? that’s the reason i gave up on it, although i guess there’s not so much call for it with something like the monome.

    I will get round to doing a full write-up on the code for flOSC soon!

    I love your background!!

  3. Pingback: Synja Dev Blog » Blog Archive » MIDI to Flash (the free way)

  4. Posted by Jonathan Hart, at Reply

    I didn’t catch that MIDI CC isn’t supported in Red5. Total Bummer. I’ll have to brush off my JAVA skills and have a stab at it!

  5. Posted by Tamer, at Reply

    I have just tested MIDI with Red5 and it worked smoothly, I was able to recieved Midi data inside Flash!
    Thanks fore the tip!

    • Posted by momothemonster, at Reply

      That's great to hear – care to share more about your setup?

  6. Posted by Oliver Greschke, at Reply

    Hi, thank you very much for sharing your knowledge in this topic. So have you worked with Oscar? I can get in OSC Data into Flash with Oscar, but I don't know how to handle it. All examples I have seen so far do some XML handling, but for me it looks data comes in as strings. If you got this working for you some code snippet would be wonderful …

Reply to Jonathan Hart