I have new audio events below my video events, now i could group them by selecting both and click "Group" is there a "batch" way to do this with all events on the 2 tracks?
Yes. Highlight all the events (Crtl+A or variations thereof) and then hit G (group). But everything that you highlight will then be grouped. Mind you, this is complete grouping - the entire selected video and audio tracks will be grouped together as one, not grouping video to audio event by event.
But the question that then arises is ... when you've imported media onto the timeline it should already be grouped until it is deliberately ungrouped. Why then do you need to batch group them when each video/audio event should already be grouped on import onto the timeline?
is there a "batch" way to do this with all events on the 2 tracks?
Short answer is "Yes". I don't have that as a built-in tool in Excalibur. I assume the audio is not the original audio that came with the clip? Otherwise the "restore missing A/V" tool in Excalibur would work.
May we also assume that event 1 on the video track goes with event 1 on the audio track? And so forth down the line? If yes, this simple code might work:
// Assume the first track is the video track and the second track is the audio track
Track vtrack = myVegas.Project.Tracks[0];
Track atrack = myVegas.Project.Tracks[1];
int eventNum = 0;
foreach(TrackEvent evnt in vtrack.Events)
{
TrackEvent aevnt = atrack.Events[eventNum];
TrackEventGroup grp = new TrackEventGroup();
myVegas.Project.Groups.Add(grp);
grp.Add(evnt);
grp.Add(aevnt);
eventNum++;
}
Then add the above code and that should do what you want assuming the first track is your video track and the second track is your audio track and you have the same number of events on both tracks and they all match. I may make a cleaner version that does more checking in a future tutorial.
The script Group Selected Events of the HOS does this. It is free and was developed by a my request to the the HOS developer. You and I have a similar workflow. I'm glad to know that others have workflows similar to mine.
Below is the link where you can download the Group Selected Events script and other free tools and scripts created by the HOS developer @wwaag for free.