[SOLVED] Trouble with external MIDI keyboard on Linux

• Oct 13, 2021 - 20:47

Hello forums,

I've tried looking up previous forum posts and their solutions, but I can't seem to find anything that gives me a solution.

I'm trying to get MuseScore to work with an external MIDI keyboard (Arturia Minilab II) on my linux machine (Arch Linux). My main audio server is PulseAudio.

When on default I/O settings (PulseAudio selected in I/O menu):
- Mouse input works (can input notes, the notes play back audio)
- Computer keyboard input works (can input notes, the notes play back audio)
- MIDI input DOES NOT work (cannot input notes, no playback) (MIDI input is toggled at the top of the screen)

When PortAudio selected (PortAudio as I/O— API: ALSA, MIDI Input/Output: my MIDI keyboard, Device: sysdefault)
- Mouse input playback missing (can input notes, no playback)
- Computer keyboard input playback missing (can input notes, no playback)
- MIDI input playback missing (can input notes, no playback)

So basically, I can get MIDI input to sort of work when I select PortAudio as the back end, but then audio playback stops working. I have a feeling this has something to do with:
1. My MIDI keyboard doesn't have speakers, so if MuseScore is directing audio output to my keyboard, it won't be able to produce any sound
2. I think my main audio server is PulseAudio, at least for the rest of my system, so maybe trying to use PortAudio as the back end for MuseScore won't work as expected?
2. Even if I were to use PortAudio, I have no idea what to put as the 'device' in the PortAudio settings

So as you can see, I don't really know what I am doing... what I want is for me to be able to input notes via my MIDI keyboard, and to also be able to have audio output from MuseScore correctly output through my machine's speakers.

Any help would be greatly appreciated!

Thanks a lot,
Yuta


Comments

I haven't tried linux version yet with a midi controller, but I just checked and it does seem very confusing and I think there might be issues. I'd suggest reading thru this. There's a couple of solutions in there that might work for you.

https://musescore.org/en/node/307329

I'd suggest trying this solution first as it's likely just this:

Same problem + solution / quick fix.
Connect and turn on your piano.
Open MuseScore - go to the settings in the picture from willy.
Set portaudio - save - restart MuseScore
Go to the setting again - now you get the roll down menu ;-)

In reply to by oscarcar

Dear oscarcar,

Thank you for the reply. I have been able to resolve my problem thanks to you!
So my problem was slightly different from those in the thread that you linked, but it helped me solve my problem anyway and I was basically able to resolve my issue by doing almost the same thing! So thank you.

What happened for me:

Originally:
- PortAudio could be selected and the dropdown menus also worked without me having to restart MuseScore
- The issue: When selecting my MIDI keyboard via PortAudio, MIDI input worked as expected but there was NO PLAYBACK

With your help/the thread:
- I selected PortAudio, then restarted MuseScore
- After restarting, I tested mouse input to see if playback was working. It was not. I went into settings, selected my MIDI output under PortAudio as 'pulse' (I selected this because I think PulseAudio is my main audio server that actually outputs to my speakers) and restarted MuseScore again
- After restarting for the second time, I tried to input notes via the mouse method and voila, playback was working! I checked the settings menu, and found that MuseScore had automatically now selected MIDI output as 'surround71'. I have no idea what this is and why it was changed to this after I manually selected 'pulse', but hey, it's working. (if anyone knows I would greatly appreciate if you explained!)
- Now I quit MuseScore, and then plugged in my MIDI keyboard. Then, started MuseScore again, selected the keyboard as MIDI input, and then voila, MIDI input is working and playback is working!

In reply to by yutanagano

Glad you got it working. It seems like there's a bug related to the order of actions. Other than that I have no idea, although audio in Linux is kind of a mess unfortunately. I may run into your problem when I start using MuseScore in Linux more. You might want to consider AVLinux (should be rock solid for audio, no frills) or Ubuntu Studio (good but flashier, and can be added to normal Ubuntu) for a distro.

"surround71" as a MIDI output strikes me as very odd, since that sounds like 7.1 audio. This may be indicative of a bigger bug.

Do you still have an unanswered question? Please log in first to post your question.