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 drawing of ghost notes when detuning #7465

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

regulus79
Copy link
Contributor

Description

This pull request makes the detuning ghost notes actually be drawn in their proper position and size in the Automation Editor. Additionally, when opening the Automation Editor for detuning, the default vertical zoom is changed to 200% to focus on smaller changes instead of the whole -60 to 60 semitones. However, since that default vertical zoom persists between Automation Editor sessions, the default vertical zoom for all other automation clips is changed to Auto so that the 200% zoom is reset.

Changes

  • In AutomationEditor::setCurrentClip(), an if statement is added which sets the default vertical zoom depending on whether it is for detuning or not.
  • In AutomationEditor::paintEvent(), if the ghost notes are for detuning, the y pixel position of each ghost note is calculated using yCoordOfLevel() to get the correct position relative to the grid. Additionally, the height of each semitone is calculated via yCoordOfLevel(0) - yCoordOfLevel(1).

Note

I am aware that setting the zoom to default every time an automation clip is opened is not ideal, since some individuals may wish to have their zoom preferences persist between clips. On the other hand, some may find it useful that the zoom resets each time. I would love to hear your opinions.

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.

1 participant