lmms icon indicating copy to clipboard operation
lmms copied to clipboard

Fix drawing of ghost notes when detuning

Open regulus79 opened this issue 1 year ago • 4 comments

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.~~

Edit: I have removed that portion of this PR as it doesn't feel very neat. I can add it back if anyone wants.

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.

regulus79 avatar Aug 22 '24 23:08 regulus79

Closing in favor of #7759

regulus79 avatar Mar 08 '25 00:03 regulus79

Ok I just realized since #7759 doesn't actually get rid of the detuning editor, this is still technically a bug. Let me know if you want me to reopen this.

regulus79 avatar Jun 01 '25 14:06 regulus79

If 7759 doesn't fix this, then I would prefer this be fixed. This is still a big misleading bug even if there's a way to avoid seeing it.

Monospace-V avatar Jun 01 '25 14:06 Monospace-V

Sure! I'll reopen this, but I will likely remove the portion of this PR which edits the default zoom, since although that is useful, it gets complicated because the editor is shared with all the other automation stuff.

regulus79 avatar Jun 01 '25 17:06 regulus79