I luckily found the answer to this problem, so I'm going to self-answer this.
Problem: MIDI input lags by 3 - 5 seconds (not a buffer size issue).
Setup:
For me:
- Yamaha YDP-S30 digital piano
- E-MU Xmidi 1x1 Tab
- Some software capable of receiving MIDI (e.g. any DAW; Cubase for me)
Remarks:
- This setup had previously worked with no issues (3 - 4 days for me) until it suddenly failed
- Which means none of the following were relevant (I had these settings for days):
- Using ASIO drivers to decrease latency
- Changing the ASIO configuration (specifically the buffer size)
- Unplugging devices from USB ports to decrease latency
- Reinstalling drivers, configuring the software, restarting the computer
- Which means none of the following were relevant (I had these settings for days):