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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 542 - (show annotations) (download) (as text)
Sun May 15 15:31:45 2005 UTC (18 years, 11 months ago) by senoner
File MIME type: text/html
File size: 144474 byte(s)
Initial Revision

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.23 (http://xml.resource.org/)">
7 <style type='text/css'>
8 <!--
9 body {
10 font-family: verdana, charcoal, helvetica, arial, sans-serif;
11 font-size: small ; color: #000000 ; background-color: #ffffff ; }
12 .title { color: #990000; font-size: x-large ;
13 font-weight: bold; text-align: right;
14 font-family: helvetica, monaco, "MS Sans Serif", arial, sans-serif;
15 background-color: transparent; }
16 .filename { color: #666666; font-size: 18px; line-height: 28px;
17 font-weight: bold; text-align: right;
18 font-family: helvetica, arial, sans-serif;
19 background-color: transparent; }
20 td.rfcbug { background-color: #000000 ; width: 30px ; height: 30px ;
21 text-align: justify; vertical-align: middle ; padding-top: 2px ; }
22 td.rfcbug span.RFC { color: #666666; font-weight: bold; text-decoration: none;
23 background-color: #000000 ;
24 font-family: monaco, charcoal, geneva, "MS Sans Serif", helvetica, verdana, sans-serif;
25 font-size: x-small ; }
26 td.rfcbug span.hotText { color: #ffffff; font-weight: normal; text-decoration: none;
27 text-align: center ;
28 font-family: charcoal, monaco, geneva, "MS Sans Serif", helvetica, verdana, sans-serif;
29 font-size: x-small ; background-color: #000000; }
30 /* info code from SantaKlauss at http://www.madaboutstyle.com/tooltip2.html */
31 div#counter{margin-top: 100px}
32
33 a.info{
34 position:relative; /*this is the key*/
35 z-index:24;
36 text-decoration:none}
37
38 a.info:hover{z-index:25; background-color:#990000 ; color: #ffffff ;}
39
40 a.info span{display: none}
41
42 a.info:hover span{ /*the span will display just on :hover state*/
43 display:block;
44 position:absolute;
45 font-size: smaller ;
46 top:2em; left:2em; width:15em;
47 padding: 2px ;
48 border:1px solid #333333;
49 background-color:#eeeeee; color:#990000;
50 text-align: left ;}
51
52 A { font-weight: bold; }
53 A:link { color: #990000; background-color: transparent ; }
54 A:visited { color: #333333; background-color: transparent ; }
55 A:active { color: #333333; background-color: transparent ; }
56
57 p { margin-left: 2em; margin-right: 2em; }
58 p.copyright { font-size: x-small ; }
59 p.toc { font-size: small ; font-weight: bold ; margin-left: 3em ;}
60
61 span.emph { font-style: italic; }
62 span.strong { font-weight: bold; }
63 span.verb { font-family: "Courier New", Courier, monospace ; }
64
65 ol.text { margin-left: 2em; margin-right: 2em; }
66 ul.text { margin-left: 2em; margin-right: 2em; }
67 li { margin-left: 3em; }
68
69 pre { margin-left: 3em; color: #333333; background-color: transparent;
70 font-family: "Courier New", Courier, monospace ; font-size: small ;
71 }
72
73 h3 { color: #333333; font-size: medium ;
74 font-family: helvetica, arial, sans-serif ;
75 background-color: transparent; }
76 h4 { font-size: small; font-family: helvetica, arial, sans-serif ; }
77
78 table.bug { width: 30px ; height: 15px ; }
79 td.bug { color: #ffffff ; background-color: #990000 ;
80 text-align: center ; width: 30px ; height: 15px ;
81 }
82 td.bug A.link2 { color: #ffffff ; font-weight: bold;
83 text-decoration: none;
84 font-family: monaco, charcoal, geneva, "MS Sans Serif", helvetica, sans-serif;
85 font-size: x-small ; background-color: transparent }
86
87 td.header { color: #ffffff; font-size: x-small ;
88 font-family: arial, helvetica, sans-serif; vertical-align: top;
89 background-color: #666666 ; width: 33% ; }
90 td.author { font-weight: bold; margin-left: 4em; font-size: x-small ; }
91 td.author-text { font-size: x-small; }
92 table.data { vertical-align: top ; border-collapse: collapse ;
93 border-style: solid solid solid solid ;
94 border-color: black black black black ;
95 font-size: small ; text-align: center ; }
96 table.data th { font-weight: bold ;
97 border-style: solid solid solid solid ;
98 border-color: black black black black ; }
99 table.data td {
100 border-style: solid solid solid solid ;
101 border-color: #333333 #333333 #333333 #333333 ; }
102
103 hr { height: 1px }
104 -->
105 </style>
106 </head>
107 <body>
108 <table summary="layout" cellpadding="0" cellspacing="2" class="bug" align="right"><tr><td class="bug"><a href="#toc" class="link2">&nbsp;TOC&nbsp;</a></td></tr></table>
109 <table summary="layout" width="66%" border="0" cellpadding="0" cellspacing="0"><tr><td><table summary="layout" width="100%" border="0" cellpadding="2" cellspacing="1">
110 <tr><td class="header">LinuxSampler Developers</td><td class="header">C. Schoenebeck</td></tr>
111 <tr><td class="header">Internet-Draft</td><td class="header">Interessengemeinschaft Software</td></tr>
112 <tr><td class="header">Expires: November 30, 2004</td><td class="header">Engineering e. V.</td></tr>
113 <tr><td class="header">&nbsp;</td><td class="header">June 2004</td></tr>
114 </table></td></tr></table>
115 <div align="right"><span class="title"><br />LinuxSampler Control Protocol</span></div>
116 <div align="right"><span class="title"><br />lscp.txt</span></div>
117
118 <h3>Status of this Memo</h3>
119 <p>
120 This document is an Internet-Draft and is
121 in full conformance with all provisions of Section 10 of RFC2026.</p>
122 <p>
123 Internet-Drafts are working documents of the Internet Engineering
124 Task Force (IETF), its areas, and its working groups.
125 Note that other groups may also distribute working documents as
126 Internet-Drafts.</p>
127 <p>
128 Internet-Drafts are draft documents valid for a maximum of six months
129 and may be updated, replaced, or obsoleted by other documents at any time.
130 It is inappropriate to use Internet-Drafts as reference material or to cite
131 them other than as "work in progress."</p>
132 <p>
133 The list of current Internet-Drafts can be accessed at
134 <a href='http://www.ietf.org/ietf/1id-abstracts.txt'>http://www.ietf.org/ietf/1id-abstracts.txt</a>.</p>
135 <p>
136 The list of Internet-Draft Shadow Directories can be accessed at
137 <a href='http://www.ietf.org/shadow.html'>http://www.ietf.org/shadow.html</a>.</p>
138 <p>
139 This Internet-Draft will expire on November 30, 2004.</p>
140
141 <h3>Copyright Notice</h3>
142 <p>
143 Copyright (C) The Internet Society (2004). All Rights Reserved.</p>
144
145 <h3>Abstract</h3>
146
147 <p>The LinuxSampler Control Protocol (LSCP) is an
148 application-level protocol primarily intended for local and
149 remote controlling the LinuxSampler main application, which is a
150 sophisticated console application essentially playing back audio
151 samples and manipulating the samples in real time to certain
152 extent.
153 </p><a name="toc"></a><br /><hr />
154 <h3>Table of Contents</h3>
155 <p class="toc">
156 <a href="#anchor1">1.</a>&nbsp;
157 Requirements notation<br />
158 <a href="#anchor2">2.</a>&nbsp;
159 Introduction<br />
160 <a href="#anchor3">3.</a>&nbsp;
161 Focus of this protocol<br />
162 <a href="#anchor4">4.</a>&nbsp;
163 Communication Overview<br />
164 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#anchor5">4.1</a>&nbsp;
165 Request/response communication method<br />
166 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#anchor6">4.1.1</a>&nbsp;
167 Result format<br />
168 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#anchor7">4.2</a>&nbsp;
169 Subscribe/notify communication method<br />
170 <a href="#anchor8">5.</a>&nbsp;
171 Description for control commands<br />
172 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#anchor9">5.1</a>&nbsp;
173 Ignored lines and comments<br />
174 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#anchor10">5.2</a>&nbsp;
175 Configuring audio drivers<br />
176 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#anchor11">5.2.1</a>&nbsp;
177 Getting all available audio output drivers<br />
178 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#anchor12">5.2.2</a>&nbsp;
179 Getting information about a specific audio
180 output driver<br />
181 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#anchor13">5.2.3</a>&nbsp;
182 Getting information about specific audio
183 output driver parameter<br />
184 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#anchor14">5.2.4</a>&nbsp;
185 Creating an audio output device<br />
186 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#anchor15">5.2.5</a>&nbsp;
187 Destroying an audio output device<br />
188 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#anchor16">5.2.6</a>&nbsp;
189 Getting all created audio output device count<br />
190 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#anchor17">5.2.7</a>&nbsp;
191 Getting all created audio output device list<br />
192 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#anchor18">5.2.8</a>&nbsp;
193 Getting current settings of an audio output device<br />
194 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#anchor19">5.2.9</a>&nbsp;
195 Changing settings of audio output devices<br />
196 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#anchor20">5.2.10</a>&nbsp;
197 Getting information about an audio channel<br />
198 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#anchor21">5.2.11</a>&nbsp;
199 Getting information about specific audio channel parameter<br />
200 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#anchor22">5.2.12</a>&nbsp;
201 Changing settings of audio output channels<br />
202 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#anchor23">5.3</a>&nbsp;
203 Configuring MIDI input drivers<br />
204 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#anchor24">5.3.1</a>&nbsp;
205 Getting all available MIDI input drivers<br />
206 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#anchor25">5.3.2</a>&nbsp;
207 Getting information about a specific MIDI input driver<br />
208 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#anchor26">5.3.3</a>&nbsp;
209 Getting information about specific MIDI input driver parameter<br />
210 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#anchor27">5.3.4</a>&nbsp;
211 Creating a MIDI input device<br />
212 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#anchor28">5.3.5</a>&nbsp;
213 Destroying a MIDI input device<br />
214 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#anchor29">5.3.6</a>&nbsp;
215 Getting all created MIDI input device count<br />
216 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#anchor30">5.3.7</a>&nbsp;
217 Getting all created MIDI input device list<br />
218 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#anchor31">5.3.8</a>&nbsp;
219 Getting current settings of a MIDI input device<br />
220 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#anchor32">5.3.9</a>&nbsp;
221 Changing settings of audio output devices<br />
222 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#anchor33">5.3.10</a>&nbsp;
223 Getting information about a MIDI port<br />
224 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#anchor34">5.3.11</a>&nbsp;
225 Getting information about specific MIDI port parameter<br />
226 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#anchor35">5.3.12</a>&nbsp;
227 Changing settings of MIDI input ports<br />
228 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#anchor36">5.4</a>&nbsp;
229 Configuring sampler channels<br />
230 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#anchor37">5.4.1</a>&nbsp;
231 Loading an instrument<br />
232 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#anchor38">5.4.2</a>&nbsp;
233 Loading a sampler engine<br />
234 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#anchor39">5.4.3</a>&nbsp;
235 Getting all created sampler channel count<br />
236 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#anchor40">5.4.4</a>&nbsp;
237 Getting all created sampler channel list<br />
238 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#anchor41">5.4.5</a>&nbsp;
239 Adding a new sampler channel<br />
240 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#anchor42">5.4.6</a>&nbsp;
241 Removing a sampler channel<br />
242 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#anchor43">5.4.7</a>&nbsp;
243 Getting all available engines<br />
244 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#anchor44">5.4.8</a>&nbsp;
245 Getting information about an engine<br />
246 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#anchor45">5.4.9</a>&nbsp;
247 Getting sampler channel information<br />
248 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#anchor46">5.4.10</a>&nbsp;
249 Current number of active voices<br />
250 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#anchor47">5.4.11</a>&nbsp;
251 Current number of active disk streams<br />
252 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#anchor48">5.4.12</a>&nbsp;
253 Current fill state of disk stream buffers<br />
254 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#anchor49">5.4.13</a>&nbsp;
255 Setting audio output device<br />
256 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#anchor50">5.4.14</a>&nbsp;
257 Setting audio output type<br />
258 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#anchor51">5.4.15</a>&nbsp;
259 Setting audio output channel<br />
260 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#anchor52">5.4.16</a>&nbsp;
261 Setting MIDI input device<br />
262 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#anchor53">5.4.17</a>&nbsp;
263 Setting MIDI input type<br />
264 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#anchor54">5.4.18</a>&nbsp;
265 Setting MIDI input port<br />
266 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#anchor55">5.4.19</a>&nbsp;
267 Setting MIDI input channel<br />
268 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#anchor56">5.4.20</a>&nbsp;
269 Setting channel volume<br />
270 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#anchor57">5.4.21</a>&nbsp;
271 Resetting a sampler channel<br />
272 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#anchor58">5.5</a>&nbsp;
273 Controlling connection<br />
274 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#anchor59">5.5.1</a>&nbsp;
275 Register front-end for receiving event messages<br />
276 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#anchor60">5.5.2</a>&nbsp;
277 Unregister front-end for not receiving UDP event messages anymore<br />
278 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#anchor61">5.5.3</a>&nbsp;
279 Enable or disable echo of commands<br />
280 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#anchor62">5.5.4</a>&nbsp;
281 Close client connection<br />
282 <a href="#anchor63">6.</a>&nbsp;
283 Command Syntax<br />
284 <a href="#anchor64">7.</a>&nbsp;
285 Events<br />
286 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#anchor65">7.1</a>&nbsp;
287 Number of sampler channels changed<br />
288 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#anchor66">7.2</a>&nbsp;
289 Number of active voices changed<br />
290 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#anchor67">7.3</a>&nbsp;
291 Number of active disk streams changed<br />
292 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#anchor68">7.4</a>&nbsp;
293 Disk stream buffer fill state changed<br />
294 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#anchor69">7.5</a>&nbsp;
295 Channel information changed<br />
296 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#anchor70">7.6</a>&nbsp;
297 Miscellaneous and debugging events<br />
298 <a href="#anchor71">8.</a>&nbsp;
299 Security Considerations<br />
300 <a href="#anchor72">9.</a>&nbsp;
301 Acknowledgments<br />
302 <a href="#rfc.references1">&#167;.</a>&nbsp;
303 References<br />
304 <a href="#rfc.authors">&#167;</a>&nbsp;
305 Author's Address<br />
306 <a href="#rfc.copyright">&#167;</a>&nbsp;
307 Intellectual Property and Copyright Statements<br />
308 </p>
309 <br clear="all" />
310
311 <a name="anchor1"></a><br /><hr />
312 <table summary="layout" cellpadding="0" cellspacing="2" class="bug" align="right"><tr><td class="bug"><a href="#toc" class="link2">&nbsp;TOC&nbsp;</a></td></tr></table>
313 <a name="rfc.section.1"></a><h3>1.&nbsp;Requirements notation</h3>
314
315 <p>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL",
316 "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY",
317 and "OPTIONAL" in this document are to be interpreted as
318 described in <a class="info" href="#RFC2119">[RFC2119]<span>Bradner, S., Key words for use in RFCs to Indicate Requirement Levels, March 1997.</span></a>.
319 </p>
320 <p>This protocol is always case-sensitive if not explicitly
321 claimed the opposite.
322 </p>
323 <p>In examples, "C:" and "S:" indicate lines sent by the client
324 (front-end) and server (LinuxSampler) respectively. Lines in
325 examples must be interpreted as every line being CRLF
326 terminated (carriage return character followed by line feed
327 character as defined in the ASCII standard), thus the following
328 example:
329 </p>
330 <p></p>
331 <blockquote class="text">
332 <p>C: "some line"
333 </p>
334 <p>&nbsp;&nbsp;&nbsp;"another line"
335 </p>
336 </blockquote>
337
338 <p>must actually be interpreted as client sending the following
339 message:
340 </p>
341 <p></p>
342 <blockquote class="text">
343 <p>"some line&lt;CR&gt;&lt;LF&gt;another
344 line&lt;CR&gt;&lt;LF&gt;"
345 </p>
346 </blockquote>
347
348 <p>where &lt;CR&gt; symbolizes the carriage return character and
349 &lt;LF&gt; the line feed character as defined in the ASCII
350 standard.
351 </p>
352 <p>Due to technical reasons, messages can arbitrary be
353 fragmented, means the following example:
354 </p>
355 <p></p>
356 <blockquote class="text">
357 <p>S: "abcd"
358 </p>
359 </blockquote>
360
361 <p>could also happen to be sent in three messages like in the
362 following sequence scenario:
363 </p>
364 <p></p>
365 <ul class="text">
366 <li>server sending message "a"
367 </li>
368 <li>followed by a delay (pause) with
369 arbitrary duration
370 </li>
371 <li>followed by server sending message
372 "bcd&lt;CR&gt;"
373 </li>
374 <li>again followed by a delay (pause) with arbitrary
375 duration
376 </li>
377 <li>followed by server sending the message
378 "&lt;LF&gt;"
379 </li>
380 </ul>
381
382 <p>where again &lt;CR&gt; and &lt;LF&gt; symbolize the carriage
383 return and line feed characters respectively.
384 </p>
385 <a name="anchor2"></a><br /><hr />
386 <table summary="layout" cellpadding="0" cellspacing="2" class="bug" align="right"><tr><td class="bug"><a href="#toc" class="link2">&nbsp;TOC&nbsp;</a></td></tr></table>
387 <a name="rfc.section.2"></a><h3>2.&nbsp;Introduction</h3>
388
389 <p>LinuxSampler is a so called software sampler application
390 capable to playback audio samples from a computer's Random
391 Access Memory (RAM) as well as directly streaming it from disk.
392 LinuxSampler is designed to be modular. It provides several so
393 called "sampler engines" where each engine is specialized for a
394 certain purpose. LinuxSampler has virtual channels which will be
395 referred in this document as "sampler channels". The channels
396 are in such way virtual as they can be connected to an
397 arbitrary MIDI input method and arbitrary MIDI channel (e.g.
398 sampler channel 17 could be connected to an Alsa sequencer
399 device 64:0 and listening to MIDI channel 1 there). Each sampler
400 engine will be assigned an own instance of one of the available
401 sampler engines (e.g. GigEngine, DLSEngine). The audio output of
402 each sampler channel can be routed to an arbitrary audio output
403 method (Alsa / Jack) and an arbitrary audio output channel
404 there.
405 </p>
406 <a name="anchor3"></a><br /><hr />
407 <table summary="layout" cellpadding="0" cellspacing="2" class="bug" align="right"><tr><td class="bug"><a href="#toc" class="link2">&nbsp;TOC&nbsp;</a></td></tr></table>
408 <a name="rfc.section.3"></a><h3>3.&nbsp;Focus of this protocol</h3>
409
410 <p>Main focus of this protocol is to provide a way to configure
411 a running LinuxSampler instance and to retrieve information
412 about it. The focus of this protocol is not to provide a way to
413 control synthesis parameters or even to trigger or release
414 notes. Or in other words; the focus are those functionalities
415 which are not covered by MIDI or which may at most be handled
416 via MIDI System Exclusive Messages.
417 </p>
418 <a name="anchor4"></a><br /><hr />
419 <table summary="layout" cellpadding="0" cellspacing="2" class="bug" align="right"><tr><td class="bug"><a href="#toc" class="link2">&nbsp;TOC&nbsp;</a></td></tr></table>
420 <a name="rfc.section.4"></a><h3>4.&nbsp;Communication Overview</h3>
421
422 <p>There are two distinct methods of communication between a
423 running instance of LinuxSampler and one or more control
424 applications, so called "front-ends": a simple request/response
425 communication method used by the clients to give commands to the
426 server as well as to inquire about server's status and a
427 subscribe/notify communication method used by the client to
428 subscribe to and receive notifications of certain events as they
429 happen on the server. The latter needs more effort to be
430 implemented in the front-end application. The two communication
431 methods will be described next.
432 </p>
433 <a name="rfc.section.4.1"></a><h4><a name="anchor5">4.1</a>&nbsp;Request/response communication method</h4>
434
435 <p>This simple communication method is based on TCP. The
436 front-end application establishes a TCP connection to the
437 LinuxSampler instance on a certain host system. Then the
438 front-end application will send certain ASCII based commands
439 as defined in this document (every command line must be CRLF
440 terminated - see "Conventions used in this document" at the
441 beginning of this document) and the LinuxSampler application
442 will response after a certain process time with an
443 appropriate ASCII based answer, also as defined in this
444 document. So this TCP communication is simply based on query
445 and answer paradigm. That way LinuxSampler is only able to
446 answer on queries from front-ends, but not able to
447 automatically send messages to the client if it's not asked
448 to. The fronted should not reconnect to LinuxSampler for
449 every single command, instead it should keep the connection
450 established and simply resend message(s) for subsequent
451 commands. To keep information in the front-end up-to-date
452 the front-end has to periodically send new requests to get
453 the current information from the LinuxSampler instance. This
454 is often referred to as "polling". While polling is simple
455 to implement and may be OK to use in some cases, there may
456 be disadvantages to polling such as network traffic overhead
457 and information being out of date.
458 It is possible for a client or several clients to open more
459 than one connection to the server at the same time. It is
460 also possible to send more than one request to the server
461 at the same time but if those requests are sent over the
462 same connection server MUST execute them sequentially. Upon
463 executing a request server will produce a result set and
464 send it to the client. Each and every request made by the
465 client MUST result in a result set being sent back to the
466 client. No other data other than a result set may be sent by
467 a server to a client. No result set may be sent to a client
468 without the client sending request to the server first. On
469 any particular connection, result sets MUST be sent in their
470 entirety without being interrupted by other result sets. If
471 several requests got queued up at the server they MUST be
472 processed in the order they were received and result sets
473 MUST be sent back in the same order.
474 </p>
475 <a name="rfc.section.4.1.1"></a><h4><a name="anchor6">4.1.1</a>&nbsp;Result format</h4>
476
477 <p>Result set could be one of the following types:
478 </p>
479 <p></p>
480 <ol class="text">
481 <li>Normal
482 </li>
483 <li>Warning
484 </li>
485 <li>Error
486 </li>
487 </ol>
488
489 <p>Warning and Error result sets MUST be single line and
490 have the following format:
491 </p>
492 <p></p>
493 <ul class="text">
494 <li>"WRN:&lt;warning-code&gt;:&lt;warning-message&gt;"
495 </li>
496 <li>"ERR:&lt;error-code&gt;:&lt;error-message&gt;"
497 </li>
498 </ul>
499
500 <p>Where &lt;warning-code&gt; and &lt;error-code&gt; are
501 numeric unique identifiers of the warning or error and
502 &lt;warning-message&gt; and &lt;error-message&gt; are
503 human readable descriptions of the warning or error
504 respectively.
505 </p>
506 <p>Normal result sets could be:
507 </p>
508 <p></p>
509 <ol class="text">
510 <li>Empty
511 </li>
512 <li>Single line
513 </li>
514 <li>Multi-line
515 </li>
516 </ol>
517
518 <p> Empty result set is issued when the server only
519 needed to acknowledge the fact that the request was
520 received and it was processed successfully and no
521 additional information is available. This result set has
522 the following format:
523 </p>
524 <p></p>
525 <blockquote class="text">
526 <p>"OK"
527 </p>
528 </blockquote>
529
530 <p>Single line result sets are command specific. One
531 example of a single line result set is an empty line.
532 Multi-line result sets are command specific and may
533 include one or more lines of information. They MUST
534 always end with the following line:
535 </p>
536 <p></p>
537 <blockquote class="text">
538 <p>"."
539 </p>
540 </blockquote>
541
542 <p>In addition to above mentioned formats, warnings and
543 empty result sets MAY be indexed. In this case, they
544 have the following formats respectively:
545 </p>
546 <p></p>
547 <ul class="text">
548 <li>"WRN[&lt;index&gt;]:&lt;warning-code&gt;:&lt;warning-message&gt;"
549 </li>
550 <li>"OK[&lt;index&gt;]"
551 </li>
552 </ul>
553
554 <p>where &lt;index&gt; is command specific and is used
555 to indicate channel number that the result set was
556 related to or other integer value.
557 </p>
558 <p>Each line of the result set MUST end with
559 &lt;CRLF&gt;.
560 </p>
561 <a name="rfc.section.4.2"></a><h4><a name="anchor7">4.2</a>&nbsp;Subscribe/notify communication method</h4>
562
563 <p>This more sophisticated communication method is actually
564 only an extension of the simple request/response
565 communication method. The front-end still uses a TCP
566 connection and sends the same commands on the TCP
567 connection. Two extra commands are SUBSCRIBE and UNSUBSCRIBE
568 commands that allow a client to tell the server that it is
569 interested in receiving notifications about certain events
570 as they happen on the server. The SUBSCRIBE command has the
571 following syntax:
572 </p>
573 <p></p>
574 <blockquote class="text">
575 <p>SUBSCRIBE &lt;event-id&gt;
576 </p>
577 </blockquote>
578
579 <p>where &lt;event-id&gt; will be replaced by the respective
580 event that client wants to subscribe to. Upon receiving such
581 request, server SHOULD respond with OK and start sending
582 EVENT notifications when a given even has occurred to the
583 front-end when an event has occurred. It MAY be possible
584 certain events may be sent before OK response during real
585 time nature of their generation. Event messages have the
586 following format:
587 </p>
588 <p></p>
589 <blockquote class="text">
590 <p>NOTIFY:&lt;event-id&gt;:&lt;custom-event-data&gt;
591 </p>
592 </blockquote>
593
594 <p>where &lt;event-id&gt; uniquely identifies the event that
595 has occurred and &lt;custom-event-data&gt; is event
596 specific.
597 </p>
598 <p>Several rules must be followed by the server when
599 generating events:
600 </p>
601 <p></p>
602 <ol class="text">
603 <li>Events MUST NOT be sent to any client who has not
604 issued an appropriate SUBSCRIBE command.
605 </li>
606 <li>Events MUST only be sent using the same
607 connection that was used to subscribe to them.
608 </li>
609 <li>When response is being sent to the client, event
610 MUST be inserted in the stream before or after the
611 response, but NOT in the middle. Same is true about
612 the response. It should never be inserted in the
613 middle of the event message as well as any other
614 response.
615 </li>
616 </ol>
617
618 <p>If the client is not interested in a particular event
619 anymore it MAY issue UNSUBSCRIBE command using the following
620 syntax:
621 </p>
622 <p></p>
623 <blockquote class="text">
624 <p>UNSUBSCRIBE &lt;event-id&gt;
625 </p>
626 </blockquote>
627
628 <p>where &lt;event-id&gt; will be replace by the respective
629 event that client is no longer interested in receiving. For
630 a list of supported events see chapter 6.
631 </p>
632 <p>Example: the fill states of disk stream buffers have
633 changed on sampler channel 4 and the LinuxSampler instance
634 will react by sending the following message to all clients
635 who subscribed to this event:
636 </p>
637 <p></p>
638 <blockquote class="text">
639 <p>NOTIFY:CHANNEL_BUFFER_FILL:4 [35]62%,[33]80%,[37]98%
640 </p>
641 </blockquote>
642
643 <p>Which means there are currently three active streams on
644 sampler channel 4, where the stream with ID "35" is filled
645 by 62%, stream with ID 33 is filled by 80% and stream with
646 ID 37 is filled by 98%.
647 </p>
648 <p>Clients may choose to open more than one connection to
649 the server and use some connections to receive notifications
650 while using other connections to issue commands to the
651 back-end. This is entirely legal and up to the
652 implementation. This does not change the protocol in any way
653 and no special restrictions exist on the server to allow or
654 disallow this or to track what connections belong to what
655 front-ends. Server will listen on a single port, accept
656 multiple connections and support protocol described in this
657 specification in it's entirety on this single port on each
658 connection that it accepted.
659 </p>
660 <p>Due to the fact that TCP is used for this communication,
661 dead peers will be detected automatically by the OS TCP
662 stack. While it may take a while to detect dead peers if no
663 traffic is being sent from server to client (TCP keep-alive
664 timer is set to 2 hours on many OSes) it will not be an
665 issue here as when notifications are sent by the server,
666 dead client will be detected quickly.
667 </p>
668 <p>When connection is closed for any reason server MUST
669 forget all subscriptions that were made on this connection.
670 If client reconnects it MUST resubscribe to all events that
671 it wants to receive.
672 </p>
673 <a name="anchor8"></a><br /><hr />
674 <table summary="layout" cellpadding="0" cellspacing="2" class="bug" align="right"><tr><td class="bug"><a href="#toc" class="link2">&nbsp;TOC&nbsp;</a></td></tr></table>
675 <a name="rfc.section.5"></a><h3>5.&nbsp;Description for control commands</h3>
676
677 <p>This chapter will describe the available control commands
678 that can be sent on the TCP connection in detail. Some certain
679 commands (e.g. "GET CHANNEL INFO" or "GET ENGINE INFO") lead to
680 multiple-line responses. In this case LinuxSampler signals the
681 end of the response by a "." (single dot) line.
682 </p>
683 <a name="rfc.section.5.1"></a><h4><a name="anchor9">5.1</a>&nbsp;Ignored lines and comments</h4>
684
685 <p>White lines, that is lines which only contain space and
686 tabulator characters, and lines that start with a "#"
687 character are ignored, thus it's possible for example to
688 group commands and to place comments in a LSCP script
689 file.
690 </p>
691 <a name="rfc.section.5.2"></a><h4><a name="anchor10">5.2</a>&nbsp;Configuring audio drivers</h4>
692
693 <p>Instances of drivers in LinuxSampler are called devices.
694 You can use multiple audio devices simultaneously, e.g. to
695 output the sound of one sampler channel using the Alsa audio
696 output driver, and on another sampler channel you might want
697 to use the Jack audio output driver. For particular audio
698 output systems it's also possible to create several devices
699 of the same audio output driver, e.g. two separate Alsa
700 audio output devices for using two different sound cards at
701 the same time. This chapter describes all commands to
702 configure LinuxSampler's audio output devices and their
703 parameters.
704 </p>
705 <p>Instead of defining commands and parameters for each
706 driver individually, all possible parameters, their meanings
707 and possible values have to be obtained at runtime. This
708 makes the protocol a bit abstract, but has the advantage,
709 that front-ends can be written independently of what drivers
710 are currently implemented and what parameters these drivers
711 are actually offering. This means front-ends can even handle
712 drivers which are implemented somewhere in future without
713 modifying the front-end at all.
714 </p>
715 <p>Note: examples in this chapter showing particular
716 parameters of drivers are not meant as specification of the
717 drivers' parameters. Driver implementations in LinuxSampler
718 might have complete different parameter names and meanings
719 than shown in these examples or might change in future, so
720 these examples are only meant for showing how to retrieve
721 what parameters drivers are offering, how to retrieve their
722 possible values, etc.
723 </p>
724 <a name="rfc.section.5.2.1"></a><h4><a name="anchor11">5.2.1</a>&nbsp;Getting all available audio output drivers</h4>
725
726 <p>Use the following command to list all audio output
727 drivers currently available for the LinuxSampler
728 instance:
729 </p>
730 <p></p>
731 <blockquote class="text">
732 <p>GET AVAILABLE_AUDIO_OUTPUT_DRIVERS
733 </p>
734 </blockquote>
735
736 <p>Possible Answers:
737 </p>
738 <p></p>
739 <blockquote class="text">
740 <p>LinuxSampler will answer by sending comma
741 separated character strings, each symbolizing an
742 audio output driver.
743 </p>
744 </blockquote>
745
746 <p>Example:
747 </p>
748 <p></p>
749 <blockquote class="text">
750 <p>C: "GET AVAILABLE_AUDIO_OUTPUT_DRIVERS"
751 </p>
752 <p>S: "Alsa,Jack"
753 </p>
754 </blockquote>
755
756 <a name="rfc.section.5.2.2"></a><h4><a name="anchor12">5.2.2</a>&nbsp;Getting information about a specific audio
757 output driver</h4>
758
759 <p>Use the following command to get detailed information
760 about a specific audio output driver:
761 </p>
762 <p></p>
763 <blockquote class="text">
764 <p>GET AUDIO_OUTPUT_DRIVER INFO
765 &lt;audio-output-driver&gt;
766 </p>
767 </blockquote>
768
769 <p>Where &lt;audio-output-driver&gt; is the name of the
770 audio output driver, returned by the "GET
771 AVAILABLE_AUDIO_OUTPUT_DRIVERS" command.
772 </p>
773 <p>Possible Answers:
774 </p>
775 <p></p>
776 <blockquote class="text">
777 <p>LinuxSampler will answer by sending a
778 &lt;CRLF&gt; separated list. Each answer line
779 begins with the information category name
780 followed by a colon and then a space character
781 &lt;SP&gt; and finally the info character string
782 to that info category. At the moment the
783 following information categories are
784 defined:
785 </p>
786 <p></p>
787 <blockquote class="text">
788 <p>DESCRIPTION -
789 </p>
790 <blockquote class="text">
791 <p> character string describing the
792 audio output driver
793 </p>
794 </blockquote>
795
796 <p>VERSION -
797 </p>
798 <blockquote class="text">
799 <p>character string reflecting the
800 driver's version
801 </p>
802 </blockquote>
803
804 <p>PARAMETERS -
805 </p>
806 <blockquote class="text">
807 <p>comma separated list of all
808 parameters available for the given
809 audio output driver, at least
810 parameters 'channels', 'samplerate'
811 and 'active' are offered by all audio
812 output drivers
813 </p>
814 </blockquote>
815
816 </blockquote>
817
818 <p>The mentioned fields above don't have to be
819 in particular order.
820 </p>
821 </blockquote>
822
823 <p>Example:
824 </p>
825 <p></p>
826 <blockquote class="text">
827 <p>C: "GET AUDIO_OUTPUT_DRIVER INFO Alsa"
828 </p>
829 <p>S: "DESCRIPTION: Advanced Linux Sound
830 Architecture"
831 </p>
832 <p>&nbsp;&nbsp;&nbsp;"VERSION: 1.0"
833 </p>
834 <p>&nbsp;&nbsp;&nbsp;"PARAMETERS:
835 driver,channels,samplerate,active,fragments,
836 fragmentsize,card"
837 </p>
838 <p>&nbsp;&nbsp;&nbsp;"."
839 </p>
840 </blockquote>
841
842 <a name="rfc.section.5.2.3"></a><h4><a name="anchor13">5.2.3</a>&nbsp;Getting information about specific audio
843 output driver parameter</h4>
844
845 <p>Use the following command to get detailed information
846 about a specific audio output driver parameter:
847 </p>
848 <p></p>
849 <blockquote class="text">
850 <p>GET AUDIO_OUTPUT_DRIVER_PARAMETER INFO &lt;audio&gt; &lt;prm&gt; [&lt;deplist&gt;]
851 </p>
852 </blockquote>
853
854 <p>Where &lt;audio&gt; is the name of the audio output
855 driver as returned by the "GET AVAILABLE_AUDIO_OUTPUT_DRIVERS" command,
856 &lt;prm&gt; a specific parameter name for which information should be
857 obtained (as returned by the "GET AUDIO_OUTPUT_DRIVER INFO" command) and
858 &lt;deplist&gt; is an optional list of parameters on which the sought
859 parameter &lt;prm&gt; depends on, &lt;deplist&gt; is a list of key-value
860 pairs in form of "key1=val1 key2=val2 ...", where character string values
861 are encapsulated into apostrophes ('). Arguments given with &lt;deplist&gt;
862 which are not dependency parameters of &lt;prm&gt; will be ignored, means
863 the front-end application can simply put all parameters into &lt;deplist&gt;
864 with the values already selected by the user.
865 </p>
866 <p>Possible Answers:
867 </p>
868 <p></p>
869 <blockquote class="text">
870 <p>LinuxSampler will answer by sending a
871 &lz;CRLF&gt; separated list.
872 Each answer line begins with the information category name
873 followed by a colon and then a space character &lt;SP&gt; and
874 finally
875 the info character string to that info category. There are
876 information which is always returned, independently of the
877 given driver parameter and there are optional information
878 which is only shown dependently to given driver parameter. At
879 the moment the following information categories are defined:
880 </p>
881 </blockquote>
882
883 <p></p>
884 <blockquote class="text">
885 <p>TYPE -
886 </p>
887 <blockquote class="text">
888 <p>either "BOOL" for boolean value(s) or
889 "INT" for integer
890 value(s) or "FLOAT" for dotted number(s) or "STRING" for
891 character string(s)
892 (always returned, no matter which driver parameter)
893 </p>
894 </blockquote>
895
896 <p>DESCRIPTION -
897 </p>
898 <blockquote class="text">
899 <p>arbitrary text describing the purpose of the parameter
900 (always returned, no matter which driver parameter)
901 </p>
902 </blockquote>
903
904 <p>MANDATORY -
905 </p>
906 <blockquote class="text">
907 <p>either true or false, defines if this parameter must be
908 given when the device is to be created with the
909 'CREATE AUDIO_OUTPUT_DEVICE' command
910 (always returned, no matter which driver parameter)
911 </p>
912 </blockquote>
913
914 <p>FIX -
915 </p>
916 <blockquote class="text">
917 <p>either true or false, if false then this parameter can
918 be changed at any time, once the device is created by
919 the 'CREATE AUDIO_OUTPUT_DEVICE' command
920 (always returned, no matter which driver parameter)
921 </p>
922 </blockquote>
923
924 <p>MULTIPLICITY -
925 </p>
926 <blockquote class="text">
927 <p>either true or false, defines if this parameter allows
928 only one value or a list of values, where true means
929 multiple values and false only a single value allowed
930 (always returned, no matter which driver parameter)
931 </p>
932 </blockquote>
933
934 <p>DEPENDS -
935 </p>
936 <blockquote class="text">
937 <p>comma separated list of paramters this parameter depends
938 on, means the values for fields 'DEFAULT', 'RANGE_MIN',
939 'RANGE_MAX' and 'POSSIBILITIES' might depend on these
940 listed parameters, for example assuming that an audio
941 driver (like the Alsa driver) offers parameters 'card'
942 and 'samplerate' then parameter 'samplerate' would
943 depend on 'card' because the possible values for
944 'samplerate' depends on the sound card which can be
945 chosen by the 'card' parameter
946 (optionally returned, dependent to driver parameter)
947 </p>
948 </blockquote>
949
950 <p>DEFAULT -
951 </p>
952 <blockquote class="text">
953 <p>reflects the default value for this parameter which is
954 used when the device is created and not explicitly
955 given with the 'CREATE AUDIO_OUTPUT_DEVICE' command,
956 in case of MULTIPLCITY=true, this is a comma separated
957 list, that's why character strings are encapsulated into
958 apostrophes (')
959 (optionally returned, dependent to driver parameter)
960 </p>
961 </blockquote>
962
963 <p>RANGE_MIN -
964 </p>
965 <blockquote class="text">
966 <p>defines lower limit of the allowed value range for this
967 parameter, can be an integer value as well as a dotted
968 number, this parameter is often used in conjunction
969 with RANGE_MAX, but may also appear without
970 (optionally returned, dependent to driver parameter)
971 </p>
972 </blockquote>
973
974 <p>RANGE_MAX -
975 </p>
976 <blockquote class="text">
977 <p>defines upper limit of the allowed value range for this
978 parameter, can be an integer value as well as a dotted
979 number, this parameter is often used in conjunction with
980 RANGE_MIN, but may also appear without
981 (optionally returned, dependent to driver parameter)
982 </p>
983 </blockquote>
984
985 <p>POSSIBILITES -
986 </p>
987 <blockquote class="text">
988 <p>comma separated list of possible values for this
989 parameter, character strings are encapsulated into
990 apostrophes
991 (optionally returned, dependent to driver parameter)
992 </p>
993 </blockquote>
994
995 </blockquote>
996
997 <p>The mentioned fields above don't have to be in particular order.
998 </p>
999 <p>Examples:
1000 </p>
1001 <p></p>
1002 <blockquote class="text">
1003 <p>C: "GET AUDIO_OUTPUT_DRIVER_PARAMETER INFO Alsa card"
1004 </p>
1005 <p>S: "DESCRIPTION: sound card to be used"
1006 </p>
1007 <p>&nbsp;&nbsp;&nbsp;"TYPE: STRING"
1008 </p>
1009 <p>&nbsp;&nbsp;&nbsp;"MANDATORY: false"
1010 </p>
1011 <p>&nbsp;&nbsp;&nbsp;"FIX: true"
1012 </p>
1013 <p>&nbsp;&nbsp;&nbsp;"MULTIPLICITY: false"
1014 </p>
1015 <p>&nbsp;&nbsp;&nbsp;"DEFAULT: '0,0'"
1016 </p>
1017 <p>&nbsp;&nbsp;&nbsp;"POSSIBILITES: '0,0','1,0','2,0'"
1018 </p>
1019 <p>&nbsp;&nbsp;&nbsp;"."
1020 </p>
1021 </blockquote>
1022
1023 <p></p>
1024 <blockquote class="text">
1025 <p>C: "GET AUDIO_OUTPUT_DRIVER_PARAMETER INFO Alsa samplerate"
1026 </p>
1027 <p>S: "DESCRIPTION: output sample rate in Hz"
1028 </p>
1029 <p>&nbsp;&nbsp;&nbsp;"TYPE: INT"
1030 </p>
1031 <p>&nbsp;&nbsp;&nbsp;"MANDATORY: false"
1032 </p>
1033 <p>&nbsp;&nbsp;&nbsp;"FIX: false"
1034 </p>
1035 <p>&nbsp;&nbsp;&nbsp;"MULTIPLICITY: false"
1036 </p>
1037 <p>&nbsp;&nbsp;&nbsp;"DEPENDS: card"
1038 </p>
1039 <p>&nbsp;&nbsp;&nbsp;"DEFAULT: 44100"
1040 </p>
1041 <p>&nbsp;&nbsp;&nbsp;"."
1042 </p>
1043 </blockquote>
1044
1045 <p></p>
1046 <blockquote class="text">
1047 <p>C: "GET AUDIO_OUTPUT_DRIVER_PARAMETER INFO Alsa samplerate card='0,0'"
1048 </p>
1049 <p>S: "DESCRIPTION: output sample rate in Hz"
1050 </p>
1051 <p>&nbsp;&nbsp;&nbsp;"TYPE: INT"
1052 </p>
1053 <p>&nbsp;&nbsp;&nbsp;"MANDATORY: false"
1054 </p>
1055 <p>&nbsp;&nbsp;&nbsp;"FIX: false"
1056 </p>
1057 <p>&nbsp;&nbsp;&nbsp;"MULTIPLICITY: false"
1058 </p>
1059 <p>&nbsp;&nbsp;&nbsp;"DEPENDS: card"
1060 </p>
1061 <p>&nbsp;&nbsp;&nbsp;"DEFAULT: 44100"
1062 </p>
1063 <p>&nbsp;&nbsp;&nbsp;"RANGE_MIN: 22050"
1064 </p>
1065 <p>&nbsp;&nbsp;&nbsp;"RANGE_MAX: 96000"
1066 </p>
1067 <p>&nbsp;&nbsp;&nbsp;"."
1068 </p>
1069 </blockquote>
1070
1071 <a name="rfc.section.5.2.4"></a><h4><a name="anchor14">5.2.4</a>&nbsp;Creating an audio output device</h4>
1072
1073 <p>Use the following command to create a new audio output device for the desired audio output system:
1074 </p>
1075 <p></p>
1076 <blockquote class="text">
1077 <p>CREATE AUDIO_OUTPUT_DEVICE &lt;audio-output-driver&gt; [&lt;param-list&gt;]
1078 </p>
1079 </blockquote>
1080
1081 <p>Where &lt;audio-output-driver&gt; should be replaced by the desired audio
1082 output system and &lt;param-list&gt; by an optional list of driver
1083 specific parameters in form of "key1=val1 key2=val2 ...", where
1084 character string values should be encapsulated into apostrophes (').
1085 Note that there might be drivers which require parameter(s) to be
1086 given with this command. Use the previously described commands in
1087 this chapter to get this information.
1088 </p>
1089 <p>Possible Answers:
1090 </p>
1091 <p></p>
1092 <blockquote class="text">
1093 <p>"OK[&lt;device-id&gt;]" -
1094 </p>
1095 <blockquote class="text">
1096 <p>in case the device was successfully created, where
1097 &lt;device-id&gt; is the numerical ID of the new device
1098 </p>
1099 </blockquote>
1100
1101 <p>"WRN[&lt;device-id&gt;]:&lt;warning-code&gt;:&lt;warning-message&gt;" -
1102 </p>
1103 <blockquote class="text">
1104 <p>in case the device was created successfully, where
1105 &lt;device-id&gt; is the numerical ID of the new device, but there
1106 are noteworthy issue(s) related (e.g. sound card doesn't
1107 support given hardware parameters and the driver is using
1108 fall-back values), providing an appropriate warning code and
1109 warning message
1110 </p>
1111 </blockquote>
1112
1113 <p>"ERR:&lt;error-code&gt;:&lt;error-message&gt;" -
1114 </p>
1115 <blockquote class="text">
1116 <p>in case it failed, providing an appropriate error code and error message
1117 </p>
1118 </blockquote>
1119
1120 </blockquote>
1121
1122 <p>Examples:
1123 </p>
1124 <p></p>
1125 <blockquote class="text">
1126 <p>C: "CREATE AUDIO_OUTPUT_DEVICE Alsa"
1127 </p>
1128 <p>S: "OK[0]"
1129 </p>
1130 </blockquote>
1131
1132 <p></p>
1133 <blockquote class="text">
1134 <p>C: "CREATE AUDIO_OUTPUT_DEVICE Alsa card='2,0' samplerate=96000"
1135 </p>
1136 <p>S: "OK[1]"
1137 </p>
1138 </blockquote>
1139
1140 <a name="rfc.section.5.2.5"></a><h4><a name="anchor15">5.2.5</a>&nbsp;Destroying an audio output device</h4>
1141
1142 <p>Use the following command to destroy a created output device:
1143 </p>
1144 <p></p>
1145 <blockquote class="text">
1146 <p>DESTROY AUDIO_OUTPUT_DEVICE &lt;device-id&gt;
1147 </p>
1148 </blockquote>
1149
1150 <p>Where &lt;device-id&gt; should be replaced by the numerical ID of the
1151 audio output device as given by the "CREATE AUDIO_OUTPUT_DEVICE" or
1152 "GET AUDIO_OUTPUT_DEVICES" command.
1153 </p>
1154 <p>Possible Answers:
1155 </p>
1156 <p></p>
1157 <blockquote class="text">
1158 <p>"OK" -
1159 </p>
1160 <blockquote class="text">
1161 <p>in case the device was successfully destroyed
1162 </p>
1163 </blockquote>
1164
1165 <p>"WRN:&lt;warning-code&gt;:&lt;warning-message&gt;" -
1166 </p>
1167 <blockquote class="text">
1168 <p>in case the device was destroyed successfully, but there are
1169 noteworthy issue(s) related (e.g. an audio over ethernet
1170 driver was unloaded but the other host might not be
1171 informed about this situation), providing an appropriate
1172 warning code and warning message
1173 </p>
1174 </blockquote>
1175
1176 <p>"ERR:&lt;error-code&gt;:&lt;error-message&gt;" -
1177 </p>
1178 <blockquote class="text">
1179 <p>in case it failed, providing an appropriate error code and
1180 error message
1181 </p>
1182 </blockquote>
1183
1184 </blockquote>
1185
1186 <p>Example:
1187 </p>
1188 <p></p>
1189 <blockquote class="text">
1190 <p>C: "DESTROY AUDIO_OUTPUT_DEVICE 0"
1191 </p>
1192 <p>S: "OK"
1193 </p>
1194 </blockquote>
1195
1196 <a name="rfc.section.5.2.6"></a><h4><a name="anchor16">5.2.6</a>&nbsp;Getting all created audio output device count</h4>
1197
1198 <p>Use the following command to count all created audio output devices:
1199 </p>
1200 <p></p>
1201 <blockquote class="text">
1202 <p>GET AUDIO_OUTPUT_DEVICES
1203 </p>
1204 </blockquote>
1205
1206 <p>Possible Answers:
1207 </p>
1208 <p></p>
1209 <blockquote class="text">
1210 <p>LinuxSampler will answer by sending the current number of all
1211 audio output devices.
1212 </p>
1213 </blockquote>
1214
1215 <p>Example:
1216 </p>
1217 <p></p>
1218 <blockquote class="text">
1219 <p>C: "GET AUDIO_OUTPUT_DEVICES"
1220 </p>
1221 <p>S: "4"
1222 </p>
1223 </blockquote>
1224
1225 <a name="rfc.section.5.2.7"></a><h4><a name="anchor17">5.2.7</a>&nbsp;Getting all created audio output device list</h4>
1226
1227 <p>Use the following command to list all created audio output devices:
1228 </p>
1229 <p></p>
1230 <blockquote class="text">
1231 <p>LIST AUDIO_OUTPUT_DEVICES
1232 </p>
1233 </blockquote>
1234
1235 <p>Possible Answers:
1236 </p>
1237 <p></p>
1238 <blockquote class="text">
1239 <p>LinuxSampler will answer by sending a comma separated list with
1240 the numerical IDs of all audio output devices.
1241 </p>
1242 </blockquote>
1243
1244 <p>Example:
1245 </p>
1246 <p></p>
1247 <blockquote class="text">
1248 <p>C: "LIST AUDIO_OUTPUT_DEVICES"
1249 </p>
1250 <p>S: "0,1,4,5"
1251 </p>
1252 </blockquote>
1253
1254 <a name="rfc.section.5.2.8"></a><h4><a name="anchor18">5.2.8</a>&nbsp;Getting current settings of an audio output device</h4>
1255
1256 <p>Use the following command to get current settings of a specific, created audio output device:
1257 </p>
1258 <p></p>
1259 <blockquote class="text">
1260 <p>GET AUDIO_OUTPUT_DEVICE INFO &lt;device-id&gt;
1261 </p>
1262 </blockquote>
1263
1264 <p>Where &lt;device-id&gt; should be replaced by be numerical ID
1265 of the audio output device as e.g. returned by the
1266 "GET AUDIO_OUTPUT_DEVICES" command.
1267 </p>
1268 <p>Possible Answers:
1269 </p>
1270 <p>LinuxSampler will answer by sending a &lt;CRLF&gt; separated list.
1271 Each answer line begins with the information category name
1272 followed by a colon and then a space character &lt;SP&gt; and finally
1273 the info character string to that info category. As some
1274 parameters might allow multiple values, character strings are
1275 encapsulated into apostrophes ('). At the moment the following
1276 information categories are defined (independently of device):
1277 </p>
1278 <p></p>
1279 <blockquote class="text">
1280 <p>driver -
1281 </p>
1282 <blockquote class="text">
1283 <p>identifier of the used audio output driver, as also
1284 returned by the "GET AVAILABLE_AUDIO_OUTPUT_DRIVERS"
1285 command
1286 </p>
1287 </blockquote>
1288
1289 <p>channels -
1290 </p>
1291 <blockquote class="text">
1292 <p>amount of audio output channels this device currently
1293 offers
1294 </p>
1295 </blockquote>
1296
1297 <p>samplerate -
1298 </p>
1299 <blockquote class="text">
1300 <p>playback sample rate the device uses
1301 </p>
1302 </blockquote>
1303
1304 <p>active -
1305 </p>
1306 <blockquote class="text">
1307 <p>either true or false, if false then the audio device is
1308 inactive and doesn't output any sound, nor do the
1309 sampler channels connected to this audio device render
1310 any audio
1311 </p>
1312 </blockquote>
1313
1314 </blockquote>
1315
1316 <p>The mentioned fields above don't have to be in particular
1317 order. The fields above are only those fields which are
1318 returned by all audio output devices. Every audio output driver
1319 might have its own, additional driver specific parameters (see
1320 "GET AUDIO_OUTPUT_DRIVER INFO" command) which are also returned
1321 by this command.
1322 </p>
1323 <p>Example:
1324 </p>
1325 <p></p>
1326 <blockquote class="text">
1327 <p>C: "GET AUDIO_OUTPUT_DEVICE INFO 0"
1328 </p>
1329 <p>S: "driver: Alsa"
1330 </p>
1331 <p>&nbsp;&nbsp;&nbsp;"channels: 2"
1332 </p>
1333 <p>&nbsp;&nbsp;&nbsp;"samplerate: 44100"
1334 </p>
1335 <p>&nbsp;&nbsp;&nbsp;"active: true"
1336 </p>
1337 <p>&nbsp;&nbsp;&nbsp;"fragments: 2"
1338 </p>
1339 <p>&nbsp;&nbsp;&nbsp;"fragmentsize: 128"
1340 </p>
1341 <p>&nbsp;&nbsp;&nbsp;"card: '0,0'"
1342 </p>
1343 <p>&nbsp;&nbsp;&nbsp;"."
1344 </p>
1345 </blockquote>
1346
1347 <a name="rfc.section.5.2.9"></a><h4><a name="anchor19">5.2.9</a>&nbsp;Changing settings of audio output devices</h4>
1348
1349 <p>Use the following command to alter a specific setting of a created audio output device:
1350 </p>
1351 <p></p>
1352 <blockquote class="text">
1353 <p>SET AUDIO_OUTPUT_DEVICE_PARAMETER &lt;device-id&gt; &lt;key&gt;=&lt;value&gt;
1354 </p>
1355 </blockquote>
1356
1357 <p>Where &lt;device-id&gt; should be replaced by the numerical ID of the
1358 audio output device, &lt;key&gt; by the name of the parameter to change
1359 and &lt;value&gt; by the new value for this parameter.
1360 </p>
1361 <p>Possible Answers:
1362 </p>
1363 <p></p>
1364 <blockquote class="text">
1365 <p>"OK" -
1366 </p>
1367 <blockquote class="text">
1368 <p>in case setting was successfully changed
1369 </p>
1370 </blockquote>
1371
1372 <p>"WRN:&lt;warning-code&gt;:&lt;warning-message&gt;" -
1373 </p>
1374 <blockquote class="text">
1375 <p>in case setting was changed successfully, but there are
1376 noteworthy issue(s) related, providing an appropriate
1377 warning code and warning message
1378 </p>
1379 </blockquote>
1380
1381 <p>"ERR:&lt;error-code&gt;:&lt;error-message&gt;" -
1382 </p>
1383 <blockquote class="text">
1384 <p>in case it failed, providing an appropriate error code and
1385 error message
1386 </p>
1387 </blockquote>
1388
1389 </blockquote>
1390
1391 <p>Example:
1392 </p>
1393 <p></p>
1394 <blockquote class="text">
1395 <p>C: "SET AUDIO_OUTPUT_DEVICE_PARAMETER 0 fragmentsize=128"
1396 </p>
1397 <p>S: "OK"
1398 </p>
1399 </blockquote>
1400
1401 <a name="rfc.section.5.2.10"></a><h4><a name="anchor20">5.2.10</a>&nbsp;Getting information about an audio channel</h4>
1402
1403 <p>Use the following command to get information about an audio channel:
1404 </p>
1405 <p></p>
1406 <blockquote class="text">
1407 <p>GET AUDIO_OUTPUT_CHANNEL INFO &lt;device-id&gt; &lt;audio-chan&gt;
1408 </p>
1409 </blockquote>
1410
1411 <p>Where &lt;device-id&gt; is the numerical ID of the audio output device
1412 and &lt;audio-chan&gt; the audio channel number.
1413 </p>
1414 <p>Possible Answers:
1415 </p>
1416 <p></p>
1417 <blockquote class="text">
1418 <p>LinuxSampler will answer by sending a &lt;CRLF&gt; separated list.
1419 Each answer line begins with the information category name
1420 followed by a colon and then a space character &lt;SP&gt; and finally
1421 the info character string to that info category. At the moment
1422 the following information categories are defined:
1423 </p>
1424 <p></p>
1425 <blockquote class="text">
1426 <p>NAME -
1427 </p>
1428 <blockquote class="text">
1429 <p>arbitrary character string naming the channel, which
1430 doesn't have to be unique (always returned by all audio channels)
1431 </p>
1432 </blockquote>
1433
1434 <p>IS_MIX_CHANNEL -
1435 </p>
1436 <blockquote class="text">
1437 <p>either true or false, a mix-channel is not a real,
1438 independent audio channel, but a virtual channel which
1439 is mixed to another real channel, this mechanism is
1440 needed for sampler engines which need more audio
1441 channels than the used audio system might be able to offer
1442 (always returned by all audio channels)
1443 </p>
1444 </blockquote>
1445
1446 <p>MIX_CHANNEL_DESTINATION -
1447 </p>
1448 <blockquote class="text">
1449 <p>reflects the real audio channel (of the same audio
1450 output device) this mix channel refers to, means where
1451 the audio signal actually will be routed / added to
1452 (only returned in case the audio channel is mix channel)
1453 </p>
1454 </blockquote>
1455
1456 </blockquote>
1457
1458 </blockquote>
1459
1460 <p>The mentioned fields above don't have to be in particular
1461 order. The fields above are only those fields which are
1462 generally returned for the described cases by all audio
1463 channels regardless of the audio driver. Every audio channel
1464 might have its own, additional driver and channel specific
1465 parameters.
1466 </p>
1467 <p>Examples:
1468 </p>
1469 <p></p>
1470 <blockquote class="text">
1471 <p>C: "GET AUDIO_OUTPUT_CHANNEL INFO 0 0"
1472 </p>
1473 <p>S: "NAME: studio monitor left"
1474 </p>
1475 <p>&nbsp;&nbsp;&nbsp;"IS_MIX_CHANNEL: false"
1476 </p>
1477 <p>&nbsp;&nbsp;&nbsp;"."
1478 </p>
1479 </blockquote>
1480
1481 <p></p>
1482 <blockquote class="text">
1483 <p>C: "GET AUDIO_OUTPUT_CHANNEL INFO 0 1"
1484 </p>
1485 <p>S: "NAME: studio monitor right"
1486 </p>
1487 <p>&nbsp;&nbsp;&nbsp;"IS_MIX_CHANNEL: false"
1488 </p>
1489 <p>&nbsp;&nbsp;&nbsp;"."
1490 </p>
1491 </blockquote>
1492
1493 <p></p>
1494 <blockquote class="text">
1495 <p>C: "GET AUDIO_OUTPUT_CHANNEL INFO 0 2"
1496 </p>
1497 <p>S: "NAME: studio monitor left"
1498 </p>
1499 <p>&nbsp;&nbsp;&nbsp;"IS_MIX_CHANNEL: true"
1500 </p>
1501 <p>&nbsp;&nbsp;&nbsp;"MIX_CHANNEL_DESTINATION: 1"
1502 </p>
1503 <p>&nbsp;&nbsp;&nbsp;"."
1504 </p>
1505 </blockquote>
1506
1507 <p></p>
1508 <blockquote class="text">
1509 <p>C: "GET AUDIO_OUTPUT_CHANNEL INFO 1 0"
1510 </p>
1511 <p>S: "NAME: 'ardour (left)'"
1512 </p>
1513 <p>&nbsp;&nbsp;&nbsp;"IS_MIX_CHANNEL: false"
1514 </p>
1515 <p>&nbsp;&nbsp;&nbsp;"jack_bindings: 'ardour:0'"
1516 </p>
1517 <p>&nbsp;&nbsp;&nbsp;"."
1518 </p>
1519 </blockquote>
1520
1521 <a name="rfc.section.5.2.11"></a><h4><a name="anchor21">5.2.11</a>&nbsp;Getting information about specific audio channel parameter</h4>
1522
1523 <p>Use the following command to get detailed information about specific audio channel parameter:
1524 </p>
1525 <p></p>
1526 <blockquote class="text">
1527 <p>GET AUDIO_OUTPUT_CHANNEL_PARAMETER INFO &lt;dev-id&gt; &lt;chan&gt; &lt;param&gt;
1528 </p>
1529 </blockquote>
1530
1531 <p>Where &lt;dev-id&gt; is the numerical ID of the audio output device as returned
1532 by the "GET AUDIO_OUTPUT_DEVICES" command, &lt;chan&gt; the audio channel number
1533 and &lt;param&gt; a specific channel parameter name for which information should
1534 be obtained (as returned by the "GET AUDIO_OUTPUT_CHANNEL INFO" command).
1535 </p>
1536 <p>Possible Answers:
1537 </p>
1538 <p></p>
1539 <blockquote class="text">
1540 <p>LinuxSampler will answer by sending a &lt;CRLF&gt; separated list.
1541 Each answer line begins with the information category name
1542 followed by a colon and then a space character &lt;SP&gt; and finally
1543 the info character string to that info category. There are
1544 information which is always returned, independently of the
1545 given channel parameter and there is optional information
1546 which is only shown dependently to the given audio channel. At
1547 the moment the following information categories are defined:
1548 </p>
1549 <p></p>
1550 <blockquote class="text">
1551 <p>TYPE -
1552 </p>
1553 <blockquote class="text">
1554 <p>either "BOOL" for boolean value(s) or "INT" for integer
1555 value(s) or "FLOAT" for dotted number(s) or "STRING" for
1556 character string(s)
1557 (always returned)
1558 </p>
1559 </blockquote>
1560
1561 <p>DESCRIPTION -
1562 </p>
1563 <blockquote class="text">
1564 <p>arbitrary text describing the purpose of the parameter (always returned)
1565 </p>
1566 </blockquote>
1567
1568 <p>FIX -
1569 </p>
1570 <blockquote class="text">
1571 <p>either true or false, if true then this parameter is
1572 read only, thus cannot be altered
1573 (always returned)
1574 </p>
1575 </blockquote>
1576
1577 <p>MULTIPLICITY -
1578 </p>
1579 <blockquote class="text">
1580 <p>either true or false, defines if this parameter allows
1581 only one value or a list of values, where true means
1582 multiple values and false only a single value allowed
1583 (always returned)
1584 </p>
1585 </blockquote>
1586
1587 <p>RANGE_MIN -
1588 </p>
1589 <blockquote class="text">
1590 <p>defines lower limit of the allowed value range for this
1591 parameter, can be an integer value as well as a dotted
1592 number, usually used in conjunction with 'RANGE_MAX',
1593 but may also appear without
1594 (optionally returned, dependent to driver and channel
1595 parameter)
1596 </p>
1597 </blockquote>
1598
1599 <p>RANGE_MAX -
1600 </p>
1601 <blockquote class="text">
1602 <p>defines upper limit of the allowed value range for this
1603 parameter, can be an integer value as well as a dotted
1604 number, usually used in conjunction with 'RANGE_MIN',
1605 but may also appear without
1606 (optionally returned, dependent to driver and channel
1607 parameter)
1608 </p>
1609 </blockquote>
1610
1611 <p>POSSIBILITES -
1612 </p>
1613 <blockquote class="text">
1614 <p>comma separated list of possible values for this
1615 parameter, character strings are encapsulated into
1616 apostrophes
1617 (optionally returned, dependent to driver and channel
1618 parameter)
1619 </p>
1620 </blockquote>
1621
1622 </blockquote>
1623
1624 <p>The mentioned fields above don't have to be in particular order.
1625 </p>
1626 </blockquote>
1627
1628 <p>Example:
1629 </p>
1630 <p></p>
1631 <blockquote class="text">
1632 <p>C: "GET AUDIO_OUTPUT_CHANNEL_PARAMETER INFO 1 0 jack_bindings"
1633 </p>
1634 <p>S: "DESCRIPTION: bindings to other Jack clients"
1635 </p>
1636 <p>&nbsp;&nbsp;&nbsp;"TYPE: STRING"
1637 </p>
1638 <p>&nbsp;&nbsp;&nbsp;"FIX: false"
1639 </p>
1640 <p>&nbsp;&nbsp;&nbsp;"MULTIPLICITY: true"
1641 </p>
1642 <p>&nbsp;&nbsp;&nbsp;"POSSIBILITES: 'PCM:0','PCM:1','ardour:0','ardour:1'"
1643 </p>
1644 <p>&nbsp;&nbsp;&nbsp;"."
1645 </p>
1646 </blockquote>
1647
1648 <a name="rfc.section.5.2.12"></a><h4><a name="anchor22">5.2.12</a>&nbsp;Changing settings of audio output channels</h4>
1649
1650 <p>Use the following command to alter a specific setting of an audio output channel:
1651 </p>
1652 <p></p>
1653 <blockquote class="text">
1654 <p>SET AUDIO_OUTPUT_CHANNEL_PARAMETER &lt;dev-id&gt; &lt;chn&gt; &lt;key&gt;=&lt;value&gt;
1655 </p>
1656 </blockquote>
1657
1658 <p>Where &lt;dev-id&gt; should be replaced by the numerical ID of the audio
1659 device, &lt;chn&gt; by the audio channel number, &lt;key&gt; by the name of the
1660 parameter to change and &lt;value&gt; by the new value for this parameter.
1661 </p>
1662 <p>Possible Answers:
1663 </p>
1664 <p></p>
1665 <blockquote class="text">
1666 <p>"OK" -
1667 </p>
1668 <blockquote class="text">
1669 <p>in case setting was successfully changed
1670 </p>
1671 </blockquote>
1672
1673 <p>"WRN:&lt;warning-code&gt;:&lt;warning-message&gt;" -
1674 </p>
1675 <blockquote class="text">
1676 <p>in case setting was changed successfully, but there are
1677 noteworthy issue(s) related, providing an appropriate
1678 warning code and warning message
1679 </p>
1680 </blockquote>
1681
1682 <p>"ERR:&lt;error-code&gt;:&lt;error-message&gt;" -
1683 </p>
1684 <blockquote class="text">
1685 <p>in case it failed, providing an appropriate error code and
1686 error message
1687 </p>
1688 </blockquote>
1689
1690 </blockquote>
1691
1692 <p>Example:
1693 </p>
1694 <p></p>
1695 <blockquote class="text">
1696 <p>C: "SET AUDIO_OUTPUT_CHANNEL PARAMETER 0 0 jack_bindings='PCM:0'"
1697 </p>
1698 <p>S: "OK"
1699 </p>
1700 </blockquote>
1701
1702 <p></p>
1703 <blockquote class="text">
1704 <p>C: "SET AUDIO_OUTPUT_CHANNEL PARAMETER 0 0 NAME='monitor left'"
1705 </p>
1706 <p>S: "OK"
1707 </p>
1708 </blockquote>
1709
1710 <a name="rfc.section.5.3"></a><h4><a name="anchor23">5.3</a>&nbsp;Configuring MIDI input drivers</h4>
1711
1712 <p>Instances of drivers in LinuxSampler are called devices. You can use
1713 multiple MIDI devices simultaneously, e.g. to use MIDI over ethernet as
1714 MIDI input on one sampler channel and Alsa as MIDI input on another sampler
1715 channel. For particular MIDI input systems it's also possible to create
1716 several devices of the same MIDI input type. This chapter describes all
1717 commands to configure LinuxSampler's MIDI input devices and their parameters.
1718 </p>
1719 <p>Instead of defining commands and parameters for each driver individually,
1720 all possible parameters, their meanings and possible values have to be obtained
1721 at runtime. This makes the protocol a bit abstract, but has the advantage, that
1722 front-ends can be written independently of what drivers are currently implemented
1723 and what parameters these drivers are actually offering. This means front-ends can
1724 even handle drivers which are implemented somewhere in future without modifying
1725 the front-end at all.
1726 </p>
1727 <p>Commands for configuring MIDI input devices are pretty much the same as the
1728 commands for configuring audio output drivers, already described in the last
1729 chapter.
1730 </p>
1731 <p>Note: examples in this chapter showing particular parameters of drivers are
1732 not meant as specification of the drivers' parameters. Driver implementations in
1733 LinuxSampler might have complete different parameter names and meanings than shown
1734 in these examples or might change in future, so these examples are only meant for
1735 showing how to retrieve what parameters drivers are offering, how to retrieve their
1736 possible values, etc.
1737 </p>
1738 <a name="rfc.section.5.3.1"></a><h4><a name="anchor24">5.3.1</a>&nbsp;Getting all available MIDI input drivers</h4>
1739
1740 <p>Use the following command to list all MIDI input drivers currently available
1741 for the LinuxSampler instance:
1742 </p>
1743 <p></p>
1744 <blockquote class="text">
1745 <p>GET AVAILABLE_MIDI_INPUT_DRIVERS
1746 </p>
1747 </blockquote>
1748
1749 <p>Possible Answers:
1750 </p>
1751 <p></p>
1752 <blockquote class="text">
1753 <p>LinuxSampler will answer by sending comma separated character
1754 strings, each symbolizing a MIDI input driver.
1755 </p>
1756 </blockquote>
1757
1758 <p>Example:
1759 </p>
1760 <p></p>
1761 <blockquote class="text">
1762 <p>C: "GET AVAILABLE_MIDI_INPUT_DRIVERS"
1763 </p>
1764 <p>S: "Alsa,Jack"
1765 </p>
1766 </blockquote>
1767
1768 <a name="rfc.section.5.3.2"></a><h4><a name="anchor25">5.3.2</a>&nbsp;Getting information about a specific MIDI input driver</h4>
1769
1770 <p>Use the following command to get detailed information about a specific MIDI input driver:
1771 </p>
1772 <p></p>
1773 <blockquote class="text">
1774 <p>GET MIDI_INPUT_DRIVER INFO &lt;midi-input-driver&gt;
1775 </p>
1776 </blockquote>
1777
1778 <p>Where &lt;midi-input-driver&gt; is the name of the MIDI input driver.
1779 </p>
1780 <p>Possible Answers:
1781 </p>
1782 <p></p>
1783 <blockquote class="text">
1784 <p>LinuxSampler will answer by sending a &lt;CRLF&gt; separated list.
1785 Each answer line begins with the information category name
1786 followed by a colon and then a space character &lt;SP&gt; and finally
1787 the info character string to that info category. At the moment
1788 the following information categories are defined:
1789 </p>
1790 <p></p>
1791 <blockquote class="text">
1792 <p>DESCRIPTION -
1793 </p>
1794 <blockquote class="text">
1795 <p>arbitrary description text about the MIDI input driver
1796 </p>
1797 </blockquote>
1798
1799 <p>VERSION -
1800 </p>
1801 <blockquote class="text">
1802 <p>arbitrary character string regarding the driver's version
1803 </p>
1804 </blockquote>
1805
1806 <p>PARAMETERS -
1807 </p>
1808 <blockquote class="text">
1809 <p>comma separated list of all parameters available for the given MIDI input driver
1810 </p>
1811 </blockquote>
1812
1813 </blockquote>
1814
1815 <p>The mentioned fields above don't have to be in particular order.
1816 </p>
1817 </blockquote>
1818
1819 <p>Example:
1820 </p>
1821 <p></p>
1822 <blockquote class="text">
1823 <p>C: "GET MIDI_INPUT_DRIVER INFO Alsa"
1824 </p>
1825 <p>S: "DESCRIPTION: Advanced Linux Sound Architecture"
1826 </p>
1827 <p>&nbsp;&nbsp;&nbsp;"VERSION: 1.0"
1828 </p>
1829 <p>&nbsp;&nbsp;&nbsp;"PARAMETERS: driver,active"
1830 </p>
1831 <p>&nbsp;&nbsp;&nbsp;"."
1832 </p>
1833 </blockquote>
1834
1835 <a name="rfc.section.5.3.3"></a><h4><a name="anchor26">5.3.3</a>&nbsp;Getting information about specific MIDI input driver parameter</h4>
1836
1837 <p>Use the following command to get detailed information about a specific parameter of a specific MIDI input driver:
1838 </p>
1839 <p></p>
1840 <blockquote class="text">
1841 <p>GET MIDI_INPUT_DRIVER_PARAMETER INFO &lt;midit&gt; &lt;param&gt; [&lt;deplist&gt;]
1842 </p>
1843 </blockquote>
1844
1845 <p>Where &lt;midi-t&gt; is the name of the MIDI input driver as returned
1846 by the "GET AVAILABLE_MIDI_INPUT_DRIVERS" command, &lt;param&gt; a specific
1847 parameter name for which information should be obtained (as returned by the
1848 "GET MIDI_INPUT_DRIVER INFO" command) and &lt;deplist&gt; is an optional list
1849 of parameters on which the sought parameter &lt;param&gt; depends on,
1850 &lt;deplist&gt; is a key-value pair list in form of "key1=val1 key2=val2 ...",
1851 where character string values are encapsulated into apostrophes ('). Arguments
1852 given with &lt;deplist&gt; which are not dependency parameters of &lt;param&gt;
1853 will be ignored, means the front-end application can simply put all parameters
1854 in &lt;deplist&gt; with the values selected by the user.
1855 </p>
1856 <p>Possible Answers:
1857 </p>
1858 <p>LinuxSampler will answer by sending a &lt;CRLF> separated list.
1859 Each answer line begins with the information category name
1860 followed by a colon and then a space character &lt;SP> and finally
1861 the info character string to that info category. There is
1862 information which is always returned, independent of the
1863 given driver parameter and there is optional information
1864 which is only shown dependent to given driver parameter. At
1865 the moment the following information categories are defined:
1866 </p>
1867 <p></p>
1868 <blockquote class="text">
1869 <p>TYPE -
1870 </p>
1871 <blockquote class="text">
1872 <p>either "BOOL" for boolean value(s) or "INT" for integer
1873 value(s) or "FLOAT" for dotted number(s) or "STRING" for
1874 character string(s)
1875 (always returned, no matter which driver parameter)
1876 </p>
1877 </blockquote>
1878
1879 <p>DESCRIPTION -
1880 </p>
1881 <blockquote class="text">
1882 <p>arbitrary text describing the purpose of the parameter
1883 (always returned, no matter which driver parameter)
1884 </p>
1885 </blockquote>
1886
1887 <p>MANDATORY -
1888 </p>
1889 <blockquote class="text">
1890 <p>either true or false, defines if this parameter must be
1891 given when the device is to be created with the
1892 'CREATE MIDI_INPUT_DEVICE' command
1893 (always returned, no matter which driver parameter)
1894 </p>
1895 </blockquote>
1896
1897 <p>FIX -
1898 </p>
1899 <blockquote class="text">
1900 <p>either true or false, if false then this parameter can
1901 be changed at any time, once the device is created by
1902 the 'CREATE MIDI_INPUT_DEVICE' command
1903 (always returned, no matter which driver parameter)
1904 </p>
1905 </blockquote>
1906
1907 <p>MULTIPLICITY -
1908 </p>
1909 <blockquote class="text">
1910 <p>either true or false, defines if this parameter allows
1911 only one value or a list of values, where true means
1912 multiple values and false only a single value allowed
1913 (always returned, no matter which driver parameter)
1914 </p>
1915 </blockquote>
1916
1917 <p>DEPENDS -
1918 </p>
1919 <blockquote class="text">
1920 <p>comma separated list of paramters this parameter depends
1921 on, means the values for fields 'DEFAULT', 'RANGE_MIN',
1922 'RANGE_MAX' and 'POSSIBILITIES' might depend on these
1923 listed parameters, for example assuming that an audio
1924 driver (like the Alsa driver) offers parameters 'card'
1925 and 'samplerate' then parameter 'samplerate' would
1926 depend on 'card' because the possible values for
1927 'samplerate' depends on the sound card which can be
1928 chosen by the 'card' parameter
1929 (optionally returned, dependent to driver parameter)
1930 </p>
1931 </blockquote>
1932
1933 <p>DEFAULT -
1934 </p>
1935 <blockquote class="text">
1936 <p>reflects the default value for this parameter which is
1937 used when the device is created and not explicitly
1938 given with the 'CREATE MIDI_INPUT_DEVICE' command,
1939 in case of MULTIPLCITY=true, this is a comma separated
1940 list, that's why character strings are encapsulated into
1941 apostrophes (')
1942 (optionally returned, dependent to driver parameter)
1943 </p>
1944 </blockquote>
1945
1946 <p>RANGE_MIN -
1947 </p>
1948 <blockquote class="text">
1949 <p>defines lower limit of the allowed value range for this
1950 parameter, can be an integer value as well as a dotted
1951 number, this parameter is often used in conjunction
1952 with RANGE_MAX, but may also appear without
1953 (optionally returned, dependent to driver parameter)
1954 </p>
1955 </blockquote>
1956
1957 <p>RANGE_MAX -
1958 </p>
1959 <blockquote class="text">
1960 <p>defines upper limit of the allowed value range for this
1961 parameter, can be an integer value as well as a dotted
1962 number, this parameter is often used in conjunction with
1963 RANGE_MIN, but may also appear without
1964 (optionally returned, dependent to driver parameter)
1965 </p>
1966 </blockquote>
1967
1968 <p>POSSIBILITES -
1969 </p>
1970 <blockquote class="text">
1971 <p>comma separated list of possible values for this
1972 parameter, character strings are encapsulated into
1973 apostrophes
1974 (optionally returned, dependent to driver parameter)
1975 </p>
1976 </blockquote>
1977
1978 </blockquote>
1979
1980 <p>The mentioned fields above don't have to be in particular order.
1981 </p>
1982 <p>Example:
1983 </p>
1984 <p></p>
1985 <blockquote class="text">
1986 <p>C: "GET MIDI_INPUT_DRIVER_PARAMETER INFO Alsa active"
1987 </p>
1988 <p>S: "DESCRIPTION: Whether device is enabled"
1989 </p>
1990 <p>&nbsp;&nbsp;&nbsp;"TYPE: BOOL"
1991 </p>
1992 <p>&nbsp;&nbsp;&nbsp;"MANDATORY: false"
1993 </p>
1994 <p>&nbsp;&nbsp;&nbsp;"FIX: false"
1995 </p>
1996 <p>&nbsp;&nbsp;&nbsp;"MULTIPLICITY: false"
1997 </p>
1998 <p>&nbsp;&nbsp;&nbsp;"DEFAULT: true"
1999 </p>
2000 <p>&nbsp;&nbsp;&nbsp;"."
2001 </p>
2002 </blockquote>
2003
2004 <a name="rfc.section.5.3.4"></a><h4><a name="anchor27">5.3.4</a>&nbsp;Creating a MIDI input device</h4>
2005
2006 <p>Use the following command to create a new MIDI input device for the desired MIDI input system:
2007 </p>
2008 <p></p>
2009 <blockquote class="text">
2010 <p>CREATE MIDI_INPUT_DEVICE &lt;midi-input-driver&gt; [&lt;param-list&gt;]
2011 </p>
2012 </blockquote>
2013
2014 <p>Where &lt;midi-input-driver&gt; should be replaced by the desired MIDI input system and &lt;param-list&gt; by an
2015 optional list of driver specific parameters in form of "key1=val1 key2=val2 ...", where
2016 character string values should be encapsulated into apostrophes (').
2017 Note that there might be drivers which require parameter(s) to be
2018 given with this command. Use the previously described commands in
2019 this chapter to get that information.
2020 </p>
2021 <p>Possible Answers:
2022 </p>
2023 <p></p>
2024 <blockquote class="text">
2025 <p>"OK[&lt;device-id&gt;]" -
2026 </p>
2027 <blockquote class="text">
2028 <p>in case the device was successfully created, where
2029 &lt;device-id&gt; is the numerical ID of the new device
2030 </p>
2031 </blockquote>
2032
2033 <p>"WRN[&lt;device-id&gt;]:&lt;warning-code&gt;:&lt;warning-message&gt;" -
2034 </p>
2035 <blockquote class="text">
2036 <p>in case the driver was loaded successfully, where
2037 &lt;device-id&gt; is the numerical ID of the new device, but
2038 there are noteworthy issue(s) related, providing an
2039 appropriate warning code and warning message
2040 </p>
2041 </blockquote>
2042
2043 <p>"ERR:&lt;error-code&gt;:&lt;error-message&gt;" -
2044 </p>
2045 <blockquote class="text">
2046 <p>in case it failed, providing an appropriate error code and error message
2047 </p>
2048 </blockquote>
2049
2050 </blockquote>
2051
2052 <p>Example:
2053 </p>
2054 <p></p>
2055 <blockquote class="text">
2056 <p>C: "CREATE MIDI_INPUT_DEVICE Alsa"
2057 </p>
2058 <p>S: "OK[0]"
2059 </p>
2060 </blockquote>
2061
2062 <a name="rfc.section.5.3.5"></a><h4><a name="anchor28">5.3.5</a>&nbsp;Destroying a MIDI input device</h4>
2063
2064 <p>Use the following command to destroy a created MIDI input device:
2065 </p>
2066 <p></p>
2067 <blockquote class="text">
2068 <p>DESTROY MIDI_INPUT_DEVICE &lt;device-id&gt;
2069 </p>
2070 </blockquote>
2071
2072 <p>Where &lt;device-id&gt; should be replaced by the device's numerical ID.
2073 </p>
2074 <p>Possible Answers:
2075 </p>
2076 <p></p>
2077 <blockquote class="text">
2078 <p>"OK" -
2079 </p>
2080 <blockquote class="text">
2081 <p>in case the device was successfully destroyed
2082 </p>
2083 </blockquote>
2084
2085 <p>"WRN:&lt;warning-code&gt;:&lt;warning-message&gt;" -
2086 </p>
2087 <blockquote class="text">
2088 <p>in case the device was destroyed, but there are noteworthy
2089 issue(s) related, providing an appropriate warning code and
2090 warning message
2091 </p>
2092 </blockquote>
2093
2094 <p>"ERR:&lt;error-code&gt;:&lt;error-message&gt;" -
2095 </p>
2096 <blockquote class="text">
2097 <p>in case it failed, providing an appropriate error code and error message
2098 </p>
2099 </blockquote>
2100
2101 </blockquote>
2102
2103 <p>Example:
2104 </p>
2105 <p></p>
2106 <blockquote class="text">
2107 <p>C: "DESTROY MIDI_INPUT_DEVICE 0"
2108 </p>
2109 <p>S: "OK"
2110 </p>
2111 </blockquote>
2112
2113 <a name="rfc.section.5.3.6"></a><h4><a name="anchor29">5.3.6</a>&nbsp;Getting all created MIDI input device count</h4>
2114
2115 <p>Use the following command to count all created MIDI input devices:
2116 </p>
2117 <p></p>
2118 <blockquote class="text">
2119 <p>GET MIDI_INPUT_DEVICES
2120 </p>
2121 </blockquote>
2122
2123 <p>Possible Answers:
2124 </p>
2125 <p></p>
2126 <blockquote class="text">
2127 <p>LinuxSampler will answer by sending the current number of all
2128 MIDI input devices.
2129 </p>
2130 </blockquote>
2131
2132 <p>Example:
2133 </p>
2134 <p></p>
2135 <blockquote class="text">
2136 <p>C: "GET MIDI_INPUT_DEVICES"
2137 </p>
2138 <p>S: "3"
2139 </p>
2140 </blockquote>
2141
2142 <a name="rfc.section.5.3.7"></a><h4><a name="anchor30">5.3.7</a>&nbsp;Getting all created MIDI input device list</h4>
2143
2144 <p>Use the following command to list all created MIDI input devices:
2145 </p>
2146 <p></p>
2147 <blockquote class="text">
2148 <p>LIST MIDI_INPUT_DEVICES
2149 </p>
2150 </blockquote>
2151
2152 <p>Possible Answers:
2153 </p>
2154 <p></p>
2155 <blockquote class="text">
2156 <p>LinuxSampler will answer by sending a comma separated list
2157 with the numerical Ids of all created MIDI input devices.
2158 </p>
2159 </blockquote>
2160
2161 <p>Examples:
2162 </p>
2163 <p></p>
2164 <blockquote class="text">
2165 <p>C: "LIST MIDI_INPUT_DEVICES"
2166 </p>
2167 <p>S: "0,1,2"
2168 </p>
2169 </blockquote>
2170
2171 <p></p>
2172 <blockquote class="text">
2173 <p>C: "LIST MIDI_INPUT_DEVICES"
2174 </p>
2175 <p>S: "1,3"
2176 </p>
2177 </blockquote>
2178
2179 <a name="rfc.section.5.3.8"></a><h4><a name="anchor31">5.3.8</a>&nbsp;Getting current settings of a MIDI input device</h4>
2180
2181 <p>Use the following command to get current settings of a specific, created MIDI input device:
2182 </p>
2183 <p></p>
2184 <blockquote class="text">
2185 <p>GET MIDI_INPUT_DEVICE INFO &lt;device-id&gt;
2186 </p>
2187 </blockquote>
2188
2189 <p>Where &lt;device-id&gt; is the numerical ID of the MIDI input device.
2190 </p>
2191 <p>Possible Answers:
2192 </p>
2193 <p></p>
2194 <blockquote class="text">
2195 <p>LinuxSampler will answer by sending a &lt;CRLF&gt; separated list.
2196 Each answer line begins with the information category name
2197 followed by a colon and then a space character &lt;SP&gt; and finally
2198 the info character string to that info category. As some
2199 parameters might allow multiple values, character strings are
2200 encapsulated into apostrophes ('). At the moment the following
2201 information categories are defined (independent of driver):
2202 </p>
2203 <p></p>
2204 <blockquote class="text">
2205 <p>DRIVER -
2206 </p>
2207 <blockquote class="text">
2208 <p>identifier of the used MIDI input driver, as e.g.
2209 returned by the "GET AVAILABLE_MIDI_INPUT_DRIVERS"
2210 command
2211 </p>
2212 </blockquote>
2213
2214 </blockquote>
2215 <blockquote class="text">
2216 <p><p>ACTIVE -
2217 </p>
2218 <blockquote class="text">
2219 <p>either true or false, if false then the MIDI device is
2220 inactive and doesn't listen to any incoming MIDI events
2221 and thus doesn't forward them to connected sampler
2222 channels
2223 </p>
2224 </blockquote>
2225
2226 </blockquote>
2227
2228 </blockquote>
2229
2230 <p>The mentioned fields above don't have to be in particular
2231 order. The fields above are only those fields which are
2232 returned by all MIDI input devices. Every MIDI input driver
2233 might have its own, additional driver specific parameters (see
2234 "GET MIDI_INPUT_DRIVER INFO" command) which are also returned
2235 by this command.
2236 </p>
2237 <p>Example:
2238 </p>
2239 <p></p>
2240 <blockquote class="text">
2241 <p>C: "GET MIDI_INPUT_DEVICE INFO 0"
2242 </p>
2243 <p>S: "driver: Alsa"
2244 </p>
2245 <p>&nbsp;&nbsp;&nbsp;"active: true"
2246 </p>
2247 <p>&nbsp;&nbsp;&nbsp;"."
2248 </p>
2249 </blockquote>
2250
2251 <a name="rfc.section.5.3.9"></a><h4><a name="anchor32">5.3.9</a>&nbsp;Changing settings of audio output devices</h4>
2252
2253 <p>Use the following command to alter a specific setting of a created MIDI input device:
2254 </p>
2255 <p></p>
2256 <blockquote class="text">
2257 <p>SET MIDI_INPUT_DEVICE_PARAMETER &lt;device-id&gt; &lt;key&gt;=&lt;value&gt;
2258 </p>
2259 </blockquote>
2260
2261 <p>Where &lt;device-id&gt; should be replaced by the numerical ID of the
2262 MIDI input device, &lt;key&gt; by the name of the parameter to change and
2263 &lt;value&gt; by the new value for this parameter.
2264 </p>
2265 <p>Possible Answers:
2266 </p>
2267 <p></p>
2268 <blockquote class="text">
2269 <p>"OK" -
2270 </p>
2271 <blockquote class="text">
2272 <p>in case setting was successfully changed
2273 </p>
2274 </blockquote>
2275
2276 <p>"WRN:&lt;warning-code&gt;:&lt;warning-message&gt;" -
2277 </p>
2278 <blockquote class="text">
2279 <p>in case setting was changed successfully, but there are
2280 noteworthy issue(s) related, providing an appropriate
2281 warning code and warning message
2282 </p>
2283 </blockquote>
2284
2285 <p>"ERR:&lt;error-code&gt;:&lt;error-message&gt;" -
2286 </p>
2287 <blockquote class="text">
2288 <p>in case it failed, providing an appropriate error code and error message
2289 </p>
2290 </blockquote>
2291
2292 </blockquote>
2293
2294 <p>Example:
2295 </p>
2296 <p></p>
2297 <blockquote class="text">
2298 <p>C: "SET MIDI_INPUT_DEVICE PARAMETER 0 ACTIVE=false"
2299 </p>
2300 <p>S: "OK"
2301 </p>
2302 </blockquote>
2303
2304 <a name="rfc.section.5.3.10"></a><h4><a name="anchor33">5.3.10</a>&nbsp;Getting information about a MIDI port</h4>
2305
2306 <p>Use the following command to get information about a MIDI port:
2307 </p>
2308 <p></p>
2309 <blockquote class="text">
2310 <p>GET MIDI_INPUT_PORT INFO &lt;device-id&gt; &lt;midi-port&gt;
2311 </p>
2312 </blockquote>
2313
2314 <p>Where &lt;device-id&gt; is the numerical ID of the MIDI input device
2315 and &lt;midi-port&gt; the MIDI input port number.
2316 </p>
2317 <p>Possible Answers:
2318 </p>
2319 <p></p>
2320 <blockquote class="text">
2321 <p>LinuxSampler will answer by sending a &lt;CRLF&gt; separated list.
2322 Each answer line begins with the information category name
2323 followed by a colon and then a space character &lt;SP&gt; and finally
2324 the info character string to that info category. At the moment
2325 the following information categories are defined:
2326 </p>
2327 <p>NAME -
2328 </p>
2329 <blockquote class="text">
2330 <p>arbitrary character string naming the port
2331 </p>
2332 </blockquote>
2333
2334 </blockquote>
2335
2336 <p>The field above is only the one which is returned by all MIDI
2337 ports regardless of the MIDI driver and port. Every MIDI port
2338 might have its own, additional driver and port specific
2339 parameters.
2340 </p>
2341 <p>Example:
2342 </p>
2343 <p></p>
2344 <blockquote class="text">
2345 <p>C: "GET MIDI_INPUT_PORT INFO 0 0"
2346 </p>
2347 <p>S: "name: 'Masterkeyboard'"
2348 </p>
2349 <p>&nbsp;&nbsp;&nbsp;"alsa_seq_bindings: '64:0'"
2350 </p>
2351 <p>&nbsp;&nbsp;&nbsp;"."
2352 </p>
2353 </blockquote>
2354
2355 <a name="rfc.section.5.3.11"></a><h4><a name="anchor34">5.3.11</a>&nbsp;Getting information about specific MIDI port parameter</h4>
2356
2357 <p>Use the following command to get detailed information about specific MIDI port parameter:
2358 </p>
2359 <p></p>
2360 <blockquote class="text">
2361 <p>GET MIDI_INPUT_PORT_PARAMETER INFO &lt;dev-id&gt; &lt;port&gt; &lt;param&gt;
2362 </p>
2363 </blockquote>
2364
2365 <p>Where &lt;dev-id&gt; is the numerical ID of the MIDI input device as returned
2366 by the "GET MIDI_INPUT_DEVICES" command, &lt;port&gt; the MIDI port number and
2367 &lt;param&gt; a specific port parameter name for which information should be
2368 obtained (as returned by the "GET MIDI_INPUT_PORT INFO" command).
2369 </p>
2370 <p>Possible Answers:
2371 </p>
2372 <p></p>
2373 <blockquote class="text">
2374 <p>LinuxSampler will answer by sending a &lt;CRLF&gt; separated list.
2375 Each answer line begins with the information category name
2376 followed by a colon and then a space character &lt;SP&gt; and finally
2377 the info character string to that info category. There is
2378 information which is always returned, independently of the
2379 given channel parameter and there is optional information
2380 which are only shown dependently to the given MIDI port. At the
2381 moment the following information categories are defined:
2382 </p>
2383 <p>TYPE -
2384 </p>
2385 <blockquote class="text">
2386 <p>either "BOOL" for boolean value(s) or "INT" for integer
2387 value(s) or "FLOAT" for dotted number(s) or "STRING" for
2388 character string(s)
2389 (always returned)
2390 </p>
2391 </blockquote>
2392
2393 <p>DESCRIPTION -
2394 </p>
2395 <blockquote class="text">
2396 <p>arbitrary text describing the purpose of the parameter
2397 (always returned)
2398 </p>
2399 </blockquote>
2400
2401 <p>FIX -
2402 </p>
2403 <blockquote class="text">
2404 <p>either true or false, if true then this parameter is
2405 read only, thus cannot be altered
2406 (always returned)
2407 </p>
2408 </blockquote>
2409
2410 <p>MULTIPLICITY -
2411 </p>
2412 <blockquote class="text">
2413 <p>either true or false, defines if this parameter allows
2414 only one value or a list of values, where true means
2415 multiple values and false only a single value allowed
2416 (always returned)
2417 </p>
2418 </blockquote>
2419
2420 <p>RANGE_MIN -
2421 </p>
2422 <blockquote class="text">
2423 <p>defines lower limit of the allowed value range for this
2424 parameter, can be an integer value as well as a dotted
2425 number, this parameter is usually used in conjunction
2426 with 'RANGE_MAX' but may also appear without
2427 (optionally returned, dependent to driver and port
2428 parameter)
2429 </p>
2430 </blockquote>
2431
2432 <p>RANGE_MAX -
2433 </p>
2434 <blockquote class="text">
2435 <p>defines upper limit of the allowed value range for this
2436 parameter, can be an integer value as well as a dotted
2437 number, this parameter is usually used in conjunction
2438 with 'RANGE_MIN' but may also appear without
2439 (optionally returned, dependent to driver and port
2440 parameter)
2441 </p>
2442 </blockquote>
2443
2444 <p>POSSIBILITES -
2445 </p>
2446 <blockquote class="text">
2447 <p>comma separated list of possible values for this
2448 parameter, character strings are encapsulated into
2449 apostrophes
2450 (optionally returned, dependent to device and port
2451 parameter)
2452 </p>
2453 </blockquote>
2454
2455 </blockquote>
2456
2457 <p>The mentioned fields above don't have to be in particular order.
2458 </p>
2459 <p>Example:
2460 </p>
2461 <p></p>
2462 <blockquote class="text">
2463 <p>C: "GET MIDI_INPUT_PORT_PARAMETER INFO 0 0 alsa_seq_bindings"
2464 </p>
2465 <p>S: "DESCRIPTION: bindings to other Alsa sequencer clients"
2466 </p>
2467 <p>"TYPE: STRING"
2468 </p>
2469 <p>&nbsp;&nbsp;&nbsp;"FIX: false"
2470 </p>
2471 <p>&nbsp;&nbsp;&nbsp;"MULTIPLICITY: true"
2472 </p>
2473 <p>&nbsp;&nbsp;&nbsp;"POSSIBILITES: '64:0','68:0','68:1'"
2474 </p>
2475 <p>&nbsp;&nbsp;&nbsp;"."
2476 </p>
2477 </blockquote>
2478
2479 <a name="rfc.section.5.3.12"></a><h4><a name="anchor35">5.3.12</a>&nbsp;Changing settings of MIDI input ports</h4>
2480
2481 <p>Use the following command to alter a specific setting of a MIDI input port:
2482 </p>
2483 <p></p>
2484 <blockquote class="text">
2485 <p>SET MIDI_INPUT_PORT PARAMETER &lt;device-id&gt; &lt;port&gt; &lt;key&gt;=&lt;value&gt;
2486 </p>
2487 </blockquote>
2488
2489 <p>Where &lt;device-id&gt; should be replaced by the numerical ID of the
2490 MIDI device, &lt;port&gt; by the MIDI port number, &lt;key&gt; by the name of
2491 the parameter to change and &lt;value&gt; by the new value for this
2492 parameter.
2493 </p>
2494 <p>Possible Answers:
2495 </p>
2496 <p></p>
2497 <blockquote class="text">
2498 <p>"OK" -
2499 </p>
2500 <blockquote class="text">
2501 <p>in case setting was successfully changed
2502 </p>
2503 </blockquote>
2504
2505 <p>"WRN:&lt;warning-code&gt;:&lt;warning-message&gt;" -
2506 </p>
2507 <blockquote class="text">
2508 <p>in case setting was changed successfully, but there are
2509 noteworthy issue(s) related, providing an appropriate
2510 warning code and warning message
2511 </p>
2512 </blockquote>
2513
2514 <p>"ERR:&lt;error-code&gt;:&lt;error-message&gt;" -
2515 </p>
2516 <blockquote class="text">
2517 <p>in case it failed, providing an appropriate error code and error message
2518 </p>
2519 </blockquote>
2520
2521 </blockquote>
2522
2523 <p>Example:
2524 </p>
2525 <p></p>
2526 <blockquote class="text">
2527 <p>
2528 </p>
2529 </blockquote>
2530
2531 <a name="rfc.section.5.4"></a><h4><a name="anchor36">5.4</a>&nbsp;Configuring sampler channels</h4>
2532
2533 <p>The following commands describe how to add and remove sampler channels, deploy
2534 sampler engines, load instruments and connect sampler channels to MIDI and audio devices.
2535 </p>
2536 <a name="rfc.section.5.4.1"></a><h4><a name="anchor37">5.4.1</a>&nbsp;Loading an instrument</h4>
2537
2538 <p>An instrument file can be loaded and assigned to a sampler channel by one of the following commands:
2539 </p>
2540 <p></p>
2541 <blockquote class="text">
2542 <p>LOAD INSTRUMENT [NON_MODAL] '&lt;filename&gt;' &lt;instr-index&gt; &lt;sampler-channel&gt;
2543 </p>
2544 </blockquote>
2545
2546 <p>Where &lt;filename&gt; is the name of the instrument file on the
2547 LinuxSampler instance's host system, &lt;instr-index&gt; the index of the
2548 instrument in the instrument file and &lt;sampler-channel> is the
2549 number of the sampler channel the instrument should be assigned to.
2550 Each sampler channel can only have one instrument.
2551 </p>
2552 <p>The difference between regular and NON_MODAL versions of the command
2553 is that the regular command returns OK only after the instrument has been
2554 fully loaded and the channel is ready to be used while NON_MODAL version
2555 returns immediately and a background process is launched to load the instrument
2556 on the channel. GET CHANNEL INFO command can be used to obtain loading
2557 progress from INSTRUMENT_STATUS field. LOAD command will perform sanity checks
2558 such as making sure that the file could be read and it is of a proper format
2559 and SHOULD return ERR and SHOULD not launch the background process should any
2560 errors be detected at that point.
2561 </p>
2562 <p>Possible Answers:
2563 </p>
2564 <p></p>
2565 <blockquote class="text">
2566 <p>"OK" -
2567 </p>
2568 <blockquote class="text">
2569 <p>in case the instrument was successfully loaded
2570 </p>
2571 </blockquote>
2572
2573 <p>"WRN:&lt;warning-code&gt;:&lt;warning-message&gt;" -
2574 </p>
2575 <blockquote class="text">
2576 <p>in case the instrument was loaded successfully, but there
2577 are noteworthy issue(s) related (e.g. Engine doesn't support
2578 one or more patch parameters provided by the loaded
2579 instrument file), providing an appropriate warning code and
2580 warning message
2581 </p>
2582 </blockquote>
2583
2584 <p>"ERR:&lt;error-code&gt;:&lt;error-message&gt;" -
2585 </p>
2586 <blockquote class="text">
2587 <p>in case it failed, providing an appropriate error code and error message
2588 </p>
2589 </blockquote>
2590
2591 </blockquote>
2592
2593 <p>Example:
2594 </p>
2595 <p></p>
2596 <blockquote class="text">
2597 <p>
2598 </p>
2599 </blockquote>
2600
2601 <a name="rfc.section.5.4.2"></a><h4><a name="anchor38">5.4.2</a>&nbsp;Loading a sampler engine</h4>
2602
2603 <p>A sample engine can be deployed and assigned to a specific sampler
2604 channel by the following command:
2605 </p>
2606 <p></p>
2607 <blockquote class="text">
2608 <p>LOAD ENGINE &lt;engine-name&gt; &lt;sampler-channel&gt;
2609 </p>
2610 </blockquote>
2611
2612 <p>Where &lt;engine-name&gt; is usually the C++ class name of the engine
2613 implementation and &lt;sampler-channel&gt; the sampler channel the
2614 deployed engine should be assigned to. Even if the respective
2615 sampler channel has already a deployed engine with that engine
2616 name, a new engine instance will be assigned to the sampler channel.
2617 </p>
2618 <p>Possible Answers:
2619 </p>
2620 <p></p>
2621 <blockquote class="text">
2622 <p>"OK" -
2623 </p>
2624 <blockquote class="text">
2625 <p>in case the engine was successfully deployed
2626 </p>
2627 </blockquote>
2628
2629 <p>"WRN:&lt;warning-code&gt;:&lt;warning-message&gt;" -
2630 </p>
2631 <blockquote class="text">
2632 <p>in case the engine was deployed successfully, but there
2633 are noteworthy issue(s) related, providing an appropriate
2634 warning code and warning message
2635 </p>
2636 </blockquote>
2637
2638 <p>"ERR:&lt;error-code&gt;:&lt;error-message&gt;" -
2639 </p>
2640 <blockquote class="text">
2641 <p>in case it failed, providing an appropriate error code and
2642 error message
2643 </p>
2644 </blockquote>
2645
2646 </blockquote>
2647
2648 <p>Example:
2649 </p>
2650 <p></p>
2651 <blockquote class="text">
2652 <p>
2653 </p>
2654 </blockquote>
2655
2656 <a name="rfc.section.5.4.3"></a><h4><a name="anchor39">5.4.3</a>&nbsp;Getting all created sampler channel count</h4>
2657
2658 <p>The number of sampler channels can change on runtime. To get the
2659 current amount of sampler channels, the front-end can send the
2660 following command:
2661 </p>
2662 <p></p>
2663 <blockquote class="text">
2664 <p>GET CHANNELS
2665 </p>
2666 </blockquote>
2667
2668 <p>Possible Answers:
2669 </p>
2670 <p></p>
2671 <blockquote class="text">
2672 <p>LinuxSampler will answer by returning the current number of sampler channels.
2673 </p>
2674 </blockquote>
2675
2676 <p>Example:
2677 </p>
2678 <p></p>
2679 <blockquote class="text">
2680 <p>C: "GET CHANNELS"
2681 </p>
2682 <p>S: "12"
2683 </p>
2684 </blockquote>
2685
2686 <a name="rfc.section.5.4.4"></a><h4><a name="anchor40">5.4.4</a>&nbsp;Getting all created sampler channel list</h4>
2687
2688 <p>The number of sampler channels can change on runtime. To get the
2689 current list of sampler channels, the front-end can send the
2690 following command:
2691 </p>
2692 <p></p>
2693 <blockquote class="text">
2694 <p>LIST CHANNELS
2695 </p>
2696 </blockquote>
2697
2698 <p>Possible Answers:
2699 </p>
2700 <p></p>
2701 <blockquote class="text">
2702 <p>LinuxSampler will answer by returning a comma separated list
2703 with all sampler channels numerical IDs.
2704 </p>
2705 </blockquote>
2706
2707 <p>Example:
2708 </p>
2709 <p></p>
2710 <blockquote class="text">
2711 <p>C: "LIST CHANNELS"
2712 </p>
2713 <p>S: "0,1,2,3,4,5,6,9,10,11,15,20"
2714 </p>
2715 </blockquote>
2716
2717 <a name="rfc.section.5.4.5"></a><h4><a name="anchor41">5.4.5</a>&nbsp;Adding a new sampler channel</h4>
2718
2719 <p>A new sampler channel can be added to the end of the sampler
2720 channel list by sending the following command:
2721 </p>
2722 <p></p>
2723 <blockquote class="text">
2724 <p>ADD CHANNEL
2725 </p>
2726 </blockquote>
2727
2728 <p>This will increment the sampler channel count by one and the new
2729 sampler channel will be appended to the end of the sampler channel
2730 list. The front-end should send the respective, related commands
2731 right after to e.g. load an engine, load an instrument and setting
2732 input, output method and eventually other commands to initialize
2733 the new channel. The front-end should use the sampler channel
2734 returned by the answer of this command to perform the previously
2735 recommended commands, to avoid race conditions e.g. with other
2736 front-ends that might also have sent an "ADD CHANNEL" command.
2737 </p>
2738 <p>Possible Answers:
2739 </p>
2740 <p></p>
2741 <blockquote class="text">
2742 <p>"OK[&lt;sampler-channel&gt;]" -
2743 </p>
2744 <blockquote class="text">
2745 <p>in case a new sampler channel could be added, where
2746 &lt;sampler-channel&gt; reflects the channel number of the new
2747 created sampler channel which should the be used to set up
2748 the sampler channel by sending subsequent intialization
2749 commands
2750 </p>
2751 </blockquote>
2752
2753 <p>"WRN:&lt;warning-code&gt;:&lt;warning-message&gt;" -
2754 </p>
2755 <blockquote class="text">
2756 <p>in case a new channel was added successfully, but there are
2757 noteworthy issue(s) related, providing an appropriate
2758 warning code and warning message
2759 </p>
2760 </blockquote>
2761
2762 <p>"ERR:&lt;error-code&gt;:&lt;error-message&gt;" -
2763 </p>
2764 <blockquote class="text">
2765 <p>in case it failed, providing an appropriate error code and
2766 error message
2767 </p>
2768 </blockquote>
2769
2770 </blockquote>
2771
2772 <p>Example:
2773 </p>
2774 <p></p>
2775 <blockquote class="text">
2776 <p>
2777 </p>
2778 </blockquote>
2779
2780 <a name="rfc.section.5.4.6"></a><h4><a name="anchor42">5.4.6</a>&nbsp;Removing a sampler channel</h4>
2781
2782 <p>A sampler channel can be removed by sending the following command:
2783 </p>
2784 <p></p>
2785 <blockquote class="text">
2786 <p>REMOVE CHANNEL &lt;sampler-channel&gt;
2787 </p>
2788 </blockquote>
2789
2790 <p>This will decrement the sampler channel count by one and also
2791 decrement the channel numbers of all subsequent sampler channels by
2792 one.
2793 </p>
2794 <p>Possible Answers:
2795 </p>
2796 <p></p>
2797 <blockquote class="text">
2798 <p>"OK" -
2799 </p>
2800 <blockquote class="text">
2801 <p>in case the given sampler channel could be removed
2802 </p>
2803 </blockquote>
2804
2805 <p>"WRN:&lt;warning-code&gt;:&lt;warning-message&gt;" -
2806 </p>
2807 <blockquote class="text">
2808 <p>in case the given channel was removed, but there are
2809 noteworthy issue(s) related, providing an appropriate
2810 warning code and warning message
2811 </p>
2812 </blockquote>
2813
2814 <p>"ERR:&lt;error-code&gt;:&lt;error-message&gt;" -
2815 </p>
2816 <blockquote class="text">
2817 <p>in case it failed, providing an appropriate error code and
2818 error message
2819 </p>
2820 </blockquote>
2821
2822 </blockquote>
2823
2824 <p>Example:
2825 </p>
2826 <p></p>
2827 <blockquote class="text">
2828 <p>
2829 </p>
2830 </blockquote>
2831
2832 <a name="rfc.section.5.4.7"></a><h4><a name="anchor43">5.4.7</a>&nbsp;Getting all available engines</h4>
2833
2834 <p>The front-end can ask for all available engines by sending the following command:
2835 </p>
2836 <p></p>
2837 <blockquote class="text">
2838 <p>GET AVAILABLE_ENGINES
2839 </p>
2840 </blockquote>
2841
2842 <p>Possible Answers:
2843 </p>
2844 <p></p>
2845 <blockquote class="text">
2846 <p>LinuxSampler will answer by sending a comma separated character
2847 string of the engines' C++ class names.
2848 </p>
2849 </blockquote>
2850
2851 <p>Example:
2852 </p>
2853 <p></p>
2854 <blockquote class="text">
2855 <p>C: "GET AVAILABLE_ENGINES"
2856 </p>
2857 <p>S: "GigEngine,AkaiEngine,DLSEngine,JoesCustomEngine"
2858 </p>
2859 </blockquote>
2860
2861 <a name="rfc.section.5.4.8"></a><h4><a name="anchor44">5.4.8</a>&nbsp;Getting information about an engine</h4>
2862
2863 <p>The front-end can ask for information about a specific engine by
2864 sending the following command:
2865 </p>
2866 <p></p>
2867 <blockquote class="text">
2868 <p>GET ENGINE INFO &lt;engine-name&gt;
2869 </p>
2870 </blockquote>
2871
2872 <p>Where &lt;engine-name&gt; is usually the C++ class name of the engine implementation.
2873 </p>
2874 <p>Possible Answers:
2875 </p>
2876 <p></p>
2877 <blockquote class="text">
2878 <p>LinuxSampler will answer by sending &lt;&gt; separated list.
2879 Each answer line begins with the information category name
2880 followed by a colon and then a space character &lt;SP&gt; and finally
2881 the info character string to that info category. At the moment
2882 the following categories are defined:
2883 </p>
2884 <p></p>
2885 <blockquote class="text">
2886 <p>DESCRIPTION -
2887 </p>
2888 <blockquote class="text">
2889 <p>arbitrary description text about the engine
2890 </p>
2891 </blockquote>
2892
2893 <p>VERSION -
2894 </p>
2895 <blockquote class="text">
2896 <p>arbitrary character string regarding the engine's version
2897 </p>
2898 </blockquote>
2899
2900 </blockquote>
2901
2902 </blockquote>
2903
2904 <p>The mentioned fields above don't have to be in particular order.
2905 </p>
2906 <p>Example:
2907 </p>
2908 <p></p>
2909 <blockquote class="text">
2910 <p>C: "GET ENGINE INFO JoesCustomEngine"
2911 </p>
2912 <p>S: "DESCRIPTION: this is Joe's custom sampler engine"
2913 </p>
2914 <p>&nbsp;&nbsp;&nbsp;"VERSION: testing-1.0"
2915 </p>
2916 <p>&nbsp;&nbsp;&nbsp;"."
2917 </p>
2918 </blockquote>
2919
2920 <a name="rfc.section.5.4.9"></a><h4><a name="anchor45">5.4.9</a>&nbsp;Getting sampler channel information</h4>
2921
2922 <p>The front-end can ask for the current settings of a sampler channel
2923 by sending the following command:
2924 </p>
2925 <p></p>
2926 <blockquote class="text">
2927 <p>GET CHANNEL INFO &lt;sampler-channel&gt;
2928 </p>
2929 </blockquote>
2930
2931 <p>Where &lt;sampler-channel&gt; is the sampler channel number the front-end is interested in.
2932 </p>
2933 <p>Possible Answers:
2934 </p>
2935 <p></p>
2936 <blockquote class="text">
2937 <p>LinuxSampler will answer by sending a &lt;CRLF&gt; separated list.
2938 Each answer line begins with the settings category name
2939 followed by a colon and then a space character &lt;SP&gt; and finally
2940 the info character string to that setting category. At the
2941 moment the following categories are defined:
2942 </p>
2943 <p></p>
2944 <blockquote class="text">
2945 <p>ENGINE_NAME -
2946 </p>
2947 <blockquote class="text">
2948 <p>name of the engine that is deployed on the sampler
2949 channel, "NONE" if there's no engine deployed yet for
2950 this sampler channel
2951 </p>
2952 </blockquote>
2953
2954 <p>AUDIO_OUTPUT_DEVICE -
2955 </p>
2956 <blockquote class="text">
2957 <p>numerical ID of the audio output device which is
2958 currently connected to this sampler channel to output
2959 the audio signal, "NONE" if there's no device
2960 connected to this sampler channel
2961 </p>
2962 </blockquote>
2963
2964 <p>AUDIO_OUTPUT_CHANNELS -
2965 </p>
2966 <blockquote class="text">
2967 <p>number of output channels the sampler channel offers
2968 (dependent to used sampler engine and loaded instrument)
2969 </p>
2970 </blockquote>
2971
2972 <p>AUDIO_OUTPUT_ROUTING -
2973 </p>
2974 <blockquote class="text">
2975 <p>comma separated list which reflects to which audio
2976 channel of the selected audio output device each
2977 sampler output channel is routed to, e.g. "0,3" would
2978 mean the engine's output channel 0 is routed to channel
2979 0 of the audio output device and the engine's output
2980 channel 1 is routed to the channel 3 of the audio
2981 output device
2982 </p>
2983 </blockquote>
2984
2985 <p>INSTRUMENT_FILE -
2986 </p>
2987 <blockquote class="text">
2988 <p>the file name of the loaded instrument, "NONE" if
2989 there's no instrument yet loaded for this sampler
2990 channel
2991 </p>
2992 </blockquote>
2993
2994 <p>INSTRUMENT_NR -
2995 </p>
2996 <blockquote class="text">
2997 <p>the instrument index number of the loaded instrument
2998 </p>
2999 </blockquote>
3000
3001 <p>INSTRUMENT_STATUS -
3002 </p>
3003 <blockquote class="text">
3004 <p>integer values 0 to 100 indicating loading progress percentage for the instrument. Negative
3005 value indicates a loading exception. Value of 100 indicates that the instrument is fully
3006 loaded.
3007 </p>
3008 </blockquote>
3009
3010 <p>MIDI_INPUT_DEVICE -
3011 </p>
3012 <blockquote class="text">
3013 <p>numerical ID of the MIDI input device which is
3014 currently connected to this sampler channel to deliver
3015 MIDI input commands, "NONE" if there's no device
3016 connected to this sampler channel
3017 </p>
3018 </blockquote>
3019
3020 <p>MIDI_INPUT_PORT -
3021 </p>
3022 <blockquote class="text">
3023 <p>port number of the MIDI input device
3024 </p>
3025 </blockquote>
3026
3027 <p>MIDI_INPUT_CHANNEL -
3028 </p>
3029 <blockquote class="text">
3030 <p>the MIDI input channel number this sampler channel
3031 should listen to or "ALL" to listen on all MIDI channels
3032 </p>
3033 </blockquote>
3034
3035 <p>VOLUME -
3036 </p>
3037 <blockquote class="text">
3038 <p>optionally dotted number for the channel volume factor
3039 (where a value < 1.0 means attenuation and a value >
3040 1.0 means amplification)
3041 </p>
3042 </blockquote>
3043
3044 </blockquote>
3045
3046 </blockquote>
3047
3048 <p>The mentioned fields above don't have to be in particular order.
3049 </p>
3050 <p>Example:
3051 </p>
3052 <p></p>
3053 <blockquote class="text">
3054 <p>C: "GET CHANNEL INFO 34"
3055 </p>
3056 <p>S: "ENGINE_NAME: GigEngine"
3057 </p>
3058 <p>&nbsp;&nbsp;&nbsp;"VOLUME: 1.0"
3059 </p>
3060 <p>&nbsp;&nbsp;&nbsp;"AUDIO_OUTPUT_DEVICE: 0"
3061 </p>
3062 <p>&nbsp;&nbsp;&nbsp;"AUDIO_OUTPUT_CHANNELS: 2"
3063 </p>
3064 <p>&nbsp;&nbsp;&nbsp;"AUDIO_OUTPUT_ROUTING: 0,1"
3065 </p>
3066 <p>&nbsp;&nbsp;&nbsp;"INSTRUMENT_FILE: /home/joe/FazioliPiano.gig"
3067 </p>
3068 <p>&nbsp;&nbsp;&nbsp;"INSTRUMENT_NR: 0"
3069 </p>
3070 <p>&nbsp;&nbsp;&nbsp;"INSTRUMENT_STATUS: 100"
3071 </p>
3072 <p>&nbsp;&nbsp;&nbsp;"MIDI_INPUT_DEVICE: 0"
3073 </p>
3074 <p>&nbsp;&nbsp;&nbsp;"MIDI_INPUT_PORT: 0"
3075 </p>
3076 <p>&nbsp;&nbsp;&nbsp;"MIDI_INPUT_CHANNEL: 5"
3077 </p>
3078 <p>&nbsp;&nbsp;&nbsp;"."
3079 </p>
3080 </blockquote>
3081
3082 <a name="rfc.section.5.4.10"></a><h4><a name="anchor46">5.4.10</a>&nbsp;Current number of active voices</h4>
3083
3084 <p>The front-end can ask for the current number of active voices on a
3085 sampler channel by sending the following command:
3086 </p>
3087 <p></p>
3088 <blockquote class="text">
3089 <p>GET CHANNEL VOICE_COUNT &lt;sampler-channel&gt;
3090 </p>
3091 </blockquote>
3092
3093 <p>Where &lt;sampler-channel&gt; is the sampler channel number the front-end is interested in.
3094 </p>
3095 <p>Possible Answers:
3096 </p>
3097 <p></p>
3098 <blockquote class="text">
3099 <p>LinuxSampler will answer by returning the number of active
3100 voices on that channel.
3101 </p>
3102 </blockquote>
3103
3104 <p>Example:
3105 </p>
3106 <p></p>
3107 <blockquote class="text">
3108 <p>
3109 </p>
3110 </blockquote>
3111
3112 <a name="rfc.section.5.4.11"></a><h4><a name="anchor47">5.4.11</a>&nbsp;Current number of active disk streams</h4>
3113
3114 <p>The front-end can ask for the current number of active disk streams
3115 on a sampler channel by sending the following command:
3116 </p>
3117 <p></p>
3118 <blockquote class="text">
3119 <p>GET CHANNEL STREAM_COUNT &lt;sampler-channel&gt;
3120 </p>
3121 </blockquote>
3122
3123 <p>Where &lt;sampler-channel&gt; is the sampler channel number the front-end is interested in.
3124 </p>
3125 <p>Possible Answers:
3126 </p>
3127 <p></p>
3128 <blockquote class="text">
3129 <p>LinuxSampler will answer by returning the number of active
3130 disk streams on that channel in case the engine supports disk
3131 streaming, if the engine doesn't support disk streaming it will
3132 return "NA" for not available.
3133 </p>
3134 </blockquote>
3135
3136 <p>Example:
3137 </p>
3138 <p></p>
3139 <blockquote class="text">
3140 <p>
3141 </p>
3142 </blockquote>
3143
3144 <a name="rfc.section.5.4.12"></a><h4><a name="anchor48">5.4.12</a>&nbsp;Current fill state of disk stream buffers</h4>
3145
3146 <p>The front-end can ask for the current fill state of all disk streams
3147 on a sampler channel by sending the following command:
3148 </p>
3149 <p></p>
3150 <blockquote class="text">
3151 <p>GET CHANNEL BUFFER_FILL BYTES &lt;sampler-channel&gt;
3152 </p>
3153 </blockquote>
3154
3155 <p>to get the fill state in bytes or
3156 </p>
3157 <p></p>
3158 <blockquote class="text">
3159 <p>GET CHANNEL BUFFER_FILL PERCENTAGE &lt;sampler-channel&gt;
3160 </p>
3161 </blockquote>
3162
3163 <p>to get the fill state in percent, where &lt;sampler-channel&gt; is the
3164 sampler channel number the front-end is interested in.
3165 </p>
3166 <p>Possible Answers:
3167 </p>
3168 <p></p>
3169 <blockquote class="text">
3170 <p>LinuxSampler will either answer by returning a comma separated
3171 string with the fill state of all disk stream buffers on that
3172 channel or an empty line if there are no active disk streams or
3173 "NA" for *not available* in case the engine which is deployed
3174 doesn't support disk streaming. Each entry in the answer list
3175 will begin with the stream's ID in brackets followed by the
3176 numerical representation of the fill size (either in bytes or
3177 percentage). Note: due to efficiency reasons the fill states in
3178 the response are not in particular order, thus the front-end has
3179 to sort them by itself if necessary.
3180 </p>
3181 </blockquote>
3182
3183 <p>Examples:
3184 </p>
3185 <p></p>
3186 <blockquote class="text">
3187 <p>C: "GET CHANNEL BUFFER_FILL BYTES 4"
3188 </p>
3189 <p>S: "[115]420500,[116]510300,[75]110000,[120]230700"
3190 </p>
3191 </blockquote>
3192 <blockquote class="text">
3193 <p><p>C: "GET CHANNEL BUFFER_FILL PERCENTAGE 4"
3194 </p>
3195 <p>S: "[115]90%,[116]98%,[75]40%,[120]62%"
3196 </p>
3197 </blockquote>
3198 <blockquote class="text">
3199 <p><p>C: "GET CHANNEL BUFFER_FILL PERCENTAGE 4"
3200 </p>
3201 <p>S: ""
3202 </p>
3203 </blockquote>
3204
3205 <a name="rfc.section.5.4.13"></a><h4><a name="anchor49">5.4.13</a>&nbsp;Setting audio output device</h4>
3206
3207 <p>The front-end can set the audio output device on a specific sampler
3208 channel by sending the following command:
3209 </p>
3210 <p></p>
3211 <blockquote class="text">
3212 <p>SET CHANNEL AUDIO_OUTPUT_DEVICE &lt;sampler-channel&gt; &lt;audio-device-id&gt;
3213 </p>
3214 </blockquote>
3215
3216 <p>Where &lt;audio-device-id&gt; is the numerical ID of the audio output
3217 device and &lt;sampler-channel&gt; is the respective sampler channel
3218 number.
3219 </p>
3220 <p>Possible Answers:
3221 </p>
3222 <p></p>
3223 <blockquote class="text">
3224 <p>"OK" -
3225 </p>
3226 <blockquote class="text">
3227 <p>on success
3228 </p>
3229 </blockquote>
3230
3231 <p>"WRN:&lt;warning-code&gt;:&lt;warning-message&gt;" -
3232 </p>
3233 <blockquote class="text">
3234 <p>if audio output device was set, but there are noteworthy
3235 issue(s) related, providing an appropriate warning code and
3236 warning message
3237 </p>
3238 </blockquote>
3239
3240 <p>"ERR:&lt;error-code&gt;:&lt;error-message&gt;" -
3241 </p>
3242 <blockquote class="text">
3243 <p>in case it failed, providing an appropriate error code and error message
3244 </p>
3245 </blockquote>
3246
3247 </blockquote>
3248
3249 <p>Examples:
3250 </p>
3251 <p></p>
3252 <blockquote class="text">
3253 <p>
3254 </p>
3255 </blockquote>
3256
3257 <a name="rfc.section.5.4.14"></a><h4><a name="anchor50">5.4.14</a>&nbsp;Setting audio output type</h4>
3258
3259 <p>DEPRECATED: THIS COMMAND WILL DISAPPEAR SOON!
3260 </p>
3261 <p>The front-end can alter the audio output type on a specific sampler
3262 channel by sending the following command:
3263 </p>
3264 <p></p>
3265 <blockquote class="text">
3266 <p>SET CHANNEL AUDIO_OUTPUT_TYPE &lt;sampler-channel&gt; &lt;audio-output-type&gt;
3267 </p>
3268 </blockquote>
3269
3270 <p>Where &lt;audio-output-type&gt; is currently either "Alsa" or "Jack" and
3271 &lt;sampler-channel&gt; is the respective sampler channel number.
3272 </p>
3273 <p>Possible Answers:
3274 </p>
3275 <p></p>
3276 <blockquote class="text">
3277 <p>"OK" -
3278 </p>
3279 <blockquote class="text">
3280 <p>on success
3281 </p>
3282 </blockquote>
3283
3284 <p>"WRN:&lt;warning-code&gt;:&lt;warning-message&gt;" -
3285 </p>
3286 <blockquote class="text">
3287 <p>if audio output type was set, but there are noteworthy
3288 issue(s) related, providing an appropriate warning code and
3289 warning message
3290 </p>
3291 </blockquote>
3292
3293 <p>"ERR:&lt;error-code&gt;:&lt;error-message&gt;" -
3294 </p>
3295 <blockquote class="text">
3296 <p>in case it failed, providing an appropriate error code and error message
3297 </p>
3298 </blockquote>
3299
3300 </blockquote>
3301
3302 <p>Examples:
3303 </p>
3304 <p></p>
3305 <blockquote class="text">
3306 <p>
3307 </p>
3308 </blockquote>
3309
3310 <a name="rfc.section.5.4.15"></a><h4><a name="anchor51">5.4.15</a>&nbsp;Setting audio output channel</h4>
3311
3312 <p>The front-end can alter the audio output channel on a specific
3313 sampler channel by sending the following command:
3314 </p>
3315 <p></p>
3316 <blockquote class="text">
3317 <p>SET CHANNEL AUDIO_OUTPUT_CHANNEL &lt;sampler-chan&gt; &lt;audio-out&gt; &lt;audio-in&gt;
3318 </p>
3319 </blockquote>
3320
3321 <p>Where &lt;sampler-chan&gt; is the sampler channel, &lt;audio-out&gt; is the
3322 sampler channel's audio output channel which should be
3323 rerouted and &lt;audio-in&gt; the audio channel of the selected audio
3324 output device where &lt;audio-out&gt; should be routed to.
3325 </p>
3326 <p>Possible Answers:
3327 </p>
3328 <p></p>
3329 <blockquote class="text">
3330 <p>"OK" -
3331 </p>
3332 <blockquote class="text">
3333 <p>on success
3334 </p>
3335 </blockquote>
3336
3337 <p>"WRN:&lt;warning-code&gt;:&lt;warning-message&gt;" -
3338 </p>
3339 <blockquote class="text">
3340 <p>if audio output channel was set, but there are noteworthy
3341 issue(s) related, providing an appropriate warning code and
3342 warning message
3343 </p>
3344 </blockquote>
3345
3346 <p>"ERR:&lt;error-code&gt;:&lt;error-message&gt;" -
3347 </p>
3348 <blockquote class="text">
3349 <p>in case it failed, providing an appropriate error code and error message
3350 </p>
3351 </blockquote>
3352
3353 </blockquote>
3354
3355 <p>Examples:
3356 </p>
3357 <p></p>
3358 <blockquote class="text">
3359 <p>
3360 </p>
3361 </blockquote>
3362
3363 <a name="rfc.section.5.4.16"></a><h4><a name="anchor52">5.4.16</a>&nbsp;Setting MIDI input device</h4>
3364
3365 <p>The front-end can set the MIDI input device on a specific sampler
3366 channel by sending the following command:
3367 </p>
3368 <p></p>
3369 <blockquote class="text">
3370 <p>SET CHANNEL MIDI_INPUT_DEVICE &lt;sampler-channel&gt; &lt;midi-device-id&gt;
3371 </p>
3372 </blockquote>
3373
3374 <p>
3375 </p>
3376 <p>Possible Answers:
3377 </p>
3378 <p></p>
3379 <blockquote class="text">
3380 <p>"OK" -
3381 </p>
3382 <blockquote class="text">
3383 <p>on success
3384 </p>
3385 </blockquote>
3386
3387 <p>"WRN:&lt;warning-code&gt;:&lt;warning-message&gt;" -
3388 </p>
3389 <blockquote class="text">
3390 <p>if MIDI input device was set, but there are noteworthy
3391 issue(s) related, providing an appropriate warning code and
3392 warning message
3393 </p>
3394 </blockquote>
3395
3396 <p>"ERR:&lt;error-code&gt;:&lt;error-message&gt;" -
3397 </p>
3398 <blockquote class="text">
3399 <p>in case it failed, providing an appropriate error code and error message
3400 </p>
3401 </blockquote>
3402
3403 </blockquote>
3404
3405 <p>Examples:
3406 </p>
3407 <p></p>
3408 <blockquote class="text">
3409 <p>
3410 </p>
3411 </blockquote>
3412
3413 <a name="rfc.section.5.4.17"></a><h4><a name="anchor53">5.4.17</a>&nbsp;Setting MIDI input type</h4>
3414
3415 <p>DEPRECATED: THIS COMMAND WILL DISAPPEAR SOON!
3416 </p>
3417 <p>The front-end can alter the MIDI input type on a specific sampler
3418 channel by sending the following command:
3419 </p>
3420 <p></p>
3421 <blockquote class="text">
3422 <p>SET CHANNEL MIDI_INPUT_TYPE &lt;sampler-channel&gt; &lt;midi-input-type&gt;
3423 </p>
3424 </blockquote>
3425
3426 <p>Where &lt;midi-input-type&gt; is currently only "Alsa" and
3427 &lt;sampler-channel&gt; is the respective sampler channel number.
3428 </p>
3429 <p>Possible Answers:
3430 </p>
3431 <p></p>
3432 <blockquote class="text">
3433 <p>"OK" -
3434 </p>
3435 <blockquote class="text">
3436 <p>on success
3437 </p>
3438 </blockquote>
3439
3440 <p>"WRN:&lt;warning-code&gt;:&lt;warning-message&gt;" -
3441 </p>
3442 <blockquote class="text">
3443 <p>if MIDI input type was set, but there are noteworthy
3444 issue(s) related, providing an appropriate warning code and
3445 warning message
3446 </p>
3447 </blockquote>
3448
3449 <p>"ERR:&lt;error-code&gt;:&lt;error-message&gt;" -
3450 </p>
3451 <blockquote class="text">
3452 <p>in case it failed, providing an appropriate error code and error message
3453 </p>
3454 </blockquote>
3455
3456 </blockquote>
3457
3458 <p>Examples:
3459 </p>
3460 <p></p>
3461 <blockquote class="text">
3462 <p>
3463 </p>
3464 </blockquote>
3465
3466 <a name="rfc.section.5.4.18"></a><h4><a name="anchor54">5.4.18</a>&nbsp;Setting MIDI input port</h4>
3467
3468 <p>The front-end can alter the input MIDI port on a specific sampler
3469 channel by sending the following command:
3470 </p>
3471 <p></p>
3472 <blockquote class="text">
3473 <p>SET CHANNEL MIDI_INPUT_PORT &lt;sampler-channel&gt; &lt;midi-input-port&gt;
3474 </p>
3475 </blockquote>
3476
3477 <p>Where &lt;midi-input-port&gt; is a MIDI input port number of the
3478 MIDI input device connected to the sampler channel given by
3479 &lt;sampler-channel&gt;.
3480 </p>
3481 <p>Possible Answers:
3482 </p>
3483 <p></p>
3484 <blockquote class="text">
3485 <p>"OK" -
3486 </p>
3487 <blockquote class="text">
3488 <p>on success
3489 </p>
3490 </blockquote>
3491
3492 <p>"WRN:&lt;warning-code&gt;:&lt;warning-message&gt;" -
3493 </p>
3494 <blockquote class="text">
3495 <p>if MIDI input port was set, but there are noteworthy
3496 issue(s) related, providing an appropriate warning code and
3497 warning message
3498 </p>
3499 </blockquote>
3500
3501 <p>"ERR:&lt;error-code&gt;:&lt;error-message&gt;" -
3502 </p>
3503 <blockquote class="text">
3504 <p>in case it failed, providing an appropriate error code and error messag
3505 </p>
3506 </blockquote>
3507
3508 </blockquote>
3509
3510 <p>Examples:
3511 </p>
3512 <p></p>
3513 <blockquote class="text">
3514 <p>
3515 </p>
3516 </blockquote>
3517
3518 <a name="rfc.section.5.4.19"></a><h4><a name="anchor55">5.4.19</a>&nbsp;Setting MIDI input channel</h4>
3519
3520 <p>The front-end can alter the MIDI channel a sampler channel should
3521 listen to by sending the following command:
3522 </p>
3523 <p></p>
3524 <blockquote class="text">
3525 <p>SET CHANNEL MIDI_INPUT_CHANNEL &lt;sampler-channel&gt; &lt;midi-input-chan&gt;
3526 </p>
3527 </blockquote>
3528
3529 <p>Where &lt;midi-input-chan&gt; is the new MIDI input channel where
3530 &lt;sampler-channel&gt; should listen to or "ALL" to listen on all 16 MIDI
3531 channels.
3532 </p>
3533 <p>Possible Answers:
3534 </p>
3535 <p></p>
3536 <blockquote class="text">
3537 <p>"OK" -
3538 </p>
3539 <blockquote class="text">
3540 <p>on success
3541 </p>
3542 </blockquote>
3543
3544 <p>"WRN:&lt;warning-code&gt;:&lt;warning-message&gt;" -
3545 </p>
3546 <blockquote class="text">
3547 <p>if MIDI input channel was set, but there are noteworthy
3548 issue(s) related, providing an appropriate warning code and
3549 warning message
3550 </p>
3551 </blockquote>
3552
3553 <p>"ERR:&lt;error-code&gt;:&lt;error-message&gt;" -
3554 </p>
3555 <blockquote class="text">
3556 <p>in case it failed, providing an appropriate error code and error message
3557 </p>
3558 </blockquote>
3559
3560 </blockquote>
3561
3562 <p>Examples:
3563 </p>
3564 <p></p>
3565 <blockquote class="text">
3566 <p>
3567 </p>
3568 </blockquote>
3569
3570 <a name="rfc.section.5.4.20"></a><h4><a name="anchor56">5.4.20</a>&nbsp;Setting channel volume</h4>
3571
3572 <p>The front-end can alter the volume of a sampler channel by sending
3573 the following command:
3574 </p>
3575 <p></p>
3576 <blockquote class="text">
3577 <p>SET CHANNEL VOLUME &lt;sampler-channel&gt; &lt;volume&gt;
3578 </p>
3579 </blockquote>
3580
3581 <p>Where &lt;volume&gt; is an optionally dotted positive number (a value
3582 smaller than 1.0 means attenuation, whereas a value greater than
3583 1.0 means amplification) and &lt;sampler-channel&gt; defines the sampler
3584 channel where this volume factor should be set.
3585 </p>
3586 <p>Possible Answers:
3587 </p>
3588 <p></p>
3589 <blockquote class="text">
3590 <p>"OK" -
3591 </p>
3592 <blockquote class="text">
3593 <p>on success
3594 </p>
3595 </blockquote>
3596
3597 <p>"WRN:&lt;warning-code&gt;:&lt;warning-message&gt;" -
3598 </p>
3599 <blockquote class="text">
3600 <p>if channel volume was set, but there are noteworthy
3601 issue(s) related, providing an appropriate warning code and
3602 warning message
3603 </p>
3604 </blockquote>
3605
3606 <p>"ERR:&lt;error-code&gt;:&lt;error-message&gt;" -
3607 </p>
3608 <blockquote class="text">
3609 <p>in case it failed, providing an appropriate error code and error message
3610 </p>
3611 </blockquote>
3612
3613 </blockquote>
3614
3615 <p>Examples:
3616 </p>
3617 <p></p>
3618 <blockquote class="text">
3619 <p>
3620 </p>
3621 </blockquote>
3622
3623 <a name="rfc.section.5.4.21"></a><h4><a name="anchor57">5.4.21</a>&nbsp;Resetting a sampler channel</h4>
3624
3625 <p>The front-end can reset a particular sampler channel by sending the following command:
3626 </p>
3627 <p></p>
3628 <blockquote class="text">
3629 <p>RESET CHANNEL &lt;sampler-channel&gt;
3630 </p>
3631 </blockquote>
3632
3633 <p>
3634 Where &lt;sampler-channel&gt; defines the sampler channel to be reset.
3635 This will cause the engine on that sampler channel, its voices and
3636 eventually disk streams and all control and status variables to be
3637 reset.
3638 </p>
3639 <p>Possible Answers:
3640 </p>
3641 <p></p>
3642 <blockquote class="text">
3643 <p>"OK" -
3644 </p>
3645 <blockquote class="text">
3646 <p>on success
3647 </p>
3648 </blockquote>
3649
3650 <p>"WRN:&lt;warning-code&gt;:&lt;warning-message&gt;" -
3651 </p>
3652 <blockquote class="text">
3653 <p>if channel was reset, but there are noteworthy issue(s)
3654 related, providing an appropriate warning code and warning
3655 message
3656 </p>
3657 </blockquote>
3658
3659 <p>"ERR:&lt;error-code&gt;:&lt;error-message&gt;" -
3660 </p>
3661 <blockquote class="text">
3662 <p>in case it failed, providing an appropriate error code and
3663 error message
3664 </p>
3665 </blockquote>
3666
3667 </blockquote>
3668
3669 <p>Examples:
3670 </p>
3671 <p></p>
3672 <blockquote class="text">
3673 <p>
3674 </p>
3675 </blockquote>
3676
3677 <a name="rfc.section.5.5"></a><h4><a name="anchor58">5.5</a>&nbsp;Controlling connection</h4>
3678
3679 <p>The following commands are used to control the connection to LinuxSampler.
3680 </p>
3681 <a name="rfc.section.5.5.1"></a><h4><a name="anchor59">5.5.1</a>&nbsp;Register front-end for receiving event messages</h4>
3682
3683 <p>The front-end can register itself to the LinuxSampler application to
3684 be informed about noteworthy events by sending this command:
3685 </p>
3686 <p></p>
3687 <blockquote class="text">
3688 <p>SUBSCRIBE &lt;event-id&gt;
3689 </p>
3690 </blockquote>
3691
3692 <p>where &lt;event-id&gt; will be replaced by the respective event that
3693 client wants to subscribe to.
3694 </p>
3695 <p>Possible Answers:
3696 </p>
3697 <p></p>
3698 <blockquote class="text">
3699 <p>"OK" -
3700 </p>
3701 <blockquote class="text">
3702 <p>on success
3703 </p>
3704 </blockquote>
3705
3706 <p>"WRN:&lt;warning-code&gt;:&lt;warning-message&gt;" -
3707 </p>
3708 <blockquote class="text">
3709 <p>if registration succeeded, but there are noteworthy
3710 issue(s) related, providing an appropriate warning code and
3711 warning message
3712 </p>
3713 </blockquote>
3714
3715 <p>"ERR:&lt;error-code&gt;:&lt;error-message&gt;" -
3716 </p>
3717 <blockquote class="text">
3718 <p>in case it failed, providing an appropriate error code and
3719 error message
3720 </p>
3721 </blockquote>
3722
3723 </blockquote>
3724
3725 <p>Examples:
3726 </p>
3727 <p></p>
3728 <blockquote class="text">
3729 <p>
3730 </p>
3731 </blockquote>
3732
3733 <a name="rfc.section.5.5.2"></a><h4><a name="anchor60">5.5.2</a>&nbsp;Unregister front-end for not receiving UDP event messages anymore</h4>
3734
3735 <p>The front-end can unregister itself if it doesn't want to receive event
3736 messages anymore by sending the following command:
3737 </p>
3738 <p></p>
3739 <blockquote class="text">
3740 <p>UNSUBSCRIBE &lt;event-id&gt;
3741 </p>
3742 </blockquote>
3743
3744 <p>Where &lt;event-id&gt; will be replaced by the respective event that
3745 client doesn't want to receive anymore.
3746 </p>
3747 <p>Possible Answers:
3748 </p>
3749 <p></p>
3750 <blockquote class="text">
3751 <p>"OK" -
3752 </p>
3753 <blockquote class="text">
3754 <p>on success
3755 </p>
3756 </blockquote>
3757
3758 <p>"WRN:&lt;warning-code&gt;:&lt;warning-message&gt;" -
3759 </p>
3760 <blockquote class="text">
3761 <p>if unregistration succeeded, but there are noteworthy
3762 issue(s) related, providing an appropriate warning code and
3763 warning message
3764 </p>
3765 </blockquote>
3766
3767 <p>"ERR:&lt;error-code&gt;:&lt;error-message&gt;" -
3768 </p>
3769 <blockquote class="text">
3770 <p>in case it failed, providing an appropriate error code and
3771 error message
3772 </p>
3773 </blockquote>
3774
3775 </blockquote>
3776
3777 <p>Examples:
3778 </p>
3779 <p></p>
3780 <blockquote class="text">
3781 <p>
3782 </p>
3783 </blockquote>
3784
3785 <a name="rfc.section.5.5.3"></a><h4><a name="anchor61">5.5.3</a>&nbsp;Enable or disable echo of commands</h4>
3786
3787 <p>To enable or disable back sending of commands to the client the following command can be used:
3788 </p>
3789 <p></p>
3790 <blockquote class="text">
3791 <p>SET ECHO &lt;value&gt;
3792 </p>
3793 </blockquote>
3794
3795 <p>Where &lt;value&gt; should be replaced either by "1" to enable echo mode
3796 or "0" to disable echo mode. When echo mode is enabled, all
3797 commands send to LinuxSampler will be immediately send back and
3798 after this echo the actual response to the command will be
3799 returned. Echo mode will only be altered for the client connection
3800 that issued the "SET ECHO" command, not globally for all client
3801 connections.
3802 </p>
3803 <p>Possible Answers:
3804 </p>
3805 <p></p>
3806 <blockquote class="text">
3807 <p>"OK" -
3808 </p>
3809 <blockquote class="text">
3810 <p>usually
3811 </p>
3812 </blockquote>
3813
3814 <p>"ERR:&lt;error-code&gt;:&lt;error-message&gt;" -
3815 </p>
3816 <blockquote class="text">
3817 <p>on syntax error, e.g. non boolean value
3818 </p>
3819 </blockquote>
3820
3821 </blockquote>
3822
3823 <p>Examples:
3824 </p>
3825 <p></p>
3826 <blockquote class="text">
3827 <p>
3828 </p>
3829 </blockquote>
3830
3831 <a name="rfc.section.5.5.4"></a><h4><a name="anchor62">5.5.4</a>&nbsp;Close client connection</h4>
3832
3833 <p>The client can close its network connection to LinuxSampler by sending the following command:
3834 </p>
3835 <p></p>
3836 <blockquote class="text">
3837 <p>QUIT
3838 </p>
3839 </blockquote>
3840
3841 <p>This is probably more interesting for manual telnet connections to
3842 LinuxSampler than really useful for a front-end implementation.
3843 </p>
3844 <a name="anchor63"></a><br /><hr />
3845 <table summary="layout" cellpadding="0" cellspacing="2" class="bug" align="right"><tr><td class="bug"><a href="#toc" class="link2">&nbsp;TOC&nbsp;</a></td></tr></table>
3846 <a name="rfc.section.6"></a><h3>6.&nbsp;Command Syntax</h3>
3847
3848 <p>TODO: will soon automatically included from src/network/lscp.y
3849 </p>
3850 <a name="anchor64"></a><br /><hr />
3851 <table summary="layout" cellpadding="0" cellspacing="2" class="bug" align="right"><tr><td class="bug"><a href="#toc" class="link2">&nbsp;TOC&nbsp;</a></td></tr></table>
3852 <a name="rfc.section.7"></a><h3>7.&nbsp;Events</h3>
3853
3854 <p>This chapter will describe all currently defined events supported by LinuxSampler.
3855 </p>
3856 <a name="rfc.section.7.1"></a><h4><a name="anchor65">7.1</a>&nbsp;Number of sampler channels changed</h4>
3857
3858 <p>Client may want to be notified when the total number of channels on the
3859 back-end changes by issuing the following command:
3860 </p>
3861 <p></p>
3862 <blockquote class="text">
3863 <p>SUBSCRIBE CHANNELS
3864 </p>
3865 </blockquote>
3866
3867 <p>Server will start sending the following notification messages:
3868 </p>
3869 <p></p>
3870 <blockquote class="text">
3871 <p>"NOTIFY:CHANNELS:&lt;channels&gt;"
3872 </p>
3873 </blockquote>
3874
3875 <p>where &lt;channels&gt; will be replaced by the new number
3876 of sampler channels.
3877 </p>
3878 <a name="rfc.section.7.2"></a><h4><a name="anchor66">7.2</a>&nbsp;Number of active voices changed</h4>
3879
3880 <p>Client may want to be notified when the number of voices on the
3881 back-end changes by issuing the following command:
3882 </p>
3883 <p></p>
3884 <blockquote class="text">
3885 <p>SUBSCRIBE VOICE_COUNT
3886 </p>
3887 </blockquote>
3888
3889 <p>Server will start sending the following notification messages:
3890 </p>
3891 <p></p>
3892 <blockquote class="text">
3893 <p>"NOTIFY:VOICE_COUNT:&lt;sampler-channel&gt; &lt;voices>&gt;
3894 </p>
3895 </blockquote>
3896
3897 <p>where &lt;sampler-channel&gt; will be replaced by the sampler channel the
3898 voice count change occurred and &lt;voices>&gt; by the new number of
3899 active voices on that channel.
3900 </p>
3901 <a name="rfc.section.7.3"></a><h4><a name="anchor67">7.3</a>&nbsp;Number of active disk streams changed</h4>
3902
3903 <p>Client may want to be notified when the number of streams on the back-end
3904 changes by issuing the following command: SUBSCRIBE STREAM_COUNT
3905 </p>
3906 <p></p>
3907 <blockquote class="text">
3908 <p>SUBSCRIBE STREAM_COUNT
3909 </p>
3910 </blockquote>
3911
3912 <p>Server will start sending the following notification messages:
3913 </p>
3914 <p></p>
3915 <blockquote class="text">
3916 <p>"NOTIFY:STREAM_COUNT:&lt;sampler-channel&gt; &lt;streams&gt;"
3917 </p>
3918 </blockquote>
3919
3920 <p>where &lt;sampler-channel&gt; will be replaced by the sampler channel the
3921 stream count change occurred and &lt;streams&gt; by the new number of
3922 active disk streams on that channel.
3923 </p>
3924 <a name="rfc.section.7.4"></a><h4><a name="anchor68">7.4</a>&nbsp;Disk stream buffer fill state changed</h4>
3925
3926 <p>Client may want to be notified when the number of streams on the back-end
3927 changes by issuing the following command:
3928 </p>
3929 <p></p>
3930 <blockquote class="text">
3931 <p>SUBSCRIBE BUFFER_FILL
3932 </p>
3933 </blockquote>
3934
3935 <p>Server will start sending the following notification messages:
3936 </p>
3937 <p></p>
3938 <blockquote class="text">
3939 <p>"NOTIFY:BUFFER_FILL:&lt;sampler-channel&gt; &lt;fill-data&gt;"
3940 </p>
3941 </blockquote>
3942
3943 <p>where &lt;sampler-channel&gt; will be replaced by the sampler channel the
3944 buffer fill state change occurred and &lt;fill-data&gt; will be replaced by the
3945 buffer fill data for this channel as described in 4.4.12 as if the
3946 "GET CHANNEL BUFFER_FILL PERCENTAGE" was issued on this channel.
3947 </p>
3948 <a name="rfc.section.7.5"></a><h4><a name="anchor69">7.5</a>&nbsp;Channel information changed</h4>
3949
3950 <p>Client may want to be notified when changes were made to sampler channels on the
3951 back-end changes by issuing the following command:
3952 </p>
3953 <p></p>
3954 <blockquote class="text">
3955 <p>SUBSCRIBE INFO
3956 </p>
3957 </blockquote>
3958
3959 <p>Server will start sending the following notification messages:
3960 </p>
3961 <p></p>
3962 <blockquote class="text">
3963 <p>"NOTIFY:INFO:&lt;sampler-channel&gt;"
3964 </p>
3965 </blockquote>
3966
3967 <p>where &lt;sampler-channel&gt; will be replaced by the sampler channel the
3968 channel info change occurred. The front-end will have to send
3969 the respective command to actually get the channel info. Because these messages
3970 will be triggered by LSCP commands issued by other clients rather than real
3971 time events happening on the server, it is believed that an empty notification
3972 message is sufficient here.
3973 </p>
3974 <a name="rfc.section.7.6"></a><h4><a name="anchor70">7.6</a>&nbsp;Miscellaneous and debugging events</h4>
3975
3976 <p>Client may want to be notified of miscellaneous and debugging events occurring at
3977 the server by issuing the following command:
3978 </p>
3979 <p></p>
3980 <blockquote class="text">
3981 <p>SUBSCRIBE MISCELLANEOUS
3982 </p>
3983 </blockquote>
3984
3985 <p>Server will start sending the following notification messages:
3986 </p>
3987 <p></p>
3988 <blockquote class="text">
3989 <p>"NOTIFY:MISCELLANEOUS:&lt;string&gt;"
3990 </p>
3991 </blockquote>
3992
3993 <p>where &lt;string&gt; will be replaced by whatever data server
3994 wants to send to the client. Client MAY display this data to the
3995 user AS IS to facilitate debugging.
3996 </p>
3997 <a name="anchor71"></a><br /><hr />
3998 <table summary="layout" cellpadding="0" cellspacing="2" class="bug" align="right"><tr><td class="bug"><a href="#toc" class="link2">&nbsp;TOC&nbsp;</a></td></tr></table>
3999 <a name="rfc.section.8"></a><h3>8.&nbsp;Security Considerations</h3>
4000
4001 <p>As there is so far no method of authentication and authorization
4002 defined and so not required for a client applications to succeed to
4003 connect, running LinuxSampler might be a security risk for the host
4004 system the LinuxSampler instance is running on.
4005 </p>
4006 <a name="anchor72"></a><br /><hr />
4007 <table summary="layout" cellpadding="0" cellspacing="2" class="bug" align="right"><tr><td class="bug"><a href="#toc" class="link2">&nbsp;TOC&nbsp;</a></td></tr></table>
4008 <a name="rfc.section.9"></a><h3>9.&nbsp;Acknowledgments</h3>
4009
4010 <p>This document has benefited greatly from the comments of the
4011 following people, discussed on the LinuxSampler developer's mailing
4012 list:
4013 </p>
4014 <p></p>
4015 <blockquote class="text">
4016 <p>Rui Nuno Capela
4017 </p>
4018 <p>Vladimir Senkov
4019 </p>
4020 <p>Mark Knecht
4021 </p>
4022 </blockquote>
4023
4024 <a name="rfc.references1"></a><br /><hr />
4025 <table summary="layout" cellpadding="0" cellspacing="2" class="bug" align="right"><tr><td class="bug"><a href="#toc" class="link2">&nbsp;TOC&nbsp;</a></td></tr></table>
4026 <h3>10&nbsp;References</h3>
4027 <table width="99%" border="0">
4028 <tr><td class="author-text" valign="top"><a name="RFC2119">[RFC2119]</a></td>
4029 <td class="author-text"><a href="mailto:sob@harvard.edu">Bradner, S.</a>, "<a href="ftp://ftp.isi.edu/in-notes/rfc2119.txt">Key words for use in RFCs to Indicate Requirement Levels</a>", BCP 14, RFC 2119, March 1997 (<a href="ftp://ftp.isi.edu/in-notes/rfc2119.txt">TXT</a>, <a href="http://xml.resource.org/public/rfc/html/rfc2119.html">HTML</a>, <a href="http://xml.resource.org/public/rfc/xml/rfc2119.xml">XML</a>).</td></tr>
4030 </table>
4031
4032 <a name="rfc.authors"></a><br /><hr />
4033 <table summary="layout" cellpadding="0" cellspacing="2" class="bug" align="right"><tr><td class="bug"><a href="#toc" class="link2">&nbsp;TOC&nbsp;</a></td></tr></table>
4034 <h3>Author's Address</h3>
4035 <table width="99%" border="0" cellpadding="0" cellspacing="0">
4036 <tr><td class="author-text">&nbsp;</td>
4037 <td class="author-text">C.
4038 Schoenebeck</td></tr>
4039 <tr><td class="author-text">&nbsp;</td>
4040 <td class="author-text">Interessengemeinschaft Software Engineering e. V.</td></tr>
4041 <tr><td class="author-text">&nbsp;</td>
4042 <td class="author-text">Max-Planck-Str. 39</td></tr>
4043 <tr><td class="author-text">&nbsp;</td>
4044 <td class="author-text">74081 Heilbronn</td></tr>
4045 <tr><td class="author-text">&nbsp;</td>
4046 <td class="author-text">Germany</td></tr>
4047 <tr><td class="author" align="right">EMail:&nbsp;</td>
4048 <td class="author-text"><a href="mailto:schoenebeck at software minus engineering dot org">schoenebeck at software minus engineering dot org</a></td></tr>
4049 </table>
4050 <a name="rfc.copyright"></a><br /><hr />
4051 <table summary="layout" cellpadding="0" cellspacing="2" class="bug" align="right"><tr><td class="bug"><a href="#toc" class="link2">&nbsp;TOC&nbsp;</a></td></tr></table>
4052 <h3>Intellectual Property Statement</h3>
4053 <p class='copyright'>
4054 The IETF takes no position regarding the validity or scope of
4055 any intellectual property or other rights that might be claimed
4056 to pertain to the implementation or use of the technology
4057 described in this document or the extent to which any license
4058 under such rights might or might not be available; neither does
4059 it represent that it has made any effort to identify any such
4060 rights. Information on the IETF's procedures with respect to
4061 rights in standards-track and standards-related documentation
4062 can be found in BCP-11. Copies of claims of rights made
4063 available for publication and any assurances of licenses to
4064 be made available, or the result of an attempt made
4065 to obtain a general license or permission for the use of such
4066 proprietary rights by implementors or users of this
4067 specification can be obtained from the IETF Secretariat.</p>
4068 <p class='copyright'>
4069 The IETF invites any interested party to bring to its
4070 attention any copyrights, patents or patent applications, or
4071 other proprietary rights which may cover technology that may be
4072 required to practice this standard. Please address the
4073 information to the IETF Executive Director.</p>
4074 <h3>Full Copyright Statement</h3>
4075 <p class='copyright'>
4076 Copyright (C) The Internet Society (2004). All Rights Reserved.</p>
4077 <p class='copyright'>
4078 This document and translations of it may be copied and furnished to
4079 others, and derivative works that comment on or otherwise explain it
4080 or assist in its implementation may be prepared, copied, published and
4081 distributed, in whole or in part, without restriction of any kind,
4082 provided that the above copyright notice and this paragraph are
4083 included on all such copies and derivative works. However, this
4084 document itself may not be modified in any way, such as by removing
4085 the copyright notice or references to the Internet Society or other
4086 Internet organizations, except as needed for the purpose of
4087 developing Internet standards in which case the procedures for
4088 copyrights defined in the Internet Standards process must be
4089 followed, or as required to translate it into languages other than
4090 English.</p>
4091 <p class='copyright'>
4092 The limited permissions granted above are perpetual and will not be
4093 revoked by the Internet Society or its successors or assignees.</p>
4094 <p class='copyright'>
4095 This document and the information contained herein is provided on an
4096 &quot;AS IS&quot; basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
4097 TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
4098 BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
4099 HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
4100 MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.</p>
4101 <h3>Acknowledgment</h3>
4102 <p class='copyright'>
4103 Funding for the RFC Editor function is currently provided by the
4104 Internet Society.</p>
4105 </body></html>

  ViewVC Help
Powered by ViewVC