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 #286900 MIDI input menu has no None option #4853

Closed
wants to merge 1 commit into from

Conversation

AntonioBL
Copy link
Contributor

No description provided.

@AntonioBL
Copy link
Contributor Author

This PR tries to symmetrize the behavior of midi input and output, so that midi input can be disabled while still having midi output.
One downside is that this change makes disabled midi input as the default, so users plugging-in a midi interface have to select it in the preference dialog (and then restart the midi interface) before being able to use it for note input. The current behavior instead gets the default midi input device by default.
In case, I think this PR has to be thoroughly tested: I added also the deletion of the timer which was left unhanded, and the closing of all output streams when the midi driver is halted (so that when restarting the freed midi device is still recognized by MuseScore; at the moment after midi-off, midi-on instructions it is no more recognized and the midi driver is not initialized).

@AntonioBL AntonioBL force-pushed the nonemidiinput branch 2 times, most recently from d64de08 to de5ac5f Compare April 6, 2019 13:18
@AntonioBL
Copy link
Contributor Author

I updated the PR so that the default behavior is the same as the current one: a midi input device is automatically grabbed unless it is explicitly set to none in the preferences.
If one choose "none midi input device" (i.e. "empty" field in the dropdown menu) and at the end of the session closes MuseScore, then:

  • if the following time MuseScore is opened with a midi device present, this preference (i.e. no input midi device) is remembered;
    -if the following time MuseScore is opened without a midi device, then the preferences are reset to their default value, and the next time MuseScore is openend with a midi device it is automatically grabbed and a "none midi input" in that case must be again manually selected.

I think thorough tests are needed to see if I managed to cover all possible cases.

@AntonioBL
Copy link
Contributor Author

By request, I am also adding some code lines which should prevent the automatic grabbing of the same MIDI device for both input and output.

As before, real-life tests with actual MIDI devices are needed.

@AntonioBL
Copy link
Contributor Author

From the tests (see the related issue), the "none" preference does not survive at the third launch of the application. I will further work on this.
So this is at the moment still a work in progress, please do not merge yet.

@anatoly-os anatoly-os added Improvement work in progress not finished work or not addressed review labels May 20, 2019
@AntonioBL
Copy link
Contributor Author

The current implementation mainly works.
It probably fails (i.e. it loads the wrong preference) in a complex corner case (see discussion in the related issue).
A remaining doubt is whether or not the "no-device" string, at the moment a " " string should be an explicit and translatable "no device"/"empty" (or similar wording) string.

@Jojo-Schmitz
Copy link
Contributor

Rebase needed.
Maybe rebase to 3.x (first)?

@AntonioBL AntonioBL changed the base branch from master to 3.x November 10, 2020 14:52
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Sep 2, 2021
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Sep 2, 2021
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Sep 3, 2021
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Sep 4, 2021
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Sep 4, 2021
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Sep 9, 2021
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Sep 10, 2021
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Sep 23, 2021
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Sep 24, 2021
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Sep 26, 2021
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Sep 29, 2021
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request May 12, 2022
@RomanPudashkin
Copy link
Contributor

3.x is closed for any changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
work in progress not finished work or not addressed review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants