Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums VEGAS Pro Randomize clip order?

  • John Rofrano

    May 10, 2010 at 10:03 am

    Vegas doesn’t do this natively. You would need to write a script to do this.

    ~jr

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

  • Devon Adkisson

    May 10, 2010 at 11:53 am

    That was a given.

    I’ve tried to use production assistant’s montage tool but no matter what I do it always changes the duration (There is no “just random this track”). I thought I had it with “Fit to region” by creating the region that was only as long as the total footage, but no, it went and changed all the clips to be the exact same length (NOT what I need)

    I have no vegas scripting experience, so I wouldn’t even know where to begin. I need to take a video track (and its corrosponding audio track) and randomize the order of the clips (keeping the video and audio together of course)

    I do know that foreach (VideoEvent videoEvent in events) {} will loop through all the clips I have selected, and a few other insignificant things, but nothing of real use.

  • Theo Van laar

    May 10, 2010 at 3:13 pm

    Excalibur can do this

    Theo

  • Devon Adkisson

    May 10, 2010 at 4:32 pm

    It doesn’t seem to work with vegas pro 9.0d x64 :/

  • Theo Van laar

    May 10, 2010 at 7:21 pm

    ‘It doesn’t seem to work with vegas pro 9.0d x64 :’

    On my computer it works with excalibur and Vegas pro 9d 64bits. Even the length of the events is not affected…

    Theo

  • Devon Adkisson

    May 10, 2010 at 7:37 pm

    Well after I installed it I can no longer get to extensions through view-> extensions, and I don’t know where else it could be.

  • Theo Van laar

    May 11, 2010 at 11:00 am

    Which version of excalibur do you have?

    Theo

  • Devon Adkisson

    May 11, 2010 at 11:30 am

    Excalibur 6.06

  • Jeremy Ashinghurst

    February 27, 2011 at 7:44 pm

    I know this is a dead thread but today I had the same problem, about 50 clips that I wanted to randomize and I didn’t feel like installing a software pack to get this one thing done so . . . I wrote a script for it. I’ve never scripted in C# before so I’m sure it’s pretty ugly, but it gets the job done. it randomizes all the media events in a track by moving a random event to the current end of the track (but will not move linked audio and video tracks simultaneously). Of course i in no way gaurantee this script and recommend you duplicate the track you want to randomize prior to performing this script just to be safe.


    //*******************************************************************
    //* Program: Random Order
    //* Author: Jeremy Ashinghurst
    //* Updated: Feb 27 2011
    //* Description: randomly order clips from a selected track. clips will be successively placed at the end of the same track they are from. All clips from that track will be moved!
    //*------------------------------------------------------------------
    //* Copyright: none
    //*******************************************************************
    using System;
    using System.Diagnostics;
    using System.Windows.Forms;
    using Sony.Vegas;

    public class EntryPoint
    {
    public void FromVegas(Vegas vegas)
    {
    try
    {
    Track track = FindSelectedTrack(vegas);
    if (track != null)
    {
    if (track.Events.Count > 1)
    {
    Random RandomNumber = new Random();
    for (int x = track.Events.Count;x>0; x--)
    {
    int r = RandomNumber.Next(x);
    foreach(TrackEvent trackEvent in track.Events)
    {
    if (trackEvent.Index == r)
    {
    Timecode cliplength = trackEvent.Length;
    trackEvent.AdjustStartLength(track.Length,cliplength,false);
    }
    }
    }

    }
    else
    {
    MessageBox.Show("Track must have at least 2 events", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
    }
    }
    else
    {
    MessageBox.Show("You must select a track before running this script", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
    }
    }
    catch (Exception e)
    {
    MessageBox.Show(e.Message, "Critical Error", MessageBoxButtons.OK, MessageBoxIcon.Stop);
    }
    }

    ///

  • Jayme Gutierrez

    August 22, 2014 at 11:26 am

    Thanks so much Jeremy!
    This is something I hadn’t even thought of looking for until now, and then bam, you nailed! Works like a charm, nice one.

    Programmers are the Stone Masons of tommorrow!
    Cheers!

    https://youtu.be/aTzSxEqcHTI?a

    Some contents or functionalities here are not available due to your cookie preferences!

    This happens because the functionality/content marked as “Google Youtube” uses cookies that you choosed to keep disabled. In order to view this content or use this functionality, please enable cookies: click here to open your cookie preferences.

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