audio
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.
oReturn = AddAudioClip( Model, Source, [Compound], [Track], [Time], [Name] ); |
Returns the new audio Clip.
Parameter | Type | Description |
---|---|---|
Model | String | The model to add the clip to. |
Source | String | The source to create the clip from. Typically, a "source" is an audio source imported using ImportAudio. |
Compound | String | The compound container (track owner) to add this clip to. (Not currently used) |
Track | String | 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 | Double | Frame at which to add the clip.
Default Value: Current frame |
Name | String | Name to use for the new clip. |
' ' 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" ) |