This is what's known as latency. If you are trying to trigger a sound generated by a softsynth in response to MIDI messages, and rendered by software into the output of the computer's soundcard, you need low-latency drivers for the soundcard (nd host software that supports them) to even have a hope of doing this in real time. That is, ASIO drivers or WDM drivers. The operating system you are running under will also be an issue, at least with WDM drivers -- you pretty much need Windows XP or Windows 2000 for those.