There is a delay when i hit the keys to hear the sound
Hello %%HESK_NAME%%
Q: When I play notes on my MIDI controller keyboard there is a delay between hitting the note and when I hear it. What is causing this delay?
A: This delay, known as latency, is directly dependent on your sound card, the type of driver it uses, and the size of the audio buffer set for the sound card.
First of all, there is ALWAYS some latency, but 98% of people playing the game either do not notice it or it does not bother them, including most musicians. This is because the action of depressing the keys initiates the signal but most people only feel like they played with they hit the bottom of the keystroke. Literally, less than 1 in 500 ever notice much less are bothered by it, so congrats on your perceptive ears, but they can sometimes be a curse. However, on some systems, this is more noticeable. Below we have some rather technical explanations, but let me give you a more practical suggestion for now.
Percussive sounds (piano) have a sharp initial attack and so the latency is more noticeable. Choose where you can an more melodious instrument from the Tracks Menu like flute or recorder, and the latency will be less noticeable. Also, it may be your sensitive ears picking it up, see if others notice it spontaneously, or are bothered by it without you mentioning it. If they do, then the problem is most likely in your particular system's configuration or sound system. Try it on another computer to see if is still as bad. In any case, most kids just adjust naturally and are comfortable with it because it is predictable rhythm wise, not sporadic. If it becomes very obvious or very disturbing to gameplay, and the above suggestions do not help, then we may have a very weird configuration combination. Here is more technical info in that case.
Windows
Most on-board sound cards only support MME drivers, a very old driver standard that has been around since the first Windows versions. It is the slowest of all audio drivers and suffers from high latency. Professional audio cards and applications utilize WDM or ASIO drivers. WDM drivers will perform much better than MME drivers; and ASIO drivers are the industry standard because they offer the best performance with the lowest latency.
As previous mentioned, latency is dependent on the size of the audio buffer (often the number of samples; i.e. 256, 512, or 1024 samples) set for your sound card. Smaller buffer sizes equate to lower latency times, however, smaller buffer sizes also increase the processing demand put on your CPU. The buffer size is generally set in the audio preferences of the application you are running. Some professional audio cards, including most M-Audio sound cards, have a control panel where the latency or buffer size can be adjusted. Please refer to the documentation for your audio application and/or sound card to determine how to adjust the buffer size.
Mac OS X
OS X utilizes Apple's own low latency Core Audio driver format. As previous mentioned, latency is dependent on the size of the audio buffer (often the number of samples; i.e. 256, 512, or 1024 samples) set for your sound card. Smaller buffer sizes will give you lower latency times, but will also increase the processing demand put on the CPU. The buffer size is generally set in the audio preferences for the application you are running. Please refer to the documentation for your audio application and/or sound card to determine how to adjust the buffer size.
What is the right buffer size?
The actual latency times and performance at a given buffer size depend on a variety of factors including CPU speed, the sound card's drivers, and the software you are using. A buffer setting of 512 samples is a good place to start. If you still perceive a delay when playing, try lowering the buffer size to 256 samples. If you hear pops or clicks when you play, your system is not able to process the audio fast enough and you should increase the buffer size.
Thank you,
Music Wizard Support