Creating Keyboard Shortcuts for Vertical Zoom

I use Audacity for LP-to-CD conversions, often need to expand the vertical scale to chase small ticks and pops. With Audacity 2.2.1 this was pretty simple – can’t remember if I created a script or it was baked in.

With the new Audacity 2.3.0 I can Control+Click on the vertical scale which brings up a menu for “zoom reset,” “zoom x 1/2,” “zoom x 2,” “half wave,” “zoom in” and “zoom out.” I would like to add keyboard shortcuts (“control =” for “zoom in” and “control _” for “zoom out”). However the only “zoom” available on the Audacity-Preferences-Keyboard menu appears to be HORIZONTAL zoom – not VERTICAL zoom.

Can somebody point me in the right direction please.

You’re correct that you can’t make keyboard shortcuts for those functions.

In 2.3.0 vertical zooming was changed. Default behaviour is the context menu you describe.
If you go to Preferences > Tracks > Track Behaviors and check “Advanced Vertical Zooming” then the old zooming behaviour becomes available.
This “old” behaviour allows you simply right-click in the vertical ruler to zoom in. A few quick clicks should get you where you want. Then a shift-right-click will reset the vertical zoom to zero.

See this page in the manual.

– Bill

Okay thanks Bill, I’ll try that. Seems like an odd omission though – having to go backwards a version to get “advanced” features(!)

You don’t have to go back to a different version. You just need to set in Preference, which option you prefer.

In previous versions there was no option - you got “Advanced zooming” whether you liked it or not. A lot of people didn’t like it, so Audacity now gives you the option.

As far as I’m aware there have never been keyboard shortcuts for vertical zoom, and personally I don’t see benefit in such an option when the “Advanced zoom” provides much better control.

Personally, I’d love an option to get, for example, 16x vertical zoom centered on zero with one keystroke.

– Bill

I’m so used to using mouse zoom that I’d not really considered that, but on reflection I think that’s a good point.

I think that for people that use the “half wave” view, the current options for VZoom are more convenient / easier than having to specify upper and lower bounds, but I’m not keen on duplication. The options that I see are:

  1. Retain the current “VZoom” and add “VZoom Top” and “VZoom Bottom” options, where “VZoom” takes priority if set.
  2. Remove the current “VZoom” option and replace it with “VZoom Top” and “VZoom Bottom”.
  3. Leave as it is now.

In both (a) and (b) cases, “VZoom Top” and “VZoom Bottom” take numeric values in the range +/- 2.0.

I’m inclined to go with (a).
Your views?

If we’re talking about the Set Track Visuals scriptable, I’d like to see “Zoom In” and “Zoom Out” added. If I want 16x zoom in, I’d call it 4 times in a macro.

I, too, am really used to the “old, advanced” zooming, but it always annoyed me that I had to keep my mouse pointer as close as possible to the zero mark to keep the waveform centered on zero. A Zoom In command that kept the waveform centered would suit me just fine.

– Bill

I’ve added “VZoom Top” and “VZoom Bottom” to the “Set Track Visuals” macro command, so in the next version of Audacity you will be able to create a macro with any zoom level for “selected wave tracks” within Audacity’s supported range.
The supported range is:
Maximum vertical zoom = VZoomTop - VZoomBottom = 0.001
Maximum VZoom Top = 2.0
Minimum VZoom Bottom = -2.0

So, for example, to create a macro that zooms in close around the centre line, you could (for example) create a macro with “Set Track Visuals” and set “VZoom Top = 0.1” and “VZoom Bottom = -0.1”.

More complex behaviour (such as zooming in/out by a factor of 4 or more or less) can be achieved via Nyquist plug-ins.
Here’s a couple of example plug-ins that work with the current “alpha” code (so should work in the next Audacity release) that zoom in/out vertically on all selected tracks by a factor of 2.
vzoomin.ny (1.08 KB)
vzoomout.ny (1022 Bytes)