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

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

  ViewVC Help
Powered by ViewVC