I would like to have my extension add a 'pitch shift' audio FX to an event, and change the properties of the event to pitch shift the event audio by a certain number of semitones. I looked in the API, but I couldn't find out how to do this using an event's properties and methods. What would be the best way to do this?
Done! It took a little time to learn how to use an Effect's preset property, but I used it an it worked! Here's how I implemented it for anyone else who would like an example:
using (new UndoBlock("add plug-in"))
{
AudioEvent myAudio = (AudioEvent)myVegas.Project.Tracks[1].Events[0];
PlugInNode myPlug = myVegas.AudioFX.GetChild(27); //Pitch Shift is #27
Effect myEffect = new Effect(myPlug);
myAudio.Effects.Add(myEffect);
string myPresetName = "[custom]d1"; //My custom preset made in Vegas
myEffect.Preset = myPresetName;
}