View Profile aap
Hello, I'm Aap.

29, Male



Joined on 1/11/06

Exp Points:
8,406 / 8,700
Exp Rank:
Vote Power:
6.96 votes
Police Sergeant
Global Rank:
B/P Bonus:

MIDI support in Flash

Posted by aap - September 24th, 2009

MIDI files are super small in size (only a few kB) and could be really usefull as background music in games. With MIDI support we could have many tunes in our games, without having a huge file size. And, ofcourse, it has a bit of nostalgic value too, as games like DOOM and Commander Keen used MIDI as background music. And you probably could also use your MIDI keyboard in games.

Currently Flash doesn't support MIDI. I couldn't find much about it on the Googles, but I found this:

Imagine what creative developers could do if Flash could transmit and respond gracefully to MIDI. Now an online petition is urging Adobe to do something about that. You need an account on bugs.adobe.com to vote, but that simply requires providing your name and email address. ...

Petitions have worked in the past. Wright points to the "Adobe, Make Some Noise" campaign for enhancing Flash audio, and the previous request for USB MIDI Device support, which is now under consideration at Adobe.

Source: http://blogs.oreilly.com/digitalmedia/
2008/04/petition-midi-support-in-flash .html

I think everyone on Newgrounds should sign that petition a bit!

Comments (9)

ummm, you do know that midi files contain the building blocks of an audio file. Flash can't turn it into an actual audio file. Synthesizers for midi files are all different

Yes, you need a MIDI synthesizer, but everyone has one build in their soundcard. And a MIDI may sound different for someone else, but that doesn't matter all that much.

There have already been a couple of abortive attempts to build a midi interpreter library for flash.

It's not such a difficult process, seeing as you can embed midi files as octet streams, read their data at the binary level with the bytearray class and manipulate it however you wish.

The only issue is that there is currently no official way to load a sound object from binary data, meaning you would have to include samples of each instrument embedded in your swf, bringing back some (but not all) of the file bloat that midi would replace.

Most people simply use one of the hackish methods of "tricking" flash into loading a sound from a bytearray, but then become rapidly discouraged when reminded that building an entire library around an unsupported feature is just asking for the library to be broken by the next patch.

O o

"he only issue is that there is currently no official way to load a sound object from binary data, meaning you would have to include samples of each instrument embedded in your swf"

I think this is exactly what Aap is talking about, right? If you must embed it in your swf; it would be horrible, but if the flashplayer gets it directly from your local midi library; it will be awesome. I'm sure this can be done. Various browserembeded mediaplayers can play midi files too.

make a videoclip sync with your beat.
Interactive music with games
Classic sounds : )

( if we can mute the midi you can even sync your mp3music. With both a "converted mp3 to midi" and the original mp3 playing at the same time)

Er is een reden waarom MIDI niet ondersteund wordt: het suckt. Ik moet toegeven, het zou wel leuk zijn om terug met MIDI's te kunnen werken, maar voor da ge het weet is newgrounds overspoeld met flash-filmpjes met walgelijke geluidskwaliteit. Nu moet men tenminste wat moeite doen voor een goede soundtrack te hebben.

Groeten vanuit Vlaanderen!

Congratz on Wacom-get!

congrats geek

Je hebt iets gewonnen ofzo.....

hey ik praat nederlands nu kan niemand behalve nederlanders lezen wat ik scrhijf wow ik ben zo geniaal en grappig hajahjlhajlasdas