Tuesday, August 9, 2011

LMMS and a MIDI keyboard

I think I mentioned a few times that I have a wimpy little MIDI keyboard. It's basically just a sampler with a few instruments built in. It always had MIDI ports, but I hadn't given them much thought despite having had the keyboard laying around for more than a year. Then I got to thinking, "I wonder if I can plug this hunk of junk into LMMS and make it sound super awesome."

The first order of business was getting the thing to plug into my machine. I obviously don't have one of those uber-expensive soundcards with a MIDI port built in. I was happy to find that MIDI to USB coverter cables are not at all abnormal. I went to eBay and got me the cheapest one. The cheapest one happened to be in China (figures) so it took around three weeks to show up at my door.

After a bit of trial and error trying to figure out which parts of the cable to plug into which parts of the keyboard, I finally got it to send MIDI events back and forth. My first attempt after that was to get it running with ZynAddSubFX by using Jack. That didn't work, so I gave up on that hoping LMMS had something easier. It did. I was able to set up LMMS to pipe the MIDI events from my keyboard to a particular track with absolutely no problems. Except one.

I can push a key, and the instrument in LMMS with play the note just fine. It just won't do it until about half a second after I push the key. Half a second may not seem like much, but it's a huge problem when it comes to music playing, especially when I'm trying to sync with other stuff. I looked around online, and apparently a lot of people end up with this problem. This is also apparently one of those really devious problems where there are a hundred fixes each of which only work for one or two people. Great, just great...

Still, keyboard with too much delay to play live is better than no keyboard at all. I'll probably get this sorted out eventually, but until then I'll probably still be confined to manual note sequencing in the piano roll.



  1. You should look for other models of midi keyboard. They have newer models that have much more to offer.

  2. In the General settings tab you can alter the buffer settings. It might help, but I don't know for sure. I haven't hooked up a Midi device yet, but I did use it to help my computer keyboard play faster.

    1. In the two years since I wrote this, I have not only found the optimal solution to my latency problems (I use JACK in LMMS now, and I've tweaked my JACK settings to the point where I have less than 30 ms latency), but I've also upgraded my keyboard to an Oxygen 61. You are correct that the buffer size is one of the biggest parts of the issue, even when configuring JACK outside of LMMS. It has a direct effect on latency, but you can set it as low as your machine can handle.