Working with MIDI files and Flash (actionscript)

date: 30 Nov, 2010, actionscript: 3 FP10, complexity: complexity level 4.2 of 5complexity level 4.2 of 5complexity level 4.2 of 5complexity level 4.2 of 5complexity level 4.2 of 5, feedback (votes): users score 4.99 of 5 (285 votes)users score 4.99 of 5 (285 votes)users score 4.99 of 5 (285 votes)users score 4.99 of 5 (285 votes)users score 4.99 of 5 (285 votes)

Guitar Hero concept using MIDI

Hehe! This is very interesting, in this example I'm not generating any audio at all, it is just a Mp3 file playing in the background (synchronized with a MIDI file). This example works completely in the other way round, the sound rely totally on the animation and the animation rely on FPS (frame rate), If the animation get stack the sound stops completely. In this case what I did was just placed some notes in fruity loops on top of the mp3 and them generate a MIDI file to control the animation synchronized with the music.

This demo didn't take long, no more than couple of hours, it so easy to build a Guitar Hero logic based on Midi files. Each finger is a note and each instrument is a MIDI channel, that's all! Take a look.

Yeap, here is the guitar hero concept source code.

Well, I think it is all for now, feel free to contact me if you would like to clarify any doubts you have about MIDI and Flash, see you!

Alex Nino -

page #1 | page #2 | page #3


A very interesting research about recording acoustics

Finally I got the chance for writing some documentation about all this MIDI files research in flash.

check the online detailed documentation Midi Files Reader
some demos midifiles examples, feel free to ask if you have any doubt.

date: 03 May 2012 - 20:46:00, published by javier
Great Work!
date: 13 Jul 2011 - 11:29:09
lol!! awesome, the MarioFortressSNES looks amazing.
date: 18 Apr 2011 - 13:18:30, published by Marc
Excellent! Thanks for sharing. . . Since we lost the Sequence Xtra for Director I've been looking for a Flash-based solution for playing and controlling MIDI. Currently using a Flash object in MAX/MSP but it's kludgy and a pain to bundle for distribution.
date: 06 Dec 2010 - 09:51:49, published by Leandro Zanol
Great article! Nice job! I'm working on some voice recognition (still freq only) games for music teaching and I'm on my college last year (2011) and doing my final work (don't know its name! :P) on the FFT and HMM algorithms... as a proof of concept too, I'll try building a voice command navigable website/app, let's see... Greetings!
date: 30 Nov 2010 - 22:56:33, published by yohami
unbelievable, x10