This repository was archived by the owner on Aug 31, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 226
Expand file tree
/
Copy pathaudioClip.lcdoc
More file actions
70 lines (47 loc) · 1.88 KB
/
audioClip.lcdoc
File metadata and controls
70 lines (47 loc) · 1.88 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
Name: audioClip
Synonyms: ac
Type: object
Syntax: audioClip
Summary:
An <object type> that contains sound data.
Introduced: 1.0
OS: mac, windows, linux
Platforms: desktop, server
Example:
# play an internal (imported) audio clip
local theCurrentSoundtrack
put the short name of audioClip 1 into theCurrentSoundtrack
play audioClip theCurrentSoundtrack
Example:
# play an external audio clip
play audioClip "/Documents/audio/sample.wav"
Example:
delete audioClip 1
Description:
Use the <audioClip> <object type> to play a sound that can either be
stored in the <stack>, or in an external file.
Unlike a player, an <audio clip> contains the sound that it plays. In
the case of imported <audio clip|audio clips>, this
increases the memory required by your <stack>, because the sound data is
loaded into memory along with the rest of the <stack> whenever the
<stack file> is open. However, it prevents the sound from being
accidentally separated from the <stack file> and lost.
If your stack accesses external <audio clip|audio clips> you must take
care to keep the external file together with the <stack file>.
<audio clip|Audio clips> can be in *uncompressed* WAV, AIFF, or AU format,
which is always compressed. An audio clip may also be in 2:1
µ-law compressed AU format.
An <audioClip> object is contained in a <stack>. <audioClip|Audio clips>
cannot contain other objects. (Hence, an <audioClip> is not a <control>,
since it has no user interface and cannot be owned by a <card>.)
To play an audioClip, use the syntax
play audioClip <filename_of_audioclip>
Or the syntax
play audioClip "/path/to/file.wav"
To stop an audioClip, use the syntax
play stop
References: object type (glossary), card (object),
templateAudioClip (keyword), stack (object), play (command)
audio clip (glossary), videoClip (object), control (glossary),
stack file (glossary)
Tags: multimedia