musescore / MuseScore

MuseScore is an open source and free music notation software. For support, contribution, bug reports, visit MuseScore.org. Fork and make pull requests!
https://musescore.org
Other
12.19k stars 2.64k forks source link

Give MIDI input some awareness of enharmonic context #24734

Open oktophonie opened 1 month ago

oktophonie commented 1 month ago

Your idea

Every note input from a MIDI keyboard will be spelled according to how MuseScore would normally spell that note, in isolation, in the current key signature.

I'm not saying we should try to implement some magic harmonic-awareness system, but it would be nice if, when inputting notes via MIDI, the context of the current bar, at least, could be taken into consideration.

Problem to be solved

For example:

  1. In C major, enter note input mode, play an A flat on a MIDI keyboard. image
  2. OK, it's come out as a G sharp. No problem. Press J to respell it as A flat.
  3. Press A flat again on the keyboard to input the next note. image
  4. Rend garments, etc

I venture to suggest that if there's already an A flat in the bar, then if the user inputs that same pitch again, they probably want it spelled the same.

(One could take this further in future - while trying to avoid being too 'clever' - but this seems like it would be a nice first step.)

Prior art

No response

Additional context

No response

Checklist

wizofaus commented 1 month ago

Interestingly even the existing "respell pitches" command doesn't do this - if you have a C major key signature and a measure with an A flat followed by a G sharp and select the G sharp only and do "respell pitches" it doesn't change at all. Indeed I've rarely had useful results from using "respell pitches". Not sure if it's worth trying to fix that first, then have the behaviour for MIDI input be that the same logic is used to determine the most sensible spelling.