Skip to content

Reduce zoom factor when zooming with mouse wheel#4243

Merged
LWinterberg merged 1 commit intoaudacity:masterfrom
LWinterberg:reduced-zoom-factor
Feb 7, 2023
Merged

Reduce zoom factor when zooming with mouse wheel#4243
LWinterberg merged 1 commit intoaudacity:masterfrom
LWinterberg:reduced-zoom-factor

Conversation

@LWinterberg
Copy link
Member

@LWinterberg LWinterberg commented Jan 27, 2023

Part 1 of #4212

@LWinterberg LWinterberg mentioned this pull request Jan 27, 2023
5 tasks
@LWinterberg LWinterberg added this to the Audacity 3.3 milestone Jan 27, 2023

wxCoord xTrackEnd = viewInfo.TimeToPosition( audioEndTime );
viewInfo.ZoomBy(pow(2.0, steps));
viewInfo.ZoomBy(pow(pow(2.0, 1/4.0), steps));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or simply pow(2.0, steps/4.0)

@Paul-Licameli Paul-Licameli self-requested a review January 27, 2023 19:28
Copy link
Collaborator

@Paul-Licameli Paul-Licameli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Even better now.

@LWinterberg LWinterberg requested a review from Tantacrul January 27, 2023 19:57
@LWinterberg
Copy link
Member Author

I'd like a test from the @Tantacrul to see if this feels better to him

@SteveDaulton
Copy link
Member

This feels worse for me as it makes zooming much slower. For example, to zoom from a 30 second view to sample level view requires three mouse scrolls with previous version, and 10 mouse scrolls (tedious) with this patch.

Personally I have no problem with the mouse zoom in previous versions, and due to the absence of feedback to the contrary, I suspect that the vast majority of users agree.

If mouse zoom is too coarse for some users (I guess that is the case for LWinterberg), then it may be worth making this a user preference. Personally I'd opt for the same zoom scrolling as Audacity has had for the last decade.

@Paul-Licameli
Copy link
Collaborator

Paul-Licameli commented Jan 29, 2023

This feels worse for me as it makes zooming much slower. For example, to zoom from a 30 second view to sample level view requires three mouse scrolls with previous version, and 10 mouse scrolls (tedious) with this patch.

Personally I have no problem with the mouse zoom in previous versions, and due to the absence of feedback to the contrary, I suspect that the vast majority of users agree.

If mouse zoom is too coarse for some users (I guess that is the case for LWinterberg), then it may be worth making this a user preference. Personally I'd opt for the same zoom scrolling as Audacity has had for the last decade.

A user preference is always a possibility.

Just lately I was using CTRL plus mouse wheel (or actually, pinch and spread on my touch pad instead of a wheel), while the pointer was in the vertical ruler of the spectrogram view. Maybe little known, but you can pan (with Shift) and zoom vertical scales too. And the defaults were too coarse for my liking.

@Paul-Licameli
Copy link
Collaborator

Paul-Licameli commented Jan 29, 2023

I wonder if we could even experiment with some kind of accelerating zoom? Small steps (logarithmically that is) at first, but larger if the next mouse wheel click arrives in less than some elapsed time? Complicating the implementation of course.

@Paul-Licameli
Copy link
Collaborator

Paul-Licameli commented Jan 29, 2023

Anyway if the multiplier should be some constant but not 2, I suggested it should be a root of 2 so you get the exact twofold multiplier with a few wheel clicks. It’s now the fourth root, but maybe the cube or square root is a compromise.

@LWinterberg
Copy link
Member Author

https://github.com/audacity/audacity/actions/runs/4027212455 - 4th root (4 scroll ticks = 1 current scroll tick)
https://github.com/audacity/audacity/actions/runs/4038643540 - 3rd root (3 scroll ticks = 1 current scroll tick)

The current behavior is definitely too sensitive. It takes a single scroll to go from default zoom to half a day. With a free-spinning mousewheel, I can zoom from one extreme to the other faster than I can put my finger down to stop the scroll midway. With a trackpad, taking off the fingers from the pad can cause a tick (rarely two) of zooming, which throws off the zoom level by up to an order of magnitude.

With the 3rd root, a single scroll goes from default zoom to about a song length. With a free-spinning wheel I now have hope of catching it at a reasonable level, and the trackpad errors are nowhere near as significant.

@Tantacrul
Copy link

Tantacrul commented Jan 30, 2023

