Setting Audio event properties. . .

AFSDMS wrote on 7/22/2003, 8:45 AM
I'd like to create a button/script/shortcut or whatever to quickly set the properties of an audio event. When I do multitrack mixdown my first step, on 13 to 22 events on the same number of tracks, is to go to each event and uncheck Looping and Normalize the track.

I'm just wondering (and I'm really not a VB programmer or whatever) how this could be accomplished. It would be nice to be able to select a group of events acoss tracks and have it done, but even being able to select one event and execute would be a big timesaver.

Any help appreciated.

Wayne

Comments

SonyPJM wrote on 7/22/2003, 9:15 AM
The following script will turn off looping and turn on normalization for all selected audio events.



import System;
import System.Collections;
import SonicFoundry.Vegas;

var enumTracks : IEnumerator = Vegas.Project.Tracks.GetEnumerator();
while (enumTracks.MoveNext()) {
var track : Track = Track(enumTracks.Current);
if (track.IsAudio()) {
var enumEvents : IEnumerator = track.Events.GetEnumerator();
while (enumEvents.MoveNext()) {
var audioEvent : AudioEvent = AudioEvent(enumEvents.Current);
if (audioEvent.Selected) {
audioEvent.Loop = false;
audioEvent.Normalize = true;
}
}
}
}


AFSDMS wrote on 7/22/2003, 2:37 PM
Heaven's that is way cool. Thank you, very much.

is this JScript or Visual Basic .NET? (Might as well learn to be a bit self-sufficient.)

Is the documentation for the objects and properties that open up the interface on the install CD? Seems I saw something but never had time to install or open it. I'm more interested when I see what can be done.

BTW, Sometimes when I trim an event I need to do a recalculation for the Normalization. Can you tell me how to do that or where I need to go to get the info. I'm thinking of editing this script to make it both turn on Normalization and do a Recalc so one script could meet both needs, if that is an OK idea.

Thanks again for being so helpful!

Wayne
jetdv wrote on 7/22/2003, 2:55 PM
The code written above is JScript.
AFSDMS wrote on 7/22/2003, 2:59 PM
Thanks. That means Java script I assume?
jetdv wrote on 7/22/2003, 3:21 PM
It's "JScript .NET". While a variation of Java, it is NOT "Java Script". (Although there are MANY MANY similarities.)

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/jscript7/html/jsoriJScript.asp
AFSDMS wrote on 7/22/2003, 6:33 PM
Thanks again. Probably should have known that, but it has been over a year since I attended the overview sessions on .NET.