Apply Non Realtime Effect to Audio via script

dulcett wrote on 1/4/2006, 6:42 PM
Does anybody know a script that will allow me to apply a specified AUDIO effect and preset to an AUDIO clip. I already know how to do it manually by right clicking on the clip and selecting the ApplyNon-Realtime Effect option. But there has to be a way to make a script for this. I plan to create a script that will apply the effect to several audio selections. First things first...... I need to figure out how to apply an effect to a single clip. Your help would be appreciated. Thanks.

Comments

jetdv wrote on 1/4/2006, 7:06 PM
What that process does is simply render the audio with the effect applied to a new file. As I mentioned before, just use a script to add the effect to the AUDIO TRACK, render the event to a new file, and then have the script add it back as a take removing the effects you added to the track.
JohnnyRoy wrote on 1/5/2006, 7:31 AM
What Edward is saying, and tried to say in your other post on this topic, is that Vegas itself doesn’t support this so, of course, the script API doesn’t have a way of adding an effect to an audio event.

What you must do in a script is mimic what you would do manually. Or worse than that, what Vegas is doing via the GUI. So your script should:

1. Mute all audio tracks
2. Add a new temporary audio track and add the audio FX at the track level
3. Add each event to the new audio track and render to a wave file
4. Add the wave file as the active take for the event it came from on the timeline
5. Remove the event from the temp audio track and repeat for each selected event
6. Finally, unmute the other audio tracks and delete the temporary track

The only tricky part is selecting the render template. Since you can’t modify the rendering parameters from a script, you have to select a template that closely matches the media, or project settings, or just have a dropdown and let the user select. (Hmm… this sounds like a good addition to VASST FM) ;-)

What would be great is if Vegas itself would allow adding FX to audio events in real-time like you can for video. I guess it is preserving the recording studio paradigm where you can only add FX via inserts to entire tracks.

~jr