Create : go to next clip in - out.

Jean

New member
Hi.

I'm trying to make a keyboard shortcut sript for the timebar to go to the head - tails of clips sequencially.

Let me explain.

you have 20 clips in your timeline and wan't to scrub through it, make fast reajustments of their positions, by moving the timebar to their in-out points only.

(this was possible on my previous edit suite and it might sound superfluous but believe me when you've used it you can't go back.)

So!

Numpad + --> go to next in/out of clips in the timeline
Numpad - --> go to previous in/out of clips in the timeline

If an audio or a video clip has the same lenght and position than an other clip I don't want the timebar to go throug the same positions several times, the script has to compute the in-out points on an horizontal plan only.

I've gathered the "go to next clip", "go to in point", "go to out point" scripts.

My problems :

1-I'm at the "IN", I want to "go to the out point" i use Numpad + againt but the sript has to know he is already at the "in point" of a clip, it has to use the script "go to out point".
then
Out point selected : use "go to next clip's in point"

--> can't find any trick to do that.


2- the way the VTscript work I don't know if it's possible for it to get the in/out point on an horizontal analize of the timeline.

ex : two clips are on two different tracks.
1st : (in 10:00) (out 20:00)
2nd : (in 15:00) (out 25:00)

Vtscript would compute the first one and, after, the second one

Timebar does : 10:00 -- 20:00--15:00--25:00

It needs to be :

10:00--15:00--20:00--25:00.

Voila, It's a lot more complex than I thought it would be but now i'm starting to get obssesed by the VTscript and don't wan't to surrender.

Jean
 

Norman

New member
To go from in point to out point of selected clips, press the 'q' and 'w' keys. To go from clip to clip, use the up and down arrows.

Pretty convenient and quick!
 

Jean

New member
I knew it would be hard to understand this function.

you just have to trust me on that, the "q" "w" "uparrow" "downarrow" takes too much action to be intuitive in the kind of result i'm looking for.

This is a great function, wich focus your edit workflow on essential parts of a crouded timeline.

The "TRACK" option is almost the idea "go where it's important with the timebar", but you have to turn it on and off all the time if you want to select clips leaving the timbar where it was, and if you have five sync A/V layers on top of each others it will take five downarrow to go further in your timeline.

I know I might looks like a maniac but you won't stop using it if I find the possibility to do it with toasterscript.

Jean
 

PIZAZZ

NewTek System Integrator
How about a go to marker option?

You could drop markers where you want them and then advance between the markers. Would this work for what you are trying to do?

Jef
 

Jean

New member
would be great to have this too.

Timebar stops at clip's in/out and markers would be even more usefull
 

bradl

Are We There Yet?
As far as determining if you are at the head or tail of a clip then move according to this infomation, i.e - go to tail or next edit for a forward command, it seems that could be handled by a an 'if' statement and a range query comparision to timebar position. However you really don't want a heads move then a tails move as that would give you two stops at each edit, you need a next tail command (analagous to 'arrow down', 'w' cycle).

I will try to look at the current 'next clip' command and 'w' command and see if I can get any ideas. One problem I see is once you are at an 'edit' you will undoubtably begin fiddling the edit and breaking your location rules for advancing to the next without carefully resetting your timebar position. Maybe a range of 20 frames or something as a determination of an edit location examination. In other words anywhere within defined range of a tail/head and the next foward (or backward) command would move you on.

One last thing, Jeff mention using markers and you agreed it would be nice or something, indicating that maybe you were not aware that they do exist (m) with a , or . to move between them or maybe if you knew they existed maybe you didn't realize they could be placed on the timeline itself independent of any clips. Not that markers are the answer in any way to what you want- a always ready to hop forward/backward tour of all your edits.
 

Jean

New member
I'm aware we can move throug markers but I was thinking it would be a good idea of adding the "go to next/previous marker too" within my "numpad+/numpad-" shortcut.


have you found a "timebar position range query command" relative to in/out points of a clip, I can't put my finger on one.

If I can find a "get timebar position" wich is returning the same input when timebar is on in/out of any clip I could do something like :


If ( Timebarpositions(in))
else timebar go to out

If ( Timebarpositions(out))
else timebar go to next clips in

