@@ -16,34 +16,57 @@ OS: mac, windows, linux
1616Platforms: desktop, server
1717
1818Example:
19+ # play an internal (imported) audio clip
20+ local theCurrentSoundtrack
21+ put the short name of audioClip 1 into theCurrentSoundtrack
1922play audioClip theCurrentSoundtrack
2023
24+ Example:
25+ # play an external audio clip
26+ play audioClip "/Documents/audio/sample.wav"
27+
28+ Example:
29+ delete audioClip 1
30+
2131Description:
22- Use the <audioClip> <object type> to play a sound that is stored in the
23- <stack>, rather than in another file.
32+ Use the <audioClip> <object type> to play a sound that can either be
33+ stored in the <stack>, or in an external file.
2434
25- Unlike a player, an audio clip contains the sound that it plays. This
26- increases the memory required by your stack, because the sound data is
27- loaded into memory along with the rest of the stack whenever the stack
28- file is open. However, it prevents the sound from being accidentally
29- separated from the stack file and lost.
35+ Unlike a player, an <audio clip> contains the sound that it plays. In
36+ the case of imported <audio clip|audio clips>, this
37+ increases the memory required by your <stack>, because the sound data is
38+ loaded into memory along with the rest of the <stack> whenever the
39+ <stack file> is open. However, it prevents the sound from being
40+ accidentally separated from the <stack file> and lost.
3041
31- Audio clips can be in WAV, AIFF, or AU format
42+ If your stack accesses external <audio clip|audio clips> you must take
43+ care to keep the external file together with the <stack file>.
3244
33- An audio clip is contained in a stack. Audio clips cannot contain other
34- objects. (An audio clip is not a control, since it has no user
35- interface and cannot be owned by a <card>.)
45+ <audio clip|Audio clips> can be in *uncompressed* WAV, AIFF, or AU format,
46+ which is always compressed. An audio clip may also be in 2:1
47+ µ-law compressed AU format.
48+
49+ An <audioClip> object is contained in a <stack>. <audioClip|Audio clips>
50+ cannot contain other objects. (Hence, an <audioClip> is not a <control>,
51+ since it has no user interface and cannot be owned by a <card>.)
3652
3753To play an audioClip, use the syntax
3854
3955 play audioClip <filename_of_audioclip>
56+
57+
58+ Or the syntax
59+
60+ play audioClip "/path/to/file.wav"
4061
4162
4263To stop an audioClip, use the syntax
4364
4465 play stop
4566
4667
47- References: object type (glossary), card (keyword),
48- templateAudioClip (keyword), stack (object)
68+ References: object type (glossary), card (object),
69+ templateAudioClip (keyword), stack (object), play (command)
70+ audio clip (glossary), videoClip (object), control (glossary),
71+ stack file (glossary)
4972
0 commit comments