Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums VEGAS Pro Fade in/out video event question

  • Fade in/out video event question

    Posted by Robert Dunn on January 26, 2009 at 2:44 am

    Hi – quick question. Is there a keyboard shortcut to insert a fade in/out on a selected video event? Sometimes I have trouble positioning the cursor so as to elicit the fade in/out pop up over the event.

    Thanks for your trouble

    Bob

    RC

    Mike Kujbida replied 14 years, 6 months ago 5 Members · 8 Replies
  • 8 Replies
  • John Rofrano

    January 26, 2009 at 12:22 pm

    You can make one with a script. First you need a script that will fade the event for you. The following JavaScript code will do this. Just cut and paste it into a file called FadeEventInOut.js

    /**
    * Program: FadeEventInOut.js
    * Description: This script will add a 1 second fade both ends of the current event
    * Author: John Rofrano
    *
    * Date: June 7, 2003
    * April 27, 2004 - Updated for Vegas 5 libraries
    * June 15, 2005 - Updated to work on ALL selected events
    *
    **/

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

    /* Change the following to be the length of the fade */
    /* note: 1000 = 1 second */
    var fadeAmount : Timecode = new Timecode(1000);

    try
    {
    for (var track in Vegas.Project.Tracks)
    {
    for (var trackEvent in track.Events)
    {
    if (trackEvent.Selected)
    {
    trackEvent.FadeIn.Length = fadeAmount;
    trackEvent.FadeOut.Length = fadeAmount;
    }
    }
    }
    }
    catch (errorMsg)
    {
    MessageBox.Show(errorMsg, "Error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
    }

    Place the file in the Vegas .\Script Menu folder. Then In Vegas make a keyboard short-cut to the script. In Vegas Pro 8.0 it’s Options | Customize Keyboard and assign the script to a short-cut.

    ~jr

    http://www.johnrofrano.com
    http://www.vasst.com

  • Robert Dunn

    January 26, 2009 at 2:43 pm

    John,

    Terrific. Thanks John – I’ve been wanting this for a long time. Appreciate all your help.

    Bob

    RC

  • John Rofrano

    January 26, 2009 at 5:41 pm

    You’re welcome. Glad I could help.

    ~jr

    http://www.johnrofrano.com
    http://www.vasst.com

  • Theodore Harding

    November 1, 2010 at 6:38 am

    Oh. my. god. I’ve been looking for this for about an hour now! Thanks a bunch!

  • Mynor De león

    November 15, 2011 at 1:37 am

    This is amazing, do you know if is possible to do the same just for one fade in or fade out, not both at the same time?

  • Mike Kujbida

    November 15, 2011 at 10:34 am

    Here’s a script that will do what you want.
    Copy everything below ********, paste it into Notepad, save it as FadeInOut1Second.js and copy it into your script folder.
    Even though it says “selected audio track”, it works on video events too.
    The beauty of this one is that it can be customized as desired.
    By changing the timecode values (FadeIn, FadeOut or both) on the appropriate lines, you can set the fade times to anything you want.
    I changed it from 00:00:01:00 to 00:00:00:15, re-saved it under a new name and now have a 1/2 sec. fade in/out script in addition to the original 1 sec. fade in/out.
    If you want a FadeIn or FadeOut only version, delete the appropriate line, resave it under a new name and you’re done.

    Just to clarify, I’m referring the lines that go
    evnt.FadeIn.Length = new Timecode(“00:00:01:00”);
    and
    evnt.FadeOut.Length = new Timecode(“00:00:01:00”);

    Have fun!!

    ********************************************************

    /**
    * This script will Fade the selected audio track up to the current cursor position
    *
    * Written By: Edward Troxel
    * Modified: 04-21-2003
    **/

    import System;
    import System.IO;
    import System.Windows.Forms;
    import Sony.Vegas;

    try {

    //Go through the list of Tracks
    var trackEnum = new Enumerator(Vegas.Project.Tracks);
    while (!trackEnum.atEnd()) {
    var track : Track = Track(trackEnum.item());

    //Go through the list of Events
    var eventEnum = new Enumerator(track.Events);
    while (!eventEnum.atEnd()) {
    var evnt : TrackEvent = TrackEvent(eventEnum.item());

    if (evnt.Selected) {

    evnt.FadeIn.Length = new Timecode(“00:00:01:00”);
    evnt.FadeOut.Length = new Timecode(“00:00:01:00”);

    }
    eventEnum.moveNext();
    }
    trackEnum.moveNext();
    }

    } catch (e) {
    MessageBox.Show(e);
    }

  • Mynor De león

    November 18, 2011 at 7:27 pm

    PERFECT!! Thanks Sr.

  • Mike Kujbida

    November 18, 2011 at 7:36 pm

    Glad to help Mynor.
    Happy editing !!

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy