Shortcut : fit track(width) into view?

Foo-Bar wrote on 2/16/2023, 5:48 AM

Is there, by any means, a shortcut for fitting the complete project into the view / width of my monitor?

When I am zoomed in to a track, I want to press X so Vegas zooms out and shows the project from 00:00 to "the end", fitting in the boundaries of my monitor.

Now I have to zoom out manually, adjust the zoom factor, select the zoom-tool, define the area I want to zoom / fit and release the mouse.

Would be nice if there is a dedicated "fit track (or project) into view" shortcut.

Comments

jetdv wrote on 2/16/2023, 9:00 AM

Save this as "Fit Project to View.cs" in [My Documents]\Vegas Script Menu

Then assign this script to a keypress.
 

using ScriptPortal.Vegas;

public class EntryPoint
{
    public void FromVegas(Vegas vegas)
    {
            Vegas myVegas = vegas;

            Timecode cursorPos = myVegas.Transport.CursorPosition;
            myVegas.Transport.SelectionStart = Timecode.FromFrames(0);
            myVegas.Transport.SelectionLength = myVegas.Project.Length;
            myVegas.UpdateUI();
            myVegas.Transport.ZoomSelection();
            myVegas.Transport.SelectionLength = Timecode.FromFrames(0);
            myVegas.Transport.CursorPosition = cursorPos;
    }
}

What did you have in mind for "Fit Track"?

rraud wrote on 2/16/2023, 10:16 AM

Does not 'Ctrl+ Down Arrow' do approximately the same?

jetdv wrote on 2/16/2023, 10:48 AM

@rraud, it's very close. The script version fills up more of the timeline width but it is very close.

DMT3 wrote on 2/16/2023, 10:52 AM

Another quick way, but not as glamorous as a script, is to drag the zoom line.

Gid wrote on 2/16/2023, 11:16 AM

Another quick way, but not as glamorous as a script, is to drag the zoom line.

@DMT3 Hi, or just double click on it, although I read the op's post as wanting a keyboard shortcut not a mouse one

Vegas Pro 20
Vegas Pro/Post 19 (Latest build), HitFilm Pro,  
Magix Movie Studio Platinum 2023 - from 2004-ish - Latest version,
Magix VPX14
Adobe After Effects
Boris Continuum & Sapphire, 
Silhouette Standalone + Plugin, 
Mocha Pro Standalone + Plugin, 
Boris Optics,
Desktop PC Microsoft Windows 10 Pro - 64-Bit
ASUS PRO WS WRX80E-SAGE SE WIFI AMD Motherboard
AMD Ryzen Threadripper PRO 3975WX 3.5GHz 32 Core
Corsair iCUE H150i RGB PRO XT 360mm All-in-One Liquid CPU Cooler
RAM 256GB ( 8x Micron 32GB (1x 32GB) 2666MHz DDR4 RAM )
2x Western Digital Black SN850 2TB M.2-2280 SSD, 7000MB/s Read, 5100MB/s Write
(programs on one, project files on the other)
Graphics MSI GeForce RTX 3090 SUPRIM X 24GB OC GPU
ASUS ROG Thor 1200W Semi-Modular 80+ Platinum PSU 
Fractal Design Define 7 XL Dark TG Case with 3 Fans
Dell SE3223Q 31.5 Inch 4K UHD (3840x2160) Monitor, 60Hz, 

At the moment my filming is done with a Samsung Galaxy S23 Ultra 5G

jetdv wrote on 2/16/2023, 11:51 AM

Let's look at the various options:

Mouse Wheel:

CTRL-Down Arrow:

Double-click:

Script:

So if you want to fill the screen width to the fullest really fast, the script option is the way to go. But, at least, there are several other options available that get you close.

Gid wrote on 2/16/2023, 12:01 PM

@jetdv Hi, different PC's, I don't get that generous space at the end with double click.

I zoomed in with the mouse wheel, then double clicked the slider at the bottom.

Last changed by Gid on 2/16/2023, 12:03 PM, changed a total of 1 times.

Vegas Pro 20
Vegas Pro/Post 19 (Latest build), HitFilm Pro,  
Magix Movie Studio Platinum 2023 - from 2004-ish - Latest version,
Magix VPX14
Adobe After Effects
Boris Continuum & Sapphire, 
Silhouette Standalone + Plugin, 
Mocha Pro Standalone + Plugin, 
Boris Optics,
Desktop PC Microsoft Windows 10 Pro - 64-Bit
ASUS PRO WS WRX80E-SAGE SE WIFI AMD Motherboard
AMD Ryzen Threadripper PRO 3975WX 3.5GHz 32 Core
Corsair iCUE H150i RGB PRO XT 360mm All-in-One Liquid CPU Cooler
RAM 256GB ( 8x Micron 32GB (1x 32GB) 2666MHz DDR4 RAM )
2x Western Digital Black SN850 2TB M.2-2280 SSD, 7000MB/s Read, 5100MB/s Write
(programs on one, project files on the other)
Graphics MSI GeForce RTX 3090 SUPRIM X 24GB OC GPU
ASUS ROG Thor 1200W Semi-Modular 80+ Platinum PSU 
Fractal Design Define 7 XL Dark TG Case with 3 Fans
Dell SE3223Q 31.5 Inch 4K UHD (3840x2160) Monitor, 60Hz, 

