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

Mapping MIDI button executes command twice - on both press and release #17549

Open
brettrp opened this issue May 13, 2023 · 4 comments
Open

Mapping MIDI button executes command twice - on both press and release #17549

brettrp opened this issue May 13, 2023 · 4 comments
Assignees
Labels
MIDI Issues related to MIDI input/export, or MIDI devices P2 Priority: Medium regression_ms3 Regression from MS3 (3.6.2)

Comments

@brettrp
Copy link

brettrp commented May 13, 2023

Issue type

Other type of issue

Bug description

Assigning a MIDI button to command executes the command twice: once on press and once on release. This means:

  • Note input: toggles on when the button is pressed, toggles off again when released

  • Duration dot: toggles on when button is pressed, off again when released

  • Play: starts playing on press, immediately stops on release

  • Tied note: adds two tied notes: one on press, one on release

  • Undo: undoes two commands

  • Rest: toggles on and off again on press and release.
    But Rest should probably enter a rest of the current duration, not select Rest mode (because otherwise there is no way to enter a rest from a MIDI keyboard)

Steps to reproduce

  1. Attach a MIDI keyboard (I used an MAUDIO Oxygen 49)
  2. Go to Preferences -> MIDI mappings
  3. Choose Note Input, Assign MIDI Mapping, and then click a button on the MIDI keyboard
  4. Go back to the score. Press the newly assigned button.
    Instead of toggling into Note Input mode, Musescore switches into Note Input mode when the button is pressed, and out again when it's released.

Screenshots/Screen recordings

see comment

MuseScore Version

OS: macOS 13.3, Arch.: x86_64, MuseScore version (64-bit): 4.0.2-230651546, revision: github-musescore-musescore-dbe7c6d

Regression

I don't know

Operating system

macOS 13.3.1, Apple M1 Max MacBook Pro

Additional context

No response

@muse-bot muse-bot added the needs review The issue needs review to set priority, fix version or change status etc. label May 13, 2023
@brettrp
Copy link
Author

brettrp commented May 15, 2023

Additional information:

Using MIDI Monitor, I can see that the buttons are sending

  • Control 127 on button down (eg. B0 66 7F)
  • Control 0 on button up (e.g. B0 66 00)

I think this is pretty normal default behaviour for a MIDI button.

It is possible to change the button to behave as a toggle (e.g. send 127 on the first press, 0 on the second press). However, this still leaves the issue of actions like Undo and Tie. These probably shouldn't be executing on the 0 (up/off) message.

@tsumare
Copy link

tsumare commented Sep 8, 2023

My Akai MPK Mini III keyboard has a similar problem.

When I press down on a pad, it sends [185, 21, 127]. When I release the pad it sends [185, 21, 0].

The result of this is as this issue describes. If I bind CC 21 to "Play", MuseScore will play my music only when I am holding it down, as it registers the release message (level 0) as another press.

MuseScore 3 behaves correctly when it receives the same sequence of events. I suspect that it simply ignores CC messages with level 0. This behavior would seem to be appropriate in MuseScore 4 as well. Certainly as an option, if not the default.

I am glad to see #15219 fixed, as it was a major reason I was unable to upgrade to MuseScore 4.0. Unfortunately, due to this issue, MIDI controller bindings are still relatively unusable.

@DmitryArefiev DmitryArefiev added regression_ms3 Regression from MS3 (3.6.2) P2 Priority: Medium and removed needs review The issue needs review to set priority, fix version or change status etc. labels Sep 8, 2023
@DmitryArefiev
Copy link
Contributor

Can reproduce with my Arturia KeyLab 66 as well (4.2 master, Win10)

Doesn't occur in MS3

bandicam.2023-09-08.13-20-12-276.mp4

@DmitryArefiev DmitryArefiev added the MIDI Issues related to MIDI input/export, or MIDI devices label Sep 8, 2023
@mikefoxnobel
Copy link

Can reproduce with my Novation LaunchKey 37.

OS: Windows 10 Version 2009 or later, Arch.: x86_64, MuseScore version (64-bit): 4.1.1-232071203, revision: github-musescore-musescore-e4d1ddf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
MIDI Issues related to MIDI input/export, or MIDI devices P2 Priority: Medium regression_ms3 Regression from MS3 (3.6.2)
Projects
Status: No status
Development

No branches or pull requests

7 participants