mute/solo script? i need an expert

ziggly wrote on 1/13/2006, 8:17 AM
may i pretty please have a script for Vegas 4
that allows me to press 1 and have track one solo'd and the rest of the project muted
also i would be able to press 2 and have track two solo'd and the rest of the project muted
so on, so forth all the way thru 10

i would like to load a project into Vegas 4 with 10 tracks and then audition each track while the timeline(?) scrolls along
thank you for your kind attention
Ziggly

Comments

jetdv wrote on 1/13/2006, 9:21 AM
With Vegas 4, you could ONLY have 10 scripts "numbered". The hotkeys are assigned by holding down CTRL-Shift and the number. Then you pick the script to be assigned to that number. To call that script, you have to press CTRL and the number.


The following script I've named: SoloTrack01.js
This script will do what you're wanting for track 1. Simply change this one line for the remaining tracks:
var soloTrack = 1;
(i.e. change the 1 to 2 for track 2 and name the file as SoloTrack02.js)

NOTE: You must STOP playback before running the script (technically, it will stop either way) so you can't audition each track while the timeline(?) scrolls along without restarting playback.



/**
* This script will solo the specified track
*
* Written By: Edward Troxel
* www.jetdv.com
* Modified: 01-13-2006
**/

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


try {
// Set the defaults


var soloTrack = 1;
var trackCount = 1;

var trackEnum = new Enumerator(Vegas.Project.Tracks);
while (!trackEnum.atEnd()) {
var track : Track = Track(trackEnum.item());

if (soloTrack == trackCount)
{
track.Solo = true;
track.Mute = false;
}
else
{
track.Solo = false;
track.Mute = true;
}

trackCount++;
trackEnum.moveNext();
}



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



ziggly wrote on 1/13/2006, 4:56 PM
First of all a Big Whopping thx! I appreciate that you even replied to my post

but secondly I must let out a Charlie Brown style yelp
Argh!! sooo close….

the script works perfect Jetdv, but just like you said playback stops.

why O why does playback stop?… I could do some real creative stuff if playback didn’t stop. if I paid money could I get this script to run without playback stopping?

last time I peeked over at the Vasst site they didn’t have a product geared towards Vegas4 or at least not geared towards Vegas audio users.

even tho you already helped tremendously, can you help me to understand……..i really got my hopes up when I realized that a certain script could help my workflow. Don’t tell me that all scripts turn off playback : (
jetdv wrote on 1/13/2006, 5:14 PM
why O why does playback stop?… I could do some real creative stuff if playback didn’t stop. if I paid money could I get this script to run without playback stopping?

The ability for a script to tell Vegas to remain playing was added in Vegas 6.0b. The script could be modified just slightly and playback could continue in 6.0b or 6.0c.

last time I peeked over at the Vasst site they didn’t have a product geared towards Vegas4

I have several products that still work in Vegas 4 but none of them are still being maintained or updated. There were major changes between Vegas 4 and Vegas 5 as far as scripting is concerned.
JohnnyRoy wrote on 1/13/2006, 5:17 PM
> if I paid money could I get this script to run without playback stopping?

Yes. Buy Vegas 6.0b. That’s when they added support for continuing playback after running a script. It’s a Vegas 4/5 limitation.

> last time I peeked over at the Vasst site they didn’t have a product geared towards Vegas4 or at least not geared towards Vegas audio users.

We (at VASST) started developing scripts during Vegas 5. We never went back ported them to Vegas 4 because we took advantage of things that were in the Vegas 5 script API that were not in Vegas 4. Edward has some scripts that run in Vegas 4.

~jr