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

Feature request: Toggle for behaviour of on-screen/MIDI keyboard regarding transposing instruments #15594

Closed
cbjeukendrup opened this issue Dec 26, 2022 · 22 comments · Fixed by #24784
Assignees
Labels
community Issues particularly suitable for community contributors to work on feature request Used to suggest improvements or new capabilities needs design Design is needed

Comments

@cbjeukendrup
Copy link
Contributor

Task description
For the behaviour of on-screen/MIDI keyboard regarding transposing instruments (when the score is in transposing pitch), there are two options:

  1. When playing C, notate C (in transposing pitch), so it will sound like something different
  2. When playing C, notate something different, so it will sound like C (effectively happens when switching the score to concert pitch)

Currently, MuseScore only really supports option 1, but there was a request for the option to toggle this behaviour (while keeping the score notated in transposing pitch).

Workaround
To get option 2, temporarily switch the score to concert pitch.

Design idea
We could show this setting in both of the following two places:

  • In the menu of the '...' button in the piano keyboard window
  • In a new section in Preferences > Note Input
@cbjeukendrup cbjeukendrup added community Issues particularly suitable for community contributors to work on feature request Used to suggest improvements or new capabilities needs design Design is needed labels Dec 26, 2022
@cbjeukendrup cbjeukendrup changed the title [MU4 Feature Request] Toggle for behaviour of on-screen/MIDI keyboard regarding transposing instruments Feature request: Toggle for behaviour of on-screen/MIDI keyboard regarding transposing instruments Oct 4, 2023
@bkunda
Copy link

bkunda commented Jan 8, 2024

I've just had a separate request for this. This is something that could fall under the umbrella of general-note-input-interaction-improvements that we might tackle for one of the releases this year.
@avvvvve @Tantacrul FYI.

@Tantacrul
Copy link
Contributor

Needs a little design but should be a nice little one to queue up for the community - or we do it a bit later in the year

@davidfaianunes
Copy link

Hi! I've been working on fixing issue #21900 - "Note highlighting on the piano keyboard ignores ottava." - and came across the problem regarding keyboard-view while transposing instruments. Could you assign this feature request to me? I'm thinking of adding a toggle to switch between sounding and notated pitches.

@wizofaus
Copy link
Contributor

wizofaus commented Aug 29, 2024

BTW if you're unable to continue with this @davidfaianunes I could have a look, but it needs some sort of UX/UI to toggle on off - if someone can provide an icon and a location for it I'm happy to do the rest. I'd also like to propose it could use an OOB shortcut assignment to toggle modes, as both are equally useful (depending on whether I'm entering notes based on how I expect them to sound, or how I expect them to appear, which the software can't know...)
The PR that's linked seems only to be related to how the onscreen keyboard displays notes (I don't use that...).
I would think the option could just as well be useful for computer-keyboard input - i.e. I want to be able to enter the notes in sounding pitch, but have them shown on the score transposed as necessary. Would have to think about what that means for, say, Horn in F with no key signature, I assume pressing an F on the keyboard would automatically cause a B flat to appear on the score (normally pressing a single key on the computer keyboard would only ever add a note with no accidental).

Temporarily changing the whole score to concert pitch isn't great when you're working with a very big score, where that can cause significant re-layout and cause a noticeable delay.

@cbjeukendrup
Copy link
Contributor Author

@wizofaus Maybe it could be a toggle in Preferences > Note input. Good idea to make the changes apply to hardware MIDI keyboards too. Applying it to the computer keyboard as well may also make sense, but perhaps that should be a next step for a separate PR.

@wizofaus
Copy link
Contributor

wizofaus commented Sep 3, 2024

I'm not convinced it's a preference per se - that implies some users would nearly always work in one mode, while others would nearly always work in the other. But I can definitely see myself wanting to flip between them depending on where I'm getting the notes from (e.g. the sounding pitches as they exist in my head, or written pitches that I'm reading off another score. I.e. essentially whether I'm composing or transcribing/arranging).

@avvvvve
Copy link

avvvvve commented Sep 4, 2024

To summarize, a three-parter would be nice here:

  • A preference in note input
  • A toggle in the piano keyboard window (that is synced to the preference)
  • A shortcut to toggle both

The preference should affect note input via hardware/software MIDI devices AND entry via the in-app "Piano keyboard". I agree that making this affect keyboard letter entry can come later.

See preliminary designs below - kept the labels relatively concise but could do another pass on them!

Preferences mockup

image

Piano panel mockup

Option 1
Context menu (takes 2 clicks, but can show the user the shortcut if we set a default one)

Option 2
In-panel toggle (takes 1 click, but perhaps it doesn't need to be this prominent)

image

@wizofaus
Copy link
Contributor

wizofaus commented Sep 4, 2024

Do we have existing examples of shortcuts that toggle preferences though?
Just yesterday I found myself wanting to toggle between the two modes for voice assignment when adding dynamics - couldn't see how to assign a shortcut to that.

@avvvvve
Copy link

avvvvve commented Sep 4, 2024

I don't think we do, but that doesn't mean we can't! (though will wait for a dev to correct me on that)

@wizofaus
Copy link
Contributor

wizofaus commented Sep 4, 2024

It still doesn't feel like a "preference" to me I guess, which presumably will affect all scores in all musescore instances, now and forever. Vs a toggle which is specific to the current session, that might not even be saved if I restart the app. I.e. it's more like having "note input mode" on/off than a preference.

@wizofaus
Copy link
Contributor

wizofaus commented Sep 4, 2024

There are commands like "pan", "countin", "midi-on", "metronome" etc. that actually toggle what are stored as preferences (in notationConfiguration() oddly, despite them being playback options), though it doesn't look like any of them appear in the Preferences dialog as such. Currently they're all accessible via the playback toolbar settings icon (except count-in which there doesn't seem to be a UI element for):

image

@avvvvve
Copy link

avvvvve commented Sep 4, 2024

We cannot assume that all users wouldn't want this setting saved from session to session. Some might always want to write in concert pitch via an external MIDI keyboard.

This setting also cannot only be accessible via the piano keyboard panel because it affects MIDI input too, and I don't think that users who use external MIDI keyboards will think to go there. And there isn't an obvious MIDI panel where this belongs either.

I'll think more on whether there is another sensible place to put this, but I really think it belongs in preferences at the least. Maaaaybe we could make the concert pitch toggle in the bottom bar have two child settings: one for the notation and one for entry.

@wizofaus
Copy link
Contributor

wizofaus commented Sep 5, 2024

Totally agree it shouldn't be on the on-screen piano keyboard panel, I never even use that!
I don't mind it being in preferences, as long as it can be toggled easily with a shortcut key, which would require extra code to support (but it's not hard).

@cbjeukendrup
Copy link
Contributor Author

See #24784, which revives the old PR for this issue, but doesn't yet implement the suggested preferences option. @avvvvve I think I would prefer having two options "Use notated pitch" / "Use sounding pitch" as in that PR, rather than a single checkbox, because with the two options you can really see what you're choosing between. What do you think about that?

@rpatters1
Copy link
Contributor

I am the one who has revived this issue with #24784. That branch is currently working as I believe we would expect it to, except for the UI. Check it out if you wish. The setting is designed to persist across invocations of MuseScore.

The current UI is inherited from #22991 and is menu options on the virtual keyboard panel. I am in agreement with the consensus that the virtual keyboard panel is likely not used by quite a large number of users, so hiding the option there seems counter productive.

The UI requirements would seem to be:

  • Option should be found in a place that might occur to most users.
  • Option should be togglable by a keyboard macro.

I can probably knock out the UI in a few hours. (Less, with luck, but luck rarely happens.) But I need a design. The options would seem to be:

  • An addition to a preferences panel (as mocked up above). Can this be easily accessed by a keyboard macro?
  • Menu options on some menu that's logical and easily found. These certainly can be accessed by a keyboard macro.

A further question is: should computer keyboard entry behave the same way? Right now, if use playback pitch is selected, typing an A on the computer keyboard still puts an A in the trumpet part but shows a G on the virtual piano keyboard. That does not seem right, and I am going to see what it takes to address it.

@wizofaus
Copy link
Contributor

If it's a preference there'd need to be a separate command to toggle it that a shortcut can be assigned to.
And yeah, I'd say it's definitely expected that the virtual piano keyboard playback shows the same key you'd click on to enter that same note, though personally I'm not entirely sure of the main purpose of having that keyboard show notes as they're played back - there's even a case that it should always show sounding pitches if it's supposed to indicate what you'd play on a real piano to obtain the same notes... In future we might have a virtual trumpet or clarinet or French horn etc that showed how to finger the sounding pitch...

@rpatters1
Copy link
Contributor

What about moving the menu options from the virtual piano keyboard to the Note-entry mode menu? (The pencil icon on the note/rest strip.)

To be clear, when I said "computer keyboard" I mean the alphabetical keyboard that you type text with. Should entering an "A" from the keyboard enter a "B" on the trumpet part when this mode is enabled. I'm pretty sure it does not in Finale, though I will check. I will also see what Dorico does.

@rpatters1
Copy link
Contributor

rpatters1 commented Sep 18, 2024

FWIW, adding this feature to alpha-keyboard input looks complicated and risky. Finale does not support it for alpha-keyboard but Dorico does.

BTW, I like Dorico's terse menu options. If they appeared under the "Enable MIDI Input" option, it could be:

Enable MIDI input
Input pitch >
   Written pitch
   Sounding pitch
---
Play repeats
Play chord symbols

etc.

That would have the advantage of showing that the feature was specifically MIDI related (with virtual keyboard palette as a bonus).

@wizofaus
Copy link
Contributor

wizofaus commented Sep 19, 2024

It's definitely more useful for MIDI keyboard input (mainly due to association - because a piano itself is always non-transposing then I always expect an "A" played on a piano to produce an "A" sound - even if I happen to be writing music for a transposing instrument. But maybe some people have MIDI clarinets or trumpets and feel quite differently about that!), but I would tend to think it's better if there was just a global option "input sounding pitches" that applies to both MIDI input and computer keyboard input.
As I've said, whether I'd use "input sounding pitches" or "input written pitches" would depend almost entirely on whether I'm composing new music or transcribing from an existing score. And I often do both even for the same piece, if I'm doing an arrangement or re-typesetting old unfinished scores.

@rpatters1
Copy link
Contributor

It's more useful on MIDI for a very practical reason. I can't convey just how annoying it is to be entering a trumpet part and hear a major 2nd clash on every note. (The keyboard is playing, e.g., G, but the trumpet is echoing back concert F.) Even if I turn off the echo, it disrupts the creative process aurally to switch keys for every transposing instrument.

In principal, I agree that the alpha keyboard should work the same way. The problem is (as I said), I don't know the code well enough to understand the ramifications of making a change in Score::cmdAddPitch (beyond passing in a boolean parameter that represents the option). If someone wants to suggest a surgical change, I am open to it. Otherwise, I suggest we not let the perfect be the enemy of the good. The urgent requirement is for MIDI input.

@wizofaus
Copy link
Contributor

wizofaus commented Sep 19, 2024

But that's a different issue entirely! Why do you even have your keyboard sound on? And if you do, then you'd want to want turn off MuseScore playback on note entry, which I believe there's a separate feature request for and has already been worked on.
You wouldn't want those major 2nds if you were entering trumpet or clarinet music while transcribing off an existing (already transposed) part already either, even though in that case you would want the played-back note to transposed down from the played key.

BTW I wouldn't really expect it would require a change to Score::cmdAddPitch( ), or for the Score class to know anything about such an option. Though I guess it may well be where the logic around dealing with concert pitch vs transposing scores currently is.

@rpatters1
Copy link
Contributor

It is much more convenient in my setup to leave the keyboard sound on, and hearing the correct pitch echoed back is excellent aural feedback that I haven't fat-fingered the note entry. Of course I know the options that are available to me: please don't treat me as if I don't. I have spent the several hours that I have spent implementing this one to enable me to work the way I work most efficiently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community Issues particularly suitable for community contributors to work on feature request Used to suggest improvements or new capabilities needs design Design is needed
Projects
Status: Done
Status: Done
7 participants