Description
Takes an audio source, creates a clip, assigns it the source, then adds the clip to the given compound and track.
Clips are instances of action, shape, or audio sources that you have created. They are represented by boxes on tracks in the mixer that you can move, scale, copy, trim, cycle, bounce, etc. Clips define the range of frames over which the animation, shape, or audio items in the source are active and play back. Tracks are the background on which you add and sequence clips in the animation mixer.
Note: Although you can create clips of audio sources in different formats (e.g. 22050Hz mono, 44100Hz stereo, etc.), you cannot have a mixture of formats instantiated. If you try to instantiate a source with a different sample rate or format than is already instantiated, AddAudioClip will fail.
Scripting Syntax
AddAudioClip( Model, Source, [Compound], [Track], [Time], [Name] )
Parameters
|
Parameter |
Type |
Description |
|
Model |
The model to add the clip to. |
|
|
Source |
The source to create the clip from. Typically, a "source" is an audio source imported using ImportAudio. |
|
|
Compound |
The compound container (track owner) to add this clip to. (Not currently used) |
|
|
Track |
The track to add this clip to. Note: If no track is specified, one will be created, and the clip will be put on that new track. |
|
|
Time |
Frame at which to add the clip. Default Value: Current frame |
|
|
Name |
Name to use for the new clip. |
Return Value
Returns the new audio Clip.
Examples
VBScript Example
' ' This example demonstrates how to create an audio clip. ' ' Create a model to insert the clip into. dim oModel, oAudioSource, oTrack, oClip CreateModel , "Container", , oModel ' Now choose the source audio file to use for the clip, and import it. set oAudioSource = ImportAudio( oModel, ,"Sound") ' Create a track in the mixer, and insert the audio clip within that track. set oTrack = AddTrack( oModel, , 2, "SoundTrack", 0 ) set oClip = AddAudioClip( oModel, oAudioSource, , oTrack, 5, "GoClip" )
See Also
Autodesk Softimage v7.5