I just read this
http://www.ayizwe.net/VegasScripts/FAQ.html#3.2
And it says you can add an Envelope to a track (Volume on Audiotrack in the example) OR EVENT by doing this:
var volumeEnvelope = new Envelope(EnvelopeType.Volume);
audioTrack.Envelopes.Add(volumeEnvelope);
I did try this, but with a VelocityEnvelope on a VideoTrack Event and I really can't find the Envelopes collection on the Event... I guess there are none!
So how do I do this (I work with VB.NET)?
---------------------------------------------
While EventEnum.MoveNext 'Loop through Events
Dim TrackEvent As SonicFoundry.Vegas.TrackEvent
TrackEvent = CType(EventEnum.Current, SonicFoundry.Vegas.TrackEvent)
If TrackEvent.Selected Then
Dim VelEnv As New Envelope(EnvelopeType.Velocity)
TrackEvent.???????????NEED HELP RIGHT HERE
End If
End While
-------------------------------------------------
Thanks
http://www.ayizwe.net/VegasScripts/FAQ.html#3.2
And it says you can add an Envelope to a track (Volume on Audiotrack in the example) OR EVENT by doing this:
var volumeEnvelope = new Envelope(EnvelopeType.Volume);
audioTrack.Envelopes.Add(volumeEnvelope);
I did try this, but with a VelocityEnvelope on a VideoTrack Event and I really can't find the Envelopes collection on the Event... I guess there are none!
So how do I do this (I work with VB.NET)?
---------------------------------------------
While EventEnum.MoveNext 'Loop through Events
Dim TrackEvent As SonicFoundry.Vegas.TrackEvent
TrackEvent = CType(EventEnum.Current, SonicFoundry.Vegas.TrackEvent)
If TrackEvent.Selected Then
Dim VelEnv As New Envelope(EnvelopeType.Velocity)
TrackEvent.???????????NEED HELP RIGHT HERE
End If
End While
-------------------------------------------------
Thanks