At the moment my filming is done with a Samsung Galaxy S23 Ultra 5G

jetdv wrote on 2/16/2023, 12:08 PM

@Gid it may depend on other factors as well but that's what I get every time with that project when I double-click. The only way to "quickly" fill the entire width is with the script. All other options give what I showed in the images above. Now, I can drag and get it even tighter but it's not "fast".

Foo-Bar wrote on 2/16/2023, 12:09 PM

Save this as "Fit Project to View.cs" in [My Documents]\Vegas Script Menu

Then assign this script to a keypress.
 

using ScriptPortal.Vegas;

public class EntryPoint
{
    public void FromVegas(Vegas vegas)
    {
            Vegas myVegas = vegas;

            Timecode cursorPos = myVegas.Transport.CursorPosition;
            myVegas.Transport.SelectionStart = Timecode.FromFrames(0);
            myVegas.Transport.SelectionLength = myVegas.Project.Length;
            myVegas.UpdateUI();
            myVegas.Transport.ZoomSelection();
            myVegas.Transport.SelectionLength = Timecode.FromFrames(0);
            myVegas.Transport.CursorPosition = cursorPos;
    }
}

What did you have in mind for "Fit Track"?

This script is absolutely the best solution, period.

Place the script in;

C:\Program Files\VEGAS\VEGAS Pro 20.0\Script Menu\

And I did attach "global CTRL + F" to it (F from "fit"), since I don't use the default "F" shortcuts.

It's a bit slow (like it takes one second to proceed all the actions in the queue), but it (punt inteded) fits the job.

All the other solutions (some of I was aware of, some where new to me) left a lot of wasted space;


I solely work with one (audio) track, using Vegas as a DAW avant-la-lettre (hey, it started as a DAW and I use Vegas since version 3).

And when I want a "complete overview" of the project (one track, masterbus, some enveloppes) I don't want to click my way around until it (doesn't) fit.

The script above also uses the "wasted space" which gives me more (again, punt intended) headroom to view at (or screen real estate, if you want).

Foo-Bar wrote on 2/16/2023, 12:15 PM

@jetdv Hi, different PC's, I don't get that generous space at the end with double click.

I zoomed in with the mouse wheel, then double clicked the slider at the bottom.

When I do so, I have about 50 to 35% unused space.

Maybe because I have a two monitor setup and Vegas renders the project for the smallest monitor?

The space left is exact the difference between monitor I and II in my set-up.

So consider it (another) bug, maybe...

Foo-Bar wrote on 2/16/2023, 12:18 PM

@Gid it may depend on other factors as well but that's what I get every time with that project when I double-click. The only way to "quickly" fill the entire width is with the script. All other options give what I showed in the images above. Now, I can drag and get it even tighter but it's not "fast".

The situation with my default setup is even worse, leaving me with about 50 to 35% empty scrollbar / track / thumb before the project "fits".

Looks like the algorithm for scaling over the x-axis is not made relative, but absolute.

 

john_dennis wrote on 2/16/2023, 1:16 PM

If I only had a penny for each time I've done this in Sound Forge and Vegas Pro since 1990-something...

Triple Left-Click

Right-Click Zoom Selection

Last changed by john_dennis on 2/16/2023, 1:21 PM, changed a total of 1 times.

