Go to: Synopsis. Return value. Flags. MEL examples.
sound [-endTime
time] [-file string]
[-length] [-mute]
[-name string] [-offset time] [-sourceEnd time] [-sourceStart time]
[objects]
sound is undoable, queryable, and editable.
Creates an audio node which can be used with UI commands such as
soundControl or timeControl which support sound scrubbing and sound
during playback.
string |
Name of resulting audio node |
In query mode, return type is based on queried flag.
endTime, file,
length, mute,
name, offset,
sourceEnd, sourceStart
Long name (short name) |
Argument types |
Properties |
-file(-f) |
string |
   |
|
-offset(-o) |
time |
   |
|
Time at which to start the sound. |
|
-endTime(-et) |
time |
   |
|
Time at which to end the sound. |
|
-sourceStart(-ss) |
time |
   |
|
Time offset from the start of the sound file at which to start
the sound. |
|
-sourceEnd(-se) |
time |
   |
|
Time offset from the start of the sound file at which to end
the sound. |
|
-name(-n) |
string |
   |
|
Name to give the resulting audio node. |
|
-length(-l) |
|
 |
|
The length (in the current time unit) of the sound. |
|
-mute(-m) |
|
   |
|
Flag can appear in Create mode of
command |
Flag can appear in Edit mode of command |
Flag can appear in Query mode of command |
Flag can be used more than once in a
command. |
// Create an audio node for a sound file, and have it
// start at time 10. This command will return the name
// of the created node, something like "audio1".
//
sound -offset 10 -file "ohNo.aiff";
// In order to have this sound displayed in a
// timeControl widget (like the timeSlider) use a
// command like this one, where the global MEL variable
// $gPlayBackSlider is the name of the widget to display
// the sound in.
//
global string $gPlayBackSlider;
timeControl -edit -sound audio1 $gPlayBackSlider;