@LWinterberg - they're both quite good. I marginally prefer: https://github.com/audacity/audacity/actions/runs/4027212455

As for hiding this change behind a setting. I think that will unfortunately do two undesirable things

  • It won't solve the quite poor performance of the mouse wheel when zooming (this PR - responsiveness - is only part of the issue)
  • New settings just introduce more complexity that 95% of our audience will never discover

You can't make changes of any kind without someone being unhappy with it. As with the copy & paste toolbar, if enough audience members complain, then we'll possibly add the setting then - and allow them to set the responsiveness to whatever they want. However, the change is hardly drastic as it is. It simply just means you are less likely to under/overshoot

@SteveDaulton
Copy link
Member

As for hiding this change behind a setting.

Adding a preference does not in any way "hide" the change if you make your preferred setting the default. It just acknowledges that some users may prefer mouse zoom the way that it has been for the last decade.

You can't make changes of any kind without someone being unhappy with it.

Surely, when some users prefer a feature one way, and other users prefer it another, then it makes sense for it to be a user preference.

@Tantacrul
Copy link

I think the simplest summary I can give is:

  • I doubt too many people will object (or even notice) a slightly less responsive setting for zoom.
  • If I'm wrong, we can create a setting for it
  • Regardless, the revised version should be the default (unless my finger is completely off the pulse and most users totally hate it)

@petersampsonaudacity
Copy link

petersampsonaudacity commented Jan 31, 2023

Testing on W10 with @LWinterberg 's latest branch: audacity-win-3.3.0-alpha-20230129+20dfd68-x64

I find myself liking the less sensitive mouse-wheel scrolling, it takes me 3 wheel moves to get to half or double.
And I had also been testing Leo's previous branch builds for this so have tried it a fair amount.

I do note that the old zoom factor of 2x still applies to Audacity's zoom in/out buttons and commands - and I think I like that this zoom factor is retained for the menu commands and Edit toolbar buttons - but I would not be unhappy if the new less aggressive zoom factor used for the mouse-wheel zoom was also used for the commands and buttons zooms.


And I do note that Reaper seems to have a similar zoom factor for mouse-wheel zooming - there two wheel moves get you to half or double. So theirs is slightly more aggressive than Leo's current build - but less aggressive that Audacity's current setting. Reaper's zoom menu items and their associated shortcut zooms (plus and minus keys) are also less aggressive than Audacity's 2x zoom)
So far I haven't found a setting in Reaper to change the sensitivity. We may think that Audacity has complex preferences settings, but Reaper's are far, far, more complex and extensive.

@petersampsonaudacity
Copy link

petersampsonaudacity commented Jan 31, 2023

This feels worse for me as it makes zooming much slower. For example, to zoom from a 30 second view to sample level view requires three mouse scrolls with previous version, and 10 mouse scrolls (tedious) with this patch.

This only takes me (with Leo's branch build) 5 mouse scrolls to go from 30secs to sample level view at full screen size - and only 4 mouse scrolls at default window size, where a mouse scroll is a full push of the wheel i.e. multiple mouse-wheel clicks and not a single click.

Reaper is similar in this regard.

I also note that if I spin the mouse-wheel forward fast with Ctrl held down the it zooms straight to maximum zoom individual sample level. Is this an easter-egg? I certainly see nothing in the manual regarding this.

@petersampsonaudacity
Copy link

I've just run this past my "Mystery-Shopper" - she too thinks the less aggressive mouse zoom is much better ...

@Tantacrul
Copy link

We're getting dangerously close to unanimous agreement here. I feel weird.

@miller-panda miller-panda self-assigned this Feb 2, 2023
@miller-panda
Copy link

Tested on Windows and MacOS and confirmed that Zoom factor when zooming with mouse wheel has been reduced and features a much higher degree of usability for general users.

@LWinterberg LWinterberg merged commit 6dc21fe into audacity:master Feb 7, 2023
@LWinterberg LWinterberg deleted the reduced-zoom-factor branch February 7, 2023 12:55
@1schlick
Copy link

1schlick commented May 5, 2023

Zooming is unusable on MacOS if using a pinching/spreading motion with fingers on the trackpad. It takes what feels like forever of doing this carpal-tunnel-inducing motion over and over again. I'm having to use keys instead, which are much more complex and don't offer as much versatility as simply having one definitive way to scroll on the part of the track that my eyes are looking at. Please add the option to change zoom sensitivity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

7 participants