You'd be helped out by visiting homerecording.com ...
What your having is a latency experience!
All soundcars and computers will record with some kind of delay "latency". In the software that came with your hardware there should be a way to adjust yours so it's at peak performance. Look up latency in all your manuals and help files. The MIDI will always play right on time (relatively speaking) and the audio will lag a little behind. This is a complex issue and one which computer recorders have had for as long as they've existed. When I bought my sound card (Soundscape Mixtreme) I did so because it had one of the lower latency problems of the many cards out there at the time. It uses it's own onboard processors and not the computers cpu (which has to do a lot of other things than just record your music and all at the same time)..
You have to know a bit about computers too in order to get the lowest possible latency. Your processor should be an INTEL on a PC or a a fast Mac (G3, G4) for best results. There are motherboard chipset issues, compatability of soft and hardware issues, ect... ad nausium.
I hope this helps you a little. I won't be availabe for your tech issues (I'm just too engrossed in my own) but you must search around the net and your own manuals for this latency issue. Using the lowest posible latency harware and software and computer... and you still might get some gap between the MIDI and audio files... but you can wittle it down to where you might not notice it. If your hard and software can use ASIO drivers it will reduce your latency. If you don't really know what I'm taking about... you will have to spend a lot of time learning up about this computer recording thing you've taken on. Some people are better off getting one of those al-in-one studio's and start making music. Others like me and now you have to become virtual computer geeks first... and them we might get some recording done. Anyway good luck and good hunting.
P.S.I won't be availabe for your tech issues (I'm just too engrossed in my own) but you must search around the net and your own manuals for this latency issue.