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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 542 - (hide 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: 145687 byte(s)
Initial Revision

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

  ViewVC Help
Powered by ViewVC