MIDI Problem (Delays in transmission)

I’ve got a digital piano hooked up to my computer via a 20ft MIDI cable. I have software on my computer with tones sampled from a Steinway piano which I am sending back to my piano from the computer soundcard, with a standard stereo cable to the stereo inputs on my piano. The sound works fine, but there is a half second or so delay from when I press the key and then hear the sound.

Why does this happen? Is it because of the length of the cable? Would a wireless MIDI such as this one solve the problem? If this might work, will the transmission “go around a corner”, as my piano and computer are in seperate rooms? Was that last question completely stupid??? :slight_smile:

The problem is called latency, and reducing it is a major part of setting up a digital audio workstation. It only takes about 10ms of latency before you notice the delay.

The whole chain needs to be examined, and the length of the MIDI cable has nothing to do with it at all.
What sort of MIDI interface do you use?* If it is USB1 it could introduce some latency, although MIDI is pretty slow and this usually is not an issue.

What software are you using to play your samples? There maybe a latency setting that is too high in the software. Make sure you are not using the Microsoft GS Wavetable MIDI device - it is terribly slow.
How does this software talk to the sound card?* There are a number of ways that an audio application can drive the physical sound hardware. Ordinary Microsoft sound card drivers (MM for multimedia) are really slow. XP style WDM audio drivers can be fast, but not always. ASIO drivers are the fastest, designed for low latency. If your soundcard does not have ASIO drivers, try ASIO4ALL - a generic ASIO driver that uses WDM features to provide low latency.
Do you have plenty of memory?* You want to be able to load up the samples into memory so the system is not delayed loading them from disk.
Is the CPU fast enough?* Your audio application may have a CPU usage monitor that tells you if the CPU is overloaded.
Are you running things in the background like Antivirus and other apps?* These use processor that you need to play music. A music workstation should be a dedicated system optimised for speed.

Try looking at a few of these issues, and get back.


I was actually able to find the problem with the help of a friend of mine. I simply had the buffer size set too high on the Steinway software. Once I reduced that everything was fine. Even so, the info you provided will definitely help me in the future, novice that I am to the whole MIDI thing. Thanks so much!

And already I have another question. When I am playing my digital piano, using everything that I described earlier, every once in a while I will hear something, that I can only describe as an electronic “fart”. I will hear all the notes of the piano, and then, all of a sudden, this weird “sputz”, like the piano is trying to eject one of the MIDI cables, or something.

What is this?

If your ‘sputz’ is kind of a crackle you might be trying to play more notes at once than the computer can handle.

Probably, your buffer is set too low :smack:

As noted above, this can be really complex. Your audio software wants to run in realtime - to respond instantly to events and to have the right to react to those events and send data out the audio device when it needs to.

However, Windows (and OS-X and Linux to a lesser extent) are multitasking shared resource operating systems. They get interrupted by non-musical events, try to share the CPU fairly (based on some definition of fair), and ensure that all running processes get a chance to execute and access to resources.

These competing priorities mean that sometimes rather than streaming generated audio data smoothly to the audio output, the program produces data, it gets queued up, and does not get delivered to the sound card smoothly but in spurts, and the driver tries to compensate by playing the data too fast or dropping part of the data and you get “sputz” and “crackle” on the audio output.

So, it may be other background tasks grabbing the CPU, it may be hardware demanding attention and behaving badly (PCI Latency settings), it could be when the software has to read new samples off the hard disk and the I/O takes too long.

Try upping the buffer a bit for a start. Look at the audio driver issues I mentioned in the initial post, disable AV, disable network cards and see what happens.