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 #21900: Note highlighting on the piano keyboard ignores ottava. #22443

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

davidfaianunes
Copy link

@davidfaianunes davidfaianunes commented Apr 16, 2024

Resolves: #21900

Bug: The pianokeyboard view was not taking into account the ottavas, so if you put an ottava on the score you would hear the pitched-up note, but the note you would see on the keyboard view would not be pitched-up by an octave as well.

Solution: In the class Note there are multiple computations for pitch, for different purposes. I've used the playback pitch (ppitch) instead of the effective pitch (epitch) on the pianokeyboardcontroller.cpp, because the playback audio was using the pitch I wanted shown on the keyboard.

Tested on Windows.

  • 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
  • I created a unit test or vtest to verify the changes I made (if applicable)

…ottava.

I've used the playback pitch (ppitch) instead of the effective pitch
(epitch) in pianokeyboardcontroller.cpp.
@zacjansheski
Copy link
Contributor

I want to make sure this is desirable behavior for transposing instruments. (I honestly don't know, I suppose if it bothers someone they can switch to concert pitch...)

@bkunda @cbjeukendrup

video1603335705.mp4

@cbjeukendrup
Copy link
Contributor

Hm... that looks a bit janky. This reminds me of #15594. We might want to introduce a toggle to switch the keyboard behaviour between "notated pitch" and "sounding pitch".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Note highlighting on the piano keyboard ignores ottavas
3 participants