My main system:
Motherboard: ASUS ProArt Z790-CREATOR WIFI
CPU: Intel Core i9-13900K - Core i9 13th Gen Raptor Lake 24-Core (8P+16E) P-core Base Frequency: 3.0 GHz E-core Base Frequency: 2.2 GHz LGA 1700 125W Intel UHD Graphics 770 Desktop Processor - BX8071513900K
GPU: Currently intel on-die video adapter
RAM: CORSAIR Vengeance 64GB (2 x 32GB) 288-Pin PC RAM DDR5 5600 (PC5 44800) Desktop Memory Model CMK64GX5M2B5600C40
Disk O/S & Programs: WD Black SN850 NVMe SSD WDS100T1X0E - SSD - 1 TB - PCIe 4.0 x4 (NVMe)
Disk Active Projects: 1TB & 2TB WD BLACK SN750 NVMe Internal PCI Express 3.0 x4 Solid State Drives
Disk Other: WD Ultrastar/Hitachi Hard Drives: WDBBUR0080BNC-WRSN, HGST HUH728080ALE600, 724040ALE640, HDS3020BLA642
Case: LIAN LI PC-90 Black Aluminum ATX Full Tower Case
CPU cooling: CORSAIR - iCUE H115i RGB PRO XT 280mm Radiator CPU Liquid Cooling System
Power supply: SeaSonic SS-750KM3 750W 80 PLUS GOLD Certified Full Modular Active PFC Power Supply
Drive Bay: Kingwin KF-256-BK 2.5" and 3.5" Trayless Hot Swap Rack with USB 3
Sound card: Realtek S1220A on motherboard. Recording done on another system.
Primary Monitor: ASUS ProArt 31.5" 1440p HDR10 Monitor PA328QV
O/S: Windows 10 Pro 10.0.19045 Build 19045
Camera: Sony RX10 Model IV

https://www.youtube.com/user/thedennischannel

VEGASDerek wrote on 2/16/2023, 1:40 PM

It appears there is an issue with setting the timeline size when you open a saved project. We have added that to our bug backlog.

DMT3 wrote on 2/16/2023, 1:58 PM

@Gid did not know about double-click, thanks. I usually just ctrl-home and then roll mouse wheel until screen is full. There are a lot of ways. It would be nice to have a one-click option, and using a device like Contour Shuttle, this could be done.

Gid wrote on 2/16/2023, 2:22 PM

@DMT3 Yeah, Magix Movie Studio has just that button 👍

Vegas Pro 20
Vegas Pro/Post 19 (Latest build), HitFilm Pro,  
Magix Movie Studio Platinum 2023 - from 2004-ish - Latest version,
Magix VPX14
Adobe After Effects
Boris Continuum & Sapphire, 
Silhouette Standalone + Plugin, 
Mocha Pro Standalone + Plugin, 
Boris Optics,
Desktop PC Microsoft Windows 10 Pro - 64-Bit
ASUS PRO WS WRX80E-SAGE SE WIFI AMD Motherboard
AMD Ryzen Threadripper PRO 3975WX 3.5GHz 32 Core
Corsair iCUE H150i RGB PRO XT 360mm All-in-One Liquid CPU Cooler
RAM 256GB ( 8x Micron 32GB (1x 32GB) 2666MHz DDR4 RAM )
2x Western Digital Black SN850 2TB M.2-2280 SSD, 7000MB/s Read, 5100MB/s Write
(programs on one, project files on the other)
Graphics MSI GeForce RTX 3090 SUPRIM X 24GB OC GPU
ASUS ROG Thor 1200W Semi-Modular 80+ Platinum PSU 
Fractal Design Define 7 XL Dark TG Case with 3 Fans
Dell SE3223Q 31.5 Inch 4K UHD (3840x2160) Monitor, 60Hz, 

At the moment my filming is done with a Samsung Galaxy S23 Ultra 5G

VEGASDerek wrote on 2/16/2023, 4:15 PM

Looked into the code...the fact the double click is not accurately resizing has to do with a remnant of the audio beginnings of VEGAS. Anyway, the extra buffer added to the timeline after a project is opened is actually a bug. The code being executed that added this buffer at the end of the timeline is actually supposed to be called when we are in the process of recording audio to an audio track. Anyway, I have this fixed and it will be remedied in the next update.

Foo-Bar wrote on 2/16/2023, 5:09 PM

If I only had a penny for each time I've done this in Sound Forge and Vegas Pro since 1990-something...

Triple Left-Click

Right-Click Zoom Selection

That works as well :-)

But the thing is, you have to click inside the selection for being able to trigger the popup menu that contains the command.

In my case / workflow the track with "content" (events) is not so high as the other (enveloppe) tracks and those do not contain any content to select... so the popup menu is never shown (which forces me to click very carefully in the right track, in the exact height of my mouse cursor).

I simple shortcut (press F to fit) would be nice!

Foo-Bar wrote on 2/16/2023, 5:13 PM

Looked into the code...the fact the double click is not accurately resizing has to do with a remnant of the audio beginnings of VEGAS. Anyway, the extra buffer added to the timeline after a project is opened is actually a bug. The code being executed that added this buffer at the end of the timeline is actually supposed to be called when we are in the process of recording audio to an audio track. Anyway, I have this fixed and it will be remedied in the next update.

The weird thing is that some projects behave like they should;

  • Open the project
  • Doubleclick scrollbar (x-axis) to fit in width
  • 100% match in width

But other project behave like;

  • Open the project
  • Doubleclick scrollbar (x-axis) to fit in width
  • 65% to 75% match in width (or something like that)

Can't figure out why this happens on some and not on other files.