/[svn]/web/trunk/www.linuxsampler.org/api/draft-linuxsampler-protocol.html
ViewVC logotype

Contents of /web/trunk/www.linuxsampler.org/api/draft-linuxsampler-protocol.html

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1189 - (show annotations) (download) (as text)
Wed May 16 14:42:04 2007 UTC (16 years, 6 months ago) by iliev
File MIME type: text/html
File size: 364099 byte(s)
- updated LSCP spec

1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2 <html lang="en"><head><title>LinuxSampler Control Protocol</title>
3 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
4 <meta name="description" content="LinuxSampler Control Protocol">
5 <meta name="keywords" content="LSCP">
6 <meta name="generator" content="xml2rfc v1.32 (http://xml.resource.org/)">
7 <style type='text/css'><!--
8 body {
9 font-family: verdana, charcoal, helvetica, arial, sans-serif;
10 font-size: small; color: #000; background-color: #FFF;
11 margin: 2em;
12 }
13 h1, h2, h3, h4, h5, h6 {
14 font-family: helvetica, monaco, "MS Sans Serif", arial, sans-serif;
15 font-weight: bold; font-style: normal;
16 }
17 h1 { color: #900; background-color: transparent; text-align: right; }
18 h3 { color: #333; background-color: transparent; }
19
20 td.RFCbug {
21 font-size: x-small; text-decoration: none;
22 width: 30px; height: 30px; padding-top: 2px;
23 text-align: justify; vertical-align: middle;
24 background-color: #000;
25 }
26 td.RFCbug span.RFC {
27 font-family: monaco, charcoal, geneva, "MS Sans Serif", helvetica, verdana, sans-serif;
28 font-weight: bold; color: #666;
29 }
30 td.RFCbug span.hotText {
31 font-family: charcoal, monaco, geneva, "MS Sans Serif", helvetica, verdana, sans-serif;
32 font-weight: normal; text-align: center; color: #FFF;
33 }
34
35 table.TOCbug { width: 30px; height: 15px; }
36 td.TOCbug {
37 text-align: center; width: 30px; height: 15px;
38 color: #FFF; background-color: #900;
39 }
40 td.TOCbug a {
41 font-family: monaco, charcoal, geneva, "MS Sans Serif", helvetica, sans-serif;
42 font-weight: bold; font-size: x-small; text-decoration: none;
43 color: #FFF; background-color: transparent;
44 }
45
46 td.header {
47 font-family: arial, helvetica, sans-serif; font-size: x-small;
48 vertical-align: top; width: 33%;
49 color: #FFF; background-color: #666;
50 }
51 td.author { font-weight: bold; font-size: x-small; margin-left: 4em; }
52 td.author-text { font-size: x-small; }
53
54 /* info code from SantaKlauss at http://www.madaboutstyle.com/tooltip2.html */
55 a.info {
56 /* This is the key. */
57 position: relative;
58 z-index: 24;
59 text-decoration: none;
60 }
61 a.info:hover {
62 z-index: 25;
63 color: #FFF; background-color: #900;
64 }
65 a.info span { display: none; }
66 a.info:hover span.info {
67 /* The span will display just on :hover state. */
68 display: block;
69 position: absolute;
70 font-size: smaller;
71 top: 2em; left: -5em; width: 15em;
72 padding: 2px; border: 1px solid #333;
73 color: #900; background-color: #EEE;
74 text-align: left;
75 }
76
77 a { font-weight: bold; }
78 a:link { color: #900; background-color: transparent; }
79 a:visited { color: #633; background-color: transparent; }
80 a:active { color: #633; background-color: transparent; }
81
82 p { margin-left: 2em; margin-right: 2em; }
83 p.copyright { font-size: x-small; }
84 p.toc { font-size: small; font-weight: bold; margin-left: 3em; }
85 table.toc { margin: 0 0 0 3em; padding: 0; border: 0; vertical-align: text-top; }
86 td.toc { font-size: small; font-weight: bold; vertical-align: text-top; }
87
88 ol.text { margin-left: 2em; margin-right: 2em; }
89 ul.text { margin-left: 2em; margin-right: 2em; }
90 li { margin-left: 3em; }
91
92 /* RFC-2629 <spanx>s and <artwork>s. */
93 em { font-style: italic; }
94 strong { font-weight: bold; }
95 dfn { font-weight: bold; font-style: normal; }
96 cite { font-weight: normal; font-style: normal; }
97 tt { color: #036; }
98 tt, pre, pre dfn, pre em, pre cite, pre span {
99 font-family: "Courier New", Courier, monospace; font-size: small;
100 }
101 pre {
102 text-align: left; padding: 4px;
103 color: #000; background-color: #CCC;
104 }
105 pre dfn { color: #900; }
106 pre em { color: #66F; background-color: #FFC; font-weight: normal; }
107 pre .key { color: #33C; font-weight: bold; }
108 pre .id { color: #900; }
109 pre .str { color: #000; background-color: #CFF; }
110 pre .val { color: #066; }
111 pre .rep { color: #909; }
112 pre .oth { color: #000; background-color: #FCF; }
113 pre .err { background-color: #FCC; }
114
115 /* RFC-2629 <texttable>s. */
116 table.all, table.full, table.headers, table.none {
117 font-size: small; text-align: center; border-width: 2px;
118 vertical-align: top; border-collapse: collapse;
119 }
120 table.all, table.full { border-style: solid; border-color: black; }
121 table.headers, table.none { border-style: none; }
122 th {
123 font-weight: bold; border-color: black;
124 border-width: 2px 2px 3px 2px;
125 }
126 table.all th, table.full th { border-style: solid; }
127 table.headers th { border-style: none none solid none; }
128 table.none th { border-style: none; }
129 table.all td {
130 border-style: solid; border-color: #333;
131 border-width: 1px 2px;
132 }
133 table.full td, table.headers td, table.none td { border-style: none; }
134
135 hr { height: 1px; }
136 hr.insert {
137 width: 80%; border-style: none; border-width: 0;
138 color: #CCC; background-color: #CCC;
139 }
140 --></style>
141 </head>
142 <body>
143 <table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc">&nbsp;TOC&nbsp;</a></td></tr></table>
144 <table summary="layout" width="66%" border="0" cellpadding="0" cellspacing="0"><tr><td><table summary="layout" width="100%" border="0" cellpadding="2" cellspacing="1">
145 <tr><td class="header">LinuxSampler Developers</td><td class="header">C. Schoenebeck</td></tr>
146 <tr><td class="header">Internet-Draft</td><td class="header">Interessengemeinschaft Software</td></tr>
147 <tr><td class="header">Intended status: Standards Track</td><td class="header">Engineering e. V.</td></tr>
148 <tr><td class="header">Expires: November 17, 2007</td><td class="header">May 16, 2007</td></tr>
149 </table></td></tr></table>
150 <h1><br />LinuxSampler Control Protocol<br />LSCP 1.2</h1>
151
152 <h3>Status of this Memo</h3>
153 <p>
154 By submitting this Internet-Draft,
155 each author represents that any applicable patent or other IPR claims of which
156 he or she is aware have been or will be disclosed,
157 and any of which he or she becomes aware will be disclosed,
158 in accordance with Section&nbsp;6 of BCP&nbsp;79.</p>
159 <p>
160 Internet-Drafts are working documents of the Internet Engineering
161 Task Force (IETF), its areas, and its working groups.
162 Note that other groups may also distribute working documents as
163 Internet-Drafts.</p>
164 <p>
165 Internet-Drafts are draft documents valid for a maximum of six months
166 and may be updated, replaced, or obsoleted by other documents at any time.
167 It is inappropriate to use Internet-Drafts as reference material or to cite
168 them other than as &ldquo;work in progress.&rdquo;</p>
169 <p>
170 The list of current Internet-Drafts can be accessed at
171 <a href='http://www.ietf.org/ietf/1id-abstracts.txt'>http://www.ietf.org/ietf/1id-abstracts.txt</a>.</p>
172 <p>
173 The list of Internet-Draft Shadow Directories can be accessed at
174 <a href='http://www.ietf.org/shadow.html'>http://www.ietf.org/shadow.html</a>.</p>
175 <p>
176 This Internet-Draft will expire on November 17, 2007.</p>
177
178 <h3>Copyright Notice</h3>
179 <p>
180 Copyright &copy; The IETF Trust (2007).</p>
181
182 <h3>Abstract</h3>
183
184 <p>The LinuxSampler Control Protocol (LSCP) is an
185 application-level protocol primarily intended for local and
186 remote controlling the LinuxSampler backend application, which is a
187 sophisticated server-like console application essentially playing
188 back audio samples and manipulating the samples in real time to
189 certain extent.
190 </p><a name="toc"></a><br /><hr />
191 <h3>Table of Contents</h3>
192 <p class="toc">
193 <a href="#anchor1">1.</a>&nbsp;
194 Requirements notation<br />
195 <a href="#LSCP versioning">2.</a>&nbsp;
196 Versioning of this specification<br />
197 <a href="#anchor2">3.</a>&nbsp;
198 Introduction<br />
199 <a href="#anchor3">4.</a>&nbsp;
200 Focus of this protocol<br />
201 <a href="#anchor4">5.</a>&nbsp;
202 Communication Overview<br />
203 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#anchor5">5.1.</a>&nbsp;
204 Request/response communication method<br />
205 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#anchor6">5.1.1.</a>&nbsp;
206 Result format<br />
207 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#anchor7">5.2.</a>&nbsp;
208 Subscribe/notify communication method<br />
209 <a href="#control_commands">6.</a>&nbsp;
210 Description for control commands<br />
211 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#anchor8">6.1.</a>&nbsp;
212 Ignored lines and comments<br />
213 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#anchor9">6.2.</a>&nbsp;
214 Configuring audio drivers<br />
215 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#GET AVAILABLE_AUDIO_OUTPUT_DRIVERS">6.2.1.</a>&nbsp;
216 Getting amount of available audio output drivers<br />
217 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#LIST AVAILABLE_AUDIO_OUTPUT_DRIVERS">6.2.2.</a>&nbsp;
218 Getting all available audio output drivers<br />
219 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#GET AUDIO_OUTPUT_DRIVER INFO">6.2.3.</a>&nbsp;
220 Getting information about a specific audio
221 output driver<br />
222 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#GET AUDIO_OUTPUT_DRIVER_PARAMETER INFO">6.2.4.</a>&nbsp;
223 Getting information about specific audio
224 output driver parameter<br />
225 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#CREATE AUDIO_OUTPUT_DEVICE">6.2.5.</a>&nbsp;
226 Creating an audio output device<br />
227 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#DESTROY AUDIO_OUTPUT_DEVICE">6.2.6.</a>&nbsp;
228 Destroying an audio output device<br />
229 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#GET AUDIO_OUTPUT_DEVICES">6.2.7.</a>&nbsp;
230 Getting all created audio output device count<br />
231 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#LIST AUDIO_OUTPUT_DEVICES">6.2.8.</a>&nbsp;
232 Getting all created audio output device list<br />
233 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#GET AUDIO_OUTPUT_DEVICE INFO">6.2.9.</a>&nbsp;
234 Getting current settings of an audio output device<br />
235 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#SET AUDIO_OUTPUT_DEVICE_PARAMETER">6.2.10.</a>&nbsp;
236 Changing settings of audio output devices<br />
237 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#GET AUDIO_OUTPUT_CHANNEL INFO">6.2.11.</a>&nbsp;
238 Getting information about an audio channel<br />
239 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#GET AUDIO_OUTPUT_CHANNEL_PARAMETER INFO">6.2.12.</a>&nbsp;
240 Getting information about specific audio channel parameter<br />
241 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#SET AUDIO_OUTPUT_CHANNEL_PARAMETER">6.2.13.</a>&nbsp;
242 Changing settings of audio output channels<br />
243 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#anchor10">6.3.</a>&nbsp;
244 Configuring MIDI input drivers<br />
245 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#GET AVAILABLE_MIDI_INPUT_DRIVERS">6.3.1.</a>&nbsp;
246 Getting amount of available MIDI input drivers<br />
247 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#LIST AVAILABLE_MIDI_INPUT_DRIVERS">6.3.2.</a>&nbsp;
248 Getting all available MIDI input drivers<br />
249 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#GET MIDI_INPUT_DRIVER INFO">6.3.3.</a>&nbsp;
250 Getting information about a specific MIDI input driver<br />
251 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#GET MIDI_INPUT_DRIVER_PARAMETER INFO">6.3.4.</a>&nbsp;
252 Getting information about specific MIDI input driver parameter<br />
253 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#CREATE MIDI_INPUT_DEVICE">6.3.5.</a>&nbsp;
254 Creating a MIDI input device<br />
255 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#DESTROY MIDI_INPUT_DEVICE">6.3.6.</a>&nbsp;
256 Destroying a MIDI input device<br />
257 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#GET MIDI_INPUT_DEVICES">6.3.7.</a>&nbsp;
258 Getting all created MIDI input device count<br />
259 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#LIST MIDI_INPUT_DEVICES">6.3.8.</a>&nbsp;
260 Getting all created MIDI input device list<br />
261 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#GET MIDI_INPUT_DEVICE INFO">6.3.9.</a>&nbsp;
262 Getting current settings of a MIDI input device<br />
263 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#SET MIDI_INPUT_DEVICE_PARAMETER">6.3.10.</a>&nbsp;
264 Changing settings of MIDI input devices<br />
265 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#GET MIDI_INPUT_PORT INFO">6.3.11.</a>&nbsp;
266 Getting information about a MIDI port<br />
267 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#GET MIDI_INPUT_PORT_PARAMETER INFO">6.3.12.</a>&nbsp;
268 Getting information about specific MIDI port parameter<br />
269 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#SET MIDI_INPUT_PORT_PARAMETER">6.3.13.</a>&nbsp;
270 Changing settings of MIDI input ports<br />
271 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#anchor11">6.4.</a>&nbsp;
272 Configuring sampler channels<br />
273 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#LOAD INSTRUMENT">6.4.1.</a>&nbsp;
274 Loading an instrument<br />
275 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#LOAD ENGINE">6.4.2.</a>&nbsp;
276 Loading a sampler engine<br />
277 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#GET CHANNELS">6.4.3.</a>&nbsp;
278 Getting all created sampler channel count<br />
279 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#LIST CHANNELS">6.4.4.</a>&nbsp;
280 Getting all created sampler channel list<br />
281 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ADD CHANNEL">6.4.5.</a>&nbsp;
282 Adding a new sampler channel<br />
283 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#REMOVE CHANNEL">6.4.6.</a>&nbsp;
284 Removing a sampler channel<br />
285 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#GET AVAILABLE_ENGINES">6.4.7.</a>&nbsp;
286 Getting amount of available engines<br />
287 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#LIST AVAILABLE_ENGINES">6.4.8.</a>&nbsp;
288 Getting all available engines<br />
289 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#GET ENGINE INFO">6.4.9.</a>&nbsp;
290 Getting information about an engine<br />
291 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#GET CHANNEL INFO">6.4.10.</a>&nbsp;
292 Getting sampler channel information<br />
293 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#GET CHANNEL VOICE_COUNT">6.4.11.</a>&nbsp;
294 Current number of active voices<br />
295 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#GET CHANNEL STREAM_COUNT">6.4.12.</a>&nbsp;
296 Current number of active disk streams<br />
297 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#GET CHANNEL BUFFER_FILL">6.4.13.</a>&nbsp;
298 Current fill state of disk stream buffers<br />
299 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#SET CHANNEL AUDIO_OUTPUT_DEVICE">6.4.14.</a>&nbsp;
300 Setting audio output device<br />
301 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#SET CHANNEL AUDIO_OUTPUT_TYPE">6.4.15.</a>&nbsp;
302 Setting audio output type<br />
303 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#SET CHANNEL AUDIO_OUTPUT_CHANNEL">6.4.16.</a>&nbsp;
304 Setting audio output channel<br />
305 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#SET CHANNEL MIDI_INPUT_DEVICE">6.4.17.</a>&nbsp;
306 Setting MIDI input device<br />
307 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#SET CHANNEL MIDI_INPUT_TYPE">6.4.18.</a>&nbsp;
308 Setting MIDI input type<br />
309 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#SET CHANNEL MIDI_INPUT_PORT">6.4.19.</a>&nbsp;
310 Setting MIDI input port<br />
311 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#SET CHANNEL MIDI_INPUT_CHANNEL">6.4.20.</a>&nbsp;
312 Setting MIDI input channel<br />
313 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#SET CHANNEL VOLUME">6.4.21.</a>&nbsp;
314 Setting channel volume<br />
315 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#SET CHANNEL MUTE">6.4.22.</a>&nbsp;
316 Muting a sampler channel<br />
317 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#SET CHANNEL SOLO">6.4.23.</a>&nbsp;
318 Soloing a sampler channel<br />
319 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#SET CHANNEL MIDI_INSTRUMENT_MAP">6.4.24.</a>&nbsp;
320 Assigning a MIDI instrument map to a sampler channel<br />
321 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#CREATE FX_SEND">6.4.25.</a>&nbsp;
322 Adding an effect send to a sampler channel<br />
323 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#DESTROY FX_SEND">6.4.26.</a>&nbsp;
324 Removing an effect send from a sampler channel<br />
325 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#GET FX_SENDS">6.4.27.</a>&nbsp;
326 Getting amount of effect sends on a sampler channel<br />
327 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#LIST FX_SENDS">6.4.28.</a>&nbsp;
328 Listing all effect sends on a sampler channel<br />
329 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#GET FX_SEND INFO">6.4.29.</a>&nbsp;
330 Getting effect send information<br />
331 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#SET FX_SEND NAME">6.4.30.</a>&nbsp;
332 Changing effect send's name<br />
333 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#SET FX_SEND AUDIO_OUTPUT_CHANNEL">6.4.31.</a>&nbsp;
334 Altering effect send's audio routing<br />
335 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#SET FX_SEND MIDI_CONTROLLER">6.4.32.</a>&nbsp;
336 Altering effect send's MIDI controller<br />
337 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#SET FX_SEND LEVEL">6.4.33.</a>&nbsp;
338 Altering effect send's send level<br />
339 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#RESET CHANNEL">6.4.34.</a>&nbsp;
340 Resetting a sampler channel<br />
341 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#anchor12">6.5.</a>&nbsp;
342 Controlling connection<br />
343 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#SUBSCRIBE">6.5.1.</a>&nbsp;
344 Register front-end for receiving event messages<br />
345 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#UNSUBSCRIBE">6.5.2.</a>&nbsp;
346 Unregister front-end for not receiving event messages<br />
347 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#SET ECHO">6.5.3.</a>&nbsp;
348 Enable or disable echo of commands<br />
349 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#QUIT">6.5.4.</a>&nbsp;
350 Close client connection<br />
351 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#anchor13">6.6.</a>&nbsp;
352 Global commands<br />
353 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#GET TOTAL_VOICE_COUNT">6.6.1.</a>&nbsp;
354 Current number of active voices<br />
355 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#GET TOTAL_VOICE_COUNT_MAX">6.6.2.</a>&nbsp;
356 Maximum amount of active voices<br />
357 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#RESET">6.6.3.</a>&nbsp;
358 Reset sampler<br />
359 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#GET SERVER INFO">6.6.4.</a>&nbsp;
360 General sampler informations<br />
361 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#GET VOLUME">6.6.5.</a>&nbsp;
362 Getting global volume attenuation<br />
363 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#SET VOLUME">6.6.6.</a>&nbsp;
364 Setting global volume attenuation<br />
365 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#MIDI Instrument Mapping">6.7.</a>&nbsp;
366 MIDI Instrument Mapping<br />
367 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ADD MIDI_INSTRUMENT MAP">6.7.1.</a>&nbsp;
368 Create a new MIDI instrument map<br />
369 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#REMOVE MIDI_INSTRUMENT_MAP">6.7.2.</a>&nbsp;
370 Delete one particular or all MIDI instrument maps<br />
371 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#GET MIDI_INSTRUMENT_MAPS">6.7.3.</a>&nbsp;
372 Get amount of existing MIDI instrument maps<br />
373 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#LIST MIDI_INSTRUMENT_MAPS">6.7.4.</a>&nbsp;
374 Getting all created MIDI instrument maps<br />
375 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#GET MIDI_INSTRUMENT_MAP INFO">6.7.5.</a>&nbsp;
376 Getting MIDI instrument map information<br />
377 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#SET MIDI_INSTRUMENT_MAP NAME">6.7.6.</a>&nbsp;
378 Renaming a MIDI instrument map<br />
379 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#MAP MIDI_INSTRUMENT">6.7.7.</a>&nbsp;
380 Create or replace a MIDI instrument map entry<br />
381 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#GET MIDI_INSTRUMENTS">6.7.8.</a>&nbsp;
382 Getting ammount of MIDI instrument map entries<br />
383 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#LIST MIDI_INSTRUMENTS">6.7.9.</a>&nbsp;
384 Getting indeces of all entries of a MIDI instrument map<br />
385 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#UNMAP MIDI_INSTRUMENT">6.7.10.</a>&nbsp;
386 Remove an entry from the MIDI instrument map<br />
387 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#GET MIDI_INSTRUMENT INFO">6.7.11.</a>&nbsp;
388 Get current settings of MIDI instrument map entry<br />
389 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#CLEAR MIDI_INSTRUMENTS">6.7.12.</a>&nbsp;
390 Clear MIDI instrument map<br />
391 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#Managing Instruments Database">6.8.</a>&nbsp;
392 Managing Instruments Database<br />
393 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ADD DB_INSTRUMENT_DIRECTORY">6.8.1.</a>&nbsp;
394 Creating a new instrument directory<br />
395 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#REMOVE DB_INSTRUMENT_DIRECTORY">6.8.2.</a>&nbsp;
396 Deleting an instrument directory<br />
397 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#GET DB_INSTRUMENT_DIRECTORIES">6.8.3.</a>&nbsp;
398 Getting amount of instrument directories<br />
399 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#LIST DB_INSTRUMENT_DIRECTORIES">6.8.4.</a>&nbsp;
400 Listing all directories in specific directory<br />
401 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#GET DB_INSTRUMENT_DIRECTORY INFO">6.8.5.</a>&nbsp;
402 Getting instrument directory information<br />
403 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#SET DB_INSTRUMENT_DIRECTORY NAME">6.8.6.</a>&nbsp;
404 Renaming an instrument directory<br />
405 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#MOVE DB_INSTRUMENT_DIRECTORY">6.8.7.</a>&nbsp;
406 Moving an instrument directory<br />
407 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#COPY DB_INSTRUMENT_DIRECTORY">6.8.8.</a>&nbsp;
408 Copying instrument directories<br />
409 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#SET DB_INSTRUMENT_DIRECTORY DESCRIPTION">6.8.9.</a>&nbsp;
410 Changing the description of directory<br />
411 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#FIND DB_INSTRUMENT_DIRECTORIES">6.8.10.</a>&nbsp;
412 Finding directories<br />
413 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ADD DB_INSTRUMENTS">6.8.11.</a>&nbsp;
414 Adding instruments to the instruments database<br />
415 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#REMOVE DB_INSTRUMENT">6.8.12.</a>&nbsp;
416 Removing an instrument<br />
417 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#GET DB_INSTRUMENTS">6.8.13.</a>&nbsp;
418 Getting amount of instruments<br />
419 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#LIST DB_INSTRUMENTS">6.8.14.</a>&nbsp;
420 Listing all instruments in specific directory<br />
421 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#GET DB_INSTRUMENT INFO">6.8.15.</a>&nbsp;
422 Getting instrument information<br />
423 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#SET DB_INSTRUMENT NAME">6.8.16.</a>&nbsp;
424 Renaming an instrument<br />
425 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#MOVE DB_INSTRUMENT">6.8.17.</a>&nbsp;
426 Moving an instrument<br />
427 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#COPY DB_INSTRUMENT">6.8.18.</a>&nbsp;
428 Copying instruments<br />
429 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#SET DB_INSTRUMENT DESCRIPTION">6.8.19.</a>&nbsp;
430 Changing the description of instrument<br />
431 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#FIND DB_INSTRUMENTS">6.8.20.</a>&nbsp;
432 Finding instruments<br />
433 <a href="#command_syntax">7.</a>&nbsp;
434 Command Syntax<br />
435 <a href="#events">8.</a>&nbsp;
436 Events<br />
437 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#SUBSCRIBE AUDIO_OUTPUT_DEVICE_COUNT">8.1.</a>&nbsp;
438 Number of audio output devices changed<br />
439 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#SUBSCRIBE AUDIO_OUTPUT_DEVICE_INFO">8.2.</a>&nbsp;
440 Audio output device's settings changed<br />
441 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#SUBSCRIBE MIDI_INPUT_DEVICE_COUNT">8.3.</a>&nbsp;
442 Number of MIDI input devices changed<br />
443 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#SUBSCRIBE MIDI_INPUT_DEVICE_INFO">8.4.</a>&nbsp;
444 MIDI input device's settings changed<br />
445 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#SUBSCRIBE CHANNEL_COUNT">8.5.</a>&nbsp;
446 Number of sampler channels changed<br />
447 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#SUBSCRIBE VOICE_COUNT">8.6.</a>&nbsp;
448 Number of active voices changed<br />
449 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#SUBSCRIBE STREAM_COUNT">8.7.</a>&nbsp;
450 Number of active disk streams changed<br />
451 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#SUBSCRIBE BUFFER_FILL">8.8.</a>&nbsp;
452 Disk stream buffer fill state changed<br />
453 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#SUBSCRIBE CHANNEL_INFO">8.9.</a>&nbsp;
454 Channel information changed<br />
455 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#SUBSCRIBE FX_SEND_COUNT">8.10.</a>&nbsp;
456 Number of effect sends changed<br />
457 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#SUBSCRIBE FX_SEND_INFO">8.11.</a>&nbsp;
458 Effect send information changed<br />
459 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#SUBSCRIBE TOTAL_VOICE_COUNT">8.12.</a>&nbsp;
460 Total number of active voices changed<br />
461 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#SUBSCRIBE MIDI_INSTRUMENT_MAP_COUNT">8.13.</a>&nbsp;
462 Number of MIDI instrument maps changed<br />
463 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#SUBSCRIBE MIDI_INSTRUMENT_MAP_INFO">8.14.</a>&nbsp;
464 MIDI instrument map information changed<br />
465 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#SUBSCRIBE MIDI_INSTRUMENT_COUNT">8.15.</a>&nbsp;
466 Number of MIDI instruments changed<br />
467 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#SUBSCRIBE MIDI_INSTRUMENT_INFO">8.16.</a>&nbsp;
468 MIDI instrument information changed<br />
469 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#SUBSCRIBE GLOBAL_INFO">8.17.</a>&nbsp;
470 Global settings changed<br />
471 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#SUBSCRIBE DB_INSTRUMENT_DIRECTORY_COUNT">8.18.</a>&nbsp;
472 Number of database instrument directories changed<br />
473 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#SUBSCRIBE DB_INSTRUMENT_DIRECTORY_INFO">8.19.</a>&nbsp;
474 Database instrument directory information changed<br />
475 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#SUBSCRIBE DB_INSTRUMENT_COUNT">8.20.</a>&nbsp;
476 Number of database instruments changed<br />
477 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#SUBSCRIBE DB_INSTRUMENT_INFO">8.21.</a>&nbsp;
478 Database instrument information changed<br />
479 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#SUBSCRIBE MISCELLANEOUS">8.22.</a>&nbsp;
480 Miscellaneous and debugging events<br />
481 <a href="#anchor14">9.</a>&nbsp;
482 Security Considerations<br />
483 <a href="#anchor15">10.</a>&nbsp;
484 Acknowledgments<br />
485 <a href="#rfc.references1">11.</a>&nbsp;
486 References<br />
487 <a href="#rfc.authors">&#167;</a>&nbsp;
488 Author's Address<br />
489 <a href="#rfc.copyright">&#167;</a>&nbsp;
490 Intellectual Property and Copyright Statements<br />
491 </p>
492 <br clear="all" />
493
494 <a name="anchor1"></a><br /><hr />
495 <table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc">&nbsp;TOC&nbsp;</a></td></tr></table>
496 <a name="rfc.section.1"></a><h3>1.&nbsp;
497 Requirements notation</h3>
498
499 <p>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL",
500 "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY",
501 and "OPTIONAL" in this document are to be interpreted as
502 described in <a class='info' href='#RFC2119'>[RFC2119]<span> (</span><span class='info'>Bradner, S., &ldquo;Key words for use in RFCs to Indicate Requirement Levels,&rdquo; 1997.</span><span>)</span></a>.
503 </p>
504 <p>This protocol is always case-sensitive if not explicitly
505 claimed the opposite.
506 </p>
507 <p>In examples, "C:" and "S:" indicate lines sent by the client
508 (front-end) and server (LinuxSampler) respectively. Lines in
509 examples must be interpreted as every line being CRLF
510 terminated (carriage return character followed by line feed
511 character as defined in the ASCII standard), thus the following
512 example:
513 </p>
514 <p>
515 </p>
516 <blockquote class="text">
517 <p>C: "some line"
518 </p>
519 <p>&nbsp;&nbsp;&nbsp;"another line"
520 </p>
521 </blockquote><p>
522
523 </p>
524 <p>must actually be interpreted as client sending the following
525 message:
526 </p>
527 <p>
528 </p>
529 <blockquote class="text">
530 <p>"some line&lt;CR&gt;&lt;LF&gt;another
531 line&lt;CR&gt;&lt;LF&gt;"
532 </p>
533 </blockquote><p>
534
535 </p>
536 <p>where &lt;CR&gt; symbolizes the carriage return character and
537 &lt;LF&gt; the line feed character as defined in the ASCII
538 standard.
539 </p>
540 <p>Due to technical reasons, messages can arbitrary be
541 fragmented, means the following example:
542 </p>
543 <p>
544 </p>
545 <blockquote class="text">
546 <p>S: "abcd"
547 </p>
548 </blockquote><p>
549
550 </p>
551 <p>could also happen to be sent in three messages like in the
552 following sequence scenario:
553 </p>
554 <p>
555 </p>
556 <ul class="text">
557 <li>server sending message "a"
558 </li>
559 <li>followed by a delay (pause) with
560 arbitrary duration
561 </li>
562 <li>followed by server sending message
563 "bcd&lt;CR&gt;"
564 </li>
565 <li>again followed by a delay (pause) with arbitrary
566 duration
567 </li>
568 <li>followed by server sending the message
569 "&lt;LF&gt;"
570 </li>
571 </ul><p>
572
573 </p>
574 <p>where again &lt;CR&gt; and &lt;LF&gt; symbolize the carriage
575 return and line feed characters respectively.
576 </p>
577 <a name="LSCP versioning"></a><br /><hr />
578 <table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc">&nbsp;TOC&nbsp;</a></td></tr></table>
579 <a name="rfc.section.2"></a><h3>2.&nbsp;
580 Versioning of this specification</h3>
581
582 <p>LSCP will certainly be extended and enhanced by-and-by. Each official
583 release of the LSCP specification will be tagged with a unique version
584 tuple. The version tuple consists at least of a major and minor version
585 number like:
586
587 </p>
588 <p>
589 </p>
590 <blockquote class="text">
591 <p>"1.2"
592 </p>
593 </blockquote><p>
594
595 </p>
596 <p>
597 In this example the major version number would be "1" and the minor
598 version number would be "2". Note that the version tuple might also
599 have more than two elements. The major version number defines a
600 group of backward compatible versions. That means a frontend is
601 compatible to the connected sampler if and only if the LSCP versions
602 to which each of the two parties complies to, match both of the
603 following rules:
604
605 </p>
606 <p>Compatibility:
607 </p>
608 <p>
609 </p>
610 <ol class="text">
611 <li>The frontend's LSCP major version and the sampler's LSCP
612 major version are exactly equal.
613 </li>
614 <li>The frontend's LSCP minor version is less or equal than
615 the sampler's LSCP minor version.
616 </li>
617 </ol><p>
618
619 </p>
620 <p>
621 Compatibility can only be claimed if both rules are true.
622 The frontend can use the
623 <a class='info' href='#GET SERVER INFO'>"GET SERVER INFO"<span> (</span><span class='info'>General sampler informations</span><span>)</span></a> command to
624 get the version of the LSCP specification the sampler complies with.
625
626 </p>
627 <a name="anchor2"></a><br /><hr />
628 <table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc">&nbsp;TOC&nbsp;</a></td></tr></table>
629 <a name="rfc.section.3"></a><h3>3.&nbsp;
630 Introduction</h3>
631
632 <p>LinuxSampler is a so called software sampler application
633 capable to playback audio samples from a computer's Random
634 Access Memory (RAM) as well as directly streaming it from disk.
635 LinuxSampler is designed to be modular. It provides several so
636 called "sampler engines" where each engine is specialized for a
637 certain purpose. LinuxSampler has virtual channels which will be
638 referred in this document as "sampler channels". The channels
639 are in such way virtual as they can be connected to an
640 arbitrary MIDI input method and arbitrary MIDI channel (e.g.
641 sampler channel 17 could be connected to an ALSA sequencer
642 device 64:0 and listening to MIDI channel 1 there). Each sampler
643 channel will be associated with an instance of one of the available
644 sampler engines (e.g. GigEngine, DLSEngine). The audio output of
645 each sampler channel can be routed to an arbitrary audio output
646 method (ALSA / JACK) and an arbitrary audio output channel
647 there.
648 </p>
649 <a name="anchor3"></a><br /><hr />
650 <table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc">&nbsp;TOC&nbsp;</a></td></tr></table>
651 <a name="rfc.section.4"></a><h3>4.&nbsp;
652 Focus of this protocol</h3>
653
654 <p>Main focus of this protocol is to provide a way to configure
655 a running LinuxSampler instance and to retrieve information
656 about it. The focus of this protocol is not to provide a way to
657 control synthesis parameters or even to trigger or release
658 notes. Or in other words; the focus are those functionalities
659 which are not covered by MIDI or which may at most be handled
660 via MIDI System Exclusive Messages.
661 </p>
662 <a name="anchor4"></a><br /><hr />
663 <table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc">&nbsp;TOC&nbsp;</a></td></tr></table>
664 <a name="rfc.section.5"></a><h3>5.&nbsp;
665 Communication Overview</h3>
666
667 <p>There are two distinct methods of communication between a
668 running instance of LinuxSampler and one or more control
669 applications, so called "front-ends": a simple request/response
670 communication method used by the clients to give commands to the
671 server as well as to inquire about server's status and a
672 subscribe/notify communication method used by the client to
673 subscribe to and receive notifications of certain events as they
674 happen on the server. The latter needs more effort to be
675 implemented in the front-end application. The two communication
676 methods will be described next.
677 </p>
678 <a name="anchor5"></a><br /><hr />
679 <table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc">&nbsp;TOC&nbsp;</a></td></tr></table>
680 <a name="rfc.section.5.1"></a><h3>5.1.&nbsp;
681 Request/response communication method</h3>
682
683 <p>This simple communication method is based on
684 <a class='info' href='#RFC793'>TCP<span> (</span><span class='info'>Defense Advanced Research Projects Agency, &ldquo;TRANSMISSION CONTROL PROTOCOL,&rdquo; 1981.</span><span>)</span></a> [RFC793]. The
685 front-end application establishes a TCP connection to the
686 LinuxSampler instance on a certain host system. Then the
687 front-end application will send certain ASCII based commands
688 as defined in this document (every command line must be CRLF
689 terminated - see "Conventions used in this document" at the
690 beginning of this document) and the LinuxSampler application
691 will response after a certain process time with an
692 appropriate ASCII based answer, also as defined in this
693 document. So this TCP communication is simply based on query
694 and answer paradigm. That way LinuxSampler is only able to
695 answer on queries from front-ends, but not able to
696 automatically send messages to the client if it's not asked
697 to. The fronted should not reconnect to LinuxSampler for
698 every single command, instead it should keep the connection
699 established and simply resend message(s) for subsequent
700 commands. To keep information in the front-end up-to-date
701 the front-end has to periodically send new requests to get
702 the current information from the LinuxSampler instance. This
703 is often referred to as "polling". While polling is simple
704 to implement and may be OK to use in some cases, there may
705 be disadvantages to polling such as network traffic overhead
706 and information being out of date.
707 It is possible for a client or several clients to open more
708 than one connection to the server at the same time. It is
709 also possible to send more than one request to the server
710 at the same time but if those requests are sent over the
711 same connection server MUST execute them sequentially. Upon
712 executing a request server will produce a result set and
713 send it to the client. Each and every request made by the
714 client MUST result in a result set being sent back to the
715 client. No other data other than a result set may be sent by
716 a server to a client. No result set may be sent to a client
717 without the client sending request to the server first. On
718 any particular connection, result sets MUST be sent in their
719 entirety without being interrupted by other result sets. If
720 several requests got queued up at the server they MUST be
721 processed in the order they were received and result sets
722 MUST be sent back in the same order.
723 </p>
724 <a name="anchor6"></a><br /><hr />
725 <table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc">&nbsp;TOC&nbsp;</a></td></tr></table>
726 <a name="rfc.section.5.1.1"></a><h3>5.1.1.&nbsp;
727 Result format</h3>
728
729 <p>Result set could be one of the following types:
730 </p>
731 <p>
732 </p>
733 <ol class="text">
734 <li>Normal
735 </li>
736 <li>Warning
737 </li>
738 <li>Error
739 </li>
740 </ol><p>
741
742 </p>
743 <p>Warning and Error result sets MUST be single line and
744 have the following format:
745 </p>
746 <p>
747 </p>
748 <ul class="text">
749 <li>"WRN:&lt;warning-code&gt;:&lt;warning-message&gt;"
750 </li>
751 <li>"ERR:&lt;error-code&gt;:&lt;error-message&gt;"
752 </li>
753 </ul><p>
754
755 </p>
756 <p>Where &lt;warning-code&gt; and &lt;error-code&gt; are
757 numeric unique identifiers of the warning or error and
758 &lt;warning-message&gt; and &lt;error-message&gt; are
759 human readable descriptions of the warning or error
760 respectively.
761 </p>
762 <p>Examples:
763 </p>
764 <p>
765 </p>
766 <blockquote class="text">
767 <p>C: "LOAD INSTRUMENT '/home/me/Boesendorfer24bit.gig" 0 0
768 </p>
769 <p>S: "WRN:32:This is a 24 bit patch which is not supported natively yet."
770 </p>
771 </blockquote><p>
772
773 </p>
774 <p>
775 </p>
776 <blockquote class="text">
777 <p>C: "GET AUDIO_OUTPUT_DRIVER_PARAMETER INFO ALSA EAR"
778 </p>
779 <p>S: "ERR:3456:Audio output driver 'ALSA' does not have a parameter 'EAR'."
780 </p>
781 </blockquote><p>
782
783 </p>
784 <p>
785 </p>
786 <blockquote class="text">
787 <p>C: "GET AUDIO_OUTPUT_DEVICE INFO 123456"
788 </p>
789 <p>S: "ERR:9:There is no audio output device with index 123456."
790 </p>
791 </blockquote><p>
792
793 </p>
794 <p>Normal result sets could be:
795 </p>
796 <p>
797 </p>
798 <ol class="text">
799 <li>Empty
800 </li>
801 <li>Single line
802 </li>
803 <li>Multi-line
804 </li>
805 </ol><p>
806
807 </p>
808 <p> Empty result set is issued when the server only
809 needed to acknowledge the fact that the request was
810 received and it was processed successfully and no
811 additional information is available. This result set has
812 the following format:
813 </p>
814 <p>
815 </p>
816 <blockquote class="text">
817 <p>"OK"
818 </p>
819 </blockquote><p>
820
821 </p>
822 <p>Example:
823 </p>
824 <p>
825 </p>
826 <blockquote class="text">
827 <p>C: "SET AUDIO_OUTPUT_DEVICE_PARAMETER 0 CHANNELS=4"
828 </p>
829 <p>S: "OK"
830 </p>
831 </blockquote><p>
832
833 </p>
834 <p>Single line result sets are command specific. One
835 example of a single line result set is an empty line.
836 Multi-line result sets are command specific and may
837 include one or more lines of information. They MUST
838 always end with the following line:
839 </p>
840 <p>
841 </p>
842 <blockquote class="text">
843 <p>"."
844 </p>
845 </blockquote><p>
846
847 </p>
848 <p>Example:
849 </p>
850 <p>
851 </p>
852 <blockquote class="text">
853 <p>C: "GET AUDIO_OUTPUT_DEVICE INFO 0"
854 </p>
855 <p>S: "DRIVER: ALSA"
856 </p>
857 <p>&nbsp;&nbsp;&nbsp;"CHANNELS: 2"
858 </p>
859 <p>&nbsp;&nbsp;&nbsp;"SAMPLERATE: 44100"
860 </p>
861 <p>&nbsp;&nbsp;&nbsp;"ACTIVE: true"
862 </p>
863 <p>&nbsp;&nbsp;&nbsp;"FRAGMENTS: 2"
864 </p>
865 <p>&nbsp;&nbsp;&nbsp;"FRAGMENTSIZE: 128"
866 </p>
867 <p>&nbsp;&nbsp;&nbsp;"CARD: '0,0'"
868 </p>
869 <p>&nbsp;&nbsp;&nbsp;"."
870 </p>
871 </blockquote><p>
872
873 </p>
874 <p>In addition to above mentioned formats, warnings and
875 empty result sets MAY be indexed. In this case, they
876 have the following formats respectively:
877 </p>
878 <p>
879 </p>
880 <ul class="text">
881 <li>"WRN[&lt;index&gt;]:&lt;warning-code&gt;:&lt;warning-message&gt;"
882 </li>
883 <li>"OK[&lt;index&gt;]"
884 </li>
885 </ul><p>
886
887 </p>
888 <p>where &lt;index&gt; is command specific and is used
889 to indicate channel number that the result set was
890 related to or other integer value.
891 </p>
892 <p>Each line of the result set MUST end with
893 &lt;CRLF&gt;.
894 </p>
895 <p>Examples:
896 </p>
897 <p>
898 </p>
899 <blockquote class="text">
900 <p>C: "ADD CHANNEL"
901 </p>
902 <p>S: "OK[12]"
903 </p>
904 </blockquote><p>
905
906 </p>
907 <p>
908 </p>
909 <blockquote class="text">
910 <p>C: "CREATE AUDIO_OUTPUT_DEVICE ALSA SAMPLERATE=96000"
911 </p>
912 <p>S: "WRN[0]:32:Sample rate not supported, using 44100 instead."
913 </p>
914 </blockquote><p>
915
916 </p>
917 <a name="anchor7"></a><br /><hr />
918 <table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc">&nbsp;TOC&nbsp;</a></td></tr></table>
919 <a name="rfc.section.5.2"></a><h3>5.2.&nbsp;
920 Subscribe/notify communication method</h3>
921
922 <p>This more sophisticated communication method is actually
923 only an extension of the simple request/response
924 communication method. The front-end still uses a TCP
925 connection and sends the same commands on the TCP
926 connection. Two extra commands are SUBSCRIBE and UNSUBSCRIBE
927 commands that allow a client to tell the server that it is
928 interested in receiving notifications about certain events
929 as they happen on the server. The SUBSCRIBE command has the
930 following syntax:
931 </p>
932 <p>
933 </p>
934 <blockquote class="text">
935 <p>SUBSCRIBE &lt;event-id&gt;
936 </p>
937 </blockquote><p>
938
939 </p>
940 <p>where &lt;event-id&gt; will be replaced by the respective
941 event that client wants to subscribe to. Upon receiving such
942 request, server SHOULD respond with OK and start sending
943 EVENT notifications when a given even has occurred to the
944 front-end when an event has occurred. It MAY be possible
945 certain events may be sent before OK response during real
946 time nature of their generation. Event messages have the
947 following format:
948 </p>
949 <p>
950 </p>
951 <blockquote class="text">
952 <p>NOTIFY:&lt;event-id&gt;:&lt;custom-event-data&gt;
953 </p>
954 </blockquote><p>
955
956 </p>
957 <p>where &lt;event-id&gt; uniquely identifies the event that
958 has occurred and &lt;custom-event-data&gt; is event
959 specific.
960 </p>
961 <p>Several rules must be followed by the server when
962 generating events:
963 </p>
964 <p>
965 </p>
966 <ol class="text">
967 <li>Events MUST NOT be sent to any client who has not
968 issued an appropriate SUBSCRIBE command.
969 </li>
970 <li>Events MUST only be sent using the same
971 connection that was used to subscribe to them.
972 </li>
973 <li>When response is being sent to the client, event
974 MUST be inserted in the stream before or after the
975 response, but NOT in the middle. Same is true about
976 the response. It should never be inserted in the
977 middle of the event message as well as any other
978 response.
979 </li>
980 </ol><p>
981
982 </p>
983 <p>If the client is not interested in a particular event
984 anymore it MAY issue UNSUBSCRIBE command using the following
985 syntax:
986 </p>
987 <p>
988 </p>
989 <blockquote class="text">
990 <p>UNSUBSCRIBE &lt;event-id&gt;
991 </p>
992 </blockquote><p>
993
994 </p>
995 <p>where &lt;event-id&gt; will be replace by the respective
996 event that client is no longer interested in receiving. For
997 a list of supported events see <a class='info' href='#events'>Section&nbsp;8<span> (</span><span class='info'>Events</span><span>)</span></a>.
998 </p>
999 <p>Example: the fill states of disk stream buffers have
1000 changed on sampler channel 4 and the LinuxSampler instance
1001 will react by sending the following message to all clients
1002 who subscribed to this event:
1003 </p>
1004 <p>
1005 </p>
1006 <blockquote class="text">
1007 <p>NOTIFY:CHANNEL_BUFFER_FILL:4 [35]62%,[33]80%,[37]98%
1008 </p>
1009 </blockquote><p>
1010
1011 </p>
1012 <p>Which means there are currently three active streams on
1013 sampler channel 4, where the stream with ID "35" is filled
1014 by 62%, stream with ID 33 is filled by 80% and stream with
1015 ID 37 is filled by 98%.
1016 </p>
1017 <p>Clients may choose to open more than one connection to
1018 the server and use some connections to receive notifications
1019 while using other connections to issue commands to the
1020 back-end. This is entirely legal and up to the
1021 implementation. This does not change the protocol in any way
1022 and no special restrictions exist on the server to allow or
1023 disallow this or to track what connections belong to what
1024 front-ends. Server will listen on a single port, accept
1025 multiple connections and support protocol described in this
1026 specification in it's entirety on this single port on each
1027 connection that it accepted.
1028 </p>
1029 <p>Due to the fact that TCP is used for this communication,
1030 dead peers will be detected automatically by the OS TCP
1031 stack. While it may take a while to detect dead peers if no
1032 traffic is being sent from server to client (TCP keep-alive
1033 timer is set to 2 hours on many OSes) it will not be an
1034 issue here as when notifications are sent by the server,
1035 dead client will be detected quickly.
1036 </p>
1037 <p>When connection is closed for any reason server MUST
1038 forget all subscriptions that were made on this connection.
1039 If client reconnects it MUST resubscribe to all events that
1040 it wants to receive.
1041 </p>
1042 <a name="control_commands"></a><br /><hr />
1043 <table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc">&nbsp;TOC&nbsp;</a></td></tr></table>
1044 <a name="rfc.section.6"></a><h3>6.&nbsp;
1045 Description for control commands</h3>
1046
1047 <p>This chapter will describe the available control commands
1048 that can be sent on the TCP connection in detail. Some certain
1049 commands (e.g. <a class='info' href='#GET CHANNEL INFO'>"GET CHANNEL INFO"<span> (</span><span class='info'>Getting sampler channel information</span><span>)</span></a>
1050 or <a class='info' href='#GET ENGINE INFO'>"GET ENGINE INFO"<span> (</span><span class='info'>Getting information about an engine</span><span>)</span></a>) lead to
1051 multiple-line responses. In this case LinuxSampler signals the
1052 end of the response by a "." (single dot) line.
1053 </p>
1054 <a name="anchor8"></a><br /><hr />
1055 <table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc">&nbsp;TOC&nbsp;</a></td></tr></table>
1056 <a name="rfc.section.6.1"></a><h3>6.1.&nbsp;
1057 Ignored lines and comments</h3>
1058
1059 <p>White lines, that is lines which only contain space and
1060 tabulator characters, and lines that start with a "#"
1061 character are ignored, thus it's possible for example to
1062 group commands and to place comments in a LSCP script
1063 file.
1064 </p>
1065 <a name="anchor9"></a><br /><hr />
1066 <table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc">&nbsp;TOC&nbsp;</a></td></tr></table>
1067 <a name="rfc.section.6.2"></a><h3>6.2.&nbsp;
1068 Configuring audio drivers</h3>
1069
1070 <p>Instances of drivers in LinuxSampler are called devices.
1071 You can use multiple audio devices simultaneously, e.g. to
1072 output the sound of one sampler channel using the ALSA audio
1073 output driver, and on another sampler channel you might want
1074 to use the JACK audio output driver. For particular audio
1075 output systems it's also possible to create several devices
1076 of the same audio output driver, e.g. two separate ALSA
1077 audio output devices for using two different sound cards at
1078 the same time. This chapter describes all commands to
1079 configure LinuxSampler's audio output devices and their
1080 parameters.
1081 </p>
1082 <p>Instead of defining commands and parameters for each
1083 driver individually, all possible parameters, their meanings
1084 and possible values have to be obtained at runtime. This
1085 makes the protocol a bit abstract, but has the advantage,
1086 that front-ends can be written independently of what drivers
1087 are currently implemented and what parameters these drivers
1088 are actually offering. This means front-ends can even handle
1089 drivers which are implemented somewhere in future without
1090 modifying the front-end at all.
1091 </p>
1092 <p>Note: examples in this chapter showing particular
1093 parameters of drivers are not meant as specification of the
1094 drivers' parameters. Driver implementations in LinuxSampler
1095 might have complete different parameter names and meanings
1096 than shown in these examples or might change in future, so
1097 these examples are only meant for showing how to retrieve
1098 what parameters drivers are offering, how to retrieve their
1099 possible values, etc.
1100 </p>
1101 <a name="GET AVAILABLE_AUDIO_OUTPUT_DRIVERS"></a><br /><hr />
1102 <table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc">&nbsp;TOC&nbsp;</a></td></tr></table>
1103 <a name="rfc.section.6.2.1"></a><h3>6.2.1.&nbsp;
1104 Getting amount of available audio output drivers</h3>
1105
1106 <p>Use the following command to get the number of
1107 audio output drivers currently available for the
1108 LinuxSampler instance:
1109 </p>
1110 <p>
1111 </p>
1112 <blockquote class="text">
1113 <p>GET AVAILABLE_AUDIO_OUTPUT_DRIVERS
1114 </p>
1115 </blockquote><p>
1116
1117 </p>
1118 <p>Possible Answers:
1119 </p>
1120 <p>
1121 </p>
1122 <blockquote class="text">
1123 <p>LinuxSampler will answer by sending the
1124 number of audio output drivers.
1125 </p>
1126 </blockquote><p>
1127
1128 </p>
1129 <p>Example:
1130 </p>
1131 <p>
1132 </p>
1133 <blockquote class="text">
1134 <p>C: "GET AVAILABLE_AUDIO_OUTPUT_DRIVERS"
1135 </p>
1136 <p>S: "2"
1137 </p>
1138 </blockquote><p>
1139
1140 </p>
1141 <a name="LIST AVAILABLE_AUDIO_OUTPUT_DRIVERS"></a><br /><hr />
1142 <table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc">&nbsp;TOC&nbsp;</a></td></tr></table>
1143 <a name="rfc.section.6.2.2"></a><h3>6.2.2.&nbsp;
1144 Getting all available audio output drivers</h3>
1145
1146 <p>Use the following command to list all audio output
1147 drivers currently available for the LinuxSampler
1148 instance:
1149 </p>
1150 <p>
1151 </p>
1152 <blockquote class="text">
1153 <p>LIST AVAILABLE_AUDIO_OUTPUT_DRIVERS
1154 </p>
1155 </blockquote><p>
1156
1157 </p>
1158 <p>Possible Answers:
1159 </p>
1160 <p>
1161 </p>
1162 <blockquote class="text">
1163 <p>LinuxSampler will answer by sending comma
1164 separated character strings, each symbolizing an
1165 audio output driver.
1166 </p>
1167 </blockquote><p>
1168
1169 </p>
1170 <p>Example:
1171 </p>
1172 <p>
1173 </p>
1174 <blockquote class="text">
1175 <p>C: "LIST AVAILABLE_AUDIO_OUTPUT_DRIVERS"
1176 </p>
1177 <p>S: "ALSA,JACK"
1178 </p>
1179 </blockquote><p>
1180
1181 </p>
1182 <a name="GET AUDIO_OUTPUT_DRIVER INFO"></a><br /><hr />
1183 <table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc">&nbsp;TOC&nbsp;</a></td></tr></table>
1184 <a name="rfc.section.6.2.3"></a><h3>6.2.3.&nbsp;
1185 Getting information about a specific audio
1186 output driver</h3>
1187
1188 <p>Use the following command to get detailed information
1189 about a specific audio output driver:
1190 </p>
1191 <p>
1192 </p>
1193 <blockquote class="text">
1194 <p>GET AUDIO_OUTPUT_DRIVER INFO
1195 &lt;audio-output-driver&gt;
1196 </p>
1197 </blockquote><p>
1198
1199 </p>
1200 <p>Where &lt;audio-output-driver&gt; is the name of the
1201 audio output driver, returned by the
1202 <a class='info' href='#LIST AVAILABLE_AUDIO_OUTPUT_DRIVERS'>"LIST AVAILABLE_AUDIO_OUTPUT_DRIVERS"<span> (</span><span class='info'>Getting all available audio output drivers</span><span>)</span></a> command.
1203 </p>
1204 <p>Possible Answers:
1205 </p>
1206 <p>
1207 </p>
1208 <blockquote class="text">
1209 <p>LinuxSampler will answer by sending a
1210 &lt;CRLF&gt; separated list. Each answer line
1211 begins with the information category name
1212 followed by a colon and then a space character
1213 &lt;SP&gt; and finally the info character string
1214 to that info category. At the moment the
1215 following information categories are
1216 defined:
1217 </p>
1218 <p>
1219 </p>
1220 <blockquote class="text">
1221 <p>DESCRIPTION -
1222 </p>
1223 <blockquote class="text">
1224 <p> character string describing the
1225 audio output driver
1226 </p>
1227 </blockquote>
1228
1229
1230 <p>VERSION -
1231 </p>
1232 <blockquote class="text">
1233 <p>character string reflecting the
1234 driver's version
1235 </p>
1236 </blockquote>
1237
1238
1239 <p>PARAMETERS -
1240 </p>
1241 <blockquote class="text">
1242 <p>comma separated list of all
1243 parameters available for the given
1244 audio output driver, at least
1245 parameters 'channels', 'samplerate'
1246 and 'active' are offered by all audio
1247 output drivers
1248 </p>
1249 </blockquote>
1250
1251
1252 </blockquote>
1253
1254
1255 <p>The mentioned fields above don't have to be
1256 in particular order.
1257 </p>
1258 </blockquote><p>
1259
1260 </p>
1261 <p>Example:
1262 </p>
1263 <p>
1264 </p>
1265 <blockquote class="text">
1266 <p>C: "GET AUDIO_OUTPUT_DRIVER INFO ALSA"
1267 </p>
1268 <p>S: "DESCRIPTION: Advanced Linux Sound
1269 Architecture"
1270 </p>
1271 <p>&nbsp;&nbsp;&nbsp;"VERSION: 1.0"
1272 </p>
1273 <p>&nbsp;&nbsp;&nbsp;"PARAMETERS:
1274 DRIVER,CHANNELS,SAMPLERATE,ACTIVE,FRAGMENTS,
1275 FRAGMENTSIZE,CARD"
1276 </p>
1277 <p>&nbsp;&nbsp;&nbsp;"."
1278 </p>
1279 </blockquote><p>
1280
1281 </p>
1282 <a name="GET AUDIO_OUTPUT_DRIVER_PARAMETER INFO"></a><br /><hr />
1283 <table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc">&nbsp;TOC&nbsp;</a></td></tr></table>
1284 <a name="rfc.section.6.2.4"></a><h3>6.2.4.&nbsp;
1285 Getting information about specific audio
1286 output driver parameter</h3>
1287
1288 <p>Use the following command to get detailed information
1289 about a specific audio output driver parameter:
1290 </p>
1291 <p>
1292 </p>
1293 <blockquote class="text">
1294 <p>GET AUDIO_OUTPUT_DRIVER_PARAMETER INFO &lt;audio&gt; &lt;prm&gt; [&lt;deplist&gt;]
1295 </p>
1296 </blockquote><p>
1297
1298 </p>
1299 <p>Where &lt;audio&gt; is the name of the audio output
1300 driver as returned by the <a class='info' href='#LIST AVAILABLE_AUDIO_OUTPUT_DRIVERS'>"LIST AVAILABLE_AUDIO_OUTPUT_DRIVERS"<span> (</span><span class='info'>Getting all available audio output drivers</span><span>)</span></a> command,
1301 &lt;prm&gt; a specific parameter name for which information should be
1302 obtained (as returned by the
1303 <a class='info' href='#GET AUDIO_OUTPUT_DRIVER INFO'>"GET AUDIO_OUTPUT_DRIVER INFO"<span> (</span><span class='info'>Getting information about a specific audio output driver</span><span>)</span></a> command) and
1304 &lt;deplist&gt; is an optional list of parameters on which the sought
1305 parameter &lt;prm&gt; depends on, &lt;deplist&gt; is a list of key-value
1306 pairs in form of "key1=val1 key2=val2 ...", where character string values
1307 are encapsulated into apostrophes ('). Arguments given with &lt;deplist&gt;
1308 which are not dependency parameters of &lt;prm&gt; will be ignored, means
1309 the front-end application can simply put all parameters into &lt;deplist&gt;
1310 with the values already selected by the user.
1311 </p>
1312 <p>Possible Answers:
1313 </p>
1314 <p>
1315 </p>
1316 <blockquote class="text">
1317 <p>LinuxSampler will answer by sending a
1318 &lt;CRLF&gt; separated list.
1319 Each answer line begins with the information category name
1320 followed by a colon and then a space character &lt;SP&gt; and
1321 finally
1322 the info character string to that info category. There are
1323 information which is always returned, independently of the
1324 given driver parameter and there are optional information
1325 which is only shown dependently to given driver parameter. At
1326 the moment the following information categories are defined:
1327 </p>
1328 </blockquote><p>
1329
1330 </p>
1331 <p>
1332 </p>
1333 <blockquote class="text">
1334 <p>TYPE -
1335 </p>
1336 <blockquote class="text">
1337 <p>either "BOOL" for boolean value(s) or
1338 "INT" for integer
1339 value(s) or "FLOAT" for dotted number(s) or "STRING" for
1340 character string(s)
1341 (always returned, no matter which driver parameter)
1342 </p>
1343 </blockquote>
1344
1345
1346 <p>DESCRIPTION -
1347 </p>
1348 <blockquote class="text">
1349 <p>arbitrary text describing the purpose of the parameter
1350 (always returned, no matter which driver parameter)
1351 </p>
1352 </blockquote>
1353
1354
1355 <p>MANDATORY -
1356 </p>
1357 <blockquote class="text">
1358 <p>either true or false, defines if this parameter must be
1359 given when the device is to be created with the
1360 <a class='info' href='#CREATE AUDIO_OUTPUT_DEVICE'>'CREATE AUDIO_OUTPUT_DEVICE'<span> (</span><span class='info'>Creating an audio output device</span><span>)</span></a>
1361 command (always returned, no matter which driver parameter)
1362 </p>
1363 </blockquote>
1364
1365
1366 <p>FIX -
1367 </p>
1368 <blockquote class="text">
1369 <p>either true or false, if false then this parameter can
1370 be changed at any time, once the device is created by
1371 the <a class='info' href='#CREATE AUDIO_OUTPUT_DEVICE'>'CREATE AUDIO_OUTPUT_DEVICE'<span> (</span><span class='info'>Creating an audio output device</span><span>)</span></a>
1372 command (always returned, no matter which driver parameter)
1373 </p>
1374 </blockquote>
1375
1376
1377 <p>MULTIPLICITY -
1378 </p>
1379 <blockquote class="text">
1380 <p>either true or false, defines if this parameter allows
1381 only one value or a list of values, where true means
1382 multiple values and false only a single value allowed
1383 (always returned, no matter which driver parameter)
1384 </p>
1385 </blockquote>
1386
1387
1388 <p>DEPENDS -
1389 </p>
1390 <blockquote class="text">
1391 <p>comma separated list of parameters this parameter depends
1392 on, means the values for fields 'DEFAULT', 'RANGE_MIN',
1393 'RANGE_MAX' and 'POSSIBILITIES' might depend on these
1394 listed parameters, for example assuming that an audio
1395 driver (like the ALSA driver) offers parameters 'card'
1396 and 'samplerate' then parameter 'samplerate' would
1397 depend on 'card' because the possible values for
1398 'samplerate' depends on the sound card which can be
1399 chosen by the 'card' parameter
1400 (optionally returned, dependent to driver parameter)
1401 </p>
1402 </blockquote>
1403
1404
1405 <p>DEFAULT -
1406 </p>
1407 <blockquote class="text">
1408 <p>reflects the default value for this parameter which is
1409 used when the device is created and not explicitly
1410 given with the <a class='info' href='#CREATE AUDIO_OUTPUT_DEVICE'>'CREATE AUDIO_OUTPUT_DEVICE'<span> (</span><span class='info'>Creating an audio output device</span><span>)</span></a> command,
1411 in case of MULTIPLCITY=true, this is a comma separated
1412 list, that's why character strings are encapsulated into
1413 apostrophes (')
1414 (optionally returned, dependent to driver parameter)
1415 </p>
1416 </blockquote>
1417
1418
1419 <p>RANGE_MIN -
1420 </p>
1421 <blockquote class="text">
1422 <p>defines lower limit of the allowed value range for this
1423 parameter, can be an integer value as well as a dotted
1424 number, this parameter is often used in conjunction
1425 with RANGE_MAX, but may also appear without
1426 (optionally returned, dependent to driver parameter)
1427 </p>
1428 </blockquote>
1429
1430
1431 <p>RANGE_MAX -
1432 </p>
1433 <blockquote class="text">
1434 <p>defines upper limit of the allowed value range for this
1435 parameter, can be an integer value as well as a dotted
1436 number, this parameter is often used in conjunction with
1437 RANGE_MIN, but may also appear without
1438 (optionally returned, dependent to driver parameter)
1439 </p>
1440 </blockquote>
1441
1442
1443 <p>POSSIBILITIES -
1444 </p>
1445 <blockquote class="text">
1446 <p>comma separated list of possible values for this
1447 parameter, character strings are encapsulated into
1448 apostrophes
1449 (optionally returned, dependent to driver parameter)
1450 </p>
1451 </blockquote>
1452
1453
1454 </blockquote><p>
1455
1456 </p>
1457 <p>The mentioned fields above don't have to be in particular order.
1458 </p>
1459 <p>Examples:
1460 </p>
1461 <p>
1462 </p>
1463 <blockquote class="text">
1464 <p>C: "GET AUDIO_OUTPUT_DRIVER_PARAMETER INFO ALSA CARD"
1465 </p>
1466 <p>S: "DESCRIPTION: sound card to be used"
1467 </p>
1468 <p>&nbsp;&nbsp;&nbsp;"TYPE: STRING"
1469 </p>
1470 <p>&nbsp;&nbsp;&nbsp;"MANDATORY: false"
1471 </p>
1472 <p>&nbsp;&nbsp;&nbsp;"FIX: true"
1473 </p>
1474 <p>&nbsp;&nbsp;&nbsp;"MULTIPLICITY: false"
1475 </p>
1476 <p>&nbsp;&nbsp;&nbsp;"DEFAULT: '0,0'"
1477 </p>
1478 <p>&nbsp;&nbsp;&nbsp;"POSSIBILITIES: '0,0','1,0','2,0'"
1479 </p>
1480 <p>&nbsp;&nbsp;&nbsp;"."
1481 </p>
1482 </blockquote><p>
1483
1484 </p>
1485 <p>
1486 </p>
1487 <blockquote class="text">
1488 <p>C: "GET AUDIO_OUTPUT_DRIVER_PARAMETER INFO ALSA SAMPLERATE"
1489 </p>
1490 <p>S: "DESCRIPTION: output sample rate in Hz"
1491 </p>
1492 <p>&nbsp;&nbsp;&nbsp;"TYPE: INT"
1493 </p>
1494 <p>&nbsp;&nbsp;&nbsp;"MANDATORY: false"
1495 </p>
1496 <p>&nbsp;&nbsp;&nbsp;"FIX: false"
1497 </p>
1498 <p>&nbsp;&nbsp;&nbsp;"MULTIPLICITY: false"
1499 </p>
1500 <p>&nbsp;&nbsp;&nbsp;"DEPENDS: card"
1501 </p>
1502 <p>&nbsp;&nbsp;&nbsp;"DEFAULT: 44100"
1503 </p>
1504 <p>&nbsp;&nbsp;&nbsp;"."
1505 </p>
1506 </blockquote><p>
1507
1508 </p>
1509 <p>
1510 </p>
1511 <blockquote class="text">
1512 <p>C: "GET AUDIO_OUTPUT_DRIVER_PARAMETER INFO ALSA SAMPLERATE CARD='0,0'"
1513 </p>
1514 <p>S: "DESCRIPTION: output sample rate in Hz"
1515 </p>
1516 <p>&nbsp;&nbsp;&nbsp;"TYPE: INT"
1517 </p>
1518 <p>&nbsp;&nbsp;&nbsp;"MANDATORY: false"
1519 </p>
1520 <p>&nbsp;&nbsp;&nbsp;"FIX: false"
1521 </p>
1522 <p>&nbsp;&nbsp;&nbsp;"MULTIPLICITY: false"
1523 </p>
1524 <p>&nbsp;&nbsp;&nbsp;"DEPENDS: card"
1525 </p>
1526 <p>&nbsp;&nbsp;&nbsp;"DEFAULT: 44100"
1527 </p>
1528 <p>&nbsp;&nbsp;&nbsp;"RANGE_MIN: 22050"
1529 </p>
1530 <p>&nbsp;&nbsp;&nbsp;"RANGE_MAX: 96000"
1531 </p>
1532 <p>&nbsp;&nbsp;&nbsp;"."
1533 </p>
1534 </blockquote><p>
1535
1536 </p>
1537 <a name="CREATE AUDIO_OUTPUT_DEVICE"></a><br /><hr />
1538 <table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc">&nbsp;TOC&nbsp;</a></td></tr></table>
1539 <a name="rfc.section.6.2.5"></a><h3>6.2.5.&nbsp;
1540 Creating an audio output device</h3>
1541
1542 <p>Use the following command to create a new audio output device for the desired audio output system:
1543 </p>
1544 <p>
1545 </p>
1546 <blockquote class="text">
1547 <p>CREATE AUDIO_OUTPUT_DEVICE &lt;audio-output-driver&gt; [&lt;param-list&gt;]
1548 </p>
1549 </blockquote><p>
1550
1551 </p>
1552 <p>Where &lt;audio-output-driver&gt; should be replaced by the desired audio
1553 output system as returned by the
1554 <a class='info' href='#LIST AVAILABLE_AUDIO_OUTPUT_DRIVERS'>"LIST AVAILABLE_AUDIO_OUTPUT_DRIVERS"<span> (</span><span class='info'>Getting all available audio output drivers</span><span>)</span></a>
1555 command and &lt;param-list&gt; by an optional list of driver
1556 specific parameters in form of "key1=val1 key2=val2 ...", where
1557 character string values should be encapsulated into apostrophes (').
1558 Note that there might be drivers which require parameter(s) to be
1559 given with this command. Use the previously described commands in
1560 this chapter to get this information.
1561 </p>
1562 <p>Possible Answers:
1563 </p>
1564 <p>
1565 </p>
1566 <blockquote class="text">
1567 <p>"OK[&lt;device-id&gt;]" -
1568 </p>
1569 <blockquote class="text">
1570 <p>in case the device was successfully created, where
1571 &lt;device-id&gt; is the numerical ID of the new device
1572 </p>
1573 </blockquote>
1574
1575
1576 <p>"WRN[&lt;device-id&gt;]:&lt;warning-code&gt;:&lt;warning-message&gt;" -
1577 </p>
1578 <blockquote class="text">
1579 <p>in case the device was created successfully, where
1580 &lt;device-id&gt; is the numerical ID of the new device, but there
1581 are noteworthy issue(s) related (e.g. sound card doesn't
1582 support given hardware parameters and the driver is using
1583 fall-back values), providing an appropriate warning code and
1584 warning message
1585 </p>
1586 </blockquote>
1587
1588
1589 <p>"ERR:&lt;error-code&gt;:&lt;error-message&gt;" -
1590 </p>
1591 <blockquote class="text">
1592 <p>in case it failed, providing an appropriate error code and error message
1593 </p>
1594 </blockquote>
1595
1596
1597 </blockquote><p>
1598
1599 </p>
1600 <p>Examples:
1601 </p>
1602 <p>
1603 </p>
1604 <blockquote class="text">
1605 <p>C: "CREATE AUDIO_OUTPUT_DEVICE ALSA"
1606 </p>
1607 <p>S: "OK[0]"
1608 </p>
1609 </blockquote><p>
1610
1611 </p>
1612 <p>
1613 </p>
1614 <blockquote class="text">
1615 <p>C: "CREATE AUDIO_OUTPUT_DEVICE ALSA CARD='2,0' SAMPLERATE=96000"
1616 </p>
1617 <p>S: "OK[1]"
1618 </p>
1619 </blockquote><p>
1620
1621 </p>
1622 <a name="DESTROY AUDIO_OUTPUT_DEVICE"></a><br /><hr />
1623 <table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc">&nbsp;TOC&nbsp;</a></td></tr></table>
1624 <a name="rfc.section.6.2.6"></a><h3>6.2.6.&nbsp;
1625 Destroying an audio output device</h3>
1626
1627 <p>Use the following command to destroy a created output device:
1628 </p>
1629 <p>
1630 </p>
1631 <blockquote class="text">
1632 <p>DESTROY AUDIO_OUTPUT_DEVICE &lt;device-id&gt;
1633 </p>
1634 </blockquote><p>
1635
1636 </p>
1637 <p>Where &lt;device-id&gt; should be replaced by the numerical ID of the
1638 audio output device as given by the
1639 <a class='info' href='#CREATE AUDIO_OUTPUT_DEVICE'>"CREATE AUDIO_OUTPUT_DEVICE"<span> (</span><span class='info'>Creating an audio output device</span><span>)</span></a>
1640 or <a class='info' href='#LIST AUDIO_OUTPUT_DEVICES'>"LIST AUDIO_OUTPUT_DEVICES"<span> (</span><span class='info'>Getting all created audio output device list</span><span>)</span></a>
1641 command.
1642 </p>
1643 <p>Possible Answers:
1644 </p>
1645 <p>
1646 </p>
1647 <blockquote class="text">
1648 <p>"OK" -
1649 </p>
1650 <blockquote class="text">
1651 <p>in case the device was successfully destroyed
1652 </p>
1653 </blockquote>
1654
1655
1656 <p>"WRN:&lt;warning-code&gt;:&lt;warning-message&gt;" -
1657 </p>
1658 <blockquote class="text">
1659 <p>in case the device was destroyed successfully, but there are
1660 noteworthy issue(s) related (e.g. an audio over ethernet
1661 driver was unloaded but the other host might not be
1662 informed about this situation), providing an appropriate
1663 warning code and warning message
1664 </p>
1665 </blockquote>
1666
1667
1668 <p>"ERR:&lt;error-code&gt;:&lt;error-message&gt;" -
1669 </p>
1670 <blockquote class="text">
1671 <p>in case it failed, providing an appropriate error code and
1672 error message
1673 </p>
1674 </blockquote>
1675
1676
1677 </blockquote><p>
1678
1679 </p>
1680 <p>Example:
1681 </p>
1682 <p>
1683 </p>
1684 <blockquote class="text">
1685 <p>C: "DESTROY AUDIO_OUTPUT_DEVICE 0"
1686 </p>
1687 <p>S: "OK"
1688 </p>
1689 </blockquote><p>
1690
1691 </p>
1692 <a name="GET AUDIO_OUTPUT_DEVICES"></a><br /><hr />
1693 <table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc">&nbsp;TOC&nbsp;</a></td></tr></table>
1694 <a name="rfc.section.6.2.7"></a><h3>6.2.7.&nbsp;
1695 Getting all created audio output device count</h3>
1696
1697 <p>Use the following command to count all created audio output devices:
1698 </p>
1699 <p>
1700 </p>
1701 <blockquote class="text">
1702 <p>GET AUDIO_OUTPUT_DEVICES
1703 </p>
1704 </blockquote><p>
1705
1706 </p>
1707 <p>Possible Answers:
1708 </p>
1709 <p>
1710 </p>
1711 <blockquote class="text">
1712 <p>LinuxSampler will answer by sending the current number of all
1713 audio output devices.
1714 </p>
1715 </blockquote><p>
1716
1717 </p>
1718 <p>Example:
1719 </p>
1720 <p>
1721 </p>
1722 <blockquote class="text">
1723 <p>C: "GET AUDIO_OUTPUT_DEVICES"
1724 </p>
1725 <p>S: "4"
1726 </p>
1727 </blockquote><p>
1728
1729 </p>
1730 <a name="LIST AUDIO_OUTPUT_DEVICES"></a><br /><hr />
1731 <table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc">&nbsp;TOC&nbsp;</a></td></tr></table>
1732 <a name="rfc.section.6.2.8"></a><h3>6.2.8.&nbsp;
1733 Getting all created audio output device list</h3>
1734
1735 <p>Use the following command to list all created audio output devices:
1736 </p>
1737 <p>
1738 </p>
1739 <blockquote class="text">
1740 <p>LIST AUDIO_OUTPUT_DEVICES
1741 </p>
1742 </blockquote><p>
1743
1744 </p>
1745 <p>Possible Answers:
1746 </p>
1747 <p>
1748 </p>
1749 <blockquote class="text">
1750 <p>LinuxSampler will answer by sending a comma separated list with
1751 the numerical IDs of all audio output devices.
1752 </p>
1753 </blockquote><p>
1754
1755 </p>
1756 <p>Example:
1757 </p>
1758 <p>
1759 </p>
1760 <blockquote class="text">
1761 <p>C: "LIST AUDIO_OUTPUT_DEVICES"
1762 </p>
1763 <p>S: "0,1,4,5"
1764 </p>
1765 </blockquote><p>
1766
1767 </p>
1768 <a name="GET AUDIO_OUTPUT_DEVICE INFO"></a><br /><hr />
1769 <table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc">&nbsp;TOC&nbsp;</a></td></tr></table>
1770 <a name="rfc.section.6.2.9"></a><h3>6.2.9.&nbsp;
1771 Getting current settings of an audio output device</h3>
1772
1773 <p>Use the following command to get current settings of a specific, created audio output device:
1774 </p>
1775 <p>
1776 </p>
1777 <blockquote class="text">
1778 <p>GET AUDIO_OUTPUT_DEVICE INFO &lt;device-id&gt;
1779 </p>
1780 </blockquote><p>
1781
1782 </p>
1783 <p>Where &lt;device-id&gt; should be replaced by numerical ID
1784 of the audio output device as e.g. returned by the
1785 <a class='info' href='#LIST AUDIO_OUTPUT_DEVICES'>"LIST AUDIO_OUTPUT_DEVICES"<span> (</span><span class='info'>Getting all created audio output device list</span><span>)</span></a> command.
1786 </p>
1787 <p>Possible Answers:
1788 </p>
1789 <p>LinuxSampler will answer by sending a &lt;CRLF&gt; separated list.
1790 Each answer line begins with the information category name
1791 followed by a colon and then a space character &lt;SP&gt; and finally
1792 the info character string to that info category. As some
1793 parameters might allow multiple values, character strings are
1794 encapsulated into apostrophes ('). At the moment the following
1795 information categories are defined (independently of device):
1796 </p>
1797 <p>
1798 </p>
1799 <blockquote class="text">
1800 <p>DRIVER -
1801 </p>
1802 <blockquote class="text">
1803 <p>identifier of the used audio output driver, as also
1804 returned by the
1805 <a class='info' href='#LIST AVAILABLE_AUDIO_OUTPUT_DRIVERS'>"LIST AVAILABLE_AUDIO_OUTPUT_DRIVERS"<span> (</span><span class='info'>Getting all available audio output drivers</span><span>)</span></a>
1806 command
1807 </p>
1808 </blockquote>
1809
1810
1811 <p>CHANNELS -
1812 </p>
1813 <blockquote class="text">
1814 <p>amount of audio output channels this device currently
1815 offers
1816 </p>
1817 </blockquote>
1818
1819
1820 <p>SAMPLERATE -
1821 </p>
1822 <blockquote class="text">
1823 <p>playback sample rate the device uses
1824 </p>
1825 </blockquote>
1826
1827
1828 <p>ACTIVE -
1829 </p>
1830 <blockquote class="text">
1831 <p>either true or false, if false then the audio device is
1832 inactive and doesn't output any sound, nor do the
1833 sampler channels connected to this audio device render
1834 any audio
1835 </p>
1836 </blockquote>
1837
1838
1839 </blockquote><p>
1840
1841 </p>
1842 <p>The mentioned fields above don't have to be in particular
1843 order. The fields above are only those fields which are
1844 returned by all audio output devices. Every audio output driver
1845 might have its own, additional driver specific parameters (see
1846 <a class='info' href='#GET AUDIO_OUTPUT_DRIVER INFO'>Section&nbsp;6.2.3<span> (</span><span class='info'>Getting information about a specific audio output driver</span><span>)</span></a>)
1847 which are also returned by this command.
1848 </p>
1849 <p>Example:
1850 </p>
1851 <p>
1852 </p>
1853 <blockquote class="text">
1854 <p>C: "GET AUDIO_OUTPUT_DEVICE INFO 0"
1855 </p>
1856 <p>S: "DRIVER: ALSA"
1857 </p>
1858 <p>&nbsp;&nbsp;&nbsp;"CHANNELS: 2"
1859 </p>
1860 <p>&nbsp;&nbsp;&nbsp;"SAMPLERATE: 44100"
1861 </p>
1862 <p>&nbsp;&nbsp;&nbsp;"ACTIVE: true"
1863 </p>
1864 <p>&nbsp;&nbsp;&nbsp;"FRAGMENTS: 2"
1865 </p>
1866 <p>&nbsp;&nbsp;&nbsp;"FRAGMENTSIZE: 128"
1867 </p>
1868 <p>&nbsp;&nbsp;&nbsp;"CARD: '0,0'"
1869 </p>
1870 <p>&nbsp;&nbsp;&nbsp;"."
1871 </p>
1872 </blockquote><p>
1873
1874 </p>
1875 <a name="SET AUDIO_OUTPUT_DEVICE_PARAMETER"></a><br /><hr />
1876 <table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc">&nbsp;TOC&nbsp;</a></td></tr></table>
1877 <a name="rfc.section.6.2.10"></a><h3>6.2.10.&nbsp;
1878 Changing settings of audio output devices</h3>
1879
1880 <p>Use the following command to alter a specific setting of a created audio output device:
1881 </p>
1882 <p>
1883 </p>
1884 <blockquote class="text">
1885 <p>SET AUDIO_OUTPUT_DEVICE_PARAMETER &lt;device-id&gt; &lt;key&gt;=&lt;value&gt;
1886 </p>
1887 </blockquote><p>
1888
1889 </p>
1890 <p>Where &lt;device-id&gt; should be replaced by the numerical ID of the
1891 audio output device as given by the
1892 <a class='info' href='#CREATE AUDIO_OUTPUT_DEVICE'>"CREATE AUDIO_OUTPUT_DEVICE"<span> (</span><span class='info'>Creating an audio output device</span><span>)</span></a>
1893 or <a class='info' href='#LIST AUDIO_OUTPUT_DEVICES'>"LIST AUDIO_OUTPUT_DEVICES"<span> (</span><span class='info'>Getting all created audio output device list</span><span>)</span></a>
1894 command, &lt;key&gt; by the name of the parameter to change
1895 and &lt;value&gt; by the new value for this parameter.
1896 </p>
1897 <p>Possible Answers:
1898 </p>
1899 <p>
1900 </p>
1901 <blockquote class="text">
1902 <p>"OK" -
1903 </p>
1904 <blockquote class="text">
1905 <p>in case setting was successfully changed
1906 </p>
1907 </blockquote>
1908
1909
1910 <p>"WRN:&lt;warning-code&gt;:&lt;warning-message&gt;" -
1911 </p>
1912 <blockquote class="text">
1913 <p>in case setting was changed successfully, but there are
1914 noteworthy issue(s) related, providing an appropriate
1915 warning code and warning message
1916 </p>
1917 </blockquote>
1918
1919
1920 <p>"ERR:&lt;error-code&gt;:&lt;error-message&gt;" -
1921 </p>
1922 <blockquote class="text">
1923 <p>in case it failed, providing an appropriate error code and
1924 error message
1925 </p>
1926 </blockquote>
1927
1928
1929 </blockquote><p>
1930
1931 </p>
1932 <p>Example:
1933 </p>
1934 <p>
1935 </p>
1936 <blockquote class="text">
1937 <p>C: "SET AUDIO_OUTPUT_DEVICE_PARAMETER 0 FRAGMENTSIZE=128"
1938 </p>
1939 <p>S: "OK"
1940 </p>
1941 </blockquote><p>
1942
1943 </p>
1944 <a name="GET AUDIO_OUTPUT_CHANNEL INFO"></a><br /><hr />
1945 <table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc">&nbsp;TOC&nbsp;</a></td></tr></table>
1946 <a name="rfc.section.6.2.11"></a><h3>6.2.11.&nbsp;
1947 Getting information about an audio channel</h3>
1948
1949 <p>Use the following command to get information about an audio channel:
1950 </p>
1951 <p>
1952 </p>
1953 <blockquote class="text">
1954 <p>GET AUDIO_OUTPUT_CHANNEL INFO &lt;device-id&gt; &lt;audio-chan&gt;
1955 </p>
1956 </blockquote><p>
1957
1958 </p>
1959 <p>Where &lt;device-id&gt; is the numerical ID of the audio output device as given by the
1960 <a class='info' href='#CREATE AUDIO_OUTPUT_DEVICE'>"CREATE AUDIO_OUTPUT_DEVICE"<span> (</span><span class='info'>Creating an audio output device</span><span>)</span></a>
1961 or <a class='info' href='#LIST AUDIO_OUTPUT_DEVICES'>"LIST AUDIO_OUTPUT_DEVICES"<span> (</span><span class='info'>Getting all created audio output device list</span><span>)</span></a>
1962 command and &lt;audio-chan&gt; the audio channel number.
1963 </p>
1964 <p>Possible Answers:
1965 </p>
1966 <p>
1967 </p>
1968 <blockquote class="text">
1969 <p>LinuxSampler will answer by sending a &lt;CRLF&gt; separated list.
1970 Each answer line begins with the information category name
1971 followed by a colon and then a space character &lt;SP&gt; and finally
1972 the info character string to that info category. At the moment
1973 the following information categories are defined:
1974 </p>
1975 <p>
1976 </p>
1977 <blockquote class="text">
1978 <p>NAME -
1979 </p>
1980 <blockquote class="text">
1981 <p>arbitrary character string naming the channel, which
1982 doesn't have to be unique (always returned by all audio channels)
1983 </p>
1984 </blockquote>
1985
1986
1987 <p>IS_MIX_CHANNEL -
1988 </p>
1989 <blockquote class="text">
1990 <p>either true or false, a mix-channel is not a real,
1991 independent audio channel, but a virtual channel which
1992 is mixed to another real channel, this mechanism is
1993 needed for sampler engines which need more audio
1994 channels than the used audio system might be able to offer
1995 (always returned by all audio channels)
1996 </p>
1997 </blockquote>
1998
1999
2000 <p>MIX_CHANNEL_DESTINATION -
2001 </p>
2002 <blockquote class="text">
2003 <p>numerical ID (positive integer including 0)
2004 which reflects the real audio channel (of the same audio
2005 output device) this mix channel refers to, means where
2006 the audio signal actually will be routed / added to
2007 (only returned in case the audio channel is mix channel)
2008 </p>
2009 </blockquote>
2010
2011
2012 </blockquote>
2013
2014
2015 </blockquote><p>
2016
2017 </p>
2018 <p>The mentioned fields above don't have to be in particular
2019 order. The fields above are only those fields which are
2020 generally returned for the described cases by all audio
2021 channels regardless of the audio driver. Every audio channel
2022 might have its own, additional driver and channel specific
2023 parameters.
2024 </p>
2025 <p>Examples:
2026 </p>
2027 <p>
2028 </p>
2029 <blockquote class="text">
2030 <p>C: "GET AUDIO_OUTPUT_CHANNEL INFO 0 0"
2031 </p>
2032 <p>S: "NAME: studio monitor left"
2033 </p>
2034 <p>&nbsp;&nbsp;&nbsp;"IS_MIX_CHANNEL: false"
2035 </p>
2036 <p>&nbsp;&nbsp;&nbsp;"."
2037 </p>
2038 </blockquote><p>
2039
2040 </p>
2041 <p>
2042 </p>
2043 <blockquote class="text">
2044 <p>C: "GET AUDIO_OUTPUT_CHANNEL INFO 0 1"
2045 </p>
2046 <p>S: "NAME: studio monitor right"
2047 </p>
2048 <p>&nbsp;&nbsp;&nbsp;"IS_MIX_CHANNEL: false"
2049 </p>
2050 <p>&nbsp;&nbsp;&nbsp;"."
2051 </p>
2052 </blockquote><p>
2053
2054 </p>
2055 <p>
2056 </p>
2057 <blockquote class="text">
2058 <p>C: "GET AUDIO_OUTPUT_CHANNEL INFO 0 2"
2059 </p>
2060 <p>S: "NAME: studio monitor left"
2061 </p>
2062 <p>&nbsp;&nbsp;&nbsp;"IS_MIX_CHANNEL: true"
2063 </p>
2064 <p>&nbsp;&nbsp;&nbsp;"MIX_CHANNEL_DESTINATION: 1"
2065 </p>
2066 <p>&nbsp;&nbsp;&nbsp;"."
2067 </p>
2068 </blockquote><p>
2069
2070 </p>
2071 <p>
2072 </p>
2073 <blockquote class="text">
2074 <p>C: "GET AUDIO_OUTPUT_CHANNEL INFO 1 0"
2075 </p>
2076 <p>S: "NAME: 'ardour (left)'"
2077 </p>
2078 <p>&nbsp;&nbsp;&nbsp;"IS_MIX_CHANNEL: false"
2079 </p>
2080 <p>&nbsp;&nbsp;&nbsp;"JACK_BINDINGS: 'ardour:0'"
2081 </p>
2082 <p>&nbsp;&nbsp;&nbsp;"."
2083 </p>
2084 </blockquote><p>
2085
2086 </p>
2087 <a name="GET AUDIO_OUTPUT_CHANNEL_PARAMETER INFO"></a><br /><hr />
2088 <table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc">&nbsp;TOC&nbsp;</a></td></tr></table>
2089 <a name="rfc.section.6.2.12"></a><h3>6.2.12.&nbsp;
2090 Getting information about specific audio channel parameter</h3>
2091
2092 <p>Use the following command to get detailed information about specific audio channel parameter:
2093 </p>
2094 <p>
2095 </p>
2096 <blockquote class="text">
2097 <p>GET AUDIO_OUTPUT_CHANNEL_PARAMETER INFO &lt;dev-id&gt; &lt;chan&gt; &lt;param&gt;
2098 </p>
2099 </blockquote><p>
2100
2101 </p>
2102 <p>Where &lt;dev-id&gt; is the numerical ID of the audio output device as returned by the
2103 <a class='info' href='#CREATE AUDIO_OUTPUT_DEVICE'>"CREATE AUDIO_OUTPUT_DEVICE"<span> (</span><span class='info'>Creating an audio output device</span><span>)</span></a>
2104 or <a class='info' href='#LIST AUDIO_OUTPUT_DEVICES'>"LIST AUDIO_OUTPUT_DEVICES"<span> (</span><span class='info'>Getting all created audio output device list</span><span>)</span></a>
2105 command, &lt;chan&gt; the audio channel number
2106 and &lt;param&gt; a specific channel parameter name for which information should
2107 be obtained (as returned by the <a class='info' href='#GET AUDIO_OUTPUT_CHANNEL INFO'>"GET AUDIO_OUTPUT_CHANNEL INFO"<span> (</span><span class='info'>Getting information about an audio channel</span><span>)</span></a> command).
2108 </p>
2109 <p>Possible Answers:
2110 </p>
2111 <p>
2112 </p>
2113 <blockquote class="text">
2114 <p>LinuxSampler will answer by sending a &lt;CRLF&gt; separated list.
2115 Each answer line begins with the information category name
2116 followed by a colon and then a space character &lt;SP&gt; and finally
2117 the info character string to that info category. There are
2118 information which is always returned, independently of the
2119 given channel parameter and there is optional information
2120 which is only shown dependently to the given audio channel. At
2121 the moment the following information categories are defined:
2122 </p>
2123 <p>
2124 </p>
2125 <blockquote class="text">
2126 <p>TYPE -
2127 </p>
2128 <blockquote class="text">
2129 <p>either "BOOL" for boolean value(s) or "INT" for integer
2130 value(s) or "FLOAT" for dotted number(s) or "STRING" for
2131 character string(s)
2132 (always returned)
2133 </p>
2134 </blockquote>
2135
2136
2137 <p>DESCRIPTION -
2138 </p>
2139 <blockquote class="text">
2140 <p>arbitrary text describing the purpose of the parameter (always returned)
2141 </p>
2142 </blockquote>
2143
2144
2145 <p>FIX -
2146 </p>
2147 <blockquote class="text">
2148 <p>either true or false, if true then this parameter is
2149 read only, thus cannot be altered
2150 (always returned)
2151 </p>
2152 </blockquote>
2153
2154
2155 <p>MULTIPLICITY -
2156 </p>
2157 <blockquote class="text">
2158 <p>either true or false, defines if this parameter allows
2159 only one value or a list of values, where true means
2160 multiple values and false only a single value allowed
2161 (always returned)
2162 </p>
2163 </blockquote>
2164
2165
2166 <p>RANGE_MIN -
2167 </p>
2168 <blockquote class="text">
2169 <p>defines lower limit of the allowed value range for this
2170 parameter, can be an integer value as well as a dotted
2171 number, usually used in conjunction with 'RANGE_MAX',
2172 but may also appear without
2173 (optionally returned, dependent to driver and channel
2174 parameter)
2175 </p>
2176 </blockquote>
2177
2178
2179 <p>RANGE_MAX -
2180 </p>
2181 <blockquote class="text">
2182 <p>defines upper limit of the allowed value range for this
2183 parameter, can be an integer value as well as a dotted
2184 number, usually used in conjunction with 'RANGE_MIN',
2185 but may also appear without
2186 (optionally returned, dependent to driver and channel
2187 parameter)
2188 </p>
2189 </blockquote>
2190
2191
2192 <p>POSSIBILITIES -
2193 </p>
2194 <blockquote class="text">
2195 <p>comma separated list of possible values for this
2196 parameter, character strings are encapsulated into
2197 apostrophes
2198 (optionally returned, dependent to driver and channel
2199 parameter)
2200 </p>
2201 </blockquote>
2202
2203
2204 </blockquote>
2205
2206
2207 <p>The mentioned fields above don't have to be in particular order.
2208 </p>
2209 </blockquote><p>
2210
2211 </p>
2212 <p>Example:
2213 </p>
2214 <p>
2215 </p>
2216 <blockquote class="text">
2217 <p>C: "GET AUDIO_OUTPUT_CHANNEL_PARAMETER INFO 1 0 JACK_BINDINGS"
2218 </p>
2219 <p>S: "DESCRIPTION: bindings to other JACK clients"
2220 </p>
2221 <p>&nbsp;&nbsp;&nbsp;"TYPE: STRING"
2222 </p>
2223 <p>&nbsp;&nbsp;&nbsp;"FIX: false"
2224 </p>
2225 <p>&nbsp;&nbsp;&nbsp;"MULTIPLICITY: true"
2226 </p>
2227 <p>&nbsp;&nbsp;&nbsp;"POSSIBILITIES: 'PCM:0','PCM:1','ardour:0','ardour:1'"
2228 </p>
2229 <p>&nbsp;&nbsp;&nbsp;"."
2230 </p>
2231 </blockquote><p>
2232
2233 </p>
2234 <a name="SET AUDIO_OUTPUT_CHANNEL_PARAMETER"></a><br /><hr />
2235 <table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc">&nbsp;TOC&nbsp;</a></td></tr></table>
2236 <a name="rfc.section.6.2.13"></a><h3>6.2.13.&nbsp;
2237 Changing settings of audio output channels</h3>
2238
2239 <p>Use the following command to alter a specific setting of an audio output channel:
2240 </p>
2241 <p>
2242 </p>
2243 <blockquote class="text">
2244 <p>SET AUDIO_OUTPUT_CHANNEL_PARAMETER &lt;dev-id&gt; &lt;chn&gt; &lt;key&gt;=&lt;value&gt;
2245 </p>
2246 </blockquote><p>
2247
2248 </p>
2249 <p>Where &lt;dev-id&gt; should be replaced by the numerical ID of the audio output device as returned by the
2250 <a class='info' href='#CREATE AUDIO_OUTPUT_DEVICE'>"CREATE AUDIO_OUTPUT_DEVICE"<span> (</span><span class='info'>Creating an audio output device</span><span>)</span></a>
2251 or <a class='info' href='#LIST AUDIO_OUTPUT_DEVICES'>"LIST AUDIO_OUTPUT_DEVICES"<span> (</span><span class='info'>Getting all created audio output device list</span><span>)</span></a>
2252 command, &lt;chn&gt; by the audio channel number, &lt;key&gt; by the name of the
2253 parameter to change and &lt;value&gt; by the new value for this parameter.
2254 </p>
2255 <p>Possible Answers:
2256 </p>
2257 <p>
2258 </p>
2259 <blockquote class="text">
2260 <p>"OK" -
2261 </p>
2262 <blockquote class="text">
2263 <p>in case setting was successfully changed
2264 </p>
2265 </blockquote>
2266
2267
2268 <p>"WRN:&lt;warning-code&gt;:&lt;warning-message&gt;" -
2269 </p>
2270 <blockquote class="text">
2271 <p>in case setting was changed successfully, but there are
2272 noteworthy issue(s) related, providing an appropriate
2273 warning code and warning message
2274 </p>
2275 </blockquote>
2276
2277
2278 <p>"ERR:&lt;error-code&gt;:&lt;error-message&gt;" -
2279 </p>
2280 <blockquote class="text">
2281 <p>in case it failed, providing an appropriate error code and
2282 error message
2283 </p>
2284 </blockquote>
2285
2286
2287 </blockquote><p>
2288
2289 </p>
2290 <p>Example:
2291 </p>
2292 <p>
2293 </p>
2294 <blockquote class="text">
2295 <p>C: "SET AUDIO_OUTPUT_CHANNEL PARAMETER 0 0 JACK_BINDINGS='PCM:0'"
2296 </p>
2297 <p>S: "OK"
2298 </p>
2299 </blockquote><p>
2300
2301 </p>
2302 <p>
2303 </p>
2304 <blockquote class="text">
2305 <p>C: "SET AUDIO_OUTPUT_CHANNEL PARAMETER 0 0 NAME='monitor left'"
2306 </p>
2307 <p>S: "OK"
2308 </p>
2309 </blockquote><p>
2310
2311 </p>
2312 <a name="anchor10"></a><br /><hr />
2313 <table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc">&nbsp;TOC&nbsp;</a></td></tr></table>
2314 <a name="rfc.section.6.3"></a><h3>6.3.&nbsp;
2315 Configuring MIDI input drivers</h3>
2316
2317 <p>Instances of drivers in LinuxSampler are called devices. You can use
2318 multiple MIDI devices simultaneously, e.g. to use MIDI over ethernet as
2319 MIDI input on one sampler channel and ALSA as MIDI input on another sampler
2320 channel. For particular MIDI input systems it's also possible to create
2321 several devices of the same MIDI input type. This chapter describes all
2322 commands to configure LinuxSampler's MIDI input devices and their parameters.
2323 </p>
2324 <p>Instead of defining commands and parameters for each driver individually,
2325 all possible parameters, their meanings and possible values have to be obtained
2326 at runtime. This makes the protocol a bit abstract, but has the advantage, that
2327 front-ends can be written independently of what drivers are currently implemented
2328 and what parameters these drivers are actually offering. This means front-ends can
2329 even handle drivers which are implemented somewhere in future without modifying
2330 the front-end at all.
2331 </p>
2332 <p>Commands for configuring MIDI input devices are pretty much the same as the
2333 commands for configuring audio output drivers, already described in the last
2334 chapter.
2335 </p>
2336 <p>Note: examples in this chapter showing particular parameters of drivers are
2337 not meant as specification of the drivers' parameters. Driver implementations in
2338 LinuxSampler might have complete different parameter names and meanings than shown
2339 in these examples or might change in future, so these examples are only meant for
2340 showing how to retrieve what parameters drivers are offering, how to retrieve their
2341 possible values, etc.
2342 </p>
2343 <a name="GET AVAILABLE_MIDI_INPUT_DRIVERS"></a><br /><hr />
2344 <table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc">&nbsp;TOC&nbsp;</a></td></tr></table>
2345 <a name="rfc.section.6.3.1"></a><h3>6.3.1.&nbsp;
2346 Getting amount of available MIDI input drivers</h3>
2347
2348 <p>Use the following command to get the number of
2349 MIDI input drivers currently available for the
2350 LinuxSampler instance:
2351 </p>
2352 <p>
2353 </p>
2354 <blockquote class="text">
2355 <p>GET AVAILABLE_MIDI_INPUT_DRIVERS
2356 </p>
2357 </blockquote><p>
2358
2359 </p>
2360 <p>Possible Answers:
2361 </p>
2362 <p>
2363 </p>
2364 <blockquote class="text">
2365 <p>LinuxSampler will answer by sending the
2366 number of available MIDI input drivers.
2367 </p>
2368 </blockquote><p>
2369
2370 </p>
2371 <p>Example:
2372 </p>
2373 <p>
2374 </p>
2375 <blockquote class="text">
2376 <p>C: "GET AVAILABLE_MIDI_INPUT_DRIVERS"
2377 </p>
2378 <p>S: "2"
2379 </p>
2380 </blockquote><p>
2381
2382 </p>
2383 <a name="LIST AVAILABLE_MIDI_INPUT_DRIVERS"></a><br /><hr />
2384 <table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc">&nbsp;TOC&nbsp;</a></td></tr></table>
2385 <a name="rfc.section.6.3.2"></a><h3>6.3.2.&nbsp;
2386 Getting all available MIDI input drivers</h3>
2387
2388 <p>Use the following command to list all MIDI input drivers currently available
2389 for the LinuxSampler instance:
2390 </p>
2391 <p>
2392 </p>
2393 <blockquote class="text">
2394 <p>LIST AVAILABLE_MIDI_INPUT_DRIVERS
2395 </p>
2396 </blockquote><p>
2397
2398 </p>
2399 <p>Possible Answers:
2400 </p>
2401 <p>
2402 </p>
2403 <blockquote class="text">
2404 <p>LinuxSampler will answer by sending comma separated character
2405 strings, each symbolizing a MIDI input driver.
2406 </p>
2407 </blockquote><p>
2408
2409 </p>
2410 <p>Example:
2411 </p>
2412 <p>
2413 </p>
2414 <blockquote class="text">
2415 <p>C: "LIST AVAILABLE_MIDI_INPUT_DRIVERS"
2416 </p>
2417 <p>S: "ALSA,JACK"
2418 </p>
2419 </blockquote><p>
2420
2421 </p>
2422 <a name="GET MIDI_INPUT_DRIVER INFO"></a><br /><hr />
2423 <table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc">&nbsp;TOC&nbsp;</a></td></tr></table>
2424 <a name="rfc.section.6.3.3"></a><h3>6.3.3.&nbsp;
2425 Getting information about a specific MIDI input driver</h3>
2426
2427 <p>Use the following command to get detailed information about a specific MIDI input driver:
2428 </p>
2429 <p>
2430 </p>
2431 <blockquote class="text">
2432 <p>GET MIDI_INPUT_DRIVER INFO &lt;midi-input-driver&gt;
2433 </p>
2434 </blockquote><p>
2435
2436 </p>
2437 <p>Where &lt;midi-input-driver&gt; is the name of the MIDI input driver as returned
2438 by the <a class='info' href='#LIST AVAILABLE_MIDI_INPUT_DRIVERS'>"LIST AVAILABLE_MIDI_INPUT_DRIVERS"<span> (</span><span class='info'>Getting all available MIDI input drivers</span><span>)</span></a> command.
2439 </p>
2440 <p>Possible Answers:
2441 </p>
2442 <p>
2443 </p>
2444 <blockquote class="text">
2445 <p>LinuxSampler will answer by sending a &lt;CRLF&gt; separated list.
2446 Each answer line begins with the information category name
2447 followed by a colon and then a space character &lt;SP&gt; and finally
2448 the info character string to that info category. At the moment
2449 the following information categories are defined:
2450 </p>
2451 <p>
2452 </p>
2453 <blockquote class="text">
2454 <p>DESCRIPTION -
2455 </p>
2456 <blockquote class="text">
2457 <p>arbitrary description text about the MIDI input driver
2458 </p>
2459 </blockquote>
2460
2461
2462 <p>VERSION -
2463 </p>
2464 <blockquote class="text">
2465 <p>arbitrary character string regarding the driver's version
2466 </p>
2467 </blockquote>
2468
2469
2470 <p>PARAMETERS -
2471 </p>
2472 <blockquote class="text">
2473 <p>comma separated list of all parameters available for the given MIDI input driver
2474 </p>
2475 </blockquote>
2476
2477
2478 </blockquote>
2479
2480
2481 <p>The mentioned fields above don't have to be in particular order.
2482 </p>
2483 </blockquote><p>
2484
2485 </p>
2486 <p>Example:
2487 </p>
2488 <p>
2489 </p>
2490 <blockquote class="text">
2491 <p>C: "GET MIDI_INPUT_DRIVER INFO ALSA"
2492 </p>
2493 <p>S: "DESCRIPTION: Advanced Linux Sound Architecture"
2494 </p>
2495 <p>&nbsp;&nbsp;&nbsp;"VERSION: 1.0"
2496 </p>
2497 <p>&nbsp;&nbsp;&nbsp;"PARAMETERS: DRIVER,ACTIVE"
2498 </p>
2499 <p>&nbsp;&nbsp;&nbsp;"."
2500 </p>
2501 </blockquote><p>
2502
2503 </p>
2504 <a name="GET MIDI_INPUT_DRIVER_PARAMETER INFO"></a><br /><hr />
2505 <table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc">&nbsp;TOC&nbsp;</a></td></tr></table>
2506 <a name="rfc.section.6.3.4"></a><h3>6.3.4.&nbsp;
2507 Getting information about specific MIDI input driver parameter</h3>
2508
2509 <p>Use the following command to get detailed information about a specific parameter of a specific MIDI input driver:
2510 </p>
2511 <p>
2512 </p>
2513 <blockquote class="text">
2514 <p>GET MIDI_INPUT_DRIVER_PARAMETER INFO &lt;midit&gt; &lt;param&gt; [&lt;deplist&gt;]
2515 </p>
2516 </blockquote><p>
2517
2518 </p>
2519 <p>Where &lt;midit&gt; is the name of the MIDI input driver as returned
2520 by the <a class='info' href='#LIST AVAILABLE_MIDI_INPUT_DRIVERS'>"LIST AVAILABLE_MIDI_INPUT_DRIVERS"<span> (</span><span class='info'>Getting all available MIDI input drivers</span><span>)</span></a> command, &lt;param&gt; a specific
2521 parameter name for which information should be obtained (as returned by the
2522 <a class='info' href='#GET MIDI_INPUT_DRIVER INFO'>"GET MIDI_INPUT_DRIVER INFO"<span> (</span><span class='info'>Getting information about a specific MIDI input driver</span><span>)</span></a> command) and &lt;deplist&gt; is an optional list
2523 of parameters on which the sought parameter &lt;param&gt; depends on,
2524 &lt;deplist&gt; is a key-value pair list in form of "key1=val1 key2=val2 ...",
2525 where character string values are encapsulated into apostrophes ('). Arguments
2526 given with &lt;deplist&gt; which are not dependency parameters of &lt;param&gt;
2527 will be ignored, means the front-end application can simply put all parameters
2528 in &lt;deplist&gt; with the values selected by the user.
2529 </p>
2530 <p>Possible Answers:
2531 </p>
2532 <p>LinuxSampler will answer by sending a &lt;CRLF> separated list.
2533 Each answer line begins with the information category name
2534 followed by a colon and then a space character &lt;SP> and finally
2535 the info character string to that info category. There is
2536 information which is always returned, independent of the
2537 given driver parameter and there is optional information
2538 which is only shown dependent to given driver parameter. At
2539 the moment the following information categories are defined:
2540 </p>
2541 <p>
2542 </p>
2543 <blockquote class="text">
2544 <p>TYPE -
2545 </p>
2546 <blockquote class="text">
2547 <p>either "BOOL" for boolean value(s) or "INT" for integer
2548 value(s) or "FLOAT" for dotted number(s) or "STRING" for
2549 character string(s)
2550 (always returned, no matter which driver parameter)
2551 </p>
2552 </blockquote>
2553
2554
2555 <p>DESCRIPTION -
2556 </p>
2557 <blockquote class="text">
2558 <p>arbitrary text describing the purpose of the parameter
2559 (always returned, no matter which driver parameter)
2560 </p>
2561 </blockquote>
2562
2563
2564 <p>MANDATORY -
2565 </p>
2566 <blockquote class="text">
2567 <p>either true or false, defines if this parameter must be
2568 given when the device is to be created with the
2569 <a class='info' href='#CREATE MIDI_INPUT_DEVICE'>'CREATE MIDI_INPUT_DEVICE'<span> (</span><span class='info'>Creating a MIDI input device</span><span>)</span></a> command
2570 (always returned, no matter which driver parameter)
2571 </p>
2572 </blockquote>
2573
2574
2575 <p>FIX -
2576 </p>
2577 <blockquote class="text">
2578 <p>either true or false, if false then this parameter can
2579 be changed at any time, once the device is created by
2580 the <a class='info' href='#CREATE MIDI_INPUT_DEVICE'>'CREATE MIDI_INPUT_DEVICE'<span> (</span><span class='info'>Creating a MIDI input device</span><span>)</span></a> command
2581 (always returned, no matter which driver parameter)
2582 </p>
2583 </blockquote>
2584
2585
2586 <p>MULTIPLICITY -
2587 </p>
2588 <blockquote class="text">
2589 <p>either true or false, defines if this parameter allows
2590 only one value or a list of values, where true means
2591 multiple values and false only a single value allowed
2592 (always returned, no matter which driver parameter)
2593 </p>
2594 </blockquote>
2595
2596
2597 <p>DEPENDS -
2598 </p>
2599 <blockquote class="text">
2600 <p>comma separated list of parameters this parameter depends
2601 on, means the values for fields 'DEFAULT', 'RANGE_MIN',
2602 'RANGE_MAX' and 'POSSIBILITIES' might depend on these
2603 listed parameters, for example assuming that an audio
2604 driver (like the ALSA driver) offers parameters 'card'
2605 and 'samplerate' then parameter 'samplerate' would
2606 depend on 'card' because the possible values for
2607 'samplerate' depends on the sound card which can be
2608 chosen by the 'card' parameter
2609 (optionally returned, dependent to driver parameter)
2610 </p>
2611 </blockquote>
2612
2613
2614 <p>DEFAULT -
2615 </p>
2616 <blockquote class="text">
2617 <p>reflects the default value for this parameter which is
2618 used when the device is created and not explicitly
2619 given with the <a class='info' href='#CREATE MIDI_INPUT_DEVICE'>'CREATE MIDI_INPUT_DEVICE'<span> (</span><span class='info'>Creating a MIDI input device</span><span>)</span></a> command,
2620 in case of MULTIPLCITY=true, this is a comma separated
2621 list, that's why character strings are encapsulated into
2622 apostrophes (')
2623 (optionally returned, dependent to driver parameter)
2624 </p>
2625 </blockquote>
2626
2627
2628 <p>RANGE_MIN -
2629 </p>
2630 <blockquote class="text">
2631 <p>defines lower limit of the allowed value range for this
2632 parameter, can be an integer value as well as a dotted
2633 number, this parameter is often used in conjunction
2634 with RANGE_MAX, but may also appear without
2635 (optionally returned, dependent to driver parameter)
2636 </p>
2637 </blockquote>
2638
2639
2640 <p>RANGE_MAX -
2641 </p>
2642 <blockquote class="text">
2643 <p>defines upper limit of the allowed value range for this
2644 parameter, can be an integer value as well as a dotted
2645 number, this parameter is often used in conjunction with
2646 RANGE_MIN, but may also appear without
2647 (optionally returned, dependent to driver parameter)
2648 </p>
2649 </blockquote>
2650
2651
2652 <p>POSSIBILITIES -
2653 </p>
2654 <blockquote class="text">
2655 <p>comma separated list of possible values for this
2656 parameter, character strings are encapsulated into
2657 apostrophes
2658 (optionally returned, dependent to driver parameter)
2659 </p>
2660 </blockquote>
2661
2662
2663 </blockquote><p>
2664
2665 </p>
2666 <p>The mentioned fields above don't have to be in particular order.
2667 </p>
2668 <p>Example:
2669 </p>
2670 <p>
2671 </p>
2672 <blockquote class="text">
2673 <p>C: "GET MIDI_INPUT_DRIVER_PARAMETER INFO ALSA ACTIVE"
2674 </p>
2675 <p>S: "DESCRIPTION: Whether device is enabled"
2676 </p>
2677 <p>&nbsp;&nbsp;&nbsp;"TYPE: BOOL"
2678 </p>
2679 <p>&nbsp;&nbsp;&nbsp;"MANDATORY: false"
2680 </p>
2681 <p>&nbsp;&nbsp;&nbsp;"FIX: false"
2682 </p>
2683 <p>&nbsp;&nbsp;&nbsp;"MULTIPLICITY: false"
2684 </p>
2685 <p>&nbsp;&nbsp;&nbsp;"DEFAULT: true"
2686 </p>
2687 <p>&nbsp;&nbsp;&nbsp;"."
2688 </p>
2689 </blockquote><p>
2690
2691 </p>
2692 <a name="CREATE MIDI_INPUT_DEVICE"></a><br /><hr />
2693 <table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc">&nbsp;TOC&nbsp;</a></td></tr></table>
2694 <a name="rfc.section.6.3.5"></a><h3>6.3.5.&nbsp;
2695 Creating a MIDI input device</h3>
2696
2697 <p>Use the following command to create a new MIDI input device for the desired MIDI input system:
2698 </p>
2699 <p>
2700 </p>
2701 <blockquote class="text">
2702 <p>CREATE MIDI_INPUT_DEVICE &lt;midi-input-driver&gt; [&lt;param-list&gt;]
2703 </p>
2704 </blockquote><p>
2705
2706 </p>
2707 <p>Where &lt;midi-input-driver&gt; should be replaced by the desired MIDI input system as returned
2708 by the <a class='info' href='#LIST AVAILABLE_MIDI_INPUT_DRIVERS'>"LIST AVAILABLE_MIDI_INPUT_DRIVERS"<span> (</span><span class='info'>Getting all available MIDI input drivers</span><span>)</span></a> command and &lt;param-list&gt; by an
2709 optional list of driver specific parameters in form of "key1=val1 key2=val2 ...", where
2710 character string values should be encapsulated into apostrophes (').
2711 Note that there might be drivers which require parameter(s) to be
2712 given with this command. Use the previously described commands in
2713 this chapter to get that information.
2714 </p>
2715 <p>Possible Answers:
2716 </p>
2717 <p>
2718 </p>
2719 <blockquote class="text">
2720 <p>"OK[&lt;device-id&gt;]" -
2721 </p>
2722 <blockquote class="text">
2723 <p>in case the device was successfully created, where
2724 &lt;device-id&gt; is the numerical ID of the new device
2725 </p>
2726 </blockquote>
2727
2728
2729 <p>"WRN[&lt;device-id&gt;]:&lt;warning-code&gt;:&lt;warning-message&gt;" -
2730 </p>
2731 <blockquote class="text">
2732 <p>in case the driver was loaded successfully, where
2733 &lt;device-id&gt; is the numerical ID of the new device, but
2734 there are noteworthy issue(s) related, providing an
2735 appropriate warning code and warning message
2736 </p>
2737 </blockquote>
2738
2739
2740 <p>"ERR:&lt;error-code&gt;:&lt;error-message&gt;" -
2741 </p>
2742 <blockquote class="text">
2743 <p>in case it failed, providing an appropriate error code and error message
2744 </p>
2745 </blockquote>
2746
2747
2748 </blockquote><p>
2749
2750 </p>
2751 <p>Example:
2752 </p>
2753 <p>
2754 </p>
2755 <blockquote class="text">
2756 <p>C: "CREATE MIDI_INPUT_DEVICE ALSA"
2757 </p>
2758 <p>S: "OK[0]"
2759 </p>
2760 </blockquote><p>
2761
2762 </p>
2763 <a name="DESTROY MIDI_INPUT_DEVICE"></a><br /><hr />
2764 <table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc">&nbsp;TOC&nbsp;</a></td></tr></table>
2765 <a name="rfc.section.6.3.6"></a><h3>6.3.6.&nbsp;
2766 Destroying a MIDI input device</h3>
2767
2768 <p>Use the following command to destroy a created MIDI input device:
2769 </p>
2770 <p>
2771 </p>
2772 <blockquote class="text">
2773 <p>DESTROY MIDI_INPUT_DEVICE &lt;device-id&gt;
2774 </p>
2775 </blockquote><p>
2776
2777 </p>
2778 <p>Where &lt;device-id&gt; should be replaced by the device's numerical ID as returned by the
2779 <a class='info' href='#CREATE MIDI_INPUT_DEVICE'>"CREATE MIDI_INPUT_DEVICE"<span> (</span><span class='info'>Creating a MIDI input device</span><span>)</span></a>
2780 or <a class='info' href='#LIST MIDI_INPUT_DEVICES'>"LIST MIDI_INPUT_DEVICES"<span> (</span><span class='info'>Getting all created MIDI input device list</span><span>)</span></a>
2781 command.
2782 </p>
2783 <p>Possible Answers:
2784 </p>
2785 <p>
2786 </p>
2787 <blockquote class="text">
2788 <p>"OK" -
2789 </p>
2790 <blockquote class="text">
2791 <p>in case the device was successfully destroyed
2792 </p>
2793 </blockquote>
2794
2795
2796 <p>"WRN:&lt;warning-code&gt;:&lt;warning-message&gt;" -
2797 </p>
2798 <blockquote class="text">
2799 <p>in case the device was destroyed, but there are noteworthy
2800 issue(s) related, providing an appropriate warning code and
2801 warning message
2802 </p>
2803 </blockquote>
2804
2805
2806 <p>"ERR:&lt;error-code&gt;:&lt;error-message&gt;" -
2807 </p>
2808 <blockquote class="text">
2809 <p>in case it failed, providing an appropriate error code and error message
2810 </p>
2811 </blockquote>
2812
2813
2814 </blockquote><p>
2815
2816 </p>
2817 <p>Example:
2818 </p>
2819 <p>
2820 </p>
2821 <blockquote class="text">
2822 <p>C: "DESTROY MIDI_INPUT_DEVICE 0"
2823 </p>
2824 <p>S: "OK"
2825 </p>
2826 </blockquote><p>
2827
2828 </p>
2829 <a name="GET MIDI_INPUT_DEVICES"></a><br /><hr />
2830 <table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc">&nbsp;TOC&nbsp;</a></td></tr></table>
2831 <a name="rfc.section.6.3.7"></a><h3>6.3.7.&nbsp;
2832 Getting all created MIDI input device count</h3>
2833
2834 <p>Use the following command to count all created MIDI input devices:
2835 </p>
2836 <p>
2837 </p>
2838 <blockquote class="text">
2839 <p>GET MIDI_INPUT_DEVICES
2840 </p>
2841 </blockquote><p>
2842
2843 </p>
2844 <p>Possible Answers:
2845 </p>
2846 <p>
2847 </p>
2848 <blockquote class="text">
2849 <p>LinuxSampler will answer by sending the current number of all
2850 MIDI input devices.
2851 </p>
2852 </blockquote><p>
2853
2854 </p>
2855 <p>Example:
2856 </p>
2857 <p>
2858 </p>
2859 <blockquote class="text">
2860 <p>C: "GET MIDI_INPUT_DEVICES"
2861 </p>
2862 <p>S: "3"
2863 </p>
2864 </blockquote><p>
2865
2866 </p>
2867 <a name="LIST MIDI_INPUT_DEVICES"></a><br /><hr />
2868 <table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc">&nbsp;TOC&nbsp;</a></td></tr></table>
2869 <a name="rfc.section.6.3.8"></a><h3>6.3.8.&nbsp;
2870 Getting all created MIDI input device list</h3>
2871
2872 <p>Use the following command to list all created MIDI input devices:
2873 </p>
2874 <p>
2875 </p>
2876 <blockquote class="text">
2877 <p>LIST MIDI_INPUT_DEVICES
2878 </p>
2879 </blockquote><p>
2880
2881 </p>
2882 <p>Possible Answers:
2883 </p>
2884 <p>
2885 </p>
2886 <blockquote class="text">
2887 <p>LinuxSampler will answer by sending a comma separated list
2888 with the numerical Ids of all created MIDI input devices.
2889 </p>
2890 </blockquote><p>
2891
2892 </p>
2893 <p>Examples:
2894 </p>
2895 <p>
2896 </p>
2897 <blockquote class="text">
2898 <p>C: "LIST MIDI_INPUT_DEVICES"
2899 </p>
2900 <p>S: "0,1,2"
2901 </p>
2902 </blockquote><p>
2903
2904 </p>
2905 <p>
2906 </p>
2907 <blockquote class="text">
2908 <p>C: "LIST MIDI_INPUT_DEVICES"
2909 </p>
2910 <p>S: "1,3"
2911 </p>
2912 </blockquote><p>
2913
2914 </p>
2915 <a name="GET MIDI_INPUT_DEVICE INFO"></a><br /><hr />
2916 <table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc">&nbsp;TOC&nbsp;</a></td></tr></table>
2917 <a name="rfc.section.6.3.9"></a><h3>6.3.9.&nbsp;
2918 Getting current settings of a MIDI input device</h3>
2919
2920 <p>Use the following command to get current settings of a specific, created MIDI input device:
2921 </p>
2922 <p>
2923 </p>
2924 <blockquote class="text">
2925 <p>GET MIDI_INPUT_DEVICE INFO &lt;device-id&gt;
2926 </p>
2927 </blockquote><p>
2928
2929 </p>
2930 <p>Where &lt;device-id&gt; is the numerical ID of the MIDI input device as returned by the
2931 <a class='info' href='#CREATE MIDI_INPUT_DEVICE'>"CREATE MIDI_INPUT_DEVICE"<span> (</span><span class='info'>Creating a MIDI input device</span><span>)</span></a>
2932 or <a class='info' href='#LIST MIDI_INPUT_DEVICES'>"LIST MIDI_INPUT_DEVICES"<span> (</span><span class='info'>Getting all created MIDI input device list</span><span>)</span></a>
2933 command.
2934 </p>
2935 <p>Possible Answers:
2936 </p>
2937 <p>
2938 </p>
2939 <blockquote class="text">
2940 <p>LinuxSampler will answer by sending a &lt;CRLF&gt; separated list.
2941 Each answer line begins with the information category name
2942 followed by a colon and then a space character &lt;SP&gt; and finally
2943 the info character string to that info category. As some
2944 parameters might allow multiple values, character strings are
2945 encapsulated into apostrophes ('). At the moment the following
2946 information categories are defined (independent of driver):
2947 </p>
2948 <p>
2949 </p>
2950 <blockquote class="text">
2951 <p>DRIVER -
2952 </p>
2953 <blockquote class="text">
2954 <p>identifier of the used MIDI input driver, as e.g.
2955 returned by the <a class='info' href='#LIST AVAILABLE_MIDI_INPUT_DRIVERS'>"LIST AVAILABLE_MIDI_INPUT_DRIVERS"<span> (</span><span class='info'>Getting all available MIDI input drivers</span><span>)</span></a>
2956 command
2957 </p>
2958 </blockquote>
2959
2960
2961 </blockquote>
2962
2963 <blockquote class="text">
2964 <p>ACTIVE -
2965 </p>
2966 <blockquote class="text">
2967 <p>either true or false, if false then the MIDI device is
2968 inactive and doesn't listen to any incoming MIDI events
2969 and thus doesn't forward them to connected sampler
2970 channels
2971 </p>
2972 </blockquote>
2973
2974
2975 </blockquote>
2976
2977
2978 </blockquote><p>
2979
2980 </p>
2981 <p>The mentioned fields above don't have to be in particular
2982 order. The fields above are only those fields which are
2983 returned by all MIDI input devices. Every MIDI input driver
2984 might have its own, additional driver specific parameters (see
2985 <a class='info' href='#GET MIDI_INPUT_DRIVER INFO'>"GET MIDI_INPUT_DRIVER INFO"<span> (</span><span class='info'>Getting information about a specific MIDI input driver</span><span>)</span></a> command) which are also returned
2986 by this command.
2987 </p>
2988 <p>Example:
2989 </p>
2990 <p>
2991 </p>
2992 <blockquote class="text">
2993 <p>C: "GET MIDI_INPUT_DEVICE INFO 0"
2994 </p>
2995 <p>S: "DRIVER: ALSA"
2996 </p>
2997 <p>&nbsp;&nbsp;&nbsp;"ACTIVE: true"
2998 </p>
2999 <p>&nbsp;&nbsp;&nbsp;"."
3000 </p>
3001 </blockquote><p>
3002
3003 </p>
3004 <a name="SET MIDI_INPUT_DEVICE_PARAMETER"></a><br /><hr />
3005 <table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc">&nbsp;TOC&nbsp;</a></td></tr></table>
3006 <a name="rfc.section.6.3.10"></a><h3>6.3.10.&nbsp;
3007 Changing settings of MIDI input devices</h3>
3008
3009 <p>Use the following command to alter a specific setting of a created MIDI input device:
3010 </p>
3011 <p>
3012 </p>
3013 <blockquote class="text">
3014 <p>SET MIDI_INPUT_DEVICE_PARAMETER &lt;device-id&gt; &lt;key&gt;=&lt;value&gt;
3015 </p>
3016 </blockquote><p>
3017
3018 </p>
3019 <p>Where &lt;device-id&gt; should be replaced by the numerical ID of the
3020 MIDI input device as returned by the
3021 <a class='info' href='#CREATE MIDI_INPUT_DEVICE'>"CREATE MIDI_INPUT_DEVICE"<span> (</span><span class='info'>Creating a MIDI input device</span><span>)</span></a>
3022 or <a class='info' href='#LIST MIDI_INPUT_DEVICES'>"LIST MIDI_INPUT_DEVICES"<span> (</span><span class='info'>Getting all created MIDI input device list</span><span>)</span></a>
3023 command, &lt;key&gt; by the name of the parameter to change and
3024 &lt;value&gt; by the new value for this parameter.
3025 </p>
3026 <p>Possible Answers:
3027 </p>
3028 <p>
3029 </p>
3030 <blockquote class="text">
3031 <p>"OK" -
3032 </p>
3033 <blockquote class="text">
3034 <p>in case setting was successfully changed
3035 </p>
3036 </blockquote>
3037
3038
3039 <p>"WRN:&lt;warning-code&gt;:&lt;warning-message&gt;" -
3040 </p>
3041 <blockquote class="text">
3042 <p>in case setting was changed successfully, but there are
3043 noteworthy issue(s) related, providing an appropriate
3044 warning code and warning message
3045 </p>
3046 </blockquote>
3047
3048
3049 <p>"ERR:&lt;error-code&gt;:&lt;error-message&gt;" -
3050 </p>
3051 <blockquote class="text">
3052 <p>in case it failed, providing an appropriate error code and error message
3053 </p>
3054 </blockquote>
3055
3056
3057 </blockquote><p>
3058
3059 </p>
3060 <p>Example:
3061 </p>
3062 <p>
3063 </p>
3064 <blockquote class="text">
3065 <p>C: "SET MIDI_INPUT_DEVICE_PARAMETER 0 ACTIVE=false"
3066 </p>
3067 <p>S: "OK"
3068 </p>
3069 </blockquote><p>
3070
3071 </p>
3072 <a name="GET MIDI_INPUT_PORT INFO"></a><br /><hr />
3073 <table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc">&nbsp;TOC&nbsp;</a></td></tr></table>
3074 <a name="rfc.section.6.3.11"></a><h3>6.3.11.&nbsp;
3075 Getting information about a MIDI port</h3>
3076
3077 <p>Use the following command to get information about a MIDI port:
3078 </p>
3079 <p>
3080 </p>
3081 <blockquote class="text">
3082 <p>GET MIDI_INPUT_PORT INFO &lt;device-id&gt; &lt;midi-port&gt;
3083 </p>
3084 </blockquote><p>
3085
3086 </p>
3087 <p>Where &lt;device-id&gt; is the numerical ID of the MIDI input device as returned by the
3088 <a class='info' href='#CREATE MIDI_INPUT_DEVICE'>"CREATE MIDI_INPUT_DEVICE"<span> (</span><span class='info'>Creating a MIDI input device</span><span>)</span></a>
3089 or <a class='info' href='#LIST MIDI_INPUT_DEVICES'>"LIST MIDI_INPUT_DEVICES"<span> (</span><span class='info'>Getting all created MIDI input device list</span><span>)</span></a>
3090 command and &lt;midi-port&gt; the MIDI input port number.
3091 </p>
3092 <p>Possible Answers:
3093 </p>
3094 <p>
3095 </p>
3096 <blockquote class="text">
3097 <p>LinuxSampler will answer by sending a &lt;CRLF&gt; separated list.
3098 Each answer line begins with the information category name
3099 followed by a colon and then a space character &lt;SP&gt; and finally
3100 the info character string to that info category. At the moment
3101 the following information categories are defined:
3102 </p>
3103 <p>NAME -
3104 </p>
3105 <blockquote class="text">
3106 <p>arbitrary character string naming the port
3107 </p>
3108 </blockquote>
3109
3110
3111 </blockquote><p>
3112
3113 </p>
3114 <p>The field above is only the one which is returned by all MIDI
3115 ports regardless of the MIDI driver and port. Every MIDI port
3116 might have its own, additional driver and port specific
3117 parameters.
3118 </p>
3119 <p>Example:
3120 </p>
3121 <p>
3122 </p>
3123 <blockquote class="text">
3124 <p>C: "GET MIDI_INPUT_PORT INFO 0 0"
3125 </p>
3126 <p>S: "NAME: 'Masterkeyboard'"
3127 </p>
3128 <p>&nbsp;&nbsp;&nbsp;"ALSA_SEQ_BINDINGS: '64:0'"
3129 </p>
3130 <p>&nbsp;&nbsp;&nbsp;"."
3131 </p>
3132 </blockquote><p>
3133
3134 </p>
3135 <a name="GET MIDI_INPUT_PORT_PARAMETER INFO"></a><br /><hr />
3136 <table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc">&nbsp;TOC