How to close gaps between many clips on timeline?

will-3 wrote on 4/3/2008, 6:00 AM
OK, I've got 30 short clips on the time line.

They are spread out so gaps are between them.

Now that I have each clip's in & out point sets I want to have all of the slide to the left on the timeline so that they follow each other with no gap in between.

I'm using Vegas 5 and read a little about the Shuffle but couldn't quite see how to make it work.

Dragging each clip to the left so they are in seuence is a lot of work... maybe someone would be kind enough to tell me how to do this.

Thanks for any help.

Comments

johnmeyer wrote on 4/3/2008, 10:04 AM
I wrote a script last year for someone in the forum that removes gaps on any track that has been named, i.e., a track for which you have typed something into the track name header. If the track doesn't have a name, then no gaps are removed on that track.

I also have another script, which you can pick up over at VASST, which will "audit" your project and flag all events that either have really small gaps or really small overlaps. The definition of "really small" can be changed in the script, but is usually set to 3-4 frames on the theory that such a small gap or overlap is seldom something you really intended to do.

Anyway, here's the remove gap script:


/**
* Program:
* Description: This script deletes empty space between events in named tracks
* Author: John Meyer (based on original script by Philip)
* January 28, 2007
*
**/

import Sony.Vegas;
import System.Windows.Forms;
// import Microsoft.Win32;


try
{

// step through all selected video events:
for (var track in Vegas.Project.Tracks) {

if( track.Name == undefined) {
continue;
}

var tracktime = track.Events.Item(0).Start;

for (var evnt in track.Events) {

evnt.AdjustStartLength(tracktime,evnt.Length,false);
tracktime = tracktime + evnt.Length;

}
}

}

catch (errorMsg)
{
MessageBox.Show(errorMsg, "Error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
}


baysidebas wrote on 4/3/2008, 10:58 AM
Will this script work in Vegas 5? [in case you missed that]

Of course, in V8, thanks to the "snapping" feature, even doing this manually is no chore [for the 30 events mentioned]. But it all could be avoided by a little planning, and using ripple edit to automatically close the gaps as each event is adjusted.
johnmeyer wrote on 4/3/2008, 4:57 PM
My old computer isn't fast enough to work with either Cineform or native m2t smoothly.

I don't know. There have been two changes that Sony made at various times which broke scripts (a practice I still can't figure out -- no other company pays such little attention to upward compatibility). One is easy to fix, and would require changing

import SonicFoundry.Vegas;

to
import Sony.Vegas;

However, I think this change was made between version 4 & 5, so that change wouldn't be necessary.

However, Sony also later changed how the "AdjustStartLength" command worked.

Best thing is to just try it. It will be quite obvious if it doesn't work. Just make sure to back up the VEG file before proceeding.
jetdv wrote on 4/3/2008, 7:30 PM
Because of the changes in "AdjustStartLength", I quit using it. Instead, I now just change the "start" position and reset the "offset" after it's moved:


Take currTake = evnt.ActiveTake;
Timecode currOffset = currTake.Offset;
evnt.Start = tracktime;
currTake.Offset = currOffset;



Yes, it's four lines of code instead of one. However, it works in EVERY version of to date.
johnmeyer wrote on 4/3/2008, 11:02 PM
thanks Ed. That's useful to know.