Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix empty midi input device list on linux #19717

Merged

Conversation

kiselev-dv
Copy link
Contributor

Resolves: #337844

Fix empty midi input device list on linux

Fix midi port capabilities for input ports (read instead of write)

  • I signed the CLA
  • The title of the PR describes the problem it addresses
  • Each commit's message describes its purpose and effects, and references the issue it resolves
  • If changes are extensive, there is a sequence of easily reviewable commits
  • The code in the PR follows the coding rules
  • There are no unnecessary changes
  • The code compiles and runs on my machine, preferably after each commit individually
  • NA I created a unit test or vtest to verify the changes I made (if applicable)

@Jojo-Schmitz
Copy link
Contributor

I guess you mean https://musescore.org/en/node/337844 ;-)

@kiselev-dv
Copy link
Contributor Author

I guess you mean https://musescore.org/en/node/337844 ;-)

Yep, did put a wrong issue number?

@Jojo-Schmitz
Copy link
Contributor

Not really, just in the wrong format, as MuseScore.org issues don't turn into links, like GitHub issues do

@DmitryArefiev
Copy link
Contributor

Tested on LinuxUbuntu 22.04.03 LTS. My Arturia KeyLab 61 Essential works fine.
But previously I didn't have a problems with connecting my MIDI keyboard to MS4. So I can't check the issue properly

@kiselev-dv Did you have a problem with MIDI keyboard before your changes?

@kiselev-dv
Copy link
Contributor Author

Yes, I had my keyboard in midi output device list, but not in input devices.

aconnect -i
client 0: 'System' [type=kernel]
0 'Timer '
1 'Announce '
client 14: 'Midi Through' [type=kernel]
0 'Midi Through Port-0'
client 32: 'masterkey 49' [type=kernel,card=4]
0 'masterkey 49 MIDI 1'

This might be because higher end keyboards might also support midi playback so they would report write capabilities.

@kiselev-dv
Copy link
Contributor Author

While I've being answering to @DmitryArefiev i took a look into midi output https://github.com/musescore/MuseScore/blob/master/src/framework/midi/internal/platform/lin/alsamidioutport.cpp#L77C67-L77C67 and I belive it should be SND_SEQ_PORT_CAP_SUBS_WRITE | SND_SEQ_PORT_CAP_WRITE; for output ports.

Should I change this as well?

@Eism
Copy link
Contributor

Eism commented Oct 18, 2023

@kiselev-dv
Yes, please

@DmitryArefiev
Copy link
Contributor

Re-tested on LinuxUbuntu 22.04.03 LTS. My Arturia KeyLab 61 Essential works fine and available in MIDI Input/MIDI Output in Preferences>I/O

@Eism Eism merged commit 751238d into musescore:master Oct 19, 2023
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

4 participants