If ( Timebarpositions())
else Go to next clip in

If ( Timebarpositions(xx:xx:xx of a clip))
else go to out


but it won't work in every cases.

THE thing would be to know the information returned by an in/out clip's frame in ted.

then just scripting a "go to next one" (like with markers.) with a minimum searching range of one frame so it won't cycle through synched clips.
 
Last edited:

Aussie

New member
I have not tested this (so why would it work?)
but something like this....

Let me know - cheers, Aussie

=====================================


(do not use timebar to get current in, as that grabs from first clip at that position - better to use selected clips and step through)


ts_InOutJumpForward() =
{

// 1. stop editor playing
// ===============
SetSpeed(0)

// 2 May also need to kill tracking ???
// =========================
SetAutoJog(false)

// 3. Need a selected clip. if no clip selected, select first clip
// ========================================
if (GetNumItems() == 0) // or maybe GetNumClipsSelected()
{
SelectFirst(false)
UpdateInOutPanelSel()
}

// 4. Get clip in and out times
// ===================
PositionStart = GetCurrentProjectStart(true)
PositionEnd = GetCurrentProjectEnd(true)

// 5. Get Timebar position
// ================
PositionTimebar = GetPosition()

// 6 Test and move timebar
// ==================
if (PositionTimebar == PositionEnd)
{
// Go to next clip
SelectFNext(false)
UpdateInOutPanelSel()
SetPosition(GetCurrentProjectStart(true))
}
else if (PositionTimebar == PositionStart)
{
// Goto out point
SetPosition(PositionEnd)
}
else
{
// Goto In
SetPosition(PositionStart)
}


// 7. If timeline, scroll to center timebar
============================
if (GetActivePaneType()==1) // timeline only
{
Range = (GetDisplayRangeEnd() - GetDisplayRangeStart())
Start = PositionTimebar - Range/2
End = Start + Range
SetDisplayRange(Start, End)
}

}



==============================

//Now... make a shortcut for timeline and storyboard

CreateShortCut ( "NumPad+", code(
ts_InOutJumpForward()
), "CurrentPopup", KbdPriority, "Timeline_Layout .*"
)

CreateShortCut ( "NumPad+",", code(
ts_InOutJumpForward()
), "CurrentPopup", KbdPriority, "Storyboard_Layout .*"
)


==================================

// Lastly write another routine to step backwards
 

Jean

New member
Wow, I find myself in love with Vtscript, it sounds like a poem.

I've learned a lot with your script.

At the same time I realise the huge gap between my rough ideas of a vtscript and my real knowledge (wich is really thin).


I'm going to try your script and work on the step bacward routine as soon as I have the time.

Thx Aussie.
 

Jean

New member
So.

I've tried to gather all Aussie tips (meaning, almost all the code) :)
and what I know about Vtscript (meaning, almost nothing). :(

To do a first draw of the "In/Out Jump" shortcut.

I can't test it because I don't have acces To our VT3 for 1 to 2 week "Sniff"



I've added some lines to prevent from jumping through previous and next clips with the same in/out points that the selected one.
I'm not shure that my way to solve this is correct.(I don't know how tho get the start and the end of next and previous clips and being able to compare with current clip's start/end).

So, Here it is.

//InOutJump Script First draw

ts_InOutJumpForward() =
{

// 1. stop editor playing
// ===============
SetSpeed(0)

// 2 May also need to kill tracking ???
// =========================
SetAutoJog(false)

// 3. Need a selected clip. if no clip selected, select first clip
// ========================================
if (GetNumItems() == 0) // or maybe GetNumClipsSelected()
{
SelectFirst(false)
UpdateInOutPanelSel()
}

// 4. Get clip in and out times
// ===================
PositionStart = GetCurrentProjectStart(true)
PositionEnd = GetCurrentProjectEnd(true)
NextClipStart =
{
SelectNextChild(true)
GetCurrentProjectStart(true))
}
NextClipEnd =
{
SelectNextChild(true)
GetCurrentProjectEnd(true))
}
PrevClipStart =
{
SelectPrevChild(true)
GetCurrentProjectStart(true))
}
PrevClipEnd =
{
SelectPrevChild(true)
GetCurrentProjectEnd(true))
}



// 5. Get Timebar position
// ================
PositionTimebar = GetPosition()

// 6 Test and move timebar
// ==================
if (PositionTimebar == PositionEnd)
{
if (NextClipStart == PositionStart) // don't go through clips with same TC in
{
SelectNextChild(true)
UpdateInOutPanelSel()
SetPosition(GetCurrentProjectEnd(true)
If (positionEnd == PrevClipEnd) // don't go through clips with same TC out
{
SelectNextChild(true)
UpdateInOutPanelSel()
SetPosition(GetCurrentProjectStart(true)
}
else
{
SelectNextChild(true)
UpdateInOutPanelSel()
SetPosition(GetCurrentProjectStart(true))
}
}
else if (PositionTimebar == PositionStart)
{
// Goto out point
SetPosition(PositionEnd)
}
else
{
// Goto In
SetPosition(PositionStart)
}


// 7. If timeline, scroll to center timebar
============================
if (GetActivePaneType()==1) // timeline only
{
Range = (GetDisplayRangeEnd() - GetDisplayRangeStart())
Start = PositionTimebar - Range/2
End = Start + Range
SetDisplayRange(Start, End)
}

}



==============================

//shortcut for timeline and storyboard

CreateShortCut ( "NumPad+", code(
ts_InOutJumpForward()
), "CurrentPopup", KbdPriority, "Timeline_Layout .*"
)

CreateShortCut ( "NumPad+",", code(
ts_InOutJumpForward()
), "CurrentPopup", KbdPriority, "Storyboard_Layout .*"
)


==================================






ts_InOutJumpBackward() =
{

// 1. stop editor playing
// ===============
SetSpeed(0)

// 2 May also need to kill tracking ???
// =========================
SetAutoJog(false)

// 3. Need a selected clip. if no clip selected, select first clip
// ========================================
if (GetNumItems() == 0) // or maybe GetNumClipsSelected()
{
SelectFirst(false)
UpdateInOutPanelSel()
}

// 4. Get clip in and out times
// ===================
PositionStart = GetCurrentProjectStart(true)
PositionEnd = GetCurrentProjectEnd(true)
NextClipStart =
{
SelectNextChild(true)
GetCurrentProjectStart(true))
}
NextClipEnd =
{
SelectNextChild(true)
GetCurrentProjectEnd(true))
}
PrevClipStart =
{
SelectPrevChild(true)
GetCurrentProjectStart(true))
}
PrevClipEnd =
{
SelectPrevChild(true)
GetCurrentProjectEnd(true))
}

// 5. Get Timebar position
// ================
PositionTimebar = GetPosition()

// 6 Test and move timebar
// ==================
if (PositionTimebar == PositionEnd)
{
// Go to in point

SetPosition(PositionStart)
}
else if (PositionTimebar == PositionStart)

// Goto previous clips's out
{
if (PrevClipEnd == PositionEnd) // don't go through clips with same TC out
{
SelectPrevChild(true)
UpdateInOutPanelSel()
SetPosition(GetCurrentProjectStart(true)
If (positionStart == NextClipStart) // don't go through clips with same TC in
{
SelectPrevChild(true)
UpdateInOutPanelSel()
SetPosition(GetCurrentProjectEnd(true)
}
else
{
SelectPrevChild(true)
UpdateInOutPanelSel()
SetPosition(GetCurrentProjectEnd(true))
}
}
else
{
// Goto In
SetPosition(PositionStart)
}


// 7. If timeline, scroll to center timebar
============================
if (GetActivePaneType()==1) // timeline only
{
Range = (GetDisplayRangeEnd() - GetDisplayRangeStart())
Start = PositionTimebar - Range/2
End = Start + Range
SetDisplayRange(Start, End)
}

}



==============================

//shortcut for timeline and storyboard

CreateShortCut ( "NumPad-", code(
ts_InOutJumpBackward()
), "CurrentPopup", KbdPriority, "Timeline_Layout .*"
)

CreateShortCut ( "NumPad-",", code(
ts_InOutJumpBackward()
), "CurrentPopup", KbdPriority, "Storyboard_Layout .*"
)


==================================
 
Top Bottom