An important tool in every producer’s studio is a MIDI keyboard or controller. A MIDI keyboard allows you to channel through virtually any sound and play it in various pitches and keys whilst recording the sounds directly into your DAW.
Although extremely useful, MIDI keyboards come with their challenges, the most common and frustrating one being a lag between playing a note and the signal transmission. This lag is called latency in audio terms and often has nothing to do with the MIDI controller at all.
Now, you may be wondering “Why does my keyboard lag” and “How do I lower my recording latency?” There are many reasons why your MIDI keyboard could be lagging, and many simple solutions.
How to get rid of MIDI delay?
The first thing you need to do is find out what is causing the latency issue. Some of the most common causes include a large buffer size, a slow sample rate, the wrong audio driver, faulty plugins, overloaded CPU, poor specs on your computer, or problems with your cable.
You can try to remedy these issues one by one using the steps in this article to rule out which one is causing the latency.
Let’s go into depth on how you can troubleshoot what is causing your MIDI keyboard signal to lag and a few things you can easily do from home to solve it.
Definition of MIDI Terms
Before we can discuss how to fix the problem, let’s discuss what MIDI is and what MIDI latency means.
What is MIDI?
The word MIDI is simply an acronym for Musical Instrument Digital Interface. MIDI refers to the communications between various hardware or digital instruments and computer software.
A MIDI controller submits a message of what is being played to the DAW on your computer in 1’s and 0’s, and the computer makes sense of the message in order to play it back as sound.
Generally, this communication is instant, as you press a key a note instantly plays as it would, for example, on a real piano.
What is MIDI Latency?
Sometimes the messages between the MIDI controller and the computer take some time to translate, causing MIDI Latency.
MIDI Latency happens when the signal or message between the MIDI controller and the computer is slowed down somewhere along the journey between pressing the key and hearing the sound.
The result of this delay is a short pause, or lag, around a split second, between pressing the key on the MIDI controller and hearing the sound.
Steps to Getting Rid of Delay on MIDI Keyboards
Delay or latency on a MIDI keyboard is most commonly a problem somewhere along the signal pathway, rather than a problem with your MIDI controller. Thankfully, there are plenty of ways to troubleshoot the lag and have it fixed in no time.
1. Reduce your audio buffer size
When you press a key on your MIDI keyboard the message to produce sound is sent off to your DAW. Before reaching your DAW and creating a sound, the signal is processed by your computer’s sound card.
Buffer size refers to the length of time it takes for your signal to pass through the sound card and be processed into sound. If your buffer size is too big, you may hear a noticeable lag as the sound takes longer to process.
To comfortably reduce your buffer size, go to your audio driver settings within your DAW. You will see sliders to control your buffer size, lower them to around 10ms or until your lag is improved. Try not to lower them too much to avoid glitches from an overloaded CPU.
2. Raise the sample rate
Your computer’s sample rate refers to the number of samples your computer can process per second. When your sample rate is too low you will notice more lag. The lower the sample rate, the more latency you will hear.
You can adjust the sample rate of your computer to process more samples per second. Be careful not to increase the sample rate too much depending on how powerful your computer is.
Raising the sample rate puts more pressure on your computer’s CPU and some computers can easily become overloaded causing other problems.
3. Select ASIO audio drivers on Windows or Core Audio drivers on Mac OS
Most computers are not built for audio production and don’t come equipped with the best audio drivers to maintain a low buffer size, think Direct X or MME for Windows computers.
Without the right drivers, you may still experience latency even if your buffer size is low and your CPU can easily become overloaded.
If you have a Windows computer the best driver to install is the ASIO audio drivers and for Mac OS it is the Core Audio drivers. These drivers are built to handle low buffer sizes and are perfect for audio production.
If your computer doesn’t allow ASIO, you can try using ASIO4ALL instead. To activate your new driver, go to preferences in your DAW, then under the audio tab find the driver select to choose your new driver.
4. Disable your audio input device while recording MIDI only
When your audio input device is enabled you are much more likely to experience more latency as the computer struggles to process audio and MIDI signals at the same time.
If you are recording MIDI only and do not have any external recording sources, you can switch your Audio Input Device setting off completely. When your Audio Input Device is disabled, it will say “No device” and your latency problem should be instantly solved if this is the cause of the lag.
5. Manually edit or quantize your MIDI instrument after you’ve recorded it
A simple, but more labor-intensive, work-around to latency issues is to manually edit or quantize your MIDI instrument in your DAW after you have recorded it.
If you recorded through your MIDI keyboard without solving the latency issue, you are more likely to have areas where your recording is off-beat.
To solve this problem, you can either manually edit your recording by placing the notes back on the beat where you would’ve liked them, or you can quantize your recording with quantization tools.
6. Turn off applications that run in the background while recording to give you more CPU power
Every application on your computer uses a CPU when open. CPU is your computer’s processing power. Every computer has a different sized CPU and when it is overused, it causes your computer to slow down and even glitch out.
Audio production software uses a lot of CPU and, especially when your computer’s CPU isn’t big enough from the start, it can make audio production frustrating, to say the least.
Give your computer a fighting chance to handle processing the signals from your MIDI controller by turning off any applications that you don’t need when you record through MIDI. The freed-up space on your CPU could solve the latency issues you’re experiencing.
7. Disable plugins while recording or playing MIDI
Sometimes plugins are the cause of your latency and need to be disabled before you can continue your recording, lag-free.
The latency could be caused by any one of your plugins. Sometimes one of your plugins may even be faulty or uses too much CPU. The best solution is to disable all of your plugins while you record MIDI.
If you don’t want to disable all of your plugins to record, use the process of elimination to rule out which plugins are safe and which ones might be the culprit. Once you find the faulty plugin, just disable it until you’re done recording.
8.Connect your MIDI keyboard using a USB 3.0 input on your computer
If your MIDI keyboard uses a USB connection to connect to your computer, make sure that your USB port is a 3.0 version as it is newer and has a faster input speed.
Some computers have more than one USB port. If you have problems with latency and suspect your cable or input to be the problem, try and plug your MIDI keyboard into each port to see if the problem is consistent in each port.
If your MIDI keyboard connects via a MIDI output cable, you can connect to your computer via an audio interface, or external soundcard. These interfaces often connect to a laptop through a USB port.
9. Don’t use Bluetooth or WIFI streaming/casting for your computer
Connecting your audio output via Bluetooth or WIFI streaming or casting causes much higher latency.
Always opt for cabled connections instead to avoid latency. You can also try using plugin headphones instead of wireless if you are using headphones and experience lag.
10. Use a dedicated audio interface for playback rather than a built-in soundcard
Most computers are not made with audio production in mind and will not have a very powerful soundcard installed. A good soundcard can help avoid latency issues.
Instead of relying on your built-in soundcard and before you think of installing a better one, instead, use a dedicated audio interface.
An external audio interface will be a lot more powerful and often has a number of useful ports for plugging in MIDI cables and microphones. You can also simply plug it into your laptop with a USB.
11. Upgrade your CPU (if possible)
If the computer that you intend to use for audio production doesn’t have the right specs, you can replace or upgrade your computer’s CPU.
This isn’t always possible, and if the computer you’re working on is quite old, it may be worth investing in a computer or laptop with better specs dedicated to audio production.
12. Upgrade the RAM in your computer
Good RAM and CPU are essential for a computer dedicated to audio production. When your computer’s RAM gets full, your whole computer can lag.
Upgrade the RAM of your computer so that when you record through MIDI your computer has enough RAM to store data without overloading, avoiding latency.
13. Time for a new computer
Audio production software and equipment requires a more powerful computer than one intended for internet browsing and emails.
When choosing a new computer, look for one with a multi-core processor, a good CPU, and a minimum of 4 gigs of RAM. Try to get a newer model with 3.0 USB ports, like most newer Macbooks.
A computer with good specs for audio production will leave no room for latency issues and will run a lot smoother and faster in general.
Do I need a computer to use a MIDI keyboard?
You do not need a computer to use a MIDI keyboard. Many MIDI keyboards have USB connectivity and are compatible with phones, tablets, and MIDI sound modules.
If you don’t want to connect your MIDI keyboard to your PC, phone, or tablet, you can try out a MIDI sound module. These devices act as a portable sound bank, allowing you to plug your MIDI keyboard in and play it on the go.
How to connect a MIDI keyboard to an iPad?
If your MIDI keyboard has USB connectivity, connecting it to an iPad is simple. You will need to purchase an Apple lightning connection to USB adapter, or connection kit.
This allows you to plug your USB connected MIDI keyboard directly into your iPads charging port for full portability.
How do I fix MIDI delay in FLStudio?
If you are experiencing a MIDI delay in FLStudio, try to find out what the cause of the delay might be.
Make sure that you are using the best audio driver for your computer, either ASIO or ASIO4ALL for Windows, or Core Audio for Mac OS. Once your driver is installed, make sure it is enabled by going to your settings in FLStudio and choosing it as your driver.
If it isn’t your driver causing the latency, make sure it isn’t any of your plugins, and make sure your sample rate and audio buffer size isn’t the problem.
Is MIDI better than USB?
MIDI cable connections are older than USB and are a bit more complicated with three ports inside, one for MIDI in, MIDI out, and MIDI thru. The USB connection is newer and manages to work without needing the three MIDI ports.
USB is said to be a lot faster and is less likely to cause latency due to a more direct connection between the MIDI and the computer or device.
Does MIDI cable quality matter?
Due to the nature of MIDI signals being digital the cable length and quality don’t generally have an effect on latency.
The maximum length of a MIDI cable is 20 feet before cable length has a significant impact on latency unless the cable quality is very high.
What is a MIDI / USB cable?
A MIDI cable is a cable with the 5 pin DIN plug on it which carries a MIDI signal. MIDI signal can carry 16 channels.
A USB cable can connect a MIDI keyboard to a USB port without the need for the three ports carrying 16 MIDI channels each.
Latency problems with MIDI keyboards are something every producer goes through at some point and it is a truly frustrating issue.
If you’ve been through this before and your previous fix isn’t working anymore, try and pinpoint what the current reason for the lag is. There is always a solution, finding the cause of the problem is the tricky part.
Don’t give up on your MIDI keyboard too soon, it may have its quirks but it’s an essential tool for any studio, and once it’s working well you won’t be able to part with it!