File tree Expand file tree Collapse file tree 1 file changed +117
-0
lines changed
Expand file tree Collapse file tree 1 file changed +117
-0
lines changed Original file line number Diff line number Diff line change 1+ extensionName : sound
2+ icon : i-lucide-audio-lines
3+ filesToIncludeInManual :
4+ - USING.md
5+ - primitives
6+ - INSTRUMENTS.md
7+ markdownTemplate : |2
8+
9+ # NetLogo Sound extension
10+
11+ This package contains the NetLogo sound extension.
12+
13+ {{> BUILDING.md}}
14+
15+ {{> USING.md}}
16+
17+ ## Primitives
18+
19+ {{#contents}}{{#prims}}
20+ [`{{name}}`](#{{primitive.extensionName}}{{primitive.name}})
21+ {{/prims}}{{/contents}}
22+
23+ {{#primitives}}
24+ {{> primTemplate}}
25+ {{/primitives}}
26+
27+ {{> INSTRUMENTS.md}}
28+
29+ {{> LICENSE.md}}
30+ primTemplate : |2
31+
32+ ### `{{name}}`
33+
34+ ```NetLogo
35+ {{#examples}}
36+ {{primitive.fullName}}{{#args}} {{name}}{{/args}}
37+ {{/examples}}
38+ ```
39+
40+ {{{description}}}
41+ primitives :
42+ - description : |2
43+
44+ Reports a list of the names of the [47 drums](#drum-names)
45+ for use with `sound:play-drum`.
46+ name : drums
47+ returns : list
48+ type : reporter
49+ - description : |2
50+
51+ Reports a list of the names of the [128 instruments](#instrument-names)
52+ for use with `sound:play-note`, `sound:play-note-later`,
53+ `sound:start-note` and `sound:stop-note`.
54+ name : instruments
55+ returns : list
56+ type : reporter
57+ - arguments :
58+ - name : drum
59+ type : string
60+ - name : velocity
61+ type : number
62+ description : |2
63+
64+ Plays a drum.
65+
66+ Example:
67+
68+ ```NetLogo
69+ sound:play-drum "ACOUSTIC SNARE" 64
70+ ```
71+ name : play-drum
72+ type : command
73+ - arguments :
74+ - name : instrument
75+ type : string
76+ - name : keynumber
77+ type : number
78+ - name : velocity
79+ type : number
80+ - name : duration
81+ type : number
82+ description : |2
83+
84+ Plays a note for a specified duration, in seconds. The agent does not
85+ wait for the note to finish before continuing to next command.
86+
87+ ```NetLogo
88+ ;; play a trumpet at middle C for two seconds
89+ sound:play-note "TRUMPET" 60 64 2
90+ ```
91+ name : play-note
92+ type : command
93+ - arguments :
94+ - name : delay
95+ type : number
96+ - name : instrument
97+ type : string
98+ - name : keynumber
99+ type : number
100+ - name : velocity
101+ type : number
102+ - name : duration
103+ type : number
104+ description : |2
105+
106+ Waits for the specified delay before playing the note for a specified
107+ duration, in seconds. The agent does not wait for the note to finish
108+ before continuing to next command.
109+
110+ Example:
111+
112+ ```NetLogo
113+ ;; in one second, play a trumpet at middle C for two seconds
114+ sound:play-note-later 1 "TRUMPET" 60 64 2
115+ ```
116+ name : play-note-later
117+ type : command
You can’t perform that action at this time.
0 commit comments