AS3 music game - how to avoid lag?

Okay, I am designing a game where it is very important that you hit notes to the beat.
You could say it’s a bit like Guitar Hero.

The soundtrack and sound effects should match the beat of the game.

This is the biggest problem I can think of: If for some reason the game lags (like if the player is on an old computer or they decide to schedule their annual DVD backup and reencryption on that day) even if it is just for a few seconds, when the computer restores to normal, the soundrack might be off.

Even by being off by 1/10th of a second, it will throw the user off and basically kill the game.

I have no problem using MIDI files for the game soundtrack and most sound effects, so would there be any way to time the MIDI to play correctly, avoiding lag?

Is there any other way I could do this?

:mu: < Music to my ears