Alter slide show event times?

DGrob wrote on 7/9/2004, 3:02 PM
I have 160 stills on my timeline with a client specified 4 second event length and .25 second random transitions. Now it seems we want to change the event length AND the transition duration. I've tried altering the boxes in the edit tab of preferences, to no effect on the timeline. It's a screwing naming system, so I can't just open a new project without having to individually insert each still.

Or can I? Can I copy the edit details list and rebuild a new project with different settings . . . or what? As always, TIA. Darryl

Comments

clearvu wrote on 7/9/2004, 3:20 PM
As for the 4 second length issue, I would to to Options/Preferences/Editing and set the "New still image length" to 4 seconds.

Afterwards, import all the pictures and they will occupy 4 seconds each on the timeline.

Now as for the transitions, that's where the beauty of 3rd party programs, such as "Excalibur" come in. If you don't have Excalibur, I believe you'll have to manually apply each transition.
JohnnyRoy wrote on 7/9/2004, 4:12 PM
Darryl,

Here is a script to do what you want. When I get a chance I'll add a dialog box and post it to the Sundance site. For now just change the eventLength and crossfadeAmount to be what you want for this client. Just select all the events and run this script. Hope this helps.

/** 
* Program: SetEventLengthAndCrossfade.js
* Description: This script will set the length of all the selected events
* and move the events to crossfade
*
* Author: Johnny (Roy) Rofrano john_rofrano at hotmail dot com
*
* Last Updated: 2004-AUG-04 - Removed evnt.End which is only in V5
* 2004-JUL-09 - Initial release (modified)
*
**/
import System.Collections;
import System.Windows.Forms;
// import SonicFoundry.Vegas;
import Sony.Vegas;
// This is the length of each event
var eventLength : Timecode = new Timecode("00:00:05.00");
// This amount the events will be crossfaded
var crossfadeAmount : Timecode = new Timecode("00:00:00.15");
try
{
// step through all tracks
for (var track in Vegas.Project.Tracks)
{
var trackPosition : Timecode = new Timecode("00:00:00:00");
      // Make a copy of the event list because we're going
// to change it by moving events and that would have
// undesireable side effects when increasing event length
var eventList : ArrayList = new ArrayList();
for (var evnt in track.Events)
{
eventList.Add(evnt);
}
      // Iterate over the copy of the list
for (evnt in eventList)
{
if (evnt.Selected)
{
// adjust its position on the track
evnt.AdjustStartLength(trackPosition, eventLength, true);
trackPosition = evnt.Start + evnt.Length - crossfadeAmount;
}
}
}
}
catch (errorMsg)
{
MessageBox.Show(errorMsg, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
/*** END OF SCRIPT ***/
EDIT: Fixed a bug that caused increasing the length to fail and modified evnt.End which is only in the V5 API.

~jr
DGrob wrote on 7/9/2004, 4:48 PM
JohnnyRoy: Wow! Thank you so much. Darryl

Hmmmm.

Compilation error on line 7:

Expecting more source characters


System.ApplicationException: Failed to compile script: 'E:\Vegas Scripts\EventLengthCrossfade.js'
at Sony.Vegas.ScriptHost.RunScript()

??? Darryl
GaryKleiner wrote on 7/9/2004, 6:01 PM
Excalibur's Duration and Gap/Overlap Wizards will do this is a few clicks.

Gary
DGrob wrote on 7/9/2004, 6:56 PM
Gary, yep. I hadn't been getting any results until I reread Excaliber's pdf.

First I had to insert a gap, which left me with a fade-in at each previous transition.
Then I used the fade wizard to reset all fades to 00:00.
Then I used the duration wizard to reset the events, and overlap wizard to change the transition time.
Then the random transition script, and voila, a new project. Whew.

Thanks to all, and to all a good night. Darryl
JohnnyRoy wrote on 7/9/2004, 7:13 PM
I’ve updated my script to include a dialog box so you can specify the length and crossfade duration. So it does it all in one click. I also fixed an error in the script which I’ve also fixed in the much simpler version above.

You can download the new script from the Vegas scripts page of my web site. (it’s at the bottom)

~jr
eejackson wrote on 7/9/2004, 7:57 PM
Dear JohnnyRoy:

I am extremely new to running scripts, as a matter of fact I have never tried to use a script before. As I was reading though this thread, I thought, WOW......I could use this script often. So I did download the script by clicking on the link you have posted, but when I open Vegas and and then go to tools and run the script I get an error message that says Error on Line 16 - Time code not declared........Am I not doing something correctly? Any help would be appreciated. Thanks
Lori J.
jetdv wrote on 7/9/2004, 8:04 PM
Sounds like you're still running Vegas 4. At the beginning of the script, change the "import Sony.Vegas" to "import SonicFoundry.Vegas" and all will be fine.
GaryKleiner wrote on 7/9/2004, 8:56 PM
>First I had to insert a gap, which left me with a fade-in at each previous transition.
Then I used the fade wizard to reset all fades to 00:00.
Then I used the duration wizard to reset the events, and overlap wizard to change the transition time.<

Darryl,

You needn't have reset the fades to 0, they just get reset with Overlap.

Glad you got it figured out.

Gary
JohnnyRoy wrote on 7/9/2004, 9:09 PM
Yea, Jetdv is right. If you’re running Vegas 4 you need to change the last import statement to SonicFoundry.Vegas as he indicated. If you’re running Vegas 5 let us know. It should just work.

~jr
eejackson wrote on 7/10/2004, 8:38 AM
Thanks so much JohnnyRoy and Jetdv. This is the first time I have tried my hand at scripts. I really appreciate your help!
Lori J.
DGrob wrote on 7/13/2004, 1:44 PM
JR: That is one sweet script! Thank you again. Darryl
JohnnyRoy wrote on 7/13/2004, 8:41 PM
You're welcome. I’m glad its making you more productive.

~jr
MJhig wrote on 8/4/2004, 1:59 PM
Johnny,

I remembered you posting this script and now that I have 196 stills with half of them Pan/Cropped so obviously I don't want to change the preference settings to change the cut to fade length and reimport the stills.

I thought your script would be great here. Unfortunately I can't run it. The interface loads and allows me to change the settings (or leave the default to test) but clicking OK gives me an error.

I'm running V4, edited the last import line from Sony. Vegas to SonicFoundry. Vegas ( I C&Ped from above actually).

Selected all stills, tried select to end, even tried setting a loop region and I continue to get this error,

Error; Object reference not set to an instance of an object.

I'm hoping you have an idea.

Thanks,

MJ
JohnnyRoy wrote on 8/4/2004, 2:06 PM
In your example, you have a space between SonicFoundry. and Vegas. There is no space. It should be
SonicFoundry.Vegas;
See if that helps. Otherwise send an email to my hotmail account (the userid is john_rofrano) and I’ll send you a .js file that works with V4.

~jr
MJhig wrote on 8/4/2004, 2:12 PM
That was a typo on the SonicFoundry. I will email you now.

Thank you SO much sir.

MJ
kennygk wrote on 8/4/2004, 2:20 PM
Is there a way to set the timing of each image in the timeline individually?

thanks,
Ken
Liam_Vegas wrote on 8/4/2004, 7:03 PM
Unless I am missing the point of your question.... once they are on the timeline... any image that you want to adjust individually... just stretch or shrink the event to the size (length) you like.

As long as you have ripple events ON then everything will be adjusted.
kennygk wrote on 8/4/2004, 8:08 PM
Yes, I understand that,...thanks Liam.

However, I want to know if there is a way to set the timing exactly, such as 8.7 seconds or whatever, instead of just dragging/stretching it out to an approximate snap point?
JohnnyRoy wrote on 8/4/2004, 8:08 PM
There was more than just the Sony/SoFo namespace problem with this script. I used a property (evnt.End) that is only available in Vegas 5. I had to change the following line of code
trackPosition = evnt.End - crossfadeAmount;
To be this:
trackPosition = evnt.Start + evnt.Length - crossfadeAmount;
Just something for code writers to be aware of if they want to maintain Vegas 4 compatibility.

Thanks MJ for testing this for me.

~jr
JohnnyRoy wrote on 8/4/2004, 8:11 PM
> However, I want to know if there is a way to set the timing exactly, such as 8.7 seconds or whatever, instead of just dragging/stretching it out to an approximate snap point?

Yes. Double click the event to make a timeline selection. Directly under the timeline to the right are three timecode readouts. They are actually data entry fields. The right most one is the selection duration. Just type in the time you want and the selection will adjust to be that duration. Now just slide the right side of the event to snap to the selection and you have an exact time. I use this all the time to make transitions an exact number of frames.

~jr
Liam_Vegas wrote on 8/4/2004, 9:01 PM
I see I was missing the point of your question (and you have clarified what you specifically meant). Thank you.

The asnwer is of course... no.. there is no way built in that will do that... but it sounds like a script may be able to do that.

I seem to recall that feature being requested in the past. I would recommend submittign a product suggestion.
Liam_Vegas wrote on 8/4/2004, 9:04 PM
Cool solution.
kennygk wrote on 8/5/2004, 9:56 AM
Thanks Johnny, that's exactly what I was looking for! And thanks to you too Liam.

Now, is there a way to keep the 'Loop Region' thing above the timeline from activating? It seems every time I click anywhere near there or stretch out a picture (event), it shows up. Perhaps someone can give me a pointer as to how I can best use or not use this feature. The help menu is not so helpful here.