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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 945 - (show annotations) (download) (as text)
Sun Nov 26 16:39:49 2006 UTC (17 years, 4 months ago) by schoenebeck
File MIME type: text/html
File size: 239296 byte(s)
- new LSCP draft (v1.2), added command set for
  MIDI instrument mapping

1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2 <html lang="en"><head><title>LinuxSampler Control Protocol</title>
3 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
4 <meta name="description" content="LinuxSampler Control Protocol">
5 <meta name="keywords" content="LSCP">
6 <meta name="generator" content="xml2rfc v1.30 (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.info{ /*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 table.toc { margin: 0 0 0 3em; padding: 0; border: 0; vertical-align: text-top; }
62 td.toc { font-size: small; font-weight: bold; vertical-align: text-top; }
63
64 span.emph { font-style: italic; }
65 span.strong { font-weight: bold; }
66 span.verb, span.vbare { font-family: "Courier New", Courier, monospace ; }
67
68 span.vemph { font-style: italic; font-family: "Courier New", Courier, monospace ; }
69 span.vstrong { font-weight: bold; font-family: "Courier New", Courier, monospace ; }
70 span.vdeluxe { font-weight: bold; font-style: italic; font-family: "Courier New", Courier, monospace ; }
71
72 ol.text { margin-left: 2em; margin-right: 2em; }
73 ul.text { margin-left: 2em; margin-right: 2em; }
74 li { margin-left: 3em; }
75
76 pre { margin-left: 3em; color: #333333; background-color: transparent;
77 font-family: "Courier New", Courier, monospace ; font-size: small ;
78 text-align: left;
79 }
80
81 h3 { color: #333333; font-size: medium ;
82 font-family: helvetica, arial, sans-serif ;
83 background-color: transparent; }
84 h4 { font-size: small; font-family: helvetica, arial, sans-serif ; }
85
86 table.bug { width: 30px ; height: 15px ; }
87 td.bug { color: #ffffff ; background-color: #990000 ;
88 text-align: center ; width: 30px ; height: 15px ;
89 }
90 td.bug A.link2 { color: #ffffff ; font-weight: bold;
91 text-decoration: none;
92 font-family: monaco, charcoal, geneva, "MS Sans Serif", helvetica, sans-serif;
93 font-size: x-small ; background-color: transparent }
94
95 td.header { color: #ffffff; font-size: x-small ;
96 font-family: arial, helvetica, sans-serif; vertical-align: top;
97 background-color: #666666 ; width: 33% ; }
98 td.author { font-weight: bold; margin-left: 4em; font-size: x-small ; }
99 td.author-text { font-size: x-small; }
100 table.full { vertical-align: top ; border-collapse: collapse ;
101 border-style: solid solid solid solid ;
102 border-color: black black black black ;
103 font-size: small ; text-align: center ; }
104 table.headers, table.none { vertical-align: top ; border-collapse: collapse ;
105 border-style: none;
106 font-size: small ; text-align: center ; }
107 table.full th { font-weight: bold ;
108 border-style: solid ;
109 border-color: black black black black ; }
110 table.headers th { font-weight: bold ;
111 border-style: none none solid none;
112 border-color: black black black black ; }
113 table.none th { font-weight: bold ;
114 border-style: none; }
115 table.full td {
116 border-style: solid solid solid solid ;
117 border-color: #333333 #333333 #333333 #333333 ; }
118 table.headers td, table.none td { border-style: none; }
119
120 hr { height: 1px }
121 -->
122 </style>
123 </head>
124 <body>
125 <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>
126 <table summary="layout" width="66%" border="0" cellpadding="0" cellspacing="0"><tr><td><table summary="layout" width="100%" border="0" cellpadding="2" cellspacing="1">
127 <tr><td class="header">LinuxSampler Developers</td><td class="header">C. Schoenebeck</td></tr>
128 <tr><td class="header">Internet-Draft</td><td class="header">Interessengemeinschaft Software</td></tr>
129 <tr><td class="header">Expires: May 30, 2007</td><td class="header">Engineering e. V.</td></tr>
130 <tr><td class="header">&nbsp;</td><td class="header">November 26, 2006</td></tr>
131 </table></td></tr></table>
132 <div align="right"><span class="title"><br />LinuxSampler Control Protocol</span></div>
133 <div align="right"><span class="title"><br />LSCP 1.2</span></div>
134
135 <h3>Status of this Memo</h3>
136 <p>
137 This document is an Internet-Draft and is
138 in full conformance with all provisions of Section&nbsp;10 of RFC&nbsp;2026.</p>
139 <p>
140 Internet-Drafts are working documents of the Internet Engineering
141 Task Force (IETF), its areas, and its working groups.
142 Note that other groups may also distribute working documents as
143 Internet-Drafts.</p>
144 <p>
145 Internet-Drafts are draft documents valid for a maximum of six months
146 and may be updated, replaced, or obsoleted by other documents at any time.
147 It is inappropriate to use Internet-Drafts as reference material or to cite
148 them other than as &ldquo;work in progress.&rdquo;</p>
149 <p>
150 The list of current Internet-Drafts can be accessed at
151 <a href='http://www.ietf.org/ietf/1id-abstracts.txt'>http://www.ietf.org/ietf/1id-abstracts.txt</a>.</p>
152 <p>
153 The list of Internet-Draft Shadow Directories can be accessed at
154 <a href='http://www.ietf.org/shadow.html'>http://www.ietf.org/shadow.html</a>.</p>
155 <p>
156 This Internet-Draft will expire on May 30, 2007.</p>
157
158 <h3>Copyright Notice</h3>
159 <p>
160 Copyright &copy; The Internet Society (2006). All Rights Reserved.</p>
161
162 <h3>Abstract</h3>
163
164 <p>The LinuxSampler Control Protocol (LSCP) is an
165 application-level protocol primarily intended for local and
166 remote controlling the LinuxSampler backend application, which is a
167 sophisticated server-like console application essentially playing
168 back audio samples and manipulating the samples in real time to
169 certain extent.
170 </p><a name="toc"></a><br /><hr />
171 <h3>Table of Contents</h3>
172 <p class="toc">
173 <a href="#anchor1">1.</a>&nbsp;
174 Requirements notation<br />
175 <a href="#LSCP versioning">2.</a>&nbsp;
176 Versioning of this specification<br />
177 <a href="#anchor2">3.</a>&nbsp;
178 Introduction<br />
179 <a href="#anchor3">4.</a>&nbsp;
180 Focus of this protocol<br />
181 <a href="#anchor4">5.</a>&nbsp;
182 Communication Overview<br />
183 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#anchor5">5.1.</a>&nbsp;
184 Request/response communication method<br />
185 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#anchor6">5.1.1.</a>&nbsp;
186 Result format<br />
187 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#anchor7">5.2.</a>&nbsp;
188 Subscribe/notify communication method<br />
189 <a href="#control_commands">6.</a>&nbsp;
190 Description for control commands<br />
191 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#anchor8">6.1.</a>&nbsp;
192 Ignored lines and comments<br />
193 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#anchor9">6.2.</a>&nbsp;
194 Configuring audio drivers<br />
195 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#GET AVAILABLE_AUDIO_OUTPUT_DRIVERS">6.2.1.</a>&nbsp;
196 Getting amount of available audio output drivers<br />
197 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#LIST AVAILABLE_AUDIO_OUTPUT_DRIVERS">6.2.2.</a>&nbsp;
198 Getting all available audio output drivers<br />
199 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#GET AUDIO_OUTPUT_DRIVER INFO">6.2.3.</a>&nbsp;
200 Getting information about a specific audio
201 output driver<br />
202 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#GET AUDIO_OUTPUT_DRIVER_PARAMETER INFO">6.2.4.</a>&nbsp;
203 Getting information about specific audio
204 output driver parameter<br />
205 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#CREATE AUDIO_OUTPUT_DEVICE">6.2.5.</a>&nbsp;
206 Creating an audio output device<br />
207 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#DESTROY AUDIO_OUTPUT_DEVICE">6.2.6.</a>&nbsp;
208 Destroying an audio output device<br />
209 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#GET AUDIO_OUTPUT_DEVICES">6.2.7.</a>&nbsp;
210 Getting all created audio output device count<br />
211 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#LIST AUDIO_OUTPUT_DEVICES">6.2.8.</a>&nbsp;
212 Getting all created audio output device list<br />
213 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#GET AUDIO_OUTPUT_DEVICE INFO">6.2.9.</a>&nbsp;
214 Getting current settings of an audio output device<br />
215 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#SET AUDIO_OUTPUT_DEVICE_PARAMETER">6.2.10.</a>&nbsp;
216 Changing settings of audio output devices<br />
217 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#GET AUDIO_OUTPUT_CHANNEL INFO">6.2.11.</a>&nbsp;
218 Getting information about an audio channel<br />
219 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#GET AUDIO_OUTPUT_CHANNEL_PARAMETER INFO">6.2.12.</a>&nbsp;
220 Getting information about specific audio channel parameter<br />
221 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#SET AUDIO_OUTPUT_CHANNEL_PARAMETER">6.2.13.</a>&nbsp;
222 Changing settings of audio output channels<br />
223 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#anchor10">6.3.</a>&nbsp;
224 Configuring MIDI input drivers<br />
225 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#GET AVAILABLE_MIDI_INPUT_DRIVERS">6.3.1.</a>&nbsp;
226 Getting amount of available MIDI input drivers<br />
227 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#LIST AVAILABLE_MIDI_INPUT_DRIVERS">6.3.2.</a>&nbsp;
228 Getting all available MIDI input drivers<br />
229 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#GET MIDI_INPUT_DRIVER INFO">6.3.3.</a>&nbsp;
230 Getting information about a specific MIDI input driver<br />
231 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#GET MIDI_INPUT_DRIVER_PARAMETER INFO">6.3.4.</a>&nbsp;
232 Getting information about specific MIDI input driver parameter<br />
233 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#CREATE MIDI_INPUT_DEVICE">6.3.5.</a>&nbsp;
234 Creating a MIDI input device<br />
235 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#DESTROY MIDI_INPUT_DEVICE">6.3.6.</a>&nbsp;
236 Destroying a MIDI input device<br />
237 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#GET MIDI_INPUT_DEVICES">6.3.7.</a>&nbsp;
238 Getting all created MIDI input device count<br />
239 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#LIST MIDI_INPUT_DEVICES">6.3.8.</a>&nbsp;
240 Getting all created MIDI input device list<br />
241 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#GET MIDI_INPUT_DEVICE INFO">6.3.9.</a>&nbsp;
242 Getting current settings of a MIDI input device<br />
243 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#SET MIDI_INPUT_DEVICE_PARAMETER">6.3.10.</a>&nbsp;
244 Changing settings of MIDI input devices<br />
245 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#GET MIDI_INPUT_PORT INFO">6.3.11.</a>&nbsp;
246 Getting information about a MIDI port<br />
247 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#GET MIDI_INPUT_PORT_PARAMETER INFO">6.3.12.</a>&nbsp;
248 Getting information about specific MIDI port parameter<br />
249 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#SET MIDI_INPUT_PORT_PARAMETER">6.3.13.</a>&nbsp;
250 Changing settings of MIDI input ports<br />
251 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#anchor11">6.4.</a>&nbsp;
252 Configuring sampler channels<br />
253 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#LOAD INSTRUMENT">6.4.1.</a>&nbsp;
254 Loading an instrument<br />
255 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#LOAD ENGINE">6.4.2.</a>&nbsp;
256 Loading a sampler engine<br />
257 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#GET CHANNELS">6.4.3.</a>&nbsp;
258 Getting all created sampler channel count<br />
259 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#LIST CHANNELS">6.4.4.</a>&nbsp;
260 Getting all created sampler channel list<br />
261 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ADD CHANNEL">6.4.5.</a>&nbsp;
262 Adding a new sampler channel<br />
263 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#REMOVE CHANNEL">6.4.6.</a>&nbsp;
264 Removing a sampler channel<br />
265 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#GET AVAILABLE_ENGINES">6.4.7.</a>&nbsp;
266 Getting amount of available engines<br />
267 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#LIST AVAILABLE_ENGINES">6.4.8.</a>&nbsp;
268 Getting all available engines<br />
269 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#GET ENGINE INFO">6.4.9.</a>&nbsp;
270 Getting information about an engine<br />
271 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#GET CHANNEL INFO">6.4.10.</a>&nbsp;
272 Getting sampler channel information<br />
273 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#GET CHANNEL VOICE_COUNT">6.4.11.</a>&nbsp;
274 Current number of active voices<br />
275 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#GET CHANNEL STREAM_COUNT">6.4.12.</a>&nbsp;
276 Current number of active disk streams<br />
277 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#GET CHANNEL BUFFER_FILL">6.4.13.</a>&nbsp;
278 Current fill state of disk stream buffers<br />
279 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#SET CHANNEL AUDIO_OUTPUT_DEVICE">6.4.14.</a>&nbsp;
280 Setting audio output device<br />
281 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#SET CHANNEL AUDIO_OUTPUT_TYP">6.4.15.</a>&nbsp;
282 Setting audio output type<br />
283 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#SET CHANNEL AUDIO_OUTPUT_CHANNEL">6.4.16.</a>&nbsp;
284 Setting audio output channel<br />
285 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#SET CHANNEL MIDI_INPUT_DEVICE">6.4.17.</a>&nbsp;
286 Setting MIDI input device<br />
287 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#SET CHANNEL MIDI_INPUT_TYPE">6.4.18.</a>&nbsp;
288 Setting MIDI input type<br />
289 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#SET CHANNEL MIDI_INPUT_PORT">6.4.19.</a>&nbsp;
290 Setting MIDI input port<br />
291 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#SET CHANNEL MIDI_INPUT_CHANNEL">6.4.20.</a>&nbsp;
292 Setting MIDI input channel<br />
293 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#SET CHANNEL VOLUME">6.4.21.</a>&nbsp;
294 Setting channel volume<br />
295 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#SET CHANNEL MUTE">6.4.22.</a>&nbsp;
296 Muting a sampler channel<br />
297 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#SET CHANNEL SOLO">6.4.23.</a>&nbsp;
298 Soloing a sampler channel<br />
299 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#RESET CHANNEL">6.4.24.</a>&nbsp;
300 Resetting a sampler channel<br />
301 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#anchor12">6.5.</a>&nbsp;
302 Controlling connection<br />
303 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#SUBSCRIBE">6.5.1.</a>&nbsp;
304 Register front-end for receiving event messages<br />
305 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#UNSUBSCRIBE">6.5.2.</a>&nbsp;
306 Unregister front-end for not receiving event messages<br />
307 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#SET ECHO">6.5.3.</a>&nbsp;
308 Enable or disable echo of commands<br />
309 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#QUIT">6.5.4.</a>&nbsp;
310 Close client connection<br />
311 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#anchor13">6.6.</a>&nbsp;
312 Global commands<br />
313 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#GET TOTAL_VOICE_COUNT">6.6.1.</a>&nbsp;
314 Current number of active voices<br />
315 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#GET TOTAL_VOICE_COUNT_MAX">6.6.2.</a>&nbsp;
316 Maximum amount of active voices<br />
317 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#RESET">6.6.3.</a>&nbsp;
318 Reset sampler<br />
319 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#GET SERVER INFO">6.6.4.</a>&nbsp;
320 General sampler informations<br />
321 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#anchor14">6.7.</a>&nbsp;
322 MIDI Instrument Mapping<br />
323 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#MAP MIDI_INSTRUMENT">6.7.1.</a>&nbsp;
324 Create or replace a MIDI instrument map entry<br />
325 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#GET MIDI_INSTRUMENTS">6.7.2.</a>&nbsp;
326 Getting ammount of MIDI instrument map entries<br />
327 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#LIST MIDI_INSTRUMENTS">6.7.3.</a>&nbsp;
328 Getting indeces of all MIDI instrument map entries<br />
329 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#UNMAP MIDI_INSTRUMENT">6.7.4.</a>&nbsp;
330 Remove an entry from the MIDI instrument map<br />
331 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#GET MIDI_INSTRUMENT INFO">6.7.5.</a>&nbsp;
332 Get current settings of MIDI instrument map entry<br />
333 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#CLEAR MIDI_INSTRUMENTS">6.7.6.</a>&nbsp;
334 Clear MIDI instrument map<br />
335 <a href="#command_syntax">7.</a>&nbsp;
336 Command Syntax<br />
337 <a href="#events">8.</a>&nbsp;
338 Events<br />
339 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#SUBSCRIBE CHANNEL">8.1.</a>&nbsp;
340 Number of sampler channels changed<br />
341 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#SUBSCRIBE VOICE_COUNT">8.2.</a>&nbsp;
342 Number of active voices changed<br />
343 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#SUBSCRIBE STREAM_COUNT">8.3.</a>&nbsp;
344 Number of active disk streams changed<br />
345 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#SUBSCRIBE BUFFER_FILL">8.4.</a>&nbsp;
346 Disk stream buffer fill state changed<br />
347 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#SUBSCRIBE INFO">8.5.</a>&nbsp;
348 Channel information changed<br />
349 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#SUBSCRIBE TOTAL_VOICE_COUNT">8.6.</a>&nbsp;
350 Total number of active voices changed<br />
351 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#SUBSCRIBE MISCELLANEOUS">8.7.</a>&nbsp;
352 Miscellaneous and debugging events<br />
353 <a href="#anchor15">9.</a>&nbsp;
354 Security Considerations<br />
355 <a href="#anchor16">10.</a>&nbsp;
356 Acknowledgments<br />
357 <a href="#rfc.references1">11.</a>&nbsp;
358 References<br />
359 <a href="#rfc.authors">&#167;</a>&nbsp;
360 Author's Address<br />
361 <a href="#rfc.copyright">&#167;</a>&nbsp;
362 Intellectual Property and Copyright Statements<br />
363 </p>
364 <br clear="all" />
365
366 <a name="anchor1"></a><br /><hr />
367 <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>
368 <a name="rfc.section.1"></a><h3>1.&nbsp;Requirements notation</h3>
369
370 <p>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL",
371 "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY",
372 and "OPTIONAL" in this document are to be interpreted as
373 described in <a class="info" href="#RFC2119">[RFC2119]<span> (</span><span class="info">Bradner, S., &ldquo;Key words for use in RFCs to Indicate Requirement Levels,&rdquo; 1997.</span><span>)</span></a>.
374 </p>
375 <p>This protocol is always case-sensitive if not explicitly
376 claimed the opposite.
377 </p>
378 <p>In examples, "C:" and "S:" indicate lines sent by the client
379 (front-end) and server (LinuxSampler) respectively. Lines in
380 examples must be interpreted as every line being CRLF
381 terminated (carriage return character followed by line feed
382 character as defined in the ASCII standard), thus the following
383 example:
384 </p>
385 <p>
386 </p>
387 <blockquote class="text">
388 <p>C: "some line"
389 </p>
390 <p>&nbsp;&nbsp;&nbsp;"another line"
391 </p>
392 </blockquote><p>
393
394 </p>
395 <p>must actually be interpreted as client sending the following
396 message:
397 </p>
398 <p>
399 </p>
400 <blockquote class="text">
401 <p>"some line&lt;CR&gt;&lt;LF&gt;another
402 line&lt;CR&gt;&lt;LF&gt;"
403 </p>
404 </blockquote><p>
405
406 </p>
407 <p>where &lt;CR&gt; symbolizes the carriage return character and
408 &lt;LF&gt; the line feed character as defined in the ASCII
409 standard.
410 </p>
411 <p>Due to technical reasons, messages can arbitrary be
412 fragmented, means the following example:
413 </p>
414 <p>
415 </p>
416 <blockquote class="text">
417 <p>S: "abcd"
418 </p>
419 </blockquote><p>
420
421 </p>
422 <p>could also happen to be sent in three messages like in the
423 following sequence scenario:
424 </p>
425 <p>
426 </p>
427 <ul class="text">
428 <li>server sending message "a"
429 </li>
430 <li>followed by a delay (pause) with
431 arbitrary duration
432 </li>
433 <li>followed by server sending message
434 "bcd&lt;CR&gt;"
435 </li>
436 <li>again followed by a delay (pause) with arbitrary
437 duration
438 </li>
439 <li>followed by server sending the message
440 "&lt;LF&gt;"
441 </li>
442 </ul><p>
443
444 </p>
445 <p>where again &lt;CR&gt; and &lt;LF&gt; symbolize the carriage
446 return and line feed characters respectively.
447 </p>
448 <a name="LSCP versioning"></a><br /><hr />
449 <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>
450 <a name="rfc.section.2"></a><h3>2.&nbsp;Versioning of this specification</h3>
451
452 <p>LSCP will certainly be extended and enhanced by-and-by. Each official
453 release of the LSCP specification will be tagged with a unique version
454 tuple. The version tuple consists at least of a major and minor version
455 number like:
456
457 </p>
458 <p>
459 </p>
460 <blockquote class="text">
461 <p>"1.2"
462 </p>
463 </blockquote><p>
464
465 </p>
466 <p>
467 In this example the major version number would be "1" and the minor
468 version number would be "2". Note that the version tuple might also
469 have more than two elements. The major version number defines a
470 group of backward compatible versions. That means a frontend is
471 compatible to the connected sampler if and only if the LSCP versions
472 to which each of the two parties complies to, match both of the
473 following rules:
474
475 </p>
476 <p>Compatibility:
477 </p>
478 <p>
479 </p>
480 <ol class="text">
481 <li>The frontend's LSCP major version and the sampler's LSCP
482 major version are exactly equal.
483 </li>
484 <li>The frontend's LSCP minor version is less or equal than
485 the sampler's LSCP minor version.
486 </li>
487 </ol><p>
488
489 </p>
490 <p>
491 Compatibility can only be claimed if both rules are true.
492 The frontend can use the
493 <a class="info" href="#GET SERVER INFO">"GET SERVER INFO"<span> (</span><span class="info">General sampler informations</span><span>)</span></a> command to
494 get the version of the LSCP specification the sampler complies with.
495
496 </p>
497 <a name="anchor2"></a><br /><hr />
498 <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>
499 <a name="rfc.section.3"></a><h3>3.&nbsp;Introduction</h3>
500
501 <p>LinuxSampler is a so called software sampler application
502 capable to playback audio samples from a computer's Random
503 Access Memory (RAM) as well as directly streaming it from disk.
504 LinuxSampler is designed to be modular. It provides several so
505 called "sampler engines" where each engine is specialized for a
506 certain purpose. LinuxSampler has virtual channels which will be
507 referred in this document as "sampler channels". The channels
508 are in such way virtual as they can be connected to an
509 arbitrary MIDI input method and arbitrary MIDI channel (e.g.
510 sampler channel 17 could be connected to an ALSA sequencer
511 device 64:0 and listening to MIDI channel 1 there). Each sampler
512 channel will be associated with an instance of one of the available
513 sampler engines (e.g. GigEngine, DLSEngine). The audio output of
514 each sampler channel can be routed to an arbitrary audio output
515 method (ALSA / JACK) and an arbitrary audio output channel
516 there.
517 </p>
518 <a name="anchor3"></a><br /><hr />
519 <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>
520 <a name="rfc.section.4"></a><h3>4.&nbsp;Focus of this protocol</h3>
521
522 <p>Main focus of this protocol is to provide a way to configure
523 a running LinuxSampler instance and to retrieve information
524 about it. The focus of this protocol is not to provide a way to
525 control synthesis parameters or even to trigger or release
526 notes. Or in other words; the focus are those functionalities
527 which are not covered by MIDI or which may at most be handled
528 via MIDI System Exclusive Messages.
529 </p>
530 <a name="anchor4"></a><br /><hr />
531 <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>
532 <a name="rfc.section.5"></a><h3>5.&nbsp;Communication Overview</h3>
533
534 <p>There are two distinct methods of communication between a
535 running instance of LinuxSampler and one or more control
536 applications, so called "front-ends": a simple request/response
537 communication method used by the clients to give commands to the
538 server as well as to inquire about server's status and a
539 subscribe/notify communication method used by the client to
540 subscribe to and receive notifications of certain events as they
541 happen on the server. The latter needs more effort to be
542 implemented in the front-end application. The two communication
543 methods will be described next.
544 </p>
545 <a name="anchor5"></a><br /><hr />
546 <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>
547 <a name="rfc.section.5.1"></a><h3>5.1.&nbsp;Request/response communication method</h3>
548
549 <p>This simple communication method is based on
550 <a class="info" href="#RFC793">TCP<span> (</span><span class="info">Defense Advanced Research Projects Agency, &ldquo;TRANSMISSION CONTROL PROTOCOL,&rdquo; 1981.</span><span>)</span></a> [RFC793]. The
551 front-end application establishes a TCP connection to the
552 LinuxSampler instance on a certain host system. Then the
553 front-end application will send certain ASCII based commands
554 as defined in this document (every command line must be CRLF
555 terminated - see "Conventions used in this document" at the
556 beginning of this document) and the LinuxSampler application
557 will response after a certain process time with an
558 appropriate ASCII based answer, also as defined in this
559 document. So this TCP communication is simply based on query
560 and answer paradigm. That way LinuxSampler is only able to
561 answer on queries from front-ends, but not able to
562 automatically send messages to the client if it's not asked
563 to. The fronted should not reconnect to LinuxSampler for
564 every single command, instead it should keep the connection
565 established and simply resend message(s) for subsequent
566 commands. To keep information in the front-end up-to-date
567 the front-end has to periodically send new requests to get
568 the current information from the LinuxSampler instance. This
569 is often referred to as "polling". While polling is simple
570 to implement and may be OK to use in some cases, there may
571 be disadvantages to polling such as network traffic overhead
572 and information being out of date.
573 It is possible for a client or several clients to open more
574 than one connection to the server at the same time. It is
575 also possible to send more than one request to the server
576 at the same time but if those requests are sent over the
577 same connection server MUST execute them sequentially. Upon
578 executing a request server will produce a result set and
579 send it to the client. Each and every request made by the
580 client MUST result in a result set being sent back to the
581 client. No other data other than a result set may be sent by
582 a server to a client. No result set may be sent to a client
583 without the client sending request to the server first. On
584 any particular connection, result sets MUST be sent in their
585 entirety without being interrupted by other result sets. If
586 several requests got queued up at the server they MUST be
587 processed in the order they were received and result sets
588 MUST be sent back in the same order.
589 </p>
590 <a name="anchor6"></a><br /><hr />
591 <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>
592 <a name="rfc.section.5.1.1"></a><h3>5.1.1.&nbsp;Result format</h3>
593
594 <p>Result set could be one of the following types:
595 </p>
596 <p>
597 </p>
598 <ol class="text">
599 <li>Normal
600 </li>
601 <li>Warning
602 </li>
603 <li>Error
604 </li>
605 </ol><p>
606
607 </p>
608 <p>Warning and Error result sets MUST be single line and
609 have the following format:
610 </p>
611 <p>
612 </p>
613 <ul class="text">
614 <li>"WRN:&lt;warning-code&gt;:&lt;warning-message&gt;"
615 </li>
616 <li>"ERR:&lt;error-code&gt;:&lt;error-message&gt;"
617 </li>
618 </ul><p>
619
620 </p>
621 <p>Where &lt;warning-code&gt; and &lt;error-code&gt; are
622 numeric unique identifiers of the warning or error and
623 &lt;warning-message&gt; and &lt;error-message&gt; are
624 human readable descriptions of the warning or error
625 respectively.
626 </p>
627 <p>Examples:
628 </p>
629 <p>
630 </p>
631 <blockquote class="text">
632 <p>C: "LOAD INSTRUMENT '/home/me/Boesendorfer24bit.gig" 0 0
633 </p>
634 <p>S: "WRN:32:This is a 24 bit patch which is not supported natively yet."
635 </p>
636 </blockquote><p>
637
638 </p>
639 <p>
640 </p>
641 <blockquote class="text">
642 <p>C: "GET AUDIO_OUTPUT_DRIVER_PARAMETER INFO ALSA EAR"
643 </p>
644 <p>S: "ERR:3456:Audio output driver 'ALSA' does not have a parameter 'EAR'."
645 </p>
646 </blockquote><p>
647
648 </p>
649 <p>
650 </p>
651 <blockquote class="text">
652 <p>C: "GET AUDIO_OUTPUT_DEVICE INFO 123456"
653 </p>
654 <p>S: "ERR:9:There is no audio output device with index 123456."
655 </p>
656 </blockquote><p>
657
658 </p>
659 <p>Normal result sets could be:
660 </p>
661 <p>
662 </p>
663 <ol class="text">
664 <li>Empty
665 </li>
666 <li>Single line
667 </li>
668 <li>Multi-line
669 </li>
670 </ol><p>
671
672 </p>
673 <p> Empty result set is issued when the server only
674 needed to acknowledge the fact that the request was
675 received and it was processed successfully and no
676 additional information is available. This result set has
677 the following format:
678 </p>
679 <p>
680 </p>
681 <blockquote class="text">
682 <p>"OK"
683 </p>
684 </blockquote><p>
685
686 </p>
687 <p>Example:
688 </p>
689 <p>
690 </p>
691 <blockquote class="text">
692 <p>C: "SET AUDIO_OUTPUT_DEVICE_PARAMETER 0 CHANNELS=4"
693 </p>
694 <p>S: "OK"
695 </p>
696 </blockquote><p>
697
698 </p>
699 <p>Single line result sets are command specific. One
700 example of a single line result set is an empty line.
701 Multi-line result sets are command specific and may
702 include one or more lines of information. They MUST
703 always end with the following line:
704 </p>
705 <p>
706 </p>
707 <blockquote class="text">
708 <p>"."
709 </p>
710 </blockquote><p>
711
712 </p>
713 <p>Example:
714 </p>
715 <p>
716 </p>
717 <blockquote class="text">
718 <p>C: "GET AUDIO_OUTPUT_DEVICE INFO 0"
719 </p>
720 <p>S: "DRIVER: ALSA"
721 </p>
722 <p>&nbsp;&nbsp;&nbsp;"CHANNELS: 2"
723 </p>
724 <p>&nbsp;&nbsp;&nbsp;"SAMPLERATE: 44100"
725 </p>
726 <p>&nbsp;&nbsp;&nbsp;"ACTIVE: true"
727 </p>
728 <p>&nbsp;&nbsp;&nbsp;"FRAGMENTS: 2"
729 </p>
730 <p>&nbsp;&nbsp;&nbsp;"FRAGMENTSIZE: 128"
731 </p>
732 <p>&nbsp;&nbsp;&nbsp;"CARD: '0,0'"
733 </p>
734 <p>&nbsp;&nbsp;&nbsp;"."
735 </p>
736 </blockquote><p>
737
738 </p>
739 <p>In addition to above mentioned formats, warnings and
740 empty result sets MAY be indexed. In this case, they
741 have the following formats respectively:
742 </p>
743 <p>
744 </p>
745 <ul class="text">
746 <li>"WRN[&lt;index&gt;]:&lt;warning-code&gt;:&lt;warning-message&gt;"
747 </li>
748 <li>"OK[&lt;index&gt;]"
749 </li>
750 </ul><p>
751
752 </p>
753 <p>where &lt;index&gt; is command specific and is used
754 to indicate channel number that the result set was
755 related to or other integer value.
756 </p>
757 <p>Each line of the result set MUST end with
758 &lt;CRLF&gt;.
759 </p>
760 <p>Examples:
761 </p>
762 <p>
763 </p>
764 <blockquote class="text">
765 <p>C: "ADD CHANNEL"
766 </p>
767 <p>S: "OK[12]"
768 </p>
769 </blockquote><p>
770
771 </p>
772 <p>
773 </p>
774 <blockquote class="text">
775 <p>C: "CREATE AUDIO_OUTPUT_DEVICE ALSA SAMPLERATE=96000"
776 </p>
777 <p>S: "WRN[0]:32:Sample rate not supported, using 44100 instead."
778 </p>
779 </blockquote><p>
780
781 </p>
782 <a name="anchor7"></a><br /><hr />
783 <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>
784 <a name="rfc.section.5.2"></a><h3>5.2.&nbsp;Subscribe/notify communication method</h3>
785
786 <p>This more sophisticated communication method is actually
787 only an extension of the simple request/response
788 communication method. The front-end still uses a TCP
789 connection and sends the same commands on the TCP
790 connection. Two extra commands are SUBSCRIBE and UNSUBSCRIBE
791 commands that allow a client to tell the server that it is
792 interested in receiving notifications about certain events
793 as they happen on the server. The SUBSCRIBE command has the
794 following syntax:
795 </p>
796 <p>
797 </p>
798 <blockquote class="text">
799 <p>SUBSCRIBE &lt;event-id&gt;
800 </p>
801 </blockquote><p>
802
803 </p>
804 <p>where &lt;event-id&gt; will be replaced by the respective
805 event that client wants to subscribe to. Upon receiving such
806 request, server SHOULD respond with OK and start sending
807 EVENT notifications when a given even has occurred to the
808 front-end when an event has occurred. It MAY be possible
809 certain events may be sent before OK response during real
810 time nature of their generation. Event messages have the
811 following format:
812 </p>
813 <p>
814 </p>
815 <blockquote class="text">
816 <p>NOTIFY:&lt;event-id&gt;:&lt;custom-event-data&gt;
817 </p>
818 </blockquote><p>
819
820 </p>
821 <p>where &lt;event-id&gt; uniquely identifies the event that
822 has occurred and &lt;custom-event-data&gt; is event
823 specific.
824 </p>
825 <p>Several rules must be followed by the server when
826 generating events:
827 </p>
828 <p>
829 </p>
830 <ol class="text">
831 <li>Events MUST NOT be sent to any client who has not
832 issued an appropriate SUBSCRIBE command.
833 </li>
834 <li>Events MUST only be sent using the same
835 connection that was used to subscribe to them.
836 </li>
837 <li>When response is being sent to the client, event
838 MUST be inserted in the stream before or after the
839 response, but NOT in the middle. Same is true about
840 the response. It should never be inserted in the
841 middle of the event message as well as any other
842 response.
843 </li>
844 </ol><p>
845
846 </p>
847 <p>If the client is not interested in a particular event
848 anymore it MAY issue UNSUBSCRIBE command using the following
849 syntax:
850 </p>
851 <p>
852 </p>
853 <blockquote class="text">
854 <p>UNSUBSCRIBE &lt;event-id&gt;
855 </p>
856 </blockquote><p>
857
858 </p>
859 <p>where &lt;event-id&gt; will be replace by the respective
860 event that client is no longer interested in receiving. For
861 a list of supported events see <a class="info" href="#events">Section&nbsp;8<span> (</span><span class="info">Events</span><span>)</span></a>.
862 </p>
863 <p>Example: the fill states of disk stream buffers have
864 changed on sampler channel 4 and the LinuxSampler instance
865 will react by sending the following message to all clients
866 who subscribed to this event:
867 </p>
868 <p>
869 </p>
870 <blockquote class="text">
871 <p>NOTIFY:CHANNEL_BUFFER_FILL:4 [35]62%,[33]80%,[37]98%
872 </p>
873 </blockquote><p>
874
875 </p>
876 <p>Which means there are currently three active streams on
877 sampler channel 4, where the stream with ID "35" is filled
878 by 62%, stream with ID 33 is filled by 80% and stream with
879 ID 37 is filled by 98%.
880 </p>
881 <p>Clients may choose to open more than one connection to
882 the server and use some connections to receive notifications
883 while using other connections to issue commands to the
884 back-end. This is entirely legal and up to the
885 implementation. This does not change the protocol in any way
886 and no special restrictions exist on the server to allow or
887 disallow this or to track what connections belong to what
888 front-ends. Server will listen on a single port, accept
889 multiple connections and support protocol described in this
890 specification in it's entirety on this single port on each
891 connection that it accepted.
892 </p>
893 <p>Due to the fact that TCP is used for this communication,
894 dead peers will be detected automatically by the OS TCP
895 stack. While it may take a while to detect dead peers if no
896 traffic is being sent from server to client (TCP keep-alive
897 timer is set to 2 hours on many OSes) it will not be an
898 issue here as when notifications are sent by the server,
899 dead client will be detected quickly.
900 </p>
901 <p>When connection is closed for any reason server MUST
902 forget all subscriptions that were made on this connection.
903 If client reconnects it MUST resubscribe to all events that
904 it wants to receive.
905 </p>
906 <a name="control_commands"></a><br /><hr />
907 <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>
908 <a name="rfc.section.6"></a><h3>6.&nbsp;Description for control commands</h3>
909
910 <p>This chapter will describe the available control commands
911 that can be sent on the TCP connection in detail. Some certain
912 commands (e.g. <a class="info" href="#GET CHANNEL INFO">"GET CHANNEL INFO"<span> (</span><span class="info">Getting sampler channel information</span><span>)</span></a>
913 or <a class="info" href="#GET ENGINE INFO">"GET ENGINE INFO"<span> (</span><span class="info">Getting information about an engine</span><span>)</span></a>) lead to
914 multiple-line responses. In this case LinuxSampler signals the
915 end of the response by a "." (single dot) line.
916 </p>
917 <a name="anchor8"></a><br /><hr />
918 <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>
919 <a name="rfc.section.6.1"></a><h3>6.1.&nbsp;Ignored lines and comments</h3>
920
921 <p>White lines, that is lines which only contain space and
922 tabulator characters, and lines that start with a "#"
923 character are ignored, thus it's possible for example to
924 group commands and to place comments in a LSCP script
925 file.
926 </p>
927 <a name="anchor9"></a><br /><hr />
928 <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>
929 <a name="rfc.section.6.2"></a><h3>6.2.&nbsp;Configuring audio drivers</h3>
930
931 <p>Instances of drivers in LinuxSampler are called devices.
932 You can use multiple audio devices simultaneously, e.g. to
933 output the sound of one sampler channel using the ALSA audio
934 output driver, and on another sampler channel you might want
935 to use the JACK audio output driver. For particular audio
936 output systems it's also possible to create several devices
937 of the same audio output driver, e.g. two separate ALSA
938 audio output devices for using two different sound cards at
939 the same time. This chapter describes all commands to
940 configure LinuxSampler's audio output devices and their
941 parameters.
942 </p>
943 <p>Instead of defining commands and parameters for each
944 driver individually, all possible parameters, their meanings
945 and possible values have to be obtained at runtime. This
946 makes the protocol a bit abstract, but has the advantage,
947 that front-ends can be written independently of what drivers
948 are currently implemented and what parameters these drivers
949 are actually offering. This means front-ends can even handle
950 drivers which are implemented somewhere in future without
951 modifying the front-end at all.
952 </p>
953 <p>Note: examples in this chapter showing particular
954 parameters of drivers are not meant as specification of the
955 drivers' parameters. Driver implementations in LinuxSampler
956 might have complete different parameter names and meanings
957 than shown in these examples or might change in future, so
958 these examples are only meant for showing how to retrieve
959 what parameters drivers are offering, how to retrieve their
960 possible values, etc.
961 </p>
962 <a name="GET AVAILABLE_AUDIO_OUTPUT_DRIVERS"></a><br /><hr />
963 <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>
964 <a name="rfc.section.6.2.1"></a><h3>6.2.1.&nbsp;Getting amount of available audio output drivers</h3>
965
966 <p>Use the following command to get the number of
967 audio output drivers currently available for the
968 LinuxSampler instance:
969 </p>
970 <p>
971 </p>
972 <blockquote class="text">
973 <p>GET AVAILABLE_AUDIO_OUTPUT_DRIVERS
974 </p>
975 </blockquote><p>
976
977 </p>
978 <p>Possible Answers:
979 </p>
980 <p>
981 </p>
982 <blockquote class="text">
983 <p>LinuxSampler will answer by sending the
984 number of audio output drivers.
985 </p>
986 </blockquote><p>
987
988 </p>
989 <p>Example:
990 </p>
991 <p>
992 </p>
993 <blockquote class="text">
994 <p>C: "GET AVAILABLE_AUDIO_OUTPUT_DRIVERS"
995 </p>
996 <p>S: "2"
997 </p>
998 </blockquote><p>
999
1000 </p>
1001 <a name="LIST AVAILABLE_AUDIO_OUTPUT_DRIVERS"></a><br /><hr />
1002 <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>
1003 <a name="rfc.section.6.2.2"></a><h3>6.2.2.&nbsp;Getting all available audio output drivers</h3>
1004
1005 <p>Use the following command to list all audio output
1006 drivers currently available for the LinuxSampler
1007 instance:
1008 </p>
1009 <p>
1010 </p>
1011 <blockquote class="text">
1012 <p>LIST AVAILABLE_AUDIO_OUTPUT_DRIVERS
1013 </p>
1014 </blockquote><p>
1015
1016 </p>
1017 <p>Possible Answers:
1018 </p>
1019 <p>
1020 </p>
1021 <blockquote class="text">
1022 <p>LinuxSampler will answer by sending comma
1023 separated character strings, each symbolizing an
1024 audio output driver.
1025 </p>
1026 </blockquote><p>
1027
1028 </p>
1029 <p>Example:
1030 </p>
1031 <p>
1032 </p>
1033 <blockquote class="text">
1034 <p>C: "LIST AVAILABLE_AUDIO_OUTPUT_DRIVERS"
1035 </p>
1036 <p>S: "ALSA,JACK"
1037 </p>
1038 </blockquote><p>
1039
1040 </p>
1041 <a name="GET AUDIO_OUTPUT_DRIVER INFO"></a><br /><hr />
1042 <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>
1043 <a name="rfc.section.6.2.3"></a><h3>6.2.3.&nbsp;Getting information about a specific audio
1044 output driver</h3>
1045
1046 <p>Use the following command to get detailed information
1047 about a specific audio output driver:
1048 </p>
1049 <p>
1050 </p>
1051 <blockquote class="text">
1052 <p>GET AUDIO_OUTPUT_DRIVER INFO
1053 &lt;audio-output-driver&gt;
1054 </p>
1055 </blockquote><p>
1056
1057 </p>
1058 <p>Where &lt;audio-output-driver&gt; is the name of the
1059 audio output driver, returned by the
1060 <a class="info" href="#LIST AVAILABLE_AUDIO_OUTPUT_DRIVERS">"LIST AVAILABLE_AUDIO_OUTPUT_DRIVERS"<span> (</span><span class="info">Getting all available audio output drivers</span><span>)</span></a> command.
1061 </p>
1062 <p>Possible Answers:
1063 </p>
1064 <p>
1065 </p>
1066 <blockquote class="text">
1067 <p>LinuxSampler will answer by sending a
1068 &lt;CRLF&gt; separated list. Each answer line
1069 begins with the information category name
1070 followed by a colon and then a space character
1071 &lt;SP&gt; and finally the info character string
1072 to that info category. At the moment the
1073 following information categories are
1074 defined:
1075 </p>
1076 <p>
1077 </p>
1078 <blockquote class="text">
1079 <p>DESCRIPTION -
1080 </p>
1081 <blockquote class="text">
1082 <p> character string describing the
1083 audio output driver
1084 </p>
1085 </blockquote>
1086
1087
1088 <p>VERSION -
1089 </p>
1090 <blockquote class="text">
1091 <p>character string reflecting the
1092 driver's version
1093 </p>
1094 </blockquote>
1095
1096
1097 <p>PARAMETERS -
1098 </p>
1099 <blockquote class="text">
1100 <p>comma separated list of all
1101 parameters available for the given
1102 audio output driver, at least
1103 parameters 'channels', 'samplerate'
1104 and 'active' are offered by all audio
1105 output drivers
1106 </p>
1107 </blockquote>
1108
1109
1110 </blockquote>
1111
1112
1113 <p>The mentioned fields above don't have to be
1114 in particular order.
1115 </p>
1116 </blockquote><p>
1117
1118 </p>
1119 <p>Example:
1120 </p>
1121 <p>
1122 </p>
1123 <blockquote class="text">
1124 <p>C: "GET AUDIO_OUTPUT_DRIVER INFO ALSA"
1125 </p>
1126 <p>S: "DESCRIPTION: Advanced Linux Sound
1127 Architecture"
1128 </p>
1129 <p>&nbsp;&nbsp;&nbsp;"VERSION: 1.0"
1130 </p>
1131 <p>&nbsp;&nbsp;&nbsp;"PARAMETERS:
1132 DRIVER,CHANNELS,SAMPLERATE,ACTIVE,FRAGMENTS,
1133 FRAGMENTSIZE,CARD"
1134 </p>
1135 <p>&nbsp;&nbsp;&nbsp;"."
1136 </p>
1137 </blockquote><p>
1138
1139 </p>
1140 <a name="GET AUDIO_OUTPUT_DRIVER_PARAMETER INFO"></a><br /><hr />
1141 <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>
1142 <a name="rfc.section.6.2.4"></a><h3>6.2.4.&nbsp;Getting information about specific audio
1143 output driver parameter</h3>
1144
1145 <p>Use the following command to get detailed information
1146 about a specific audio output driver parameter:
1147 </p>
1148 <p>
1149 </p>
1150 <blockquote class="text">
1151 <p>GET AUDIO_OUTPUT_DRIVER_PARAMETER INFO &lt;audio&gt; &lt;prm&gt; [&lt;deplist&gt;]
1152 </p>
1153 </blockquote><p>
1154
1155 </p>
1156 <p>Where &lt;audio&gt; is the name of the audio output
1157 driver as returned by the <a class="info" href="#LIST AVAILABLE_AUDIO_OUTPUT_DRIVERS">"LIST AVAILABLE_AUDIO_OUTPUT_DRIVERS"<span> (</span><span class="info">Getting all available audio output drivers</span><span>)</span></a> command,
1158 &lt;prm&gt; a specific parameter name for which information should be
1159 obtained (as returned by the
1160 <a class="info" href="#GET AUDIO_OUTPUT_DRIVER INFO">"GET AUDIO_OUTPUT_DRIVER INFO"<span> (</span><span class="info">Getting information about a specific audio output driver</span><span>)</span></a> command) and
1161 &lt;deplist&gt; is an optional list of parameters on which the sought
1162 parameter &lt;prm&gt; depends on, &lt;deplist&gt; is a list of key-value
1163 pairs in form of "key1=val1 key2=val2 ...", where character string values
1164 are encapsulated into apostrophes ('). Arguments given with &lt;deplist&gt;
1165 which are not dependency parameters of &lt;prm&gt; will be ignored, means
1166 the front-end application can simply put all parameters into &lt;deplist&gt;
1167 with the values already selected by the user.
1168 </p>
1169 <p>Possible Answers:
1170 </p>
1171 <p>
1172 </p>
1173 <blockquote class="text">
1174 <p>LinuxSampler will answer by sending a
1175 &lt;CRLF&gt; separated list.
1176 Each answer line begins with the information category name
1177 followed by a colon and then a space character &lt;SP&gt; and
1178 finally
1179 the info character string to that info category. There are
1180 information which is always returned, independently of the
1181 given driver parameter and there are optional information
1182 which is only shown dependently to given driver parameter. At
1183 the moment the following information categories are defined:
1184 </p>
1185 </blockquote><p>
1186
1187 </p>
1188 <p>
1189 </p>
1190 <blockquote class="text">
1191 <p>TYPE -
1192 </p>
1193 <blockquote class="text">
1194 <p>either "BOOL" for boolean value(s) or
1195 "INT" for integer
1196 value(s) or "FLOAT" for dotted number(s) or "STRING" for
1197 character string(s)
1198 (always returned, no matter which driver parameter)
1199 </p>
1200 </blockquote>
1201
1202
1203 <p>DESCRIPTION -
1204 </p>
1205 <blockquote class="text">
1206 <p>arbitrary text describing the purpose of the parameter
1207 (always returned, no matter which driver parameter)
1208 </p>
1209 </blockquote>
1210
1211
1212 <p>MANDATORY -
1213 </p>
1214 <blockquote class="text">
1215 <p>either true or false, defines if this parameter must be
1216 given when the device is to be created with the
1217 <a class="info" href="#CREATE AUDIO_OUTPUT_DEVICE">'CREATE AUDIO_OUTPUT_DEVICE'<span> (</span><span class="info">Creating an audio output device</span><span>)</span></a>
1218 command (always returned, no matter which driver parameter)
1219 </p>
1220 </blockquote>
1221
1222
1223 <p>FIX -
1224 </p>
1225 <blockquote class="text">
1226 <p>either true or false, if false then this parameter can
1227 be changed at any time, once the device is created by
1228 the <a class="info" href="#CREATE AUDIO_OUTPUT_DEVICE">'CREATE AUDIO_OUTPUT_DEVICE'<span> (</span><span class="info">Creating an audio output device</span><span>)</span></a>
1229 command (always returned, no matter which driver parameter)
1230 </p>
1231 </blockquote>
1232
1233
1234 <p>MULTIPLICITY -
1235 </p>
1236 <blockquote class="text">
1237 <p>either true or false, defines if this parameter allows
1238 only one value or a list of values, where true means
1239 multiple values and false only a single value allowed
1240 (always returned, no matter which driver parameter)
1241 </p>
1242 </blockquote>
1243
1244
1245 <p>DEPENDS -
1246 </p>
1247 <blockquote class="text">
1248 <p>comma separated list of parameters this parameter depends
1249 on, means the values for fields 'DEFAULT', 'RANGE_MIN',
1250 'RANGE_MAX' and 'POSSIBILITIES' might depend on these
1251 listed parameters, for example assuming that an audio
1252 driver (like the ALSA driver) offers parameters 'card'
1253 and 'samplerate' then parameter 'samplerate' would
1254 depend on 'card' because the possible values for
1255 'samplerate' depends on the sound card which can be
1256 chosen by the 'card' parameter
1257 (optionally returned, dependent to driver parameter)
1258 </p>
1259 </blockquote>
1260
1261
1262 <p>DEFAULT -
1263 </p>
1264 <blockquote class="text">
1265 <p>reflects the default value for this parameter which is
1266 used when the device is created and not explicitly
1267 given with the <a class="info" href="#CREATE AUDIO_OUTPUT_DEVICE">'CREATE AUDIO_OUTPUT_DEVICE'<span> (</span><span class="info">Creating an audio output device</span><span>)</span></a> command,
1268 in case of MULTIPLCITY=true, this is a comma separated
1269 list, that's why character strings are encapsulated into
1270 apostrophes (')
1271 (optionally returned, dependent to driver parameter)
1272 </p>
1273 </blockquote>
1274
1275
1276 <p>RANGE_MIN -
1277 </p>
1278 <blockquote class="text">
1279 <p>defines lower limit of the allowed value range for this
1280 parameter, can be an integer value as well as a dotted
1281 number, this parameter is often used in conjunction
1282 with RANGE_MAX, but may also appear without
1283 (optionally returned, dependent to driver parameter)
1284 </p>
1285 </blockquote>
1286
1287
1288 <p>RANGE_MAX -
1289 </p>
1290 <blockquote class="text">
1291 <p>defines upper limit of the allowed value range for this
1292 parameter, can be an integer value as well as a dotted
1293 number, this parameter is often used in conjunction with
1294 RANGE_MIN, but may also appear without
1295 (optionally returned, dependent to driver parameter)
1296 </p>
1297 </blockquote>
1298
1299
1300 <p>POSSIBILITIES -
1301 </p>
1302 <blockquote class="text">
1303 <p>comma separated list of possible values for this
1304 parameter, character strings are encapsulated into
1305 apostrophes
1306 (optionally returned, dependent to driver parameter)
1307 </p>
1308 </blockquote>
1309
1310
1311 </blockquote><p>
1312
1313 </p>
1314 <p>The mentioned fields above don't have to be in particular order.
1315 </p>
1316 <p>Examples:
1317 </p>
1318 <p>
1319 </p>
1320 <blockquote class="text">
1321 <p>C: "GET AUDIO_OUTPUT_DRIVER_PARAMETER INFO ALSA CARD"
1322 </p>
1323 <p>S: "DESCRIPTION: sound card to be used"
1324 </p>
1325 <p>&nbsp;&nbsp;&nbsp;"TYPE: STRING"
1326 </p>
1327 <p>&nbsp;&nbsp;&nbsp;"MANDATORY: false"
1328 </p>
1329 <p>&nbsp;&nbsp;&nbsp;"FIX: true"
1330 </p>
1331 <p>&nbsp;&nbsp;&nbsp;"MULTIPLICITY: false"
1332 </p>
1333 <p>&nbsp;&nbsp;&nbsp;"DEFAULT: '0,0'"
1334 </p>
1335 <p>&nbsp;&nbsp;&nbsp;"POSSIBILITIES: '0,0','1,0','2,0'"
1336 </p>
1337 <p>&nbsp;&nbsp;&nbsp;"."
1338 </p>
1339 </blockquote><p>
1340
1341 </p>
1342 <p>
1343 </p>
1344 <blockquote class="text">
1345 <p>C: "GET AUDIO_OUTPUT_DRIVER_PARAMETER INFO ALSA SAMPLERATE"
1346 </p>
1347 <p>S: "DESCRIPTION: output sample rate in Hz"
1348 </p>
1349 <p>&nbsp;&nbsp;&nbsp;"TYPE: INT"
1350 </p>
1351 <p>&nbsp;&nbsp;&nbsp;"MANDATORY: false"
1352 </p>
1353 <p>&nbsp;&nbsp;&nbsp;"FIX: false"
1354 </p>
1355 <p>&nbsp;&nbsp;&nbsp;"MULTIPLICITY: false"
1356 </p>
1357 <p>&nbsp;&nbsp;&nbsp;"DEPENDS: card"
1358 </p>
1359 <p>&nbsp;&nbsp;&nbsp;"DEFAULT: 44100"
1360 </p>
1361 <p>&nbsp;&nbsp;&nbsp;"."
1362 </p>
1363 </blockquote><p>
1364
1365 </p>
1366 <p>
1367 </p>
1368 <blockquote class="text">
1369 <p>C: "GET AUDIO_OUTPUT_DRIVER_PARAMETER INFO ALSA SAMPLERATE CARD='0,0'"
1370 </p>
1371 <p>S: "DESCRIPTION: output sample rate in Hz"
1372 </p>
1373 <p>&nbsp;&nbsp;&nbsp;"TYPE: INT"
1374 </p>
1375 <p>&nbsp;&nbsp;&nbsp;"MANDATORY: false"
1376 </p>
1377 <p>&nbsp;&nbsp;&nbsp;"FIX: false"
1378 </p>
1379 <p>&nbsp;&nbsp;&nbsp;"MULTIPLICITY: false"
1380 </p>
1381 <p>&nbsp;&nbsp;&nbsp;"DEPENDS: card"
1382 </p>
1383 <p>&nbsp;&nbsp;&nbsp;"DEFAULT: 44100"
1384 </p>
1385 <p>&nbsp;&nbsp;&nbsp;"RANGE_MIN: 22050"
1386 </p>
1387 <p>&nbsp;&nbsp;&nbsp;"RANGE_MAX: 96000"
1388 </p>
1389 <p>&nbsp;&nbsp;&nbsp;"."
1390 </p>
1391 </blockquote><p>
1392
1393 </p>
1394 <a name="CREATE AUDIO_OUTPUT_DEVICE"></a><br /><hr />
1395 <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>
1396 <a name="rfc.section.6.2.5"></a><h3>6.2.5.&nbsp;Creating an audio output device</h3>
1397
1398 <p>Use the following command to create a new audio output device for the desired audio output system:
1399 </p>
1400 <p>
1401 </p>
1402 <blockquote class="text">
1403 <p>CREATE AUDIO_OUTPUT_DEVICE &lt;audio-output-driver&gt; [&lt;param-list&gt;]
1404 </p>
1405 </blockquote><p>
1406
1407 </p>
1408 <p>Where &lt;audio-output-driver&gt; should be replaced by the desired audio
1409 output system as returned by the
1410 <a class="info" href="#LIST AVAILABLE_AUDIO_OUTPUT_DRIVERS">"LIST AVAILABLE_AUDIO_OUTPUT_DRIVERS"<span> (</span><span class="info">Getting all available audio output drivers</span><span>)</span></a>
1411 command and &lt;param-list&gt; by an optional list of driver
1412 specific parameters in form of "key1=val1 key2=val2 ...", where
1413 character string values should be encapsulated into apostrophes (').
1414 Note that there might be drivers which require parameter(s) to be
1415 given with this command. Use the previously described commands in
1416 this chapter to get this information.
1417 </p>
1418 <p>Possible Answers:
1419 </p>
1420 <p>
1421 </p>
1422 <blockquote class="text">
1423 <p>"OK[&lt;device-id&gt;]" -
1424 </p>
1425 <blockquote class="text">
1426 <p>in case the device was successfully created, where
1427 &lt;device-id&gt; is the numerical ID of the new device
1428 </p>
1429 </blockquote>
1430
1431
1432 <p>"WRN[&lt;device-id&gt;]:&lt;warning-code&gt;:&lt;warning-message&gt;" -
1433 </p>
1434 <blockquote class="text">
1435 <p>in case the device was created successfully, where
1436 &lt;device-id&gt; is the numerical ID of the new device, but there
1437 are noteworthy issue(s) related (e.g. sound card doesn't
1438 support given hardware parameters and the driver is using
1439 fall-back values), providing an appropriate warning code and
1440 warning message
1441 </p>
1442 </blockquote>
1443
1444
1445 <p>"ERR:&lt;error-code&gt;:&lt;error-message&gt;" -
1446 </p>
1447 <blockquote class="text">
1448 <p>in case it failed, providing an appropriate error code and error message
1449 </p>
1450 </blockquote>
1451
1452
1453 </blockquote><p>
1454
1455 </p>
1456 <p>Examples:
1457 </p>
1458 <p>
1459 </p>
1460 <blockquote class="text">
1461 <p>C: "CREATE AUDIO_OUTPUT_DEVICE ALSA"
1462 </p>
1463 <p>S: "OK[0]"
1464 </p>
1465 </blockquote><p>
1466
1467 </p>
1468 <p>
1469 </p>
1470 <blockquote class="text">
1471 <p>C: "CREATE AUDIO_OUTPUT_DEVICE ALSA CARD='2,0' SAMPLERATE=96000"
1472 </p>
1473 <p>S: "OK[1]"
1474 </p>
1475 </blockquote><p>
1476
1477 </p>
1478 <a name="DESTROY AUDIO_OUTPUT_DEVICE"></a><br /><hr />
1479 <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>
1480 <a name="rfc.section.6.2.6"></a><h3>6.2.6.&nbsp;Destroying an audio output device</h3>
1481
1482 <p>Use the following command to destroy a created output device:
1483 </p>
1484 <p>
1485 </p>
1486 <blockquote class="text">
1487 <p>DESTROY AUDIO_OUTPUT_DEVICE &lt;device-id&gt;
1488 </p>
1489 </blockquote><p>
1490
1491 </p>
1492 <p>Where &lt;device-id&gt; should be replaced by the numerical ID of the
1493 audio output device as given by the
1494 <a class="info" href="#CREATE AUDIO_OUTPUT_DEVICE">"CREATE AUDIO_OUTPUT_DEVICE"<span> (</span><span class="info">Creating an audio output device</span><span>)</span></a>
1495 or <a class="info" href="#LIST AUDIO_OUTPUT_DEVICES">"LIST AUDIO_OUTPUT_DEVICES"<span> (</span><span class="info">Getting all created audio output device list</span><span>)</span></a>
1496 command.
1497 </p>
1498 <p>Possible Answers:
1499 </p>
1500 <p>
1501 </p>
1502 <blockquote class="text">
1503 <p>"OK" -
1504 </p>
1505 <blockquote class="text">
1506 <p>in case the device was successfully destroyed
1507 </p>
1508 </blockquote>
1509
1510
1511 <p>"WRN:&lt;warning-code&gt;:&lt;warning-message&gt;" -
1512 </p>
1513 <blockquote class="text">
1514 <p>in case the device was destroyed successfully, but there are
1515 noteworthy issue(s) related (e.g. an audio over ethernet
1516 driver was unloaded but the other host might not be
1517 informed about this situation), providing an appropriate
1518 warning code and warning message
1519 </p>
1520 </blockquote>
1521
1522
1523 <p>"ERR:&lt;error-code&gt;:&lt;error-message&gt;" -
1524 </p>
1525 <blockquote class="text">
1526 <p>in case it failed, providing an appropriate error code and
1527 error message
1528 </p>
1529 </blockquote>
1530
1531
1532 </blockquote><p>
1533
1534 </p>
1535 <p>Example:
1536 </p>
1537 <p>
1538 </p>
1539 <blockquote class="text">
1540 <p>C: "DESTROY AUDIO_OUTPUT_DEVICE 0"
1541 </p>
1542 <p>S: "OK"
1543 </p>
1544 </blockquote><p>
1545
1546 </p>
1547 <a name="GET AUDIO_OUTPUT_DEVICES"></a><br /><hr />
1548 <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>
1549 <a name="rfc.section.6.2.7"></a><h3>6.2.7.&nbsp;Getting all created audio output device count</h3>
1550
1551 <p>Use the following command to count all created audio output devices:
1552 </p>
1553 <p>
1554 </p>
1555 <blockquote class="text">
1556 <p>GET AUDIO_OUTPUT_DEVICES
1557 </p>
1558 </blockquote><p>
1559
1560 </p>
1561 <p>Possible Answers:
1562 </p>
1563 <p>
1564 </p>
1565 <blockquote class="text">
1566 <p>LinuxSampler will answer by sending the current number of all
1567 audio output devices.
1568 </p>
1569 </blockquote><p>
1570
1571 </p>
1572 <p>Example:
1573 </p>
1574 <p>
1575 </p>
1576 <blockquote class="text">
1577 <p>C: "GET AUDIO_OUTPUT_DEVICES"
1578 </p>
1579 <p>S: "4"
1580 </p>
1581 </blockquote><p>
1582
1583 </p>
1584 <a name="LIST AUDIO_OUTPUT_DEVICES"></a><br /><hr />
1585 <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>
1586 <a name="rfc.section.6.2.8"></a><h3>6.2.8.&nbsp;Getting all created audio output device list</h3>
1587
1588 <p>Use the following command to list all created audio output devices:
1589 </p>
1590 <p>
1591 </p>
1592 <blockquote class="text">
1593 <p>LIST AUDIO_OUTPUT_DEVICES
1594 </p>
1595 </blockquote><p>
1596
1597 </p>
1598 <p>Possible Answers:
1599 </p>
1600 <p>
1601 </p>
1602 <blockquote class="text">
1603 <p>LinuxSampler will answer by sending a comma separated list with
1604 the numerical IDs of all audio output devices.
1605 </p>
1606 </blockquote><p>
1607
1608 </p>
1609 <p>Example:
1610 </p>
1611 <p>
1612 </p>
1613 <blockquote class="text">
1614 <p>C: "LIST AUDIO_OUTPUT_DEVICES"
1615 </p>
1616 <p>S: "0,1,4,5"
1617 </p>
1618 </blockquote><p>
1619
1620 </p>
1621 <a name="GET AUDIO_OUTPUT_DEVICE INFO"></a><br /><hr />
1622 <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>
1623 <a name="rfc.section.6.2.9"></a><h3>6.2.9.&nbsp;Getting current settings of an audio output device</h3>
1624
1625 <p>Use the following command to get current settings of a specific, created audio output device:
1626 </p>
1627 <p>
1628 </p>
1629 <blockquote class="text">
1630 <p>GET AUDIO_OUTPUT_DEVICE INFO &lt;device-id&gt;
1631 </p>
1632 </blockquote><p>
1633
1634 </p>
1635 <p>Where &lt;device-id&gt; should be replaced by numerical ID
1636 of the audio output device as e.g. returned by the
1637 <a class="info" href="#LIST AUDIO_OUTPUT_DEVICES">"LIST AUDIO_OUTPUT_DEVICES"<span> (</span><span class="info">Getting all created audio output device list</span><span>)</span></a> command.
1638 </p>
1639 <p>Possible Answers:
1640 </p>
1641 <p>LinuxSampler will answer by sending a &lt;CRLF&gt; separated list.
1642 Each answer line begins with the information category name
1643 followed by a colon and then a space character &lt;SP&gt; and finally
1644 the info character string to that info category. As some
1645 parameters might allow multiple values, character strings are
1646 encapsulated into apostrophes ('). At the moment the following
1647 information categories are defined (independently of device):
1648 </p>
1649 <p>
1650 </p>
1651 <blockquote class="text">
1652 <p>DRIVER -
1653 </p>
1654 <blockquote class="text">
1655 <p>identifier of the used audio output driver, as also
1656 returned by the
1657 <a class="info" href="#LIST AVAILABLE_AUDIO_OUTPUT_DRIVERS">"LIST AVAILABLE_AUDIO_OUTPUT_DRIVERS"<span> (</span><span class="info">Getting all available audio output drivers</span><span>)</span></a>
1658 command
1659 </p>
1660 </blockquote>
1661
1662
1663 <p>CHANNELS -
1664 </p>
1665 <blockquote class="text">
1666 <p>amount of audio output channels this device currently
1667 offers
1668 </p>
1669 </blockquote>
1670
1671
1672 <p>SAMPLERATE -
1673 </p>
1674 <blockquote class="text">
1675 <p>playback sample rate the device uses
1676 </p>
1677 </blockquote>
1678
1679
1680 <p>ACTIVE -
1681 </p>
1682 <blockquote class="text">
1683 <p>either true or false, if false then the audio device is
1684 inactive and doesn't output any sound, nor do the
1685 sampler channels connected to this audio device render
1686 any audio
1687 </p>
1688 </blockquote>
1689
1690
1691 </blockquote><p>
1692
1693 </p>
1694 <p>The mentioned fields above don't have to be in particular
1695 order. The fields above are only those fields which are
1696 returned by all audio output devices. Every audio output driver
1697 might have its own, additional driver specific parameters (see
1698 <a class="info" href="#GET AUDIO_OUTPUT_DRIVER INFO">Section&nbsp;6.2.3<span> (</span><span class="info">Getting information about a specific audio output driver</span><span>)</span></a>)
1699 which are also returned by this command.
1700 </p>
1701 <p>Example:
1702 </p>
1703 <p>
1704 </p>
1705 <blockquote class="text">
1706 <p>C: "GET AUDIO_OUTPUT_DEVICE INFO 0"
1707 </p>
1708 <p>S: "DRIVER: ALSA"
1709 </p>
1710 <p>&nbsp;&nbsp;&nbsp;"CHANNELS: 2"
1711 </p>
1712 <p>&nbsp;&nbsp;&nbsp;"SAMPLERATE: 44100"
1713 </p>
1714 <p>&nbsp;&nbsp;&nbsp;"ACTIVE: true"
1715 </p>
1716 <p>&nbsp;&nbsp;&nbsp;"FRAGMENTS: 2"
1717 </p>
1718 <p>&nbsp;&nbsp;&nbsp;"FRAGMENTSIZE: 128"
1719 </p>
1720 <p>&nbsp;&nbsp;&nbsp;"CARD: '0,0'"
1721 </p>
1722 <p>&nbsp;&nbsp;&nbsp;"."
1723 </p>
1724 </blockquote><p>
1725
1726 </p>
1727 <a name="SET AUDIO_OUTPUT_DEVICE_PARAMETER"></a><br /><hr />
1728 <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>
1729 <a name="rfc.section.6.2.10"></a><h3>6.2.10.&nbsp;Changing settings of audio output devices</h3>
1730
1731 <p>Use the following command to alter a specific setting of a created audio output device:
1732 </p>
1733 <p>
1734 </p>
1735 <blockquote class="text">
1736 <p>SET AUDIO_OUTPUT_DEVICE_PARAMETER &lt;device-id&gt; &lt;key&gt;=&lt;value&gt;
1737 </p>
1738 </blockquote><p>
1739
1740 </p>
1741 <p>Where &lt;device-id&gt; should be replaced by the numerical ID of the
1742 audio output device as given by the
1743 <a class="info" href="#CREATE AUDIO_OUTPUT_DEVICE">"CREATE AUDIO_OUTPUT_DEVICE"<span> (</span><span class="info">Creating an audio output device</span><span>)</span></a>
1744 or <a class="info" href="#LIST AUDIO_OUTPUT_DEVICES">"LIST AUDIO_OUTPUT_DEVICES"<span> (</span><span class="info">Getting all created audio output device list</span><span>)</span></a>
1745 command, &lt;key&gt; by the name of the parameter to change
1746 and &lt;value&gt; by the new value for this parameter.
1747 </p>
1748 <p>Possible Answers:
1749 </p>
1750 <p>
1751 </p>
1752 <blockquote class="text">
1753 <p>"OK" -
1754 </p>
1755 <blockquote class="text">
1756 <p>in case setting was successfully changed
1757 </p>
1758 </blockquote>
1759
1760
1761 <p>"WRN:&lt;warning-code&gt;:&lt;warning-message&gt;" -
1762 </p>
1763 <blockquote class="text">
1764 <p>in case setting was changed successfully, but there are
1765 noteworthy issue(s) related, providing an appropriate
1766 warning code and warning message
1767 </p>
1768 </blockquote>
1769
1770
1771 <p>"ERR:&lt;error-code&gt;:&lt;error-message&gt;" -
1772 </p>
1773 <blockquote class="text">
1774 <p>in case it failed, providing an appropriate error code and
1775 error message
1776 </p>
1777 </blockquote>
1778
1779
1780 </blockquote><p>
1781
1782 </p>
1783 <p>Example:
1784 </p>
1785 <p>
1786 </p>
1787 <blockquote class="text">
1788 <p>C: "SET AUDIO_OUTPUT_DEVICE_PARAMETER 0 FRAGMENTSIZE=128"
1789 </p>
1790 <p>S: "OK"
1791 </p>
1792 </blockquote><p>
1793
1794 </p>
1795 <a name="GET AUDIO_OUTPUT_CHANNEL INFO"></a><br /><hr />
1796 <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>
1797 <a name="rfc.section.6.2.11"></a><h3>6.2.11.&nbsp;Getting information about an audio channel</h3>
1798
1799 <p>Use the following command to get information about an audio channel:
1800 </p>
1801 <p>
1802 </p>
1803 <blockquote class="text">
1804 <p>GET AUDIO_OUTPUT_CHANNEL INFO &lt;device-id&gt; &lt;audio-chan&gt;
1805 </p>
1806 </blockquote><p>
1807
1808 </p>
1809 <p>Where &lt;device-id&gt; is the numerical ID of the audio output device as given by the
1810 <a class="info" href="#CREATE AUDIO_OUTPUT_DEVICE">"CREATE AUDIO_OUTPUT_DEVICE"<span> (</span><span class="info">Creating an audio output device</span><span>)</span></a>
1811 or <a class="info" href="#LIST AUDIO_OUTPUT_DEVICES">"LIST AUDIO_OUTPUT_DEVICES"<span> (</span><span class="info">Getting all created audio output device list</span><span>)</span></a>
1812 command and &lt;audio-chan&gt; the audio channel number.
1813 </p>
1814 <p>Possible Answers:
1815 </p>
1816 <p>
1817 </p>
1818 <blockquote class="text">
1819 <p>LinuxSampler will answer by sending a &lt;CRLF&gt; separated list.
1820 Each answer line begins with the information category name
1821 followed by a colon and then a space character &lt;SP&gt; and finally
1822 the info character string to that info category. At the moment
1823 the following information categories are defined:
1824 </p>
1825 <p>
1826 </p>
1827 <blockquote class="text">
1828 <p>NAME -
1829 </p>
1830 <blockquote class="text">
1831 <p>arbitrary character string naming the channel, which
1832 doesn't have to be unique (always returned by all audio channels)
1833 </p>
1834 </blockquote>
1835
1836
1837 <p>IS_MIX_CHANNEL -
1838 </p>
1839 <blockquote class="text">
1840 <p>either true or false, a mix-channel is not a real,
1841 independent audio channel, but a virtual channel which
1842 is mixed to another real channel, this mechanism is
1843 needed for sampler engines which need more audio
1844 channels than the used audio system might be able to offer
1845 (always returned by all audio channels)
1846 </p>
1847 </blockquote>
1848
1849
1850 <p>MIX_CHANNEL_DESTINATION -
1851 </p>
1852 <blockquote class="text">
1853 <p>numerical ID (positive integer including 0)
1854 which reflects the real audio channel (of the same audio
1855 output device) this mix channel refers to, means where
1856 the audio signal actually will be routed / added to
1857 (only returned in case the audio channel is mix channel)
1858 </p>
1859 </blockquote>
1860
1861
1862 </blockquote>
1863
1864
1865 </blockquote><p>
1866
1867 </p>
1868 <p>The mentioned fields above don't have to be in particular
1869 order. The fields above are only those fields which are
1870 generally returned for the described cases by all audio
1871 channels regardless of the audio driver. Every audio channel
1872 might have its own, additional driver and channel specific
1873 parameters.
1874 </p>
1875 <p>Examples:
1876 </p>
1877 <p>
1878 </p>
1879 <blockquote class="text">
1880 <p>C: "GET AUDIO_OUTPUT_CHANNEL INFO 0 0"
1881 </p>
1882 <p>S: "NAME: studio monitor left"
1883 </p>
1884 <p>&nbsp;&nbsp;&nbsp;"IS_MIX_CHANNEL: false"
1885 </p>
1886 <p>&nbsp;&nbsp;&nbsp;"."
1887 </p>
1888 </blockquote><p>
1889
1890 </p>
1891 <p>
1892 </p>
1893 <blockquote class="text">
1894 <p>C: "GET AUDIO_OUTPUT_CHANNEL INFO 0 1"
1895 </p>
1896 <p>S: "NAME: studio monitor right"
1897 </p>
1898 <p>&nbsp;&nbsp;&nbsp;"IS_MIX_CHANNEL: false"
1899 </p>
1900 <p>&nbsp;&nbsp;&nbsp;"."
1901 </p>
1902 </blockquote><p>
1903
1904 </p>
1905 <p>
1906 </p>
1907 <blockquote class="text">
1908 <p>C: "GET AUDIO_OUTPUT_CHANNEL INFO 0 2"
1909 </p>
1910 <p>S: "NAME: studio monitor left"
1911 </p>
1912 <p>&nbsp;&nbsp;&nbsp;"IS_MIX_CHANNEL: true"
1913 </p>
1914 <p>&nbsp;&nbsp;&nbsp;"MIX_CHANNEL_DESTINATION: 1"
1915 </p>
1916 <p>&nbsp;&nbsp;&nbsp;"."
1917 </p>
1918 </blockquote><p>
1919
1920 </p>
1921 <p>
1922 </p>
1923 <blockquote class="text">
1924 <p>C: "GET AUDIO_OUTPUT_CHANNEL INFO 1 0"
1925 </p>
1926 <p>S: "NAME: 'ardour (left)'"
1927 </p>
1928 <p>&nbsp;&nbsp;&nbsp;"IS_MIX_CHANNEL: false"
1929 </p>
1930 <p>&nbsp;&nbsp;&nbsp;"JACK_BINDINGS: 'ardour:0'"
1931 </p>
1932 <p>&nbsp;&nbsp;&nbsp;"."
1933 </p>
1934 </blockquote><p>
1935
1936 </p>
1937 <a name="GET AUDIO_OUTPUT_CHANNEL_PARAMETER INFO"></a><br /><hr />
1938 <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>
1939 <a name="rfc.section.6.2.12"></a><h3>6.2.12.&nbsp;Getting information about specific audio channel parameter</h3>
1940
1941 <p>Use the following command to get detailed information about specific audio channel parameter:
1942 </p>
1943 <p>
1944 </p>
1945 <blockquote class="text">
1946 <p>GET AUDIO_OUTPUT_CHANNEL_PARAMETER INFO &lt;dev-id&gt; &lt;chan&gt; &lt;param&gt;
1947 </p>
1948 </blockquote><p>
1949
1950 </p>
1951 <p>Where &lt;dev-id&gt; is the numerical ID of the audio output device as returned by the
1952 <a class="info" href="#CREATE AUDIO_OUTPUT_DEVICE">"CREATE AUDIO_OUTPUT_DEVICE"<span> (</span><span class="info">Creating an audio output device</span><span>)</span></a>
1953 or <a class="info" href="#LIST AUDIO_OUTPUT_DEVICES">"LIST AUDIO_OUTPUT_DEVICES"<span> (</span><span class="info">Getting all created audio output device list</span><span>)</span></a>
1954 command, &lt;chan&gt; the audio channel number
1955 and &lt;param&gt; a specific channel parameter name for which information should
1956 be obtained (as returned by the <a class="info" href="#GET AUDIO_OUTPUT_CHANNEL INFO">"GET AUDIO_OUTPUT_CHANNEL INFO"<span> (</span><span class="info">Getting information about an audio channel</span><span>)</span></a> command).
1957 </p>
1958 <p>Possible Answers:
1959 </p>
1960 <p>
1961 </p>
1962 <blockquote class="text">
1963 <p>LinuxSampler will answer by sending a &lt;CRLF&gt; separated list.
1964 Each answer line begins with the information category name
1965 followed by a colon and then a space character &lt;SP&gt; and finally
1966 the info character string to that info category. There are
1967 information which is always returned, independently of the
1968 given channel parameter and there is optional information
1969 which is only shown dependently to the given audio channel. At
1970 the moment the following information categories are defined:
1971 </p>
1972 <p>
1973 </p>
1974 <blockquote class="text">
1975 <p>TYPE -
1976 </p>
1977 <blockquote class="text">
1978 <p>either "BOOL" for boolean value(s) or "INT" for integer
1979 value(s) or "FLOAT" for dotted number(s) or "STRING" for
1980 character string(s)
1981 (always returned)
1982 </p>
1983 </blockquote>
1984
1985
1986 <p>DESCRIPTION -
1987 </p>
1988 <blockquote class="text">
1989 <p>arbitrary text describing the purpose of the parameter (always returned)
1990 </p>
1991 </blockquote>
1992
1993
1994 <p>FIX -
1995 </p>
1996 <blockquote class="text">
1997 <p>either true or false, if true then this parameter is
1998 read only, thus cannot be altered
1999 (always returned)
2000 </p>
2001 </blockquote>
2002
2003
2004 <p>MULTIPLICITY -
2005 </p>
2006 <blockquote class="text">
2007 <p>either true or false, defines if this parameter allows
2008 only one value or a list of values, where true means
2009 multiple values and false only a single value allowed
2010 (always returned)
2011 </p>
2012 </blockquote>
2013
2014
2015 <p>RANGE_MIN -
2016 </p>
2017 <blockquote class="text">
2018 <p>defines lower limit of the allowed value range for this
2019 parameter, can be an integer value as well as a dotted
2020 number, usually used in conjunction with 'RANGE_MAX',
2021 but may also appear without
2022 (optionally returned, dependent to driver and channel
2023 parameter)
2024 </p>
2025 </blockquote>
2026
2027
2028 <p>RANGE_MAX -
2029 </p>
2030 <blockquote class="text">
2031 <p>defines upper limit of the allowed value range for this
2032 parameter, can be an integer value as well as a dotted
2033 number, usually used in conjunction with 'RANGE_MIN',
2034 but may also appear without
2035 (optionally returned, dependent to driver and channel
2036 parameter)
2037 </p>
2038 </blockquote>
2039
2040
2041 <p>POSSIBILITIES -
2042 </p>
2043 <blockquote class="text">
2044 <p>comma separated list of possible values for this
2045 parameter, character strings are encapsulated into
2046 apostrophes
2047 (optionally returned, dependent to driver and channel
2048 parameter)
2049 </p>
2050 </blockquote>
2051
2052
2053 </blockquote>
2054
2055
2056 <p>The mentioned fields above don't have to be in particular order.
2057 </p>
2058 </blockquote><p>
2059
2060 </p>
2061 <p>Example:
2062 </p>
2063 <p>
2064 </p>
2065 <blockquote class="text">
2066 <p>C: "GET AUDIO_OUTPUT_CHANNEL_PARAMETER INFO 1 0 JACK_BINDINGS"
2067 </p>
2068 <p>S: "DESCRIPTION: bindings to other JACK clients"
2069 </p>
2070 <p>&nbsp;&nbsp;&nbsp;"TYPE: STRING"
2071 </p>
2072 <p>&nbsp;&nbsp;&nbsp;"FIX: false"
2073 </p>
2074 <p>&nbsp;&nbsp;&nbsp;"MULTIPLICITY: true"
2075 </p>
2076 <p>&nbsp;&nbsp;&nbsp;"POSSIBILITIES: 'PCM:0','PCM:1','ardour:0','ardour:1'"
2077 </p>
2078 <p>&nbsp;&nbsp;&nbsp;"."
2079 </p>
2080 </blockquote><p>
2081
2082 </p>
2083 <a name="SET AUDIO_OUTPUT_CHANNEL_PARAMETER"></a><br /><hr />
2084 <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>
2085 <a name="rfc.section.6.2.13"></a><h3>6.2.13.&nbsp;Changing settings of audio output channels</h3>
2086
2087 <p>Use the following command to alter a specific setting of an audio output channel:
2088 </p>
2089 <p>
2090 </p>
2091 <blockquote class="text">
2092 <p>SET AUDIO_OUTPUT_CHANNEL_PARAMETER &lt;dev-id&gt; &lt;chn&gt; &lt;key&gt;=&lt;value&gt;
2093 </p>
2094 </blockquote><p>
2095
2096 </p>
2097 <p>Where &lt;dev-id&gt; should be replaced by the numerical ID of the audio output device as returned by the
2098 <a class="info" href="#CREATE AUDIO_OUTPUT_DEVICE">"CREATE AUDIO_OUTPUT_DEVICE"<span> (</span><span class="info">Creating an audio output device</span><span>)</span></a>
2099 or <a class="info" href="#LIST AUDIO_OUTPUT_DEVICES">"LIST AUDIO_OUTPUT_DEVICES"<span> (</span><span class="info">Getting all created audio output device list</span><span>)</span></a>
2100 command, &lt;chn&gt; by the audio channel number, &lt;key&gt; by the name of the
2101 parameter to change and &lt;value&gt; by the new value for this parameter.
2102 </p>
2103 <p>Possible Answers:
2104 </p>
2105 <p>
2106 </p>
2107 <blockquote class="text">
2108 <p>"OK" -
2109 </p>
2110 <blockquote class="text">
2111 <p>in case setting was successfully changed
2112 </p>
2113 </blockquote>
2114
2115
2116 <p>"WRN:&lt;warning-code&gt;:&lt;warning-message&gt;" -
2117 </p>
2118 <blockquote class="text">
2119 <p>in case setting was changed successfully, but there are
2120 noteworthy issue(s) related, providing an appropriate
2121 warning code and warning message
2122 </p>
2123 </blockquote>
2124
2125
2126 <p>"ERR:&lt;error-code&gt;:&lt;error-message&gt;" -
2127 </p>
2128 <blockquote class="text">
2129 <p>in case it failed, providing an appropriate error code and
2130 error message
2131 </p>
2132 </blockquote>
2133
2134
2135 </blockquote><p>
2136
2137 </p>
2138 <p>Example:
2139 </p>
2140 <p>
2141 </p>
2142 <blockquote class="text">
2143 <p>C: "SET AUDIO_OUTPUT_CHANNEL PARAMETER 0 0 JACK_BINDINGS='PCM:0'"
2144 </p>
2145 <p>S: "OK"
2146 </p>
2147 </blockquote><p>
2148
2149 </p>
2150 <p>
2151 </p>
2152 <blockquote class="text">
2153 <p>C: "SET AUDIO_OUTPUT_CHANNEL PARAMETER 0 0 NAME='monitor left'"
2154 </p>
2155 <p>S: "OK"
2156 </p>
2157 </blockquote><p>
2158
2159 </p>
2160 <a name="anchor10"></a><br /><hr />
2161 <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>
2162 <a name="rfc.section.6.3"></a><h3>6.3.&nbsp;Configuring MIDI input drivers</h3>
2163
2164 <p>Instances of drivers in LinuxSampler are called devices. You can use
2165 multiple MIDI devices simultaneously, e.g. to use MIDI over ethernet as
2166 MIDI input on one sampler channel and ALSA as MIDI input on another sampler
2167 channel. For particular MIDI input systems it's also possible to create
2168 several devices of the same MIDI input type. This chapter describes all
2169 commands to configure LinuxSampler's MIDI input devices and their parameters.
2170 </p>
2171 <p>Instead of defining commands and parameters for each driver individually,
2172 all possible parameters, their meanings and possible values have to be obtained
2173 at runtime. This makes the protocol a bit abstract, but has the advantage, that
2174 front-ends can be written independently of what drivers are currently implemented
2175 and what parameters these drivers are actually offering. This means front-ends can
2176 even handle drivers which are implemented somewhere in future without modifying
2177 the front-end at all.
2178 </p>
2179 <p>Commands for configuring MIDI input devices are pretty much the same as the
2180 commands for configuring audio output drivers, already described in the last
2181 chapter.
2182 </p>
2183 <p>Note: examples in this chapter showing particular parameters of drivers are
2184 not meant as specification of the drivers' parameters. Driver implementations in
2185 LinuxSampler might have complete different parameter names and meanings than shown
2186 in these examples or might change in future, so these examples are only meant for
2187 showing how to retrieve what parameters drivers are offering, how to retrieve their
2188 possible values, etc.
2189 </p>
2190 <a name="GET AVAILABLE_MIDI_INPUT_DRIVERS"></a><br /><hr />
2191 <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>
2192 <a name="rfc.section.6.3.1"></a><h3>6.3.1.&nbsp;Getting amount of available MIDI input drivers</h3>
2193
2194 <p>Use the following command to get the number of
2195 MIDI input drivers currently available for the
2196 LinuxSampler instance:
2197 </p>
2198 <p>
2199 </p>
2200 <blockquote class="text">
2201 <p>GET AVAILABLE_MIDI_INPUT_DRIVERS
2202 </p>
2203 </blockquote><p>
2204
2205 </p>
2206 <p>Possible Answers:
2207 </p>
2208 <p>
2209 </p>
2210 <blockquote class="text">
2211 <p>LinuxSampler will answer by sending the
2212 number of available MIDI input drivers.
2213 </p>
2214 </blockquote><p>
2215
2216 </p>
2217 <p>Example:
2218 </p>
2219 <p>
2220 </p>
2221 <blockquote class="text">
2222 <p>C: "GET AVAILABLE_MIDI_INPUT_DRIVERS"
2223 </p>
2224 <p>S: "2"
2225 </p>
2226 </blockquote><p>
2227
2228 </p>
2229 <a name="LIST AVAILABLE_MIDI_INPUT_DRIVERS"></a><br /><hr />
2230 <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>
2231 <a name="rfc.section.6.3.2"></a><h3>6.3.2.&nbsp;Getting all available MIDI input drivers</h3>
2232
2233 <p>Use the following command to list all MIDI input drivers currently available
2234 for the LinuxSampler instance:
2235 </p>
2236 <p>
2237 </p>
2238 <blockquote class="text">
2239 <p>LIST AVAILABLE_MIDI_INPUT_DRIVERS
2240 </p>
2241 </blockquote><p>
2242
2243 </p>
2244 <p>Possible Answers:
2245 </p>
2246 <p>
2247 </p>
2248 <blockquote class="text">
2249 <p>LinuxSampler will answer by sending comma separated character
2250 strings, each symbolizing a MIDI input driver.
2251 </p>
2252 </blockquote><p>
2253
2254 </p>
2255 <p>Example:
2256 </p>
2257 <p>
2258 </p>
2259 <blockquote class="text">
2260 <p>C: "LIST AVAILABLE_MIDI_INPUT_DRIVERS"
2261 </p>
2262 <p>S: "ALSA,JACK"
2263 </p>
2264 </blockquote><p>
2265
2266 </p>
2267 <a name="GET MIDI_INPUT_DRIVER INFO"></a><br /><hr />
2268 <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>
2269 <a name="rfc.section.6.3.3"></a><h3>6.3.3.&nbsp;Getting information about a specific MIDI input driver</h3>
2270
2271 <p>Use the following command to get detailed information about a specific MIDI input driver:
2272 </p>
2273 <p>
2274 </p>
2275 <blockquote class="text">
2276 <p>GET MIDI_INPUT_DRIVER INFO &lt;midi-input-driver&gt;
2277 </p>
2278 </blockquote><p>
2279
2280 </p>
2281 <p>Where &lt;midi-input-driver&gt; is the name of the MIDI input driver as returned
2282 by the <a class="info" href="#LIST AVAILABLE_MIDI_INPUT_DRIVERS">"LIST AVAILABLE_MIDI_INPUT_DRIVERS"<span> (</span><span class="info">Getting all available MIDI input drivers</span><span>)</span></a> command.
2283 </p>
2284 <p>Possible Answers:
2285 </p>
2286 <p>
2287 </p>
2288 <blockquote class="text">
2289 <p>LinuxSampler will answer by sending a &lt;CRLF&gt; separated list.
2290 Each answer line begins with the information category name
2291 followed by a colon and then a space character &lt;SP&gt; and finally
2292 the info character string to that info category. At the moment
2293 the following information categories are defined:
2294 </p>
2295 <p>
2296 </p>
2297 <blockquote class="text">
2298 <p>DESCRIPTION -
2299 </p>
2300 <blockquote class="text">
2301 <p>arbitrary description text about the MIDI input driver
2302 </p>
2303 </blockquote>
2304
2305
2306 <p>VERSION -
2307 </p>
2308 <blockquote class="text">
2309 <p>arbitrary character string regarding the driver's version
2310 </p>
2311 </blockquote>
2312
2313
2314 <p>PARAMETERS -
2315 </p>
2316 <blockquote class="text">
2317 <p>comma separated list of all parameters available for the given MIDI input driver
2318 </p>
2319 </blockquote>
2320
2321
2322 </blockquote>
2323
2324
2325 <p>The mentioned fields above don't have to be in particular order.
2326 </p>
2327 </blockquote><p>
2328
2329 </p>
2330 <p>Example:
2331 </p>
2332 <p>
2333 </p>
2334 <blockquote class="text">
2335 <p>C: "GET MIDI_INPUT_DRIVER INFO ALSA"
2336 </p>
2337 <p>S: "DESCRIPTION: Advanced Linux Sound Architecture"
2338 </p>
2339 <p>&nbsp;&nbsp;&nbsp;"VERSION: 1.0"
2340 </p>
2341 <p>&nbsp;&nbsp;&nbsp;"PARAMETERS: DRIVER,ACTIVE"
2342 </p>
2343 <p>&nbsp;&nbsp;&nbsp;"."
2344 </p>
2345 </blockquote><p>
2346
2347 </p>
2348 <a name="GET MIDI_INPUT_DRIVER_PARAMETER INFO"></a><br /><hr />
2349 <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>
2350 <a name="rfc.section.6.3.4"></a><h3>6.3.4.&nbsp;Getting information about specific MIDI input driver parameter</h3>
2351
2352 <p>Use the following command to get detailed information about a specific parameter of a specific MIDI input driver:
2353 </p>
2354 <p>
2355 </p>
2356 <blockquote class="text">
2357 <p>GET MIDI_INPUT_DRIVER_PARAMETER INFO &lt;midit&gt; &lt;param&gt; [&lt;deplist&gt;]
2358 </p>
2359 </blockquote><p>
2360
2361 </p>
2362 <p>Where &lt;midit&gt; is the name of the MIDI input driver as returned
2363 by the <a class="info" href="#LIST AVAILABLE_MIDI_INPUT_DRIVERS">"LIST AVAILABLE_MIDI_INPUT_DRIVERS"<span> (</span><span class="info">Getting all available MIDI input drivers</span><span>)</span></a> command, &lt;param&gt; a specific
2364 parameter name for which information should be obtained (as returned by the
2365 <a class="info" href="#GET MIDI_INPUT_DRIVER INFO">"GET MIDI_INPUT_DRIVER INFO"<span> (</span><span class="info">Getting information about a specific MIDI input driver</span><span>)</span></a> command) and &lt;deplist&gt; is an optional list
2366 of parameters on which the sought parameter &lt;param&gt; depends on,
2367 &lt;deplist&gt; is a key-value pair list in form of "key1=val1 key2=val2 ...",
2368 where character string values are encapsulated into apostrophes ('). Arguments
2369 given with &lt;deplist&gt; which are not dependency parameters of &lt;param&gt;
2370 will be ignored, means the front-end application can simply put all parameters
2371 in &lt;deplist&gt; with the values selected by the user.
2372 </p>
2373 <p>Possible Answers:
2374 </p>
2375 <p>LinuxSampler will answer by sending a &lt;CRLF> separated list.
2376 Each answer line begins with the information category name
2377 followed by a colon and then a space character &lt;SP> and finally
2378 the info character string to that info category. There is
2379 information which is always returned, independent of the
2380 given driver parameter and there is optional information
2381 which is only shown dependent to given driver parameter. At
2382 the moment the following information categories are defined:
2383 </p>
2384 <p>
2385 </p>
2386 <blockquote class="text">
2387 <p>TYPE -
2388 </p>
2389 <blockquote class="text">
2390 <p>either "BOOL" for boolean value(s) or "INT" for integer
2391 value(s) or "FLOAT" for dotted number(s) or "STRING" for
2392 character string(s)
2393 (always returned, no matter which driver parameter)
2394 </p>
2395 </blockquote>
2396
2397
2398 <p>DESCRIPTION -
2399 </p>
2400 <blockquote class="text">
2401 <p>arbitrary text describing the purpose of the parameter
2402 (always returned, no matter which driver parameter)
2403 </p>
2404 </blockquote>
2405
2406
2407 <p>MANDATORY -
2408 </p>
2409 <blockquote class="text">
2410 <p>either true or false, defines if this parameter must be
2411 given when the device is to be created with the
2412 <a class="info" href="#CREATE MIDI_INPUT_DEVICE">'CREATE MIDI_INPUT_DEVICE'<span> (</span><span class="info">Creating a MIDI input device</span><span>)</span></a> command
2413 (always returned, no matter which driver parameter)
2414 </p>
2415 </blockquote>
2416
2417
2418 <p>FIX -
2419 </p>
2420 <blockquote class="text">
2421 <p>either true or false, if false then this parameter can
2422 be changed at any time, once the device is created by
2423 the <a class="info" href="#CREATE MIDI_INPUT_DEVICE">'CREATE MIDI_INPUT_DEVICE'<span> (</span><span class="info">Creating a MIDI input device</span><span>)</span></a> command
2424 (always returned, no matter which driver parameter)
2425 </p>
2426 </blockquote>
2427
2428
2429 <p>MULTIPLICITY -
2430 </p>
2431 <blockquote class="text">
2432 <p>either true or false, defines if this parameter allows
2433 only one value or a list of values, where true means
2434 multiple values and false only a single value allowed
2435 (always returned, no matter which driver parameter)
2436 </p>
2437 </blockquote>
2438
2439
2440 <p>DEPENDS -
2441 </p>
2442 <blockquote class="text">
2443 <p>comma separated list of parameters this parameter depends
2444 on, means the values for fields 'DEFAULT', 'RANGE_MIN',
2445 'RANGE_MAX' and 'POSSIBILITIES' might depend on these
2446 listed parameters, for example assuming that an audio
2447 driver (like the ALSA driver) offers parameters 'card'
2448 and 'samplerate' then parameter 'samplerate' would
2449 depend on 'card' because the possible values for
2450 'samplerate' depends on the sound card which can be
2451 chosen by the 'card' parameter
2452 (optionally returned, dependent to driver parameter)
2453 </p>
2454 </blockquote>
2455
2456
2457 <p>DEFAULT -
2458 </p>
2459 <blockquote class="text">
2460 <p>reflects the default value for this parameter which is
2461 used when the device is created and not explicitly
2462 given with the <a class="info" href="#CREATE MIDI_INPUT_DEVICE">'CREATE MIDI_INPUT_DEVICE'<span> (</span><span class="info">Creating a MIDI input device</span><span>)</span></a> command,
2463 in case of MULTIPLCITY=true, this is a comma separated
2464 list, that's why character strings are encapsulated into
2465 apostrophes (')
2466 (optionally returned, dependent to driver parameter)
2467 </p>
2468 </blockquote>
2469
2470
2471 <p>RANGE_MIN -
2472 </p>
2473 <blockquote class="text">
2474 <p>defines lower limit of the allowed value range for this
2475 parameter, can be an integer value as well as a dotted
2476 number, this parameter is often used in conjunction
2477 with RANGE_MAX, but may also appear without
2478 (optionally returned, dependent to driver parameter)
2479 </p>
2480 </blockquote>
2481
2482
2483 <p>RANGE_MAX -
2484 </p>
2485 <blockquote class="text">
2486 <p>defines upper limit of the allowed value range for this
2487 parameter, can be an integer value as well as a dotted
2488 number, this parameter is often used in conjunction with
2489 RANGE_MIN, but may also appear without
2490 (optionally returned, dependent to driver parameter)
2491 </p>
2492 </blockquote>
2493
2494
2495 <p>POSSIBILITIES -
2496 </p>
2497 <blockquote class="text">
2498 <p>comma separated list of possible values for this
2499 parameter, character strings are encapsulated into
2500 apostrophes
2501 (optionally returned, dependent to driver parameter)
2502 </p>
2503 </blockquote>
2504
2505
2506 </blockquote><p>
2507
2508 </p>
2509 <p>The mentioned fields above don't have to be in particular order.
2510 </p>
2511 <p>Example:
2512 </p>
2513 <p>
2514 </p>
2515 <blockquote class="text">
2516 <p>C: "GET MIDI_INPUT_DRIVER_PARAMETER INFO ALSA ACTIVE"
2517 </p>
2518 <p>S: "DESCRIPTION: Whether device is enabled"
2519 </p>
2520 <p>&nbsp;&nbsp;&nbsp;"TYPE: BOOL"
2521 </p>
2522 <p>&nbsp;&nbsp;&nbsp;"MANDATORY: false"
2523 </p>
2524 <p>&nbsp;&nbsp;&nbsp;"FIX: false"
2525 </p>
2526 <p>&nbsp;&nbsp;&nbsp;"MULTIPLICITY: false"
2527 </p>
2528 <p>&nbsp;&nbsp;&nbsp;"DEFAULT: true"
2529 </p>
2530 <p>&nbsp;&nbsp;&nbsp;"."
2531 </p>
2532 </blockquote><p>
2533
2534 </p>
2535 <a name="CREATE MIDI_INPUT_DEVICE"></a><br /><hr />
2536 <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>
2537 <a name="rfc.section.6.3.5"></a><h3>6.3.5.&nbsp;Creating a MIDI input device</h3>
2538
2539 <p>Use the following command to create a new MIDI input device for the desired MIDI input system:
2540 </p>
2541 <p>
2542 </p>
2543 <blockquote class="text">
2544 <p>CREATE MIDI_INPUT_DEVICE &lt;midi-input-driver&gt; [&lt;param-list&gt;]
2545 </p>
2546 </blockquote><p>
2547
2548 </p>
2549 <p>Where &lt;midi-input-driver&gt; should be replaced by the desired MIDI input system as returned
2550 by the <a class="info" href="#LIST AVAILABLE_MIDI_INPUT_DRIVERS">"LIST AVAILABLE_MIDI_INPUT_DRIVERS"<span> (</span><span class="info">Getting all available MIDI input drivers</span><span>)</span></a> command and &lt;param-list&gt; by an
2551 optional list of driver specific parameters in form of "key1=val1 key2=val2 ...", where
2552 character string values should be encapsulated into apostrophes (').
2553 Note that there might be drivers which require parameter(s) to be
2554 given with this command. Use the previously described commands in
2555 this chapter to get that information.
2556 </p>
2557 <p>Possible Answers:
2558 </p>
2559 <p>
2560 </p>
2561 <blockquote class="text">
2562 <p>"OK[&lt;device-id&gt;]" -
2563 </p>
2564 <blockquote class="text">
2565 <p>in case the device was successfully created, where
2566 &lt;device-id&gt; is the numerical ID of the new device
2567 </p>
2568 </blockquote>
2569
2570
2571 <p>"WRN[&lt;device-id&gt;]:&lt;warning-code&gt;:&lt;warning-message&gt;" -
2572 </p>
2573 <blockquote class="text">
2574 <p>in case the driver was loaded successfully, where
2575 &lt;device-id&gt; is the numerical ID of the new device, but
2576 there are noteworthy issue(s) related, providing an
2577 appropriate warning code and warning message
2578 </p>
2579 </blockquote>
2580
2581
2582 <p>"ERR:&lt;error-code&gt;:&lt;error-message&gt;" -
2583 </p>
2584 <blockquote class="text">
2585 <p>in case it failed, providing an appropriate error code and error message
2586 </p>
2587 </blockquote>
2588
2589
2590 </blockquote><p>
2591
2592 </p>
2593 <p>Example:
2594 </p>
2595 <p>
2596 </p>
2597 <blockquote class="text">
2598 <p>C: "CREATE MIDI_INPUT_DEVICE ALSA"
2599 </p>
2600 <p>S: "OK[0]"
2601 </p>
2602 </blockquote><p>
2603
2604 </p>
2605 <a name="DESTROY MIDI_INPUT_DEVICE"></a><br /><hr />
2606 <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>
2607 <a name="rfc.section.6.3.6"></a><h3>6.3.6.&nbsp;Destroying a MIDI input device</h3>
2608
2609 <p>Use the following command to destroy a created MIDI input device:
2610 </p>
2611 <p>
2612 </p>
2613 <blockquote class="text">
2614 <p>DESTROY MIDI_INPUT_DEVICE &lt;device-id&gt;
2615 </p>
2616 </blockquote><p>
2617
2618 </p>
2619 <p>Where &lt;device-id&gt; should be replaced by the device's numerical ID as returned by the
2620 <a class="info" href="#CREATE MIDI_INPUT_DEVICE">"CREATE MIDI_INPUT_DEVICE"<span> (</span><span class="info">Creating a MIDI input device</span><span>)</span></a>
2621 or <a class="info" href="#LIST MIDI_INPUT_DEVICES">"LIST MIDI_INPUT_DEVICES"<span> (</span><span class="info">Getting all created MIDI input device list</span><span>)</span></a>
2622 command.
2623 </p>
2624 <p>Possible Answers:
2625 </p>
2626 <p>
2627 </p>
2628 <blockquote class="text">
2629 <p>"OK" -
2630 </p>
2631 <blockquote class="text">
2632 <p>in case the device was successfully destroyed
2633 </p>
2634 </blockquote>
2635
2636
2637 <p>"WRN:&lt;warning-code&gt;:&lt;warning-message&gt;" -
2638 </p>
2639 <blockquote class="text">
2640 <p>in case the device was destroyed, but there are noteworthy
2641 issue(s) related, providing an appropriate warning code and
2642 warning message
2643 </p>
2644 </blockquote>
2645
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 error message
2651 </p>
2652 </blockquote>
2653
2654
2655 </blockquote><p>
2656
2657 </p>
2658 <p>Example:
2659 </p>
2660 <p>
2661 </p>
2662 <blockquote class="text">
2663 <p>C: "DESTROY MIDI_INPUT_DEVICE 0"
2664 </p>
2665 <p>S: "OK"
2666 </p>
2667 </blockquote><p>
2668
2669 </p>
2670 <a name="GET MIDI_INPUT_DEVICES"></a><br /><hr />
2671 <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>
2672 <a name="rfc.section.6.3.7"></a><h3>6.3.7.&nbsp;Getting all created MIDI input device count</h3>
2673
2674 <p>Use the following command to count all created MIDI input devices:
2675 </p>
2676 <p>
2677 </p>
2678 <blockquote class="text">
2679 <p>GET MIDI_INPUT_DEVICES
2680 </p>
2681 </blockquote><p>
2682
2683 </p>
2684 <p>Possible Answers:
2685 </p>
2686 <p>
2687 </p>
2688 <blockquote class="text">
2689 <p>LinuxSampler will answer by sending the current number of all
2690 MIDI input devices.
2691 </p>
2692 </blockquote><p>
2693
2694 </p>
2695 <p>Example:
2696 </p>
2697 <p>
2698 </p>
2699 <blockquote class="text">
2700 <p>C: "GET MIDI_INPUT_DEVICES"
2701 </p>
2702 <p>S: "3"
2703 </p>
2704 </blockquote><p>
2705
2706 </p>
2707 <a name="LIST MIDI_INPUT_DEVICES"></a><br /><hr />
2708 <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>
2709 <a name="rfc.section.6.3.8"></a><h3>6.3.8.&nbsp;Getting all created MIDI input device list</h3>
2710
2711 <p>Use the following command to list all created MIDI input devices:
2712 </p>
2713 <p>
2714 </p>
2715 <blockquote class="text">
2716 <p>LIST MIDI_INPUT_DEVICES
2717 </p>
2718 </blockquote><p>
2719
2720 </p>
2721 <p>Possible Answers:
2722 </p>
2723 <p>
2724 </p>
2725 <blockquote class="text">
2726 <p>LinuxSampler will answer by sending a comma separated list
2727 with the numerical Ids of all created MIDI input devices.
2728 </p>
2729 </blockquote><p>
2730
2731 </p>
2732 <p>Examples:
2733 </p>
2734 <p>
2735 </p>
2736 <blockquote class="text">
2737 <p>C: "LIST MIDI_INPUT_DEVICES"
2738 </p>
2739 <p>S: "0,1,2"
2740 </p>
2741 </blockquote><p>
2742
2743 </p>
2744 <p>
2745 </p>
2746 <blockquote class="text">
2747 <p>C: "LIST MIDI_INPUT_DEVICES"
2748 </p>
2749 <p>S: "1,3"
2750 </p>
2751 </blockquote><p>
2752
2753 </p>
2754 <a name="GET MIDI_INPUT_DEVICE INFO"></a><br /><hr />
2755 <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>
2756 <a name="rfc.section.6.3.9"></a><h3>6.3.9.&nbsp;Getting current settings of a MIDI input device</h3>
2757
2758 <p>Use the following command to get current settings of a specific, created MIDI input device:
2759 </p>
2760 <p>
2761 </p>
2762 <blockquote class="text">
2763 <p>GET MIDI_INPUT_DEVICE INFO &lt;device-id&gt;
2764 </p>
2765 </blockquote><p>
2766
2767 </p>
2768 <p>Where &lt;device-id&gt; is the numerical ID of the MIDI input device as returned by the
2769 <a class="info" href="#CREATE MIDI_INPUT_DEVICE">"CREATE MIDI_INPUT_DEVICE"<span> (</span><span class="info">Creating a MIDI input device</span><span>)</span></a>
2770 or <a class="info" href="#LIST MIDI_INPUT_DEVICES">"LIST MIDI_INPUT_DEVICES"<span> (</span><span class="info">Getting all created MIDI input device list</span><span>)</span></a>
2771 command.
2772 </p>
2773 <p>Possible Answers:
2774 </p>
2775 <p>
2776 </p>
2777 <blockquote class="text">
2778 <p>LinuxSampler will answer by sending a &lt;CRLF&gt; separated list.
2779 Each answer line begins with the information category name
2780 followed by a colon and then a space character &lt;SP&gt; and finally
2781 the info character string to that info category. As some
2782 parameters might allow multiple values, character strings are
2783 encapsulated into apostrophes ('). At the moment the following
2784 information categories are defined (independent of driver):
2785 </p>
2786 <p>
2787 </p>
2788 <blockquote class="text">
2789 <p>DRIVER -
2790 </p>
2791 <blockquote class="text">
2792 <p>identifier of the used MIDI input driver, as e.g.
2793 returned by the <a class="info" href="#LIST AVAILABLE_MIDI_INPUT_DRIVERS">"LIST AVAILABLE_MIDI_INPUT_DRIVERS"<span> (</span><span class="info">Getting all available MIDI input drivers</span><span>)</span></a>
2794 command
2795 </p>
2796 </blockquote>
2797
2798
2799 </blockquote>
2800
2801 <blockquote class="text">
2802 <p>ACTIVE -
2803 </p>
2804 <blockquote class="text">
2805 <p>either true or false, if false then the MIDI device is
2806 inactive and doesn't listen to any incoming MIDI events
2807 and thus doesn't forward them to connected sampler
2808 channels
2809 </p>
2810 </blockquote>
2811
2812
2813 </blockquote>
2814
2815
2816 </blockquote><p>
2817
2818 </p>
2819 <p>The mentioned fields above don't have to be in particular
2820 order. The fields above are only those fields which are
2821 returned by all MIDI input devices. Every MIDI input driver
2822 might have its own, additional driver specific parameters (see
2823 <a class="info" href="#GET MIDI_INPUT_DRIVER INFO">"GET MIDI_INPUT_DRIVER INFO"<span> (</span><span class="info">Getting information about a specific MIDI input driver</span><span>)</span></a> command) which are also returned
2824 by this command.
2825 </p>
2826 <p>Example:
2827 </p>
2828 <p>
2829 </p>
2830 <blockquote class="text">
2831 <p>C: "GET MIDI_INPUT_DEVICE INFO 0"
2832 </p>
2833 <p>S: "DRIVER: ALSA"
2834 </p>
2835 <p>&nbsp;&nbsp;&nbsp;"ACTIVE: true"
2836 </p>
2837 <p>&nbsp;&nbsp;&nbsp;"."
2838 </p>
2839 </blockquote><p>
2840
2841 </p>
2842 <a name="SET MIDI_INPUT_DEVICE_PARAMETER"></a><br /><hr />
2843 <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>
2844 <a name="rfc.section.6.3.10"></a><h3>6.3.10.&nbsp;Changing settings of MIDI input devices</h3>
2845
2846 <p>Use the following command to alter a specific setting of a created MIDI input device:
2847 </p>
2848 <p>
2849 </p>
2850 <blockquote class="text">
2851 <p>SET MIDI_INPUT_DEVICE_PARAMETER &lt;device-id&gt; &lt;key&gt;=&lt;value&gt;
2852 </p>
2853 </blockquote><p>
2854
2855 </p>
2856 <p>Where &lt;device-id&gt; should be replaced by the numerical ID of the
2857 MIDI input device as returned by the
2858 <a class="info" href="#CREATE MIDI_INPUT_DEVICE">"CREATE MIDI_INPUT_DEVICE"<span> (</span><span class="info">Creating a MIDI input device</span><span>)</span></a>
2859 or <a class="info" href="#LIST MIDI_INPUT_DEVICES">"LIST MIDI_INPUT_DEVICES"<span> (</span><span class="info">Getting all created MIDI input device list</span><span>)</span></a>
2860 command, &lt;key&gt; by the name of the parameter to change and
2861 &lt;value&gt; by the new value for this parameter.
2862 </p>
2863 <p>Possible Answers:
2864 </p>
2865 <p>
2866 </p>
2867 <blockquote class="text">
2868 <p>"OK" -
2869 </p>
2870 <blockquote class="text">
2871 <p>in case setting was successfully changed
2872 </p>
2873 </blockquote>
2874
2875
2876 <p>"WRN:&lt;warning-code&gt;:&lt;warning-message&gt;" -
2877 </p>
2878 <blockquote class="text">
2879 <p>in case setting was changed successfully, but there are
2880 noteworthy issue(s) related, providing an appropriate
2881 warning code and warning message
2882 </p>
2883 </blockquote>
2884
2885
2886 <p>"ERR:&lt;error-code&gt;:&lt;error-message&gt;" -
2887 </p>
2888 <blockquote class="text">
2889 <p>in case it failed, providing an appropriate error code and error message
2890 </p>
2891 </blockquote>
2892
2893
2894 </blockquote><p>
2895
2896 </p>
2897 <p>Example:
2898 </p>
2899 <p>
2900 </p>
2901 <blockquote class="text">
2902 <p>C: "SET MIDI_INPUT_DEVICE_PARAMETER 0 ACTIVE=false"
2903 </p>
2904 <p>S: "OK"
2905 </p>
2906 </blockquote><p>
2907
2908 </p>
2909 <a name="GET MIDI_INPUT_PORT INFO"></a><br /><hr />
2910 <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>
2911 <a name="rfc.section.6.3.11"></a><h3>6.3.11.&nbsp;Getting information about a MIDI port</h3>
2912
2913 <p>Use the following command to get information about a MIDI port:
2914 </p>
2915 <p>
2916 </p>
2917 <blockquote class="text">
2918 <p>GET MIDI_INPUT_PORT INFO &lt;device-id&gt; &lt;midi-port&gt;
2919 </p>
2920 </blockquote><p>
2921
2922 </p>
2923 <p>Where &lt;device-id&gt; is the numerical ID of the MIDI input device as returned by the
2924 <a class="info" href="#CREATE MIDI_INPUT_DEVICE">"CREATE MIDI_INPUT_DEVICE"<span> (</span><span class="info">Creating a MIDI input device</span><span>)</span></a>
2925 or <a class="info" href="#LIST MIDI_INPUT_DEVICES">"LIST MIDI_INPUT_DEVICES"<span> (</span><span class="info">Getting all created MIDI input device list</span><span>)</span></a>
2926 command and &lt;midi-port&gt; the MIDI input port number.
2927 </p>
2928 <p>Possible Answers:
2929 </p>
2930 <p>
2931 </p>
2932 <blockquote class="text">
2933 <p>LinuxSampler will answer by sending a &lt;CRLF&gt; separated list.
2934 Each answer line begins with the information category name
2935 followed by a colon and then a space character &lt;SP&gt; and finally
2936 the info character string to that info category. At the moment
2937 the following information categories are defined:
2938 </p>
2939 <p>NAME -
2940 </p>
2941 <blockquote class="text">
2942 <p>arbitrary character string naming the port
2943 </p>
2944 </blockquote>
2945
2946
2947 </blockquote><p>
2948
2949 </p>
2950 <p>The field above is only the one which is returned by all MIDI
2951 ports regardless of the MIDI driver and port. Every MIDI port
2952 might have its own, additional driver and port specific
2953 parameters.
2954 </p>
2955 <p>Example:
2956 </p>
2957 <p>
2958 </p>
2959 <blockquote class="text">
2960 <p>C: "GET MIDI_INPUT_PORT INFO 0 0"
2961 </p>
2962 <p>S: "NAME: 'Masterkeyboard'"
2963 </p>
2964 <p>&nbsp;&nbsp;&nbsp;"ALSA_SEQ_BINDINGS: '64:0'"
2965 </p>
2966 <p>&nbsp;&nbsp;&nbsp;"."
2967 </p>
2968 </blockquote><p>
2969
2970 </p>
2971 <a name="GET MIDI_INPUT_PORT_PARAMETER INFO"></a><br /><hr />
2972 <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>
2973 <a name="rfc.section.6.3.12"></a><h3>6.3.12.&nbsp;Getting information about specific MIDI port parameter</h3>
2974
2975 <p>Use the following command to get detailed information about specific MIDI port parameter:
2976 </p>
2977 <p>
2978 </p>
2979 <blockquote class="text">
2980 <p>GET MIDI_INPUT_PORT_PARAMETER INFO &lt;dev-id&gt; &lt;port&gt; &lt;param&gt;
2981 </p>
2982 </blockquote><p>
2983
2984 </p>
2985 <p>Where &lt;dev-id&gt; is the numerical ID of the MIDI input device as returned by the
2986 <a class="info" href="#CREATE MIDI_INPUT_DEVICE">"CREATE MIDI_INPUT_DEVICE"<span> (</span><span class="info">Creating a MIDI input device</span><span>)</span></a>
2987 or <a class="info" href="#LIST MIDI_INPUT_DEVICES">"LIST MIDI_INPUT_DEVICES"<span> (</span><span class="info">Getting all created MIDI input device list</span><span>)</span></a>
2988 command, &lt;port&gt; the MIDI port number and
2989 &lt;param&gt; a specific port parameter name for which information should be
2990 obtained (as returned by the <a class="info" href="#GET MIDI_INPUT_PORT INFO">"GET MIDI_INPUT_PORT INFO"<span> (</span><span class="info">Getting information about a MIDI port</span><span>)</span></a> command).
2991 </p>
2992 <p>Possible Answers:
2993 </p>
2994 <p>
2995 </p>
2996 <blockquote class="text">
2997 <p>LinuxSampler will answer by sending a &lt;CRLF&gt; separated list.
2998 Each answer line begins with the information category name
2999 followed by a colon and then a space character &lt;SP&gt; and finally
3000 the info character string to that info category. There is
3001 information which is always returned, independently of the
3002 given channel parameter and there is optional information
3003 which are only shown dependently to the given MIDI port. At the
3004 moment the following information categories are defined:
3005 </p>
3006 <p>TYPE -
3007 </p>
3008 <blockquote class="text">
3009 <p>either "BOOL" for boolean value(s) or "INT" for integer
3010 value(s) or "FLOAT" for dotted number(s) or "STRING" for
3011 character string(s)
3012 (always returned)
3013 </p>
3014 </blockquote>
3015
3016
3017 <p>DESCRIPTION -
3018 </p>
3019 <blockquote class="text">
3020 <p>arbitrary text describing the purpose of the parameter
3021 (always returned)
3022 </p>
3023 </blockquote>
3024
3025
3026 <p>FIX -
3027 </p>
3028 <blockquote class="text">
3029 <p>either true or false, if true then this parameter is
3030 read only, thus cannot be altered
3031 (always returned)
3032 </p>
3033 </blockquote>
3034
3035
3036 <p>MULTIPLICITY -
3037 </p>
3038 <blockquote class="text">
3039 <p>either true or false, defines if this parameter allows
3040 only one value or a list of values, where true means
3041 multiple values and false only a single value allowed
3042 (always returned)
3043 </p>
3044 </blockquote>
3045
3046
3047 <p>RANGE_MIN -
3048 </p>
3049 <blockquote class="text">
3050 <p>defines lower limit of the allowed value range for this
3051 parameter, can be an integer value as well as a dotted
3052 number, this parameter is usually used in conjunction
3053 with 'RANGE_MAX' but may also appear without
3054 (optionally returned, dependent to driver and port
3055 parameter)
3056 </p>
3057 </blockquote>
3058
3059
3060 <p>RANGE_MAX -
3061 </p>
3062 <blockquote class="text">
3063 <p>defines upper limit of the allowed value range for this
3064 parameter, can be an integer value as well as a dotted
3065 number, this parameter is usually used in conjunction
3066 with 'RANGE_MIN' but may also appear without
3067 (optionally returned, dependent to driver and port
3068 parameter)
3069 </p>
3070 </blockquote>
3071
3072
3073 <p>POSSIBILITIES -
3074 </p>
3075 <blockquote class="text">
3076 <p>comma separated list of possible values for this
3077 parameter, character strings are encapsulated into
3078 apostrophes
3079 (optionally returned, dependent to device and port
3080 parameter)
3081 </p>
3082 </blockquote>
3083
3084
3085 </blockquote><p>
3086
3087 </p>
3088 <p>The mentioned fields above don't have to be in particular order.
3089 </p>
3090 <p>Example:
3091 </p>
3092 <p>
3093 </p>
3094 <blockquote class="text">
3095 <p>C: "GET MIDI_INPUT_PORT_PARAMETER INFO 0 0 ALSA_SEQ_BINDINGS"
3096 </p>
3097 <p>S: "DESCRIPTION: bindings to other ALSA sequencer clients"
3098 </p>
3099 <p>&nbsp;&nbsp;&nbsp;"TYPE: STRING"
3100 </p>
3101 <p>&nbsp;&nbsp;&nbsp;"FIX: false"
3102 </p>
3103 <p>&nbsp;&nbsp;&nbsp;"MULTIPLICITY: true"
3104 </p>
3105 <p>&nbsp;&nbsp;&nbsp;"POSSIBILITIES: '64:0','68:0','68:1'"
3106 </p>
3107 <p>&nbsp;&nbsp;&nbsp;"."
3108 </p>
3109 </blockquote><p>
3110
3111 </p>
3112 <a name="SET MIDI_INPUT_PORT_PARAMETER"></a><br /><hr />
3113 <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>
3114 <a name="rfc.section.6.3.13"></a><h3>6.3.13.&nbsp;Changing settings of MIDI input ports</h3>
3115
3116 <p>Use the following command to alter a specific setting of a MIDI input port:
3117 </p>
3118 <p>
3119 </p>
3120 <blockquote class="text">
3121 <p>SET MIDI_INPUT_PORT_PARAMETER &lt;device-id&gt; &lt;port&gt; &lt;key&gt;=&lt;value&gt;
3122 </p>
3123 </blockquote><p>
3124
3125 </p>
3126 <p>Where &lt;device-id&gt; should be replaced by the numerical ID of the
3127 MIDI device as returned by the
3128 <a class="info" href="#CREATE MIDI_INPUT_DEVICE">"CREATE MIDI_INPUT_DEVICE"<span> (</span><span class="info">Creating a MIDI input device</span><span>)</span></a>
3129 or <a class="info" href="#LIST MIDI_INPUT_DEVICES">"LIST MIDI_INPUT_DEVICES"<span> (</span><span class="info">Getting all created MIDI input device list</span><span>)</span></a>
3130 command, &lt;port&gt; by the MIDI port number, &lt;key&gt; by the name of
3131 the parameter to change and &lt;value&gt; by the new value for this
3132 parameter.
3133 </p>
3134 <p>Possible Answers:
3135 </p>
3136 <p>
3137 </p>
3138 <blockquote class="text">
3139 <p>"OK" -
3140 </p>
3141 <blockquote class="text">
3142 <p>in case setting was successfully changed
3143 </p>
3144 </blockquote>
3145
3146
3147 <p>"WRN:&lt;warning-code&gt;:&lt;warning-message&gt;" -
3148 </p>
3149 <blockquote class="text">
3150 <p>in case setting was changed successfully, but there are
3151 noteworthy issue(s) related, providing an appropriate
3152 warning code and warning message
3153 </p>
3154 </blockquote>
3155
3156
3157 <p>"ERR:&lt;error-code&gt;:&lt;error-message&gt;" -
3158 </p>
3159 <blockquote class="text">
3160 <p>in case it failed, providing an appropriate error code and error message
3161 </p>
3162 </blockquote>
3163
3164
3165 </blockquote><p>
3166
3167 </p>
3168 <p>Example:
3169 </p>
3170 <p>
3171 </p>
3172 <blockquote class="text">
3173 <p>
3174 </p>
3175 </blockquote><p>
3176
3177 </p>
3178 <a name="anchor11"></a><br /><hr />
3179 <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>
3180 <a name="rfc.section.6.4"></a><h3>6.4.&nbsp;Configuring sampler channels</h3>
3181
3182 <p>The following commands describe how to add and remove sampler channels, associate a
3183 sampler channel with a sampler engine, load instruments and connect sampler channels to
3184 MIDI and audio devices.
3185 </p>
3186 <a name="LOAD INSTRUMENT"></a><br /><hr />
3187 <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>
3188 <a name="rfc.section.6.4.1"></a><h3>6.4.1.&nbsp;Loading an instrument</h3>
3189
3190 <p>An instrument file can be loaded and assigned to a sampler channel by one of the following commands:
3191 </p>
3192 <p>
3193 </p>
3194 <blockquote class="text">
3195 <p>LOAD INSTRUMENT [NON_MODAL] '&lt;filename&gt;' &lt;instr-index&gt; &lt;sampler-channel&gt;
3196 </p>
3197 </blockquote><p>
3198
3199 </p>
3200 <p>Where &lt;filename&gt; is the name of the instrument file on the
3201 LinuxSampler instance's host system, &lt;instr-index&gt; the index of the
3202 instrument in the instrument file and &lt;sampler-channel> is the
3203 number of the sampler channel the instrument should be assigned to.
3204 Each sampler channel can only have one instrument.
3205 </p>
3206 <p>The difference between regular and NON_MODAL versions of the command
3207 is that the regular command returns OK only after the instrument has been
3208 fully loaded and the channel is ready to be used while NON_MODAL version
3209 returns immediately and a background process is launched to load the instrument
3210 on the channel. The <a class="info" href="#GET CHANNEL INFO">GET CHANNEL INFO<span> (</span><span class="info">Getting sampler channel information</span><span>)</span></a>
3211 command can be used to obtain loading
3212 progress from INSTRUMENT_STATUS field. LOAD command will perform sanity checks
3213 such as making sure that the file could be read and it is of a proper format
3214 and SHOULD return ERR and SHOULD not launch the background process should any
3215 errors be detected at that point.
3216 </p>
3217 <p>Possible Answers:
3218 </p>
3219 <p>
3220 </p>
3221 <blockquote class="text">
3222 <p>"OK" -
3223 </p>
3224 <blockquote class="text">
3225 <p>in case the instrument was successfully loaded
3226 </p>
3227 </blockquote>
3228
3229
3230 <p>"WRN:&lt;warning-code&gt;:&lt;warning-message&gt;" -
3231 </p>
3232 <blockquote class="text">
3233 <p>in case the instrument was loaded successfully, but there
3234 are noteworthy issue(s) related (e.g. Engine doesn't support
3235 one or more patch parameters provided by the loaded
3236 instrument file), providing an appropriate warning code and
3237 warning message
3238 </p>
3239 </blockquote>
3240
3241
3242 <p>"ERR:&lt;error-code&gt;:&lt;error-message&gt;" -
3243 </p>
3244 <blockquote class="text">
3245 <p>in case it failed, providing an appropriate error code and error message
3246 </p>
3247 </blockquote>
3248
3249
3250 </blockquote><p>
3251
3252 </p>
3253 <p>Example:
3254 </p>
3255 <p>
3256 </p>
3257 <blockquote class="text">
3258 <p>
3259 </p>
3260 </blockquote><p>
3261
3262 </p>
3263 <a name="LOAD ENGINE"></a><br /><hr />
3264 <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>
3265 <a name="rfc.section.6.4.2"></a><h3>6.4.2.&nbsp;Loading a sampler engine</h3>
3266
3267 <p>A sampler engine type can be associated to a specific sampler
3268 channel by the following command:
3269 </p>
3270 <p>
3271 </p>
3272 <blockquote class="text">
3273 <p>LOAD ENGINE &lt;engine-name&gt; &lt;sampler-channel&gt;
3274 </p>
3275 </blockquote><p>
3276
3277 </p>
3278 <p>Where &lt;engine-name&gt; is an engine name as obtained by the
3279 <a class="info" href="#LIST AVAILABLE_ENGINES">"LIST AVAILABLE_ENGINES"<span> (</span><span class="info">Getting all available engines</span><span>)</span></a> command and &lt;sampler-channel&gt;
3280 the sampler channel as returned by the
3281 <a class="info" href="#ADD CHANNEL">"ADD CHANNEL"<span> (</span><span class="info">Adding a new sampler channel</span><span>)</span></a> or
3282 <a class="info" href="#LIST CHANNELS">"LIST CHANNELS"<span> (</span><span class="info">Getting all created sampler channel list</span><span>)</span></a> command where
3283 the engine type should be assigned to. This command should be issued
3284 after adding a new sampler channel and before any other control
3285 commands on the new sampler channel. It can also be used to change
3286 the engine type of a sampler channel. This command has (currently) no
3287 way to define or force if a new engine instance should be created and
3288 assigned to the given sampler channel or if an already existing
3289 instance of that engine type, shared with other sampler channels,
3290 should be used.
3291 </p>
3292 <p>Possible Answers:
3293 </p>
3294 <p>
3295 </p>
3296 <blockquote class="text">
3297 <p>"OK" -
3298 </p>
3299 <blockquote class="text">
3300 <p>in case the engine was successfully deployed
3301 </p>
3302 </blockquote>
3303
3304
3305 <p>"WRN:&lt;warning-code&gt;:&lt;warning-message&gt;" -
3306 </p>
3307 <blockquote class="text">
3308 <p>in case the engine was deployed successfully, but there
3309 are noteworthy issue(s) related, providing an appropriate
3310 warning code and warning message
3311 </p>
3312 </blockquote>
3313
3314
3315 <p>"ERR:&lt;error-code&gt;:&lt;error-message&gt;" -
3316 </p>
3317 <blockquote class="text">
3318 <p>in case it failed, providing an appropriate error code and
3319 error message
3320 </p>
3321 </blockquote>
3322
3323
3324 </blockquote><p>
3325
3326 </p>
3327 <p>Example:
3328 </p>
3329 <p>
3330 </p>
3331 <blockquote class="text">
3332 <p>
3333 </p>
3334 </blockquote><p>
3335
3336 </p>
3337 <a name="GET CHANNELS"></a><br /><hr />
3338 <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>
3339 <a name="rfc.section.6.4.3"></a><h3>6.4.3.&nbsp;Getting all created sampler channel count</h3>
3340
3341 <p>The number of sampler channels can change on runtime. To get the
3342 current amount of sampler channels, the front-end can send the
3343 following command:
3344 </p>
3345 <p>
3346 </p>
3347 <blockquote class="text">
3348 <p>GET CHANNELS
3349 </p>
3350 </blockquote><p>
3351
3352 </p>
3353 <p>Possible Answers:
3354 </p>
3355 <p>
3356 </p>
3357 <blockquote class="text">
3358 <p>LinuxSampler will answer by returning the current number of sampler channels.
3359 </p>
3360 </blockquote><p>
3361
3362 </p>
3363 <p>Example:
3364 </p>
3365 <p>
3366 </p>
3367 <blockquote class="text">
3368 <p>C: "GET CHANNELS"
3369 </p>
3370 <p>S: "12"
3371 </p>
3372 </blockquote><p>
3373
3374 </p>
3375 <a name="LIST CHANNELS"></a><br /><hr />
3376 <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>
3377 <a name="rfc.section.6.4.4"></a><h3>6.4.4.&nbsp;Getting all created sampler channel list</h3>
3378
3379 <p>The number of sampler channels can change on runtime. To get the
3380 current list of sampler channels, the front-end can send the
3381 following command:
3382 </p>
3383 <p>
3384 </p>
3385 <blockquote class="text">
3386 <p>LIST CHANNELS
3387 </p>
3388 </blockquote><p>
3389
3390 </p>
3391 <p>Possible Answers:
3392 </p>
3393 <p>
3394 </p>
3395 <blockquote class="text">
3396 <p>LinuxSampler will answer by returning a comma separated list
3397 with all sampler channels numerical IDs.
3398 </p>
3399 </blockquote><p>
3400
3401 </p>
3402 <p>Example:
3403 </p>
3404 <p>
3405 </p>
3406 <blockquote class="text">
3407 <p>C: "LIST CHANNELS"
3408 </p>
3409 <p>S: "0,1,2,3,4,5,6,9,10,11,15,20"
3410 </p>
3411 </blockquote><p>
3412
3413 </p>
3414 <a name="ADD CHANNEL"></a><br /><hr />
3415 <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>
3416 <a name="rfc.section.6.4.5"></a><h3>6.4.5.&nbsp;Adding a new sampler channel</h3>
3417
3418 <p>A new sampler channel can be added to the end of the sampler
3419 channel list by sending the following command:
3420 </p>
3421 <p>
3422 </p>
3423 <blockquote class="text">
3424 <p>ADD CHANNEL
3425 </p>
3426 </blockquote><p>
3427
3428 </p>
3429 <p>This will increment the sampler channel count by one and the new
3430 sampler channel will be appended to the end of the sampler channel
3431 list. The front-end should send the respective, related commands
3432 right after to e.g. load an engine, load an instrument and setting
3433 input, output method and eventually other commands to initialize
3434 the new channel. The front-end should use the sampler channel
3435 returned by the answer of this command to perform the previously
3436 recommended commands, to avoid race conditions e.g. with other
3437 front-ends that might also have sent an "ADD CHANNEL" command.
3438 </p>
3439 <p>Possible Answers:
3440 </p>
3441 <p>
3442 </p>
3443 <blockquote class="text">
3444 <p>"OK[&lt;sampler-channel&gt;]" -
3445 </p>
3446 <blockquote class="text">
3447 <p>in case a new sampler channel could be added, where
3448 &lt;sampler-channel&gt; reflects the channel number of the new
3449 created sampler channel which should be used to set up
3450 the sampler channel by sending subsequent initialization
3451 commands
3452 </p>
3453 </blockquote>
3454
3455
3456 <p>"WRN:&lt;warning-code&gt;:&lt;warning-message&gt;" -
3457 </p>
3458 <blockquote class="text">
3459 <p>in case a new channel was added successfully, but there are
3460 noteworthy issue(s) related, providing an appropriate
3461 warning code and warning message
3462 </p>
3463 </blockquote>
3464
3465
3466 <p>"ERR:&lt;error-code&gt;:&lt;error-message&gt;" -
3467 </p>
3468 <blockquote class="text">
3469 <p>in case it failed, providing an appropriate error code and
3470 error message
3471 </p>
3472 </blockquote>
3473
3474
3475 </blockquote><p>
3476
3477 </p>
3478 <p>Example:
3479 </p>
3480 <p>
3481 </p>
3482 <blockquote class="text">
3483 <p>
3484 </p>
3485 </blockquote><p>
3486
3487 </p>
3488 <a name="REMOVE CHANNEL"></a><br /><hr />
3489 <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>
3490 <a name="rfc.section.6.4.6"></a><h3>6.4.6.&nbsp;Removing a sampler channel</h3>
3491
3492 <p>A sampler channel can be removed by sending the following command:
3493 </p>
3494 <p>
3495 </p>
3496 <blockquote class="text">
3497 <p>REMOVE CHANNEL &lt;sampler-channel&gt;
3498 </p>
3499 </blockquote><p>
3500
3501 </p>
3502 <p>Where &lt;sampler-channel&gt; should be replaced by the
3503 number of the sampler channel as given by the
3504 <a class="info" href="#ADD CHANNEL">"ADD CHANNEL"<span> (</span><span class="info">Adding a new sampler channel</span><span>)</span></a>
3505 or <a class="info" href="#LIST CHANNELS">"LIST CHANNELS"<span> (</span><span class="info">Getting all created sampler channel list</span><span>)</span></a>
3506 command. The channel numbers of all subsequent sampler channels
3507 remain the same.
3508 </p>
3509 <p>Possible Answers:
3510 </p>
3511 <p>
3512 </p>
3513 <blockquote class="text">
3514 <p>"OK" -
3515 </p>
3516 <blockquote class="text">
3517 <p>in case the given sampler channel could be removed
3518 </p>
3519 </blockquote>
3520
3521
3522 <p>"WRN:&lt;warning-code&gt;:&lt;warning-message&gt;" -
3523 </p>
3524 <blockquote class="text">
3525 <p>in case the given channel was removed, but there are
3526 noteworthy issue(s) related, providing an appropriate
3527 warning code and warning message
3528 </p>
3529 </blockquote>
3530
3531
3532 <p>"ERR:&lt;error-code&gt;:&lt;error-message&gt;" -
3533 </p>
3534 <blockquote class="text">
3535 <p>in case it failed, providing an appropriate error code and
3536 error message
3537 </p>
3538 </blockquote>
3539
3540
3541 </blockquote><p>
3542
3543 </p>
3544 <p>Example:
3545 </p>
3546 <p>
3547 </p>
3548 <blockquote class="text">
3549 <p>
3550 </p>
3551 </blockquote><p>
3552
3553 </p>
3554 <a name="GET AVAILABLE_ENGINES"></a><br /><hr />
3555 <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>
3556 <a name="rfc.section.6.4.7"></a><h3>6.4.7.&nbsp;Getting amount of available engines</h3>
3557
3558 <p>The front-end can ask for the number of available engines by sending the following command:
3559 </p>
3560 <p>
3561 </p>
3562 <blockquote class="text">
3563 <p>GET AVAILABLE_ENGINES
3564 </p>
3565 </blockquote><p>
3566
3567 </p>
3568 <p>Possible Answers:
3569 </p>
3570 <p>
3571 </p>
3572 <blockquote class="text">
3573 <p>LinuxSampler will answer by sending the number of available engines.
3574 </p>
3575 </blockquote><p>
3576
3577 </p>
3578 <p>Example:
3579 </p>
3580 <p>
3581 </p>
3582 <blockquote class="text">
3583 <p>C: "GET AVAILABLE_ENGINES"
3584 </p>
3585 <p>S: "4"
3586 </p>
3587 </blockquote><p>
3588
3589 </p>
3590 <a name="LIST AVAILABLE_ENGINES"></a><br /><hr />
3591 <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>
3592 <a name="rfc.section.6.4.8"></a><h3>6.4.8.&nbsp;Getting all available engines</h3>
3593
3594 <p>The front-end can ask for a list of all available engines by sending the following command:
3595 </p>
3596 <p>
3597 </p>
3598 <blockquote class="text">
3599 <p>LIST AVAILABLE_ENGINES
3600 </p>
3601 </blockquote><p>
3602
3603 </p>
3604 <p>Possible Answers:
3605 </p>
3606 <p>
3607 </p>
3608 <blockquote class="text">
3609 <p>LinuxSampler will answer by sending a comma separated list
3610 of the engines' names encapsulated into apostrophes (').
3611 Engine names can consist of lower and upper cases,
3612 digits and underlines ("_" character).
3613 </p>
3614 </blockquote><p>
3615
3616 </p>
3617 <p>Example:
3618 </p>
3619 <p>
3620 </p>
3621 <blockquote class="text">
3622 <p>C: "LIST AVAILABLE_ENGINES"
3623 </p>
3624 <p>S: "'GigEngine','AkaiEngine','DLSEngine','JoesCustomEngine'"
3625 </p>
3626 </blockquote><p>
3627
3628 </p>
3629 <a name="GET ENGINE INFO"></a><br /><hr />
3630 <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>
3631 <a name="rfc.section.6.4.9"></a><h3>6.4.9.&nbsp;Getting information about an engine</h3>
3632
3633 <p>The front-end can ask for information about a specific engine by
3634 sending the following command:
3635 </p>
3636 <p>
3637 </p>
3638 <blockquote class="text">
3639 <p>GET ENGINE INFO &lt;engine-name&gt;
3640 </p>
3641 </blockquote><p>
3642
3643 </p>
3644 <p>Where &lt;engine-name&gt; is an engine name as obtained by the
3645 <a class="info" href="#LIST AVAILABLE_ENGINES">"LIST AVAILABLE_ENGINES"<span> (</span><span class="info">Getting all available engines</span><span>)</span></a> command.
3646 </p>
3647 <p>Possible Answers:
3648 </p>
3649 <p>
3650 </p>
3651 <blockquote class="text">
3652 <p>LinuxSampler will answer by sending a &lt;CRLF&gt; separated list.
3653 Each answer line begins with the information category name
3654 followed by a colon and then a space character &lt;SP&gt; and finally
3655 the info character string to that info category. At the moment
3656 the following categories are defined:
3657 </p>
3658 <p>
3659 </p>
3660 <blockquote class="text">
3661 <p>DESCRIPTION -
3662 </p>
3663 <blockquote class="text">
3664 <p>arbitrary description text about the engine
3665 </p>
3666 </blockquote>
3667
3668
3669 <p>VERSION -
3670 </p>
3671 <blockquote class="text">
3672 <p>arbitrary character string regarding the engine's version
3673 </p>
3674 </blockquote>
3675
3676
3677 </blockquote>
3678
3679
3680 </blockquote><p>
3681
3682 </p>
3683 <p>The mentioned fields above don't have to be in particular order.
3684 </p>
3685 <p>Example:
3686 </p>
3687 <p>
3688 </p>
3689 <blockquote class="text">
3690 <p>C: "GET ENGINE INFO JoesCustomEngine"
3691 </p>
3692 <p>S: "DESCRIPTION: this is Joe's custom sampler engine"
3693 </p>
3694 <p>&nbsp;&nbsp;&nbsp;"VERSION: testing-1.0"
3695 </p>
3696 <p>&nbsp;&nbsp;&nbsp;"."
3697 </p>
3698 </blockquote><p>
3699
3700 </p>
3701 <a name="GET CHANNEL INFO"></a><br /><hr />
3702 <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>
3703 <a name="rfc.section.6.4.10"></a><h3>6.4.10.&nbsp;Getting sampler channel information</h3>
3704
3705 <p>The front-end can ask for the current settings of a sampler channel
3706 by sending the following command:
3707 </p>
3708 <p>
3709 </p>
3710 <blockquote class="text">
3711 <p>GET CHANNEL INFO &lt;sampler-channel&gt;
3712 </p>
3713 </blockquote><p>
3714
3715 </p>
3716 <p>Where &lt;sampler-channel&gt; is the sampler channel number the front-end is interested in
3717 as returned by the <a class="info" href="#ADD CHANNEL">"ADD CHANNEL"<span> (</span><span class="info">Adding a new sampler channel</span><span>)</span></a>
3718 or <a class="info" href="#LIST CHANNELS">"LIST CHANNELS"<span> (</span><span class="info">Getting all created sampler channel list</span><span>)</span></a> command.
3719 </p>
3720 <p>Possible Answers:
3721 </p>
3722 <p>
3723 </p>
3724 <blockquote class="text">
3725 <p>LinuxSampler will answer by sending a &lt;CRLF&gt; separated list.
3726 Each answer line begins with the settings category name
3727 followed by a colon and then a space character &lt;SP&gt; and finally
3728 the info character string to that setting category. At the
3729 moment the following categories are defined:
3730 </p>
3731 <p>
3732 </p>
3733 <blockquote class="text">
3734 <p>ENGINE_NAME -
3735 </p>
3736 <blockquote class="text">
3737 <p>name of the engine that is associated with the sampler
3738 channel, "NONE" if there's no engine associated yet for
3739 this sampler channel
3740 </p>
3741 </blockquote>
3742
3743
3744 <p>AUDIO_OUTPUT_DEVICE -
3745 </p>
3746 <blockquote class="text">
3747 <p>numerical ID of the audio output device which is
3748 currently connected to this sampler channel to output
3749 the audio signal, "NONE" if there's no device
3750 connected to this sampler channel
3751 </p>
3752 </blockquote>
3753
3754
3755 <p>AUDIO_OUTPUT_CHANNELS -
3756 </p>
3757 <blockquote class="text">
3758 <p>number of output channels the sampler channel offers
3759 (dependent to used sampler engine and loaded instrument)
3760 </p>
3761 </blockquote>
3762
3763
3764 <p>AUDIO_OUTPUT_ROUTING -
3765 </p>
3766 <blockquote class="text">
3767 <p>comma separated list which reflects to which audio
3768 channel of the selected audio output device each
3769 sampler output channel is routed to, e.g. "0,3" would
3770 mean the engine's output channel 0 is routed to channel
3771 0 of the audio output device and the engine's output
3772 channel 1 is routed to the channel 3 of the audio
3773 output device
3774 </p>
3775 </blockquote>
3776
3777
3778 <p>INSTRUMENT_FILE -
3779 </p>
3780 <blockquote class="text">
3781 <p>the file name of the loaded instrument, "NONE" if
3782 there's no instrument yet loaded for this sampler
3783 channel
3784 </p>
3785 </blockquote>
3786
3787
3788 <p>INSTRUMENT_NR -
3789 </p>
3790 <blockquote class="text">
3791 <p>the instrument index number of the loaded instrument
3792 </p>
3793 </blockquote>
3794
3795
3796 <p>INSTRUMENT_NAME -
3797 </p>
3798 <blockquote class="text">
3799 <p>the instrument name of the loaded instrument
3800 </p>
3801 </blockquote>
3802
3803
3804 <p>INSTRUMENT_STATUS -
3805 </p>
3806 <blockquote class="text">
3807 <p>integer values 0 to 100 indicating loading progress percentage for the instrument. Negative
3808 value indicates a loading exception. Value of 100 indicates that the instrument is fully
3809 loaded.
3810 </p>
3811 </blockquote>
3812
3813
3814 <p>MIDI_INPUT_DEVICE -
3815 </p>
3816 <blockquote class="text">
3817 <p>numerical ID of the MIDI input device which is
3818 currently connected to this sampler channel to deliver
3819 MIDI input commands, "NONE" if there's no device
3820 connected to this sampler channel
3821 </p>
3822 </blockquote>
3823
3824
3825 <p>MIDI_INPUT_PORT -
3826 </p>
3827 <blockquote class="text">
3828 <p>port number of the MIDI input device
3829 </p>
3830 </blockquote>
3831
3832
3833 <p>MIDI_INPUT_CHANNEL -
3834 </p>
3835 <blockquote class="text">
3836 <p>the MIDI input channel number this sampler channel
3837 should listen to or "ALL" to listen on all MIDI channels
3838 </p>
3839 </blockquote>
3840
3841
3842 <p>VOLUME -
3843 </p>
3844 <blockquote class="text">
3845 <p>optionally dotted number for the channel volume factor
3846 (where a value < 1.0 means attenuation and a value >
3847 1.0 means amplification)
3848 </p>
3849 </blockquote>
3850
3851
3852 <p>MUTE -
3853 </p>
3854 <blockquote class="text">
3855 <p>Determines whether the channel is muted, "true" if the
3856 channel is muted, "false" if the channel is not muted, and
3857 "MUTED_BY_SOLO" if the channel is muted because of the
3858 presence of a solo channel and will be unmuted when
3859 there are no solo channels left
3860 </p>
3861 </blockquote>
3862
3863
3864 <p>SOLO -
3865 </p>
3866 <blockquote class="text">
3867 <p>Determines whether this is a solo channel, "true" if
3868 the channel is a solo channel; "false" otherwise
3869 </p>
3870 </blockquote>
3871
3872
3873 </blockquote>
3874
3875
3876 </blockquote><p>
3877
3878 </p>
3879 <p>The mentioned fields above don't have to be in particular order.
3880 </p>
3881 <p>Example:
3882 </p>
3883 <p>
3884 </p>
3885 <blockquote class="text">
3886 <p>C: "GET CHANNEL INFO 34"
3887 </p>
3888 <p>S: "ENGINE_NAME: GigEngine"
3889 </p>
3890 <p>&nbsp;&nbsp;&nbsp;"VOLUME: 1.0"
3891 </p>
3892 <p>&nbsp;&nbsp;&nbsp;"AUDIO_OUTPUT_DEVICE: 0"
3893 </p>
3894 <p>&nbsp;&nbsp;&nbsp;"AUDIO_OUTPUT_CHANNELS: 2"
3895 </p>
3896 <p>&nbsp;&nbsp;&nbsp;"AUDIO_OUTPUT_ROUTING: 0,1"
3897 </p>
3898 <p>&nbsp;&nbsp;&nbsp;"INSTRUMENT_FILE: /home/joe/FazioliPiano.gig"
3899 </p>
3900 <p>&nbsp;&nbsp;&nbsp;"INSTRUMENT_NR: 0"
3901 </p>
3902 <p>&nbsp;&nbsp;&nbsp;"INSTRUMENT_NAME: Fazioli Piano"
3903 </p>
3904 <p>&nbsp;&nbsp;&nbsp;"INSTRUMENT_STATUS: 100"
3905 </p>
3906 <p>&nbsp;&nbsp;&nbsp;"MIDI_INPUT_DEVICE: 0"
3907 </p>
3908 <p>&nbsp;&nbsp;&nbsp;"MIDI_INPUT_PORT: 0"
3909 </p>
3910 <p>&nbsp;&nbsp;&nbsp;"MIDI_INPUT_CHANNEL: 5"
3911 </p>
3912 <p>&nbsp;&nbsp;&nbsp;"."
3913 </p>
3914 </blockquote><p>
3915
3916 </p>
3917 <a name="GET CHANNEL VOICE_COUNT"></a><br /><hr />
3918 <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>
3919 <a name="rfc.section.6.4.11"></a><h3>6.4.11.&nbsp;Current number of active voices</h3>
3920
3921 <p>The front-end can ask for the current number of active voices on a
3922 sampler channel by sending the following command:
3923 </p>
3924 <p>
3925 </p>
3926 <blockquote class="text">
3927 <p>GET CHANNEL VOICE_COUNT &lt;sampler-channel&gt;
3928 </p>
3929 </blockquote><p>
3930
3931 </p>
3932 <p>Where &lt;sampler-channel&gt; is the sampler channel number the front-end is interested in
3933 as returned by the <a class="info" href="#ADD CHANNEL">"ADD CHANNEL"<span> (</span><span class="info">Adding a new sampler channel</span><span>)</span></a>
3934 or <a class="info" href="#LIST CHANNELS">"LIST CHANNELS"<span> (</span><span class="info">Getting all created sampler channel list</span><span>)</span></a> command.
3935 </p>
3936 <p>Possible Answers:
3937 </p>
3938 <p>
3939 </p>
3940 <blockquote class="text">
3941 <p>LinuxSampler will answer by returning the number of active
3942 voices on that channel.
3943 </p>
3944 </blockquote><p>
3945
3946 </p>
3947 <p>Example:
3948 </p>
3949 <p>
3950 </p>
3951 <blockquote class="text">
3952 <p>
3953 </p>
3954 </blockquote><p>
3955
3956 </p>
3957 <a name="GET CHANNEL STREAM_COUNT"></a><br /><hr />
3958 <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>
3959 <a name="rfc.section.6.4.12"></a><h3>6.4.12.&nbsp;Current number of active disk streams</h3>
3960
3961 <p>The front-end can ask for the current number of active disk streams
3962 on a sampler channel by sending the following command:
3963 </p>
3964 <p>
3965 </p>
3966 <blockquote class="text">
3967 <p>GET CHANNEL STREAM_COUNT &lt;sampler-channel&gt;
3968 </p>
3969 </blockquote><p>
3970
3971 </p>
3972 <p>Where &lt;sampler-channel&gt; is the sampler channel number the front-end is interested in
3973 as returned by the <a class="info" href="#ADD CHANNEL">"ADD CHANNEL"<span> (</span><span class="info">Adding a new sampler channel</span><span>)</span></a>
3974 or <a class="info" href="#LIST CHANNELS">"LIST CHANNELS"<span> (</span><span class="info">Getting all created sampler channel list</span><span>)</span></a> command.
3975 </p>
3976 <p>Possible Answers:
3977 </p>
3978 <p>
3979 </p>
3980 <blockquote class="text">
3981 <p>LinuxSampler will answer by returning the number of active
3982 disk streams on that channel in case the engine supports disk
3983 streaming, if the engine doesn't support disk streaming it will
3984 return "NA" for not available.
3985 </p>
3986 </blockquote><p>
3987
3988 </p>
3989 <p>Example:
3990 </p>
3991 <p>
3992 </p>
3993 <blockquote class="text">
3994 <p>
3995 </p>
3996 </blockquote><p>
3997
3998 </p>
3999 <a name="GET CHANNEL BUFFER_FILL"></a><br /><hr />
4000 <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>
4001 <a name="rfc.section.6.4.13"></a><h3>6.4.13.&nbsp;Current fill state of disk stream buffers</h3>
4002
4003 <p>The front-end can ask for the current fill state of all disk streams
4004 on a sampler channel by sending the following command:
4005 </p>
4006 <p>
4007 </p>
4008 <blockquote class="text">
4009 <p>GET CHANNEL BUFFER_FILL BYTES &lt;sampler-channel&gt;
4010 </p>
4011 </blockquote><p>
4012
4013 </p>
4014 <p>to get the fill state in bytes or
4015 </p>
4016 <p>
4017 </p>
4018 <blockquote class="text">
4019 <p>GET CHANNEL BUFFER_FILL PERCENTAGE &lt;sampler-channel&gt;
4020 </p>
4021 </blockquote><p>
4022
4023 </p>
4024 <p>to get the fill state in percent, where &lt;sampler-channel&gt; is the
4025 sampler channel number the front-end is interested in
4026 as returned by the <a class="info" href="#ADD CHANNEL">"ADD CHANNEL"<span> (</span><span class="info">Adding a new sampler channel</span><span>)</span></a>
4027 or <a class="info" href="#LIST CHANNELS">"LIST CHANNELS"<span> (</span><span class="info">Getting all created sampler channel list</span><span>)</span></a> command.
4028 </p>
4029 <p>Possible Answers:
4030 </p>
4031 <p>
4032 </p>
4033 <blockquote class="text">
4034 <p>LinuxSampler will either answer by returning a comma separated
4035 string with the fill state of all disk stream buffers on that
4036 channel or an empty line if there are no active disk streams or
4037 "NA" for *not available* in case the engine which is deployed
4038 doesn't support disk streaming. Each entry in the answer list
4039 will begin with the stream's ID in brackets followed by the
4040 numerical representation of the fill size (either in bytes or
4041 percentage). Note: due to efficiency reasons the fill states in
4042 the response are not in particular order, thus the front-end has
4043 to sort them by itself if necessary.
4044 </p>
4045 </blockquote><p>
4046
4047 </p>
4048 <p>Examples:
4049 </p>
4050 <p>
4051 </p>
4052 <blockquote class="text">
4053 <p>C: "GET CHANNEL BUFFER_FILL BYTES 4"
4054 </p>
4055 <p>S: "[115]420500,[116]510300,[75]110000,[120]230700"
4056 </p>
4057 </blockquote><p>
4058
4059 </p>
4060 <blockquote class="text">
4061 <p>C: "GET CHANNEL BUFFER_FILL PERCENTAGE 4"
4062 </p>
4063 <p>S: "[115]90%,[116]98%,[75]40%,[120]62%"
4064 </p>
4065 </blockquote><p>
4066
4067 </p>
4068 <blockquote class="text">
4069 <p>C: "GET CHANNEL BUFFER_FILL PERCENTAGE 4"
4070 </p>
4071 <p>S: ""
4072 </p>
4073 </blockquote><p>
4074
4075 </p>
4076 <a name="SET CHANNEL AUDIO_OUTPUT_DEVICE"></a><br /><hr />
4077 <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>
4078 <a name="rfc.section.6.4.14"></a><h3>6.4.14.&nbsp;Setting audio output device</h3>
4079
4080 <p>The front-end can set the audio output device on a specific sampler
4081 channel by sending the following command:
4082 </p>
4083 <p>
4084 </p>
4085 <blockquote class="text">
4086 <p>SET CHANNEL AUDIO_OUTPUT_DEVICE &lt;sampler-channel&gt; &lt;audio-device-id&gt;
4087 </p>
4088 </blockquote><p>
4089
4090 </p>
4091 <p>Where &lt;sampler-channel&gt; is the respective sampler channel
4092 number as returned by the <a class="info" href="#ADD CHANNEL">"ADD CHANNEL"<span> (</span><span class="info">Adding a new sampler channel</span><span>)</span></a>
4093 or <a class="info" href="#LIST CHANNELS">"LIST CHANNELS"<span> (</span><span class="info">Getting all created sampler channel list</span><span>)</span></a> command and
4094 &lt;audio-device-id&gt; is the numerical ID of the audio output device as given by the
4095 <a class="info" href="#CREATE AUDIO_OUTPUT_DEVICE">"CREATE AUDIO_OUTPUT_DEVICE"<span> (</span><span class="info">Creating an audio output device</span><span>)</span></a>
4096 or <a class="info" href="#LIST AUDIO_OUTPUT_DEVICES">"LIST AUDIO_OUTPUT_DEVICES"<span> (</span><span class="info">Getting all created audio output device list</span><span>)</span></a>
4097 command.
4098 </p>
4099 <p>Possible Answers:
4100 </p>
4101 <p>
4102 </p>
4103 <blockquote class="text">
4104 <p>"OK" -
4105 </p>
4106 <blockquote class="text">
4107 <p>on success
4108 </p>
4109 </blockquote>
4110
4111
4112 <p>"WRN:&lt;warning-code&gt;:&lt;warning-message&gt;" -
4113 </p>
4114 <blockquote class="text">
4115 <p>if audio output device was set, but there are noteworthy
4116 issue(s) related, providing an appropriate warning code and
4117 warning message
4118 </p>
4119 </blockquote>
4120
4121
4122 <p>"ERR:&lt;error-code&gt;:&lt;error-message&gt;" -
4123 </p>
4124 <blockquote class="text">
4125 <p>in case it failed, providing an appropriate error code and error message
4126 </p>
4127 </blockquote>
4128
4129
4130 </blockquote><p>
4131
4132 </p>
4133 <p>Examples:
4134 </p>
4135 <p>
4136 </p>
4137 <blockquote class="text">
4138 <p>
4139 </p>
4140 </blockquote><p>
4141
4142 </p>
4143 <a name="SET CHANNEL AUDIO_OUTPUT_TYP"></a><br /><hr />
4144 <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>
4145 <a name="rfc.section.6.4.15"></a><h3>6.4.15.&nbsp;Setting audio output type</h3>
4146
4147 <p>DEPRECATED: THIS COMMAND WILL DISAPPEAR SOON!
4148 </p>
4149 <p>The front-end can alter the audio output type on a specific sampler
4150 channel by sending the following command:
4151 </p>
4152 <p>
4153 </p>
4154 <blockquote class="text">
4155 <p>SET CHANNEL AUDIO_OUTPUT_TYPE &lt;sampler-channel&gt; &lt;audio-output-type&gt;
4156 </p>
4157 </blockquote><p>
4158
4159 </p>
4160 <p>Where &lt;audio-output-type&gt; is currently either "ALSA" or "JACK" and
4161 &lt;sampler-channel&gt; is the respective sampler channel number.
4162 </p>
4163 <p>Possible Answers:
4164 </p>
4165 <p>
4166 </p>
4167 <blockquote class="text">
4168 <p>"OK" -
4169 </p>
4170 <blockquote class="text">
4171 <p>on success
4172 </p>
4173 </blockquote>
4174
4175
4176 <p>"WRN:&lt;warning-code&gt;:&lt;warning-message&gt;" -
4177 </p>
4178 <blockquote class="text">
4179 <p>if audio output type was set, but there are noteworthy
4180 issue(s) related, providing an appropriate warning code and
4181 warning message
4182 </p>
4183 </blockquote>
4184
4185
4186 <p>"ERR:&lt;error-code&gt;:&lt;error-message&gt;" -
4187 </p>
4188 <blockquote class="text">
4189 <p>in case it failed, providing an appropriate error code and error message
4190 </p>
4191 </blockquote>
4192
4193
4194 </blockquote><p>
4195
4196 </p>
4197 <p>Examples:
4198 </p>
4199 <p>
4200 </p>
4201 <blockquote class="text">
4202 <p>
4203 </p>
4204 </blockquote><p>
4205
4206 </p>
4207 <a name="SET CHANNEL AUDIO_OUTPUT_CHANNEL"></a><br /><hr />
4208 <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>
4209 <a name="rfc.section.6.4.16"></a><h3>6.4.16.&nbsp;Setting audio output channel</h3>
4210
4211 <p>The front-end can alter the audio output channel on a specific
4212 sampler channel by sending the following command:
4213 </p>
4214 <p>
4215 </p>
4216 <blockquote class="text">
4217 <p>SET CHANNEL AUDIO_OUTPUT_CHANNEL &lt;sampler-chan&gt; &lt;audio-out&gt; &lt;audio-in&gt;
4218 </p>
4219 </blockquote><p>
4220
4221 </p>
4222 <p>Where &lt;sampler-chan&gt; is the sampler channel number
4223 as returned by the <a class="info" href="#ADD CHANNEL">"ADD CHANNEL"<span> (</span><span class="info">Adding a new sampler channel</span><span>)</span></a>
4224 or <a class="info" href="#LIST CHANNELS">"LIST CHANNELS"<span> (</span><span class="info">Getting all created sampler channel list</span><span>)</span></a> command, &lt;audio-out&gt; is the
4225 numerical ID of the sampler channel's audio output channel which should be
4226 rerouted and &lt;audio-in&gt; is the numerical ID of the audio channel of the selected audio
4227 output device where &lt;audio-out&gt; should be routed to.
4228 </p>
4229 <p>Possible Answers:
4230 </p>
4231 <p>
4232 </p>
4233 <blockquote class="text">
4234 <p>"OK" -
4235 </p>
4236 <blockquote class="text">
4237 <p>on success
4238 </p>
4239 </blockquote>
4240
4241
4242 <p>"WRN:&lt;warning-code&gt;:&lt;warning-message&gt;" -
4243 </p>
4244 <blockquote class="text">
4245 <p>if audio output channel was set, but there are noteworthy
4246 issue(s) related, providing an appropriate warning code and
4247 warning message
4248 </p>
4249 </blockquote>
4250
4251
4252 <p>"ERR:&lt;error-code&gt;:&lt;error-message&gt;" -
4253 </p>
4254 <blockquote class="text">
4255 <p>in case it failed, providing an appropriate error code and error message
4256 </p>
4257 </blockquote>
4258
4259
4260 </blockquote><p>
4261
4262 </p>
4263 <p>Examples:
4264 </p>
4265 <p>
4266 </p>
4267 <blockquote class="text">
4268 <p>
4269 </p>
4270 </blockquote><p>
4271
4272 </p>
4273 <a name="SET CHANNEL MIDI_INPUT_DEVICE"></a><br /><hr />
4274 <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>
4275 <a name="rfc.section.6.4.17"></a><h3>6.4.17.&nbsp;Setting MIDI input device</h3>
4276
4277 <p>The front-end can set the MIDI input device on a specific sampler
4278 channel by sending the following command:
4279 </p>
4280 <p>
4281 </p>
4282 <blockquote class="text">
4283 <p>SET CHANNEL MIDI_INPUT_DEVICE &lt;sampler-channel&gt; &lt;midi-device-id&gt;
4284 </p>
4285 </blockquote><p>
4286
4287 </p>
4288 <p>Where &lt;sampler-channel&gt; is the sampler channel number
4289 as returned by the <a class="info" href="#ADD CHANNEL">"ADD CHANNEL"<span> (</span><span class="info">Adding a new sampler channel</span><span>)</span></a>
4290 or <a class="info" href="#LIST CHANNELS">"LIST CHANNELS"<span> (</span><span class="info">Getting all created sampler channel list</span><span>)</span></a> command
4291 and &lt;midi-device-id&gt; is the numerical ID of the MIDI input device as returned by the
4292 <a class="info" href="#CREATE MIDI_INPUT_DEVICE">"CREATE MIDI_INPUT_DEVICE"<span> (</span><span class="info">Creating a MIDI input device</span><span>)</span></a>
4293 or <a class="info" href="#LIST MIDI_INPUT_DEVICES">"LIST MIDI_INPUT_DEVICES"<span> (</span><span class="info">Getting all created MIDI input device list</span><span>)</span></a> command.
4294 </p>
4295 <p>Possible Answers:
4296 </p>
4297 <p>
4298 </p>
4299 <blockquote class="text">
4300 <p>"OK" -
4301 </p>
4302 <blockquote class="text">
4303 <p>on success
4304 </p>
4305 </blockquote>
4306
4307
4308 <p>"WRN:&lt;warning-code&gt;:&lt;warning-message&gt;" -
4309 </p>
4310 <blockquote class="text">
4311 <p>if MIDI input device was set, but there are noteworthy
4312 issue(s) related, providing an appropriate warning code and
4313 warning message
4314 </p>
4315 </blockquote>
4316
4317
4318 <p>"ERR:&lt;error-code&gt;:&lt;error-message&gt;" -
4319 </p>
4320 <blockquote class="text">
4321 <p>in case it failed, providing an appropriate error code and error message
4322 </p>
4323 </blockquote>
4324
4325
4326 </blockquote><p>
4327
4328 </p>
4329 <p>Examples:
4330 </p>
4331 <p>
4332 </p>
4333 <blockquote class="text">
4334 <p>
4335 </p>
4336 </blockquote><p>
4337
4338 </p>
4339 <a name="SET CHANNEL MIDI_INPUT_TYPE"></a><br /><hr />
4340 <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>
4341 <a name="rfc.section.6.4.18"></a><h3>6.4.18.&nbsp;Setting MIDI input type</h3>
4342
4343 <p>DEPRECATED: THIS COMMAND WILL DISAPPEAR SOON!
4344 </p>
4345 <p>The front-end can alter the MIDI input type on a specific sampler
4346 channel by sending the following command:
4347 </p>
4348 <p>
4349 </p>
4350 <blockquote class="text">
4351 <p>SET CHANNEL MIDI_INPUT_TYPE &lt;sampler-channel&gt; &lt;midi-input-type&gt;
4352 </p>
4353 </blockquote><p>
4354
4355 </p>
4356 <p>Where &lt;midi-input-type&gt; is currently only "ALSA" and
4357 &lt;sampler-channel&gt; is the respective sampler channel number.
4358 </p>
4359 <p>Possible Answers:
4360 </p>
4361 <p>
4362 </p>
4363 <blockquote class="text">
4364 <p>"OK" -
4365 </p>
4366 <blockquote class="text">
4367 <p>on success
4368 </p>
4369 </blockquote>
4370
4371
4372 <p>"WRN:&lt;warning-code&gt;:&lt;warning-message&gt;" -
4373 </p>
4374 <blockquote class="text">
4375 <p>if MIDI input type was set, but there are noteworthy
4376 issue(s) related, providing an appropriate warning code and
4377 warning message
4378 </p>
4379 </blockquote>
4380
4381
4382 <p>"ERR:&lt;error-code&gt;:&lt;error-message&gt;" -
4383 </p>
4384 <blockquote class="text">
4385 <p>in case it failed, providing an appropriate error code and error message
4386 </p>
4387 </blockquote>
4388
4389
4390 </blockquote><p>
4391
4392 </p>
4393 <p>Examples:
4394 </p>
4395 <p>
4396 </p>
4397 <blockquote class="text">
4398 <p>
4399 </p>
4400 </blockquote><p>
4401
4402 </p>
4403 <a name="SET CHANNEL MIDI_INPUT_PORT"></a><br /><hr />
4404 <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>
4405 <a name="rfc.section.6.4.19"></a><h3>6.4.19.&nbsp;Setting MIDI input port</h3>
4406
4407 <p>The front-end can alter the MIDI input port on a specific sampler
4408 channel by sending the following command:
4409 </p>
4410 <p>
4411 </p>
4412 <blockquote class="text">
4413 <p>SET CHANNEL MIDI_INPUT_PORT &lt;sampler-channel&gt; &lt;midi-input-port&gt;
4414 </p>
4415 </blockquote><p>
4416
4417 </p>
4418 <p>Where &lt;midi-input-port&gt; is a MIDI input port number of the
4419 MIDI input device connected to the sampler channel given by
4420 &lt;sampler-channel&gt;.
4421 </p>
4422 <p>Possible Answers:
4423 </p>
4424 <p>
4425 </p>
4426 <blockquote class="text">
4427 <p>"OK" -
4428 </p>
4429 <blockquote class="text">
4430 <p>on success
4431 </p>
4432 </blockquote>
4433
4434
4435 <p>"WRN:&lt;warning-code&gt;:&lt;warning-message&gt;" -
4436 </p>
4437 <blockquote class="text">
4438 <p>if MIDI input port was set, but there are noteworthy
4439 issue(s) related, providing an appropriate warning code and
4440 warning message
4441 </p>
4442 </blockquote>
4443
4444
4445 <p>"ERR:&lt;error-code&gt;:&lt;error-message&gt;" -
4446 </p>
4447 <blockquote class="text">
4448 <p>in case it failed, providing an appropriate error code and error message
4449 </p>
4450 </blockquote>
4451
4452
4453 </blockquote><p>
4454
4455 </p>
4456 <p>Examples:
4457 </p>
4458 <p>
4459 </p>
4460 <blockquote class="text">
4461 <p>
4462 </p>
4463 </blockquote><p>
4464
4465 </p>
4466 <a name="SET CHANNEL MIDI_INPUT_CHANNEL"></a><br /><hr />
4467 <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>
4468 <a name="rfc.section.6.4.20"></a><h3>6.4.20.&nbsp;Setting MIDI input channel</h3>
4469
4470 <p>The front-end can alter the MIDI channel a sampler channel should
4471 listen to by sending the following command:
4472 </p>
4473 <p>
4474 </p>
4475 <blockquote class="text">
4476 <p>SET CHANNEL MIDI_INPUT_CHANNEL &lt;sampler-channel&gt; &lt;midi-input-chan&gt;
4477 </p>
4478 </blockquote><p>
4479
4480 </p>
4481 <p>Where &lt;midi-input-chan&gt; is the number of the new MIDI input channel where
4482 &lt;sampler-channel&gt; should listen to or "ALL" to listen on all 16 MIDI
4483 channels.
4484 </p>
4485 <p>Possible Answers:
4486 </p>
4487 <p>
4488 </p>
4489 <blockquote class="text">
4490 <p>"OK" -
4491 </p>
4492 <blockquote class="text">
4493 <p>on success
4494 </p>
4495 </blockquote>
4496
4497
4498 <p>"WRN:&lt;warning-code&gt;:&lt;warning-message&gt;" -
4499 </p>
4500 <blockquote class="text">
4501 <p>if MIDI input channel was set, but there are noteworthy
4502 issue(s) related, providing an appropriate warning code and
4503 warning message
4504 </p>
4505 </blockquote>
4506
4507
4508 <p>"ERR:&lt;error-code&gt;:&lt;error-message&gt;" -
4509 </p>
4510 <blockquote class="text">
4511 <p>in case it failed, providing an appropriate error code and error message
4512 </p>
4513 </blockquote>
4514
4515
4516 </blockquote><p>
4517
4518 </p>
4519 <p>Examples:
4520 </p>
4521 <p>
4522 </p>
4523 <blockquote class="text">
4524 <p>
4525 </p>
4526 </blockquote><p>
4527
4528 </p>
4529 <a name="SET CHANNEL VOLUME"></a><br /><hr />
4530 <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>
4531 <a name="rfc.section.6.4.21"></a><h3>6.4.21.&nbsp;Setting channel volume</h3>
4532
4533 <p>The front-end can alter the volume of a sampler channel by sending
4534 the following command:
4535 </p>
4536 <p>
4537 </p>
4538 <blockquote class="text">
4539 <p>SET CHANNEL VOLUME &lt;sampler-channel&gt; &lt;volume&gt;
4540 </p>
4541 </blockquote><p>
4542
4543 </p>
4544 <p>Where &lt;volume&gt; is an optionally dotted positive number (a value
4545 smaller than 1.0 means attenuation, whereas a value greater than
4546 1.0 means amplification) and &lt;sampler-channel&gt; defines the sampler
4547 channel where this volume factor should be set.
4548 </p>
4549 <p>Possible Answers:
4550 </p>
4551 <p>
4552 </p>
4553 <blockquote class="text">
4554 <p>"OK" -
4555 </p>
4556 <blockquote class="text">
4557 <p>on success
4558 </p>
4559 </blockquote>
4560
4561
4562 <p>"WRN:&lt;warning-code&gt;:&lt;warning-message&gt;" -
4563 </p>
4564 <blockquote class="text">
4565 <p>if channel volume was set, but there are noteworthy
4566 issue(s) related, providing an appropriate warning code and
4567 warning message
4568 </p>
4569 </blockquote>
4570
4571
4572 <p>"ERR:&lt;error-code&gt;:&lt;error-message&gt;" -
4573 </p>
4574 <blockquote class="text">
4575 <p>in case it failed, providing an appropriate error code and error message
4576 </p>
4577 </blockquote>
4578
4579
4580 </blockquote><p>
4581
4582 </p>
4583 <p>Examples:
4584 </p>
4585 <p>
4586 </p>
4587 <blockquote class="text">
4588 <p>
4589 </p>
4590 </blockquote><p>
4591
4592 </p>
4593 <a name="SET CHANNEL MUTE"></a><br /><hr />
4594 <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>
4595 <a name="rfc.section.6.4.22"></a><h3>6.4.22.&nbsp;Muting a sampler channel</h3>
4596
4597 <p>The front-end can mute/unmute a specific sampler
4598 channel by sending the following command:
4599 </p>
4600 <p>
4601 </p>
4602 <blockquote class="text">
4603 <p>SET CHANNEL MUTE &lt;sampler-channel&gt; &lt;mute&gt;
4604 </p>
4605 </blockquote><p>
4606
4607 </p>
4608 <p>Where &lt;sampler-channel&gt; is the respective sampler channel
4609 number as returned by the <a class="info" href="#ADD CHANNEL">"ADD CHANNEL"<span> (</span><span class="info">Adding a new sampler channel</span><span>)</span></a>
4610 or <a class="info" href="#LIST CHANNELS">"LIST CHANNELS"<span> (</span><span class="info">Getting all created sampler channel list</span><span>)</span></a> command and
4611 &lt;mute&gt; should be replaced either by "1" to mute the channel or "0"
4612 to unmute the channel.
4613 </p>
4614 <p>Possible Answers:
4615 </p>
4616 <p>
4617 </p>
4618 <blockquote class="text">
4619 <p>"OK" -
4620 </p>
4621 <blockquote class="text">
4622 <p>on success
4623 </p>
4624 </blockquote>
4625
4626
4627 <p>"WRN:&lt;warning-code&gt;:&lt;warning-message&gt;" -
4628 </p>
4629 <blockquote class="text">
4630 <p>if the channel was muted/unmuted, but there are noteworthy
4631 issue(s) related, providing an appropriate warning code and
4632 warning message
4633 </p>
4634 </blockquote>
4635
4636
4637 <p>"ERR:&lt;error-code&gt;:&lt;error-message&gt;" -
4638 </p>
4639 <blockquote class="text">
4640 <p>in case it failed, providing an appropriate error code and error message
4641 </p>
4642 </blockquote>
4643
4644
4645 </blockquote><p>
4646
4647 </p>
4648 <p>Examples:
4649 </p>
4650 <p>
4651 </p>
4652 <blockquote class="text">
4653 <p>
4654 </p>
4655 </blockquote><p>
4656
4657 </p>
4658 <a name="SET CHANNEL SOLO"></a><br /><hr />
4659 <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>
4660 <a name="rfc.section.6.4.23"></a><h3>6.4.23.&nbsp;Soloing a sampler channel</h3>
4661
4662 <p>The front-end can solo/unsolo a specific sampler channel
4663 by sending the following command:
4664 </p>
4665 <p>
4666 </p>
4667 <blockquote class="text">
4668 <p>SET CHANNEL SOLO &lt;sampler-channel&gt; &lt;solo&gt;
4669 </p>
4670 </blockquote><p>
4671
4672 </p>
4673 <p>Where &lt;sampler-channel&gt; is the respective sampler channel
4674 number as returned by the <a class="info" href="#ADD CHANNEL">"ADD CHANNEL"<span> (</span><span class="info">Adding a new sampler channel</span><span>)</span></a>
4675 or <a class="info" href="#LIST CHANNELS">"LIST CHANNELS"<span> (</span><span class="info">Getting all created sampler channel list</span><span>)</span></a> command and
4676 &lt;solo&gt; should be replaced either by "1" to solo the channel or "0"
4677 to unsolo the channel.
4678 </p>
4679 <p>Possible Answers:
4680 </p>
4681 <p>
4682 </p>
4683 <blockquote class="text">
4684 <p>"OK" -
4685 </p>
4686 <blockquote class="text">
4687 <p>on success
4688 </p>
4689 </blockquote>
4690
4691
4692 <p>"WRN:&lt;warning-code&gt;:&lt;warning-message&gt;" -
4693 </p>
4694 <blockquote class="text">
4695 <p>if the channel was soloed/unsoloed, but there are noteworthy
4696 issue(s) related, providing an appropriate warning code and
4697 warning message
4698 </p>
4699 </blockquote>
4700
4701
4702 <p>"ERR:&lt;error-code&gt;:&lt;error-message&gt;" -
4703 </p>
4704 <blockquote class="text">
4705 <p>in case it failed, providing an appropriate error code and error message
4706 </p>
4707 </blockquote>
4708
4709
4710 </blockquote><p>
4711
4712 </p>
4713 <p>Examples:
4714 </p>
4715 <p>
4716 </p>
4717 <blockquote class="text">
4718 <p>
4719 </p>
4720 </blockquote><p>
4721
4722 </p>
4723 <a name="RESET CHANNEL"></a><br /><hr />
4724 <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>
4725 <a name="rfc.section.6.4.24"></a><h3>6.4.24.&nbsp;Resetting a sampler channel</h3>
4726
4727 <p>The front-end can reset a particular sampler channel by sending the following command:
4728 </p>
4729 <p>
4730 </p>
4731 <blockquote class="text">
4732 <p>RESET CHANNEL &lt;sampler-channel&gt;
4733 </p>
4734 </blockquote><p>
4735
4736 </p>
4737 <p>
4738 Where &lt;sampler-channel&gt; defines the sampler channel to be reset.
4739 This will cause the engine on that sampler channel, its voices and
4740 eventually disk streams and all control and status variables to be
4741 reset.
4742 </p>
4743 <p>Possible Answers:
4744 </p>
4745 <p>
4746 </p>
4747 <blockquote class="text">
4748 <p>"OK" -
4749 </p>
4750 <blockquote class="text">
4751 <p>on success
4752 </p>
4753 </blockquote>
4754
4755
4756 <p>"WRN:&lt;warning-code&gt;:&lt;warning-message&gt;" -
4757 </p>
4758 <blockquote class="text">
4759 <p>if channel was reset, but there are noteworthy issue(s)
4760 related, providing an appropriate warning code and warning
4761 message
4762 </p>
4763 </blockquote>
4764
4765
4766 <p>"ERR:&lt;error-code&gt;:&lt;error-message&gt;" -
4767 </p>
4768 <blockquote class="text">
4769 <p>in case it failed, providing an appropriate error code and
4770 error message
4771 </p>
4772 </blockquote>
4773
4774
4775 </blockquote><p>
4776
4777 </p>
4778 <p>Examples:
4779 </p>
4780 <p>
4781 </p>
4782 <blockquote class="text">
4783 <p>
4784 </p>
4785 </blockquote><p>
4786
4787 </p>
4788 <a name="anchor12"></a><br /><hr />
4789 <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>
4790 <a name="rfc.section.6.5"></a><h3>6.5.&nbsp;Controlling connection</h3>
4791
4792 <p>The following commands are used to control the connection to LinuxSampler.
4793 </p>
4794 <a name="SUBSCRIBE"></a><br /><hr />
4795 <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>
4796 <a name="rfc.section.6.5.1"></a><h3>6.5.1.&nbsp;Register front-end for receiving event messages</h3>
4797
4798 <p>The front-end can register itself to the LinuxSampler application to
4799 be informed about noteworthy events by sending this command:
4800 </p>
4801 <p>
4802 </p>
4803 <blockquote class="text">
4804 <p>SUBSCRIBE &lt;event-id&gt;
4805 </p>
4806 </blockquote><p>
4807
4808 </p>
4809 <p>where &lt;event-id&gt; will be replaced by the respective event that
4810 client wants to subscribe to.
4811 </p>
4812 <p>Possible Answers:
4813 </p>
4814 <p>
4815 </p>
4816 <blockquote class="text">
4817 <p>"OK" -
4818 </p>
4819 <blockquote class="text">
4820 <p>on success
4821 </p>
4822 </blockquote>
4823
4824
4825 <p>"WRN:&lt;warning-code&gt;:&lt;warning-message&gt;" -
4826 </p>
4827 <blockquote class="text">
4828 <p>if registration succeeded, but there are noteworthy
4829 issue(s) related, providing an appropriate warning code and
4830 warning message
4831 </p>
4832 </blockquote>
4833
4834
4835 <p>"ERR:&lt;error-code&gt;:&lt;error-message&gt;" -
4836 </p>
4837 <blockquote class="text">
4838 <p>in case it failed, providing an appropriate error code and
4839 error message
4840 </p>
4841 </blockquote>
4842
4843
4844 </blockquote><p>
4845
4846 </p>
4847 <p>Examples:
4848 </p>
4849 <p>
4850 </p>
4851 <blockquote class="text">
4852 <p>
4853 </p>
4854 </blockquote><p>
4855
4856 </p>
4857 <a name="UNSUBSCRIBE"></a><br /><hr />
4858 <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>
4859 <a name="rfc.section.6.5.2"></a><h3>6.5.2.&nbsp;Unregister front-end for not receiving event messages</h3>
4860
4861 <p>The front-end can unregister itself if it doesn't want to receive event
4862 messages anymore by sending the following command:
4863 </p>
4864 <p>
4865 </p>
4866 <blockquote class="text">
4867 <p>UNSUBSCRIBE &lt;event-id&gt;
4868 </p>
4869 </blockquote><p>
4870
4871 </p>
4872 <p>Where &lt;event-id&gt; will be replaced by the respective event that
4873 client doesn't want to receive anymore.
4874 </p>
4875 <p>Possible Answers:
4876 </p>
4877 <p>
4878 </p>
4879 <blockquote class="text">
4880 <p>"OK" -
4881 </p>
4882 <blockquote class="text">
4883 <p>on success
4884 </p>
4885 </blockquote>
4886
4887
4888 <p>"WRN:&lt;warning-code&gt;:&lt;warning-message&gt;" -
4889 </p>
4890 <blockquote class="text">
4891 <p>if unregistration succeeded, but there are noteworthy
4892 issue(s) related, providing an appropriate warning code and
4893 warning message
4894 </p>
4895 </blockquote>
4896
4897
4898 <p>"ERR:&lt;error-code&gt;:&lt;error-message&gt;" -
4899 </p>
4900 <blockquote class="text">
4901 <p>in case it failed, providing an appropriate error code and
4902 error message
4903 </p>
4904 </blockquote>
4905
4906
4907 </blockquote><p>
4908
4909 </p>
4910 <p>Examples:
4911 </p>
4912 <p>
4913 </p>
4914 <blockquote class="text">
4915 <p>
4916 </p>
4917 </blockquote><p>
4918
4919 </p>
4920 <a name="SET ECHO"></a><br /><hr />
4921 <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>
4922 <a name="rfc.section.6.5.3"></a><h3>6.5.3.&nbsp;Enable or disable echo of commands</h3>
4923
4924 <p>To enable or disable back sending of commands to the client the following command can be used:
4925 </p>
4926 <p>
4927 </p>
4928 <blockquote class="text">
4929 <p>SET ECHO &lt;value&gt;
4930 </p>
4931 </blockquote><p>
4932
4933 </p>
4934 <p>Where &lt;value&gt; should be replaced either by "1" to enable echo mode
4935 or "0" to disable echo mode. When echo mode is enabled, all
4936 commands send to LinuxSampler will be immediately send back and
4937 after this echo the actual response to the command will be
4938 returned. Echo mode will only be altered for the client connection
4939 that issued the "SET ECHO" command, not globally for all client
4940 connections.
4941 </p>
4942 <p>Possible Answers:
4943 </p>
4944 <p>
4945 </p>
4946 <blockquote class="text">
4947 <p>"OK" -
4948 </p>
4949 <blockquote class="text">
4950 <p>usually
4951 </p>
4952 </blockquote>
4953
4954
4955 <p>"ERR:&lt;error-code&gt;:&lt;error-message&gt;" -
4956 </p>
4957 <blockquote class="text">
4958 <p>on syntax error, e.g. non boolean value
4959 </p>
4960 </blockquote>
4961
4962
4963 </blockquote><p>
4964
4965 </p>
4966 <p>Examples:
4967 </p>
4968 <p>
4969 </p>
4970 <blockquote class="text">
4971 <p>
4972 </p>
4973 </blockquote><p>
4974
4975 </p>
4976 <a name="QUIT"></a><br /><hr />
4977 <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>
4978 <a name="rfc.section.6.5.4"></a><h3>6.5.4.&nbsp;Close client connection</h3>
4979
4980 <p>The client can close its network connection to LinuxSampler by sending the following command:
4981 </p>
4982 <p>
4983 </p>
4984 <blockquote class="text">
4985 <p>QUIT
4986 </p>
4987 </blockquote><p>
4988
4989 </p>
4990 <p>This is probably more interesting for manual telnet connections to
4991 LinuxSampler than really useful for a front-end implementation.
4992 </p>
4993 <a name="anchor13"></a><br /><hr />
4994 <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>
4995 <a name="rfc.section.6.6"></a><h3>6.6.&nbsp;Global commands</h3>
4996
4997 <p>The following commands have global impact on the sampler.
4998 </p>
4999 <a name="GET TOTAL_VOICE_COUNT"></a><br /><hr />
5000 <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>
5001 <a name="rfc.section.6.6.1"></a><h3>6.6.1.&nbsp;Current number of active voices</h3>
5002
5003 <p>The front-end can ask for the current number of active voices on
5004 the sampler by sending the following command:
5005 </p>
5006 <p>
5007 </p>
5008 <blockquote class="text">
5009 <p>GET TOTAL_VOICE_COUNT
5010 </p>
5011 </blockquote><p>
5012
5013 </p>
5014 <p>Possible Answers:
5015 </p>
5016 <p>
5017 </p>
5018 <blockquote class="text">
5019 <p>LinuxSampler will answer by returning the number of all active
5020 voices on the sampler.
5021 </p>
5022 </blockquote><p>
5023
5024 </p>
5025 <a name="GET TOTAL_VOICE_COUNT_MAX"></a><br /><hr />
5026 <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>
5027 <a name="rfc.section.6.6.2"></a><h3>6.6.2.&nbsp;Maximum amount of active voices</h3>
5028
5029 <p>The front-end can ask for the maximum number of active voices
5030 by sending the following command:
5031 </p>
5032 <p>
5033 </p>
5034 <blockquote class="text">
5035 <p>GET TOTAL_VOICE_COUNT_MAX
5036 </p>
5037 </blockquote><p>
5038
5039 </p>
5040 <p>Possible Answers:
5041 </p>
5042 <p>
5043 </p>
5044 <blockquote class="text">
5045 <p>LinuxSampler will answer by returning the maximum number
5046 of active voices.
5047 </p>
5048 </blockquote><p>
5049
5050 </p>
5051 <a name="RESET"></a><br /><hr />
5052 <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>
5053 <a name="rfc.section.6.6.3"></a><h3>6.6.3.&nbsp;Reset sampler</h3>
5054
5055 <p>The front-end can reset the whole sampler by sending the following command:
5056 </p>
5057 <p>
5058 </p>
5059 <blockquote class="text">
5060 <p>RESET
5061 </p>
5062 </blockquote><p>
5063
5064 </p>
5065 <p>Possible Answers:
5066 </p>
5067 <p>
5068 </p>
5069 <blockquote class="text">
5070 <p>"OK" -
5071 </p>
5072 <blockquote class="text">
5073 <p>always
5074 </p>
5075 </blockquote>
5076
5077
5078 </blockquote><p>
5079
5080 </p>
5081 <p>Examples:
5082 </p>
5083 <p>
5084 </p>
5085 <blockquote class="text">
5086 <p>
5087 </p>
5088 </blockquote><p>
5089
5090 </p>
5091 <a name="GET SERVER INFO"></a><br /><hr />
5092 <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>
5093 <a name="rfc.section.6.6.4"></a><h3>6.6.4.&nbsp;General sampler informations</h3>
5094
5095 <p>The client can ask for general informations about the LinuxSampler
5096 instance by sending the following command:
5097 </p>
5098 <p>
5099 </p>
5100 <blockquote class="text">
5101 <p>GET SERVER INFO
5102 </p>
5103 </blockquote><p>
5104
5105 </p>
5106 <p>Possible Answers:
5107 </p>
5108 <p>
5109 </p>
5110 <blockquote class="text">
5111 <p>LinuxSampler will answer by sending a &lt;CRLF&gt; separated list.
5112 Each answer line begins with the information category name
5113 followed by a colon and then a space character &lt;SP&gt; and finally
5114 the info character string to that information category. At the
5115 moment the following categories are defined:
5116
5117 </p>
5118 <p>
5119 </p>
5120 <blockquote class="text">
5121 <p>DESCRIPTION -
5122 </p>
5123 <blockquote class="text">
5124 <p>arbitrary textual description about the sampler
5125 </p>
5126 </blockquote>
5127
5128
5129 <p>VERSION -
5130 </p>
5131 <blockquote class="text">
5132 <p>version of the sampler
5133 </p>
5134 </blockquote>
5135
5136
5137 <p>PROTOCOL_VERSION -
5138 </p>
5139 <blockquote class="text">
5140 <p>version of the LSCP specification the sampler
5141 complies with (see <a class="info" href="#LSCP versioning">Section&nbsp;2<span> (</span><span class="info">Versioning of this specification</span><span>)</span></a> for details)
5142 </p>
5143 </blockquote>
5144
5145
5146 </blockquote>
5147
5148
5149 </blockquote><p>
5150
5151 </p>
5152 <p>The mentioned fields above don't have to be in particular order.
5153 Other fields might be added in future.
5154 </p>
5155 <a name="anchor14"></a><br /><hr />
5156 <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>
5157 <a name="rfc.section.6.7"></a><h3>6.7.&nbsp;MIDI Instrument Mapping</h3>
5158
5159 <p>The MIDI protocol provides a way to switch between instruments
5160 by sending so called MIDI bank select and MIDI program change
5161 messages which are essentially just numbers. The following commands
5162 allow to actually map arbitrary MIDI bank select / program change
5163 numbers with real instruments.
5164 </p>
5165 <p>By default, that is when the sampler is launched, this map will
5166 be empty, thus the sampler will simply ignore all program change
5167 messages. The front-end has to explicitly add entries to the map
5168 so the sampler knows how to react on a given program change
5169 message, that is by switching to the respectively defined engine
5170 type and loading the respective instrument.
5171 </p>
5172 <p>Also note per MIDI specification a bank select message does not
5173 cause to switch to another instrument. Instead when receiving a
5174 bank select message the bank value will be stored and a subsequent
5175 program change message (which may occur at any time) will finally
5176 cause the sampler to switch to the respective instrument as
5177 reflected by the current MIDI instrument map.
5178 </p>
5179 <a name="MAP MIDI_INSTRUMENT"></a><br /><hr />
5180 <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>
5181 <a name="rfc.section.6.7.1"></a><h3>6.7.1.&nbsp;Create or replace a MIDI instrument map entry</h3>
5182
5183 <p>The front-end can create a new or replace an existing entry
5184 in the sampler's MIDI instrument map by sending the following
5185 command:
5186 </p>
5187 <p>
5188 </p>
5189 <blockquote class="text">
5190 <p>MAP MIDI_INSTRUMENT &lt;midi_bank_msb&gt;
5191 &lt;midi_bank_lsb&gt; &lt;midi_prog&gt; &lt;engine_name&gt;
5192 &lt;filename&gt; &lt;instrument_index&gt; &lt;volume_value&gt;
5193 [&lt;instr_load_mode&gt;] [&lt;name&gt;]
5194 </p>
5195 </blockquote><p>
5196
5197 </p>
5198 <p>Where &lt;midi_bank_msb&gt; is an integer value between
5199 0..127 reflecting the MIDI bank select MSB (coarse) index,
5200 &lt;midi_bank_lsb&gt; an integer value between 0..127 reflecting
5201 the MIDI bank select LSB (fine) index, &lt;midi_prog&gt; an
5202 integer value between 0..127 reflecting the MIDI program change
5203 index, &lt;engine_name&gt; a sampler engine name as returned by
5204 the <a class="info" href="#LIST AVAILABLE_ENGINES">"LIST AVAILABLE_ENGINES"<span> (</span><span class="info">Getting all available engines</span><span>)</span></a>
5205 command (not encapsulated into apostrophes), &lt;filename&gt; the name
5206 of the instrument's file to be deployed (encapsulated into apostrophes), &lt;instrument_index&gt; the index (integer value) of the instrument
5207 within the given file, &lt;volume_value&gt; reflects the master
5208 volume of the instrument as optionally dotted number (where a
5209 value < 1.0 means attenuation and a value > 1.0 means
5210 amplification). This parameter easily allows to adjust the
5211 volume of all intruments within a custom instrument map
5212 without having to adjust their instrument files. The
5213 OPTIONAL &lt;instr_load_mode&gt; argument defines the life
5214 time of the instrument, that is when the instrument should
5215 be loaded, when freed and has exactly the following
5216 possibilities:
5217 </p>
5218 <p>
5219 </p>
5220 <blockquote class="text">
5221 <p>"ON_DEMAND" -
5222 </p>
5223 <blockquote class="text">
5224 <p>The instrument will be loaded when needed,
5225 that is when demanded by at least one sampler
5226 channel. It will immediately be freed from memory
5227 when not needed by any sampler channel anymore.
5228 </p>
5229 </blockquote>
5230
5231
5232 <p>"ON_DEMAND_HOLD" -
5233 </p>
5234 <blockquote class="text">
5235 <p>The instrument will be loaded when needed,
5236 that is when demanded by at least one sampler
5237 channel. It will be kept in memory even when
5238 not needed by any sampler channel anymore.
5239 Instruments with this mode are only freed
5240 when the sampler is reset or all mapping
5241 entries with this mode (and respective
5242 instrument) are explicitly changed to
5243 "ON_DEMAND" and no sampler channel is using
5244 the instrument anymore.
5245 </p>
5246 </blockquote>
5247
5248
5249 <p>"PERSISTENT" -
5250 </p>
5251 <blockquote class="text">
5252 <p>The instrument will immediately be loaded
5253 into memory in the background when this mapping
5254 command is sent and the instrument is kept all
5255 the time. Instruments with this mode are
5256 only freed when the sampler is reset or all
5257 mapping entries with this mode (and
5258 respective instrument) are explicitly
5259 changed to "ON_DEMAND" and no sampler
5260 channel is using the instrument anymore.
5261 </p>
5262 </blockquote>
5263
5264
5265 <p>not supplied -
5266 </p>
5267 <blockquote class="text">
5268 <p>In case there is no &lt;instr_load_mode&gt;
5269 argument given, it will be up to the
5270 InstrumentManager to decide which mode to use.
5271 Usually it will use "ON_DEMAND" if an entry
5272 for the given instrument does not exist in
5273 the InstrumentManager's list yet, otherwise
5274 if an entry already exists, it will simply
5275 stick with the mode currently reflected by
5276 the already existing entry, that is it will
5277 not change the mode.
5278 </p>
5279 </blockquote>
5280
5281
5282 </blockquote><p>
5283
5284 </p>
5285 <p>
5286 The &lt;instr_load_mode&gt; argument thus allows to define an
5287 appropriate strategy (low memory consumption vs. fast
5288 instrument switching) for each instrument individually. Note, the
5289 following restrictions apply to this argument: "ON_DEMAND_HOLD" and
5290 "PERSISTENT" have to be supported by the respective sampler engine
5291 (which is technically the case when the engine provides an
5292 InstrumentManager for its format). If this is not the case the
5293 argument will automatically fall back to the default value
5294 "ON_DEMAND". Also the load mode of one instrument may
5295 automatically change the laod mode of other instrument(s), i.e.
5296 because the instruments are part of the same file and the
5297 engine does not allow a way to manage load modes for them
5298 individually. Due to this, in case the frontend shows the
5299 load modes of entries, the frontend should retrieve the actual
5300 mode by i.e. sending
5301 <a class="info" href="#GET MIDI_INSTRUMENT INFO">"GET MIDI_INSTRUMENT INFO"<span> (</span><span class="info">Get current settings of MIDI instrument map entry</span><span>)</span></a>
5302 command(s). Finally the OPTIONAL &lt;name&gt; argument allows to
5303 set a custom name (encapsulated into apostrophes) for the mapping
5304 entry, useful for frontends for displaying an appropriate name for
5305 mapped instruments (using
5306 <a class="info" href="#GET MIDI_INSTRUMENT INFO">"GET MIDI_INSTRUMENT INFO"<span> (</span><span class="info">Get current settings of MIDI instrument map entry</span><span>)</span></a>).
5307
5308 </p>
5309 <p>
5310 The "MAP MIDI_INSTRUMENT" command
5311 will immediately return, thus it will not block when an
5312 instrument is to be loaded due to a "PERSISTENT" type
5313 entry as instruments are loaded in the background. As a
5314 consequence this command may not necessarily return an error
5315 i.e. when the given instrument file does not exist or may
5316 turn out to be corrupt.
5317
5318 </p>
5319 <p>Possible Answers:
5320 </p>
5321 <p>
5322 </p>
5323 <blockquote class="text">
5324 <p>"OK" -
5325 </p>
5326 <blockquote class="text">
5327 <p>usually
5328 </p>
5329 </blockquote>
5330
5331
5332 <p>"ERR:&lt;error-code&gt;:&lt;error-message&gt;" -
5333 </p>
5334 <blockquote class="text">
5335 <p>when the given engine does not exist or a value
5336 is out of range
5337 </p>
5338 </blockquote>
5339
5340
5341 </blockquote><p>
5342
5343 </p>
5344 <p>Examples:
5345 </p>
5346 <p>
5347 </p>
5348 <blockquote class="text">
5349 <p>C: "MAP MIDI_INSTRUMENT 3 0 0 gig '/usr/share/Steinway D.gig' 0 0.8 PERSISTENT"
5350 </p>
5351 <p>S: "OK"
5352 </p>
5353 </blockquote><p>
5354
5355 </p>
5356 <p>
5357 </p>
5358 <blockquote class="text">
5359 <p>C: "MAP MIDI_INSTRUMENT 127 4 50 gig '/home/john/foostrings.gig' 7 1.0"
5360 </p>
5361 <p>S: "OK"
5362 </p>
5363 </blockquote><p>
5364
5365 </p>
5366 <p>
5367 </p>
5368 <blockquote class="text">
5369 <p>C: "MAP MIDI_INSTRUMENT 0 0 0 gig '/usr/share/piano.gig' 0 1.0 'Normal Piano'"
5370 </p>
5371 <p>S: "OK"
5372 </p>
5373 <p>C: "MAP MIDI_INSTRUMENT 1 0 0 gig '/usr/share/piano.gig' 0 0.25 'Silent Piano'"
5374 </p>
5375 <p>S: "OK"
5376 </p>
5377 </blockquote><p>
5378
5379 </p>
5380 <p>
5381 </p>
5382 <blockquote class="text">
5383 <p>C: "MAP MIDI_INSTRUMENT 99 8 120 gig '/home/joe/foodrums.gig' 0 1.0 PERSISTENT 'Foo Drumkit'"
5384 </p>
5385 <p>S: "OK"
5386 </p>
5387 </blockquote><p>
5388
5389 </p>
5390 <a name="GET MIDI_INSTRUMENTS"></a><br /><hr />
5391 <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>
5392 <a name="rfc.section.6.7.2"></a><h3>6.7.2.&nbsp;Getting ammount of MIDI instrument map entries</h3>
5393
5394 <p>The front-end can query the amount of currently existing MIDI
5395 instrument map entries by sending the following
5396 command:
5397 </p>
5398 <p>
5399 </p>
5400 <blockquote class="text">
5401 <p>GET MIDI_INSTRUMENTS
5402 </p>
5403 </blockquote><p>
5404
5405 </p>
5406 <p>Possible Answers:
5407 </p>
5408 <p>
5409 </p>
5410 <blockquote class="text">
5411 <p>LinuxSampler will answer by sending the current number of
5412 entries in the sampler's MIDI instrument map.
5413 </p>
5414 </blockquote><p>
5415
5416 </p>
5417 <p>Example:
5418 </p>
5419 <p>
5420 </p>
5421 <blockquote class="text">
5422 <p>C: "GET MIDI_INSTRUMENTS"
5423 </p>
5424 <p>S: "634"
5425 </p>
5426 </blockquote><p>
5427
5428 </p>
5429 <a name="LIST MIDI_INSTRUMENTS"></a><br /><hr />
5430 <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>
5431 <a name="rfc.section.6.7.3"></a><h3>6.7.3.&nbsp;Getting indeces of all MIDI instrument map entries</h3>
5432
5433 <p>The front-end can query a list of all currently existing MIDI
5434 instrument map entries by sending the following command:
5435 </p>
5436 <p>
5437 </p>
5438 <blockquote class="text">
5439 <p>LIST MIDI_INSTRUMENTS
5440 </p>
5441 </blockquote><p>
5442
5443 </p>
5444 <p>Possible Answers:
5445 </p>
5446 <p>
5447 </p>
5448 <blockquote class="text">
5449 <p>LinuxSampler will answer by sending a comma separated
5450 list of MIDI bank MSB (coarse) - MIDI bank LSB (fine) -
5451 MIDI program triples, where each triple is encapsulated
5452 into curly braces. The list is returned in one single
5453 line. Each triple just reflects the key of the respective
5454 map entry, thus subsequent
5455 <a class="info" href="#GET MIDI_INSTRUMENT INFO">"GET MIDI_INSTRUMENT INFO"<span> (</span><span class="info">Get current settings of MIDI instrument map entry</span><span>)</span></a>
5456 command(s) are necessary to retrieve detailed informations
5457 about each entry.
5458 </p>
5459 </blockquote><p>
5460
5461 </p>
5462 <p>Example:
5463 </p>
5464 <p>
5465 </p>
5466 <blockquote class="text">
5467 <p>C: "LIST MIDI_INSTRUMENTS"
5468 </p>
5469 <p>S: "{0,0,0},{0,0,1},{120,0,3},{120,0,4},{23,127,127}"
5470 </p>
5471 </blockquote><p>
5472
5473 </p>
5474 <a name="UNMAP MIDI_INSTRUMENT"></a><br /><hr />
5475 <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>
5476 <a name="rfc.section.6.7.4"></a><h3>6.7.4.&nbsp;Remove an entry from the MIDI instrument map</h3>
5477
5478 <p>The front-end can delete an entry from the MIDI instrument
5479 map by sending the following command:
5480 </p>
5481 <p>
5482 </p>
5483 <blockquote class="text">
5484 <p>UNMAP MIDI_INSTRUMENT &lt;midi_bank_msb&gt; &lt;midi_bank_lsb&gt; &lt;midi_prog&gt;
5485 </p>
5486 </blockquote><p>
5487
5488 </p>
5489 <p>
5490 Where &lt;midi_bank_msb&gt; is an integer value between 0..127
5491 reflecting the MIDI bank MSB (coarse) value, &lt;midi_bank_lsb&gt;
5492 an integer value between 0..127 reflecting the MIDI bank LSB
5493 (fine) value and &lt;midi_prog&gt; an integer value between
5494 0..127 reflecting the MIDI program value of the map entrie's key
5495 index triple.
5496
5497 </p>
5498 <p>Possible Answers:
5499 </p>
5500 <p>
5501 </p>
5502 <blockquote class="text">
5503 <p>"OK" -
5504 </p>
5505 <blockquote class="text">
5506 <p>usually
5507 </p>
5508 </blockquote>
5509
5510
5511 <p>"ERR:&lt;error-code&gt;:&lt;error-message&gt;" -
5512 </p>
5513 <blockquote class="text">
5514 <p>when index out of bounds
5515 </p>
5516 </blockquote>
5517
5518
5519 </blockquote><p>
5520
5521 </p>
5522 <p>Example:
5523 </p>
5524 <p>
5525 </p>
5526 <blockquote class="text">
5527 <p>C: "UNMAP MIDI_INSTRUMENT 2 40 127"
5528 </p>
5529 <p>S: "OK"
5530 </p>
5531 </blockquote><p>
5532
5533 </p>
5534 <a name="GET MIDI_INSTRUMENT INFO"></a><br /><hr />
5535 <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>
5536 <a name="rfc.section.6.7.5"></a><h3>6.7.5.&nbsp;Get current settings of MIDI instrument map entry</h3>
5537
5538 <p>The front-end can retrieve the current settings of a certain
5539 instrument map entry by sending the following command:
5540 </p>
5541 <p>
5542 </p>
5543 <blockquote class="text">
5544 <p>GET MIDI_INSTRUMENT INFO &lt;midi_bank_msb&gt; &lt;midi_bank_lsb&gt; &lt;midi_prog&gt;
5545 </p>
5546 </blockquote><p>
5547
5548 </p>
5549 <p>
5550 Where &lt;midi_bank_msb&gt; is an integer value between 0..127
5551 reflecting the MIDI bank MSB (coarse) value, &lt;midi_bank_lsb&gt;
5552 an integer value between 0..127 reflecting the MIDI bank LSB
5553 (fine) value and &lt;midi_prog&gt; an integer value between
5554 0..127 reflecting the MIDI program value of the map entrie's key
5555 index triple.
5556
5557 </p>
5558 <p>Possible Answers:
5559 </p>
5560 <p>
5561 </p>
5562 <blockquote class="text">
5563 <p>LinuxSampler will answer by sending a &lt;CRLF&gt;
5564 separated list. Each answer line begins with the
5565 information category name followed by a colon and then
5566 a space character &lt;SP&gt; and finally the info
5567 character string to that info category. At the moment
5568 the following categories are defined:
5569 </p>
5570 <p>"NAME" -
5571 </p>
5572 <blockquote class="text">
5573 <p>Name for this MIDI instrument map entry (if defined).
5574 This name shall be used by frontends for displaying a
5575 name for this mapped instrument. It can be set and
5576 changed with the
5577 <a class="info" href="#MAP MIDI_INSTRUMENT">"MAP MIDI_INSTRUMENT"<span> (</span><span class="info">Create or replace a MIDI instrument map entry</span><span>)</span></a>
5578 command and does not have to be unique.
5579 </p>
5580 </blockquote>
5581
5582
5583 <p>"ENGINE_NAME" -
5584 </p>
5585 <blockquote class="text">
5586 <p>Name of the engine to be deployed for this
5587 instrument.
5588 </p>
5589 </blockquote>
5590
5591
5592 <p>"INSTRUMENT_FILE" -
5593 </p>
5594 <blockquote class="text">
5595 <p>File name of the instrument.
5596 </p>
5597 </blockquote>
5598
5599
5600 <p>"INSTRUMENT_NR" -
5601 </p>
5602 <blockquote class="text">
5603 <p>Index of the instrument within the file.
5604 </p>
5605 </blockquote>
5606
5607
5608 <p>"INSTRUMENT_NAME" -
5609 </p>
5610 <blockquote class="text">
5611 <p>Name of the loaded instrument as reflected by its file.
5612 In contrast to the "NAME" field, the "INSTRUMENT_NAME" field
5613 cannot be changed.
5614 </p>
5615 </blockquote>
5616
5617
5618 <p>"LOAD_MODE" -
5619 </p>
5620 <blockquote class="text">
5621 <p>Life time of instrument
5622 (see <a class="info" href="#MAP MIDI_INSTRUMENT">"MAP MIDI_INSTRUMENT"<span> (</span><span class="info">Create or replace a MIDI instrument map entry</span><span>)</span></a> for details about this setting).
5623 </p>
5624 </blockquote>
5625
5626
5627 <p>"VOLUME" -
5628 </p>
5629 <blockquote class="text">
5630 <p>master volume of the instrument as optionally
5631 dotted number (where a value < 1.0 means attenuation
5632 and a value > 1.0 means amplification)
5633 </p>
5634 </blockquote>
5635
5636
5637 <p>The mentioned fields above don't have to be in particular order.
5638 </p>
5639 </blockquote><p>
5640
5641 </p>
5642 <p>Example:
5643 </p>
5644 <p>
5645 </p>
5646 <blockquote class="text">
5647 <p>C: "GET MIDI_INSTRUMENT INFO 3 45 120"
5648 </p>
5649 <p>S: "NAME: Drums for Foo Song"
5650 </p>
5651 <p>&nbsp;&nbsp;&nbsp;"ENGINE_NAME: GigEngine"
5652 </p>
5653 <p>&nbsp;&nbsp;&nbsp;"INSTRUMENT_FILE: /usr/share/joesdrumkit.gig"
5654 </p>
5655 <p>&nbsp;&nbsp;&nbsp;"INSTRUMENT_NR: 0"
5656 </p>
5657 <p>&nbsp;&nbsp;&nbsp;"INSTRUMENT_NAME: Joe's Drumkit"
5658 </p>
5659 <p>&nbsp;&nbsp;&nbsp;"LOAD_MODE: PERSISTENT"
5660 </p>
5661 <p>&nbsp;&nbsp;&nbsp;"VOLUME: 1.0"
5662 </p>
5663 <p>&nbsp;&nbsp;&nbsp;"."
5664 </p>
5665 </blockquote><p>
5666
5667 </p>
5668 <a name="CLEAR MIDI_INSTRUMENTS"></a><br /><hr />
5669 <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>
5670 <a name="rfc.section.6.7.6"></a><h3>6.7.6.&nbsp;Clear MIDI instrument map</h3>
5671
5672 <p>The front-end can clear the whole MIDI instrument map, that
5673 is delete all entries by sending the following command:
5674 </p>
5675 <p>
5676 </p>
5677 <blockquote class="text">
5678 <p>CLEAR MIDI_INSTRUMENTS
5679 </p>
5680 </blockquote><p>
5681
5682 </p>
5683 <p>Possible Answers:
5684 </p>
5685 <p>
5686 </p>
5687 <blockquote class="text">
5688 <p>"OK" -
5689 </p>
5690 <blockquote class="text">
5691 <p>always
5692 </p>
5693 </blockquote>
5694
5695
5696 </blockquote><p>
5697
5698 </p>
5699 <p>Example:
5700 </p>
5701 <p>
5702 </p>
5703 <blockquote class="text">
5704 <p>C: "CLEAR MIDI_INSTRUMENTS"
5705 </p>
5706 <p>S: "OK"
5707 </p>
5708 </blockquote><p>
5709
5710 </p>
5711 <a name="command_syntax"></a><br /><hr />
5712 <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>
5713 <a name="rfc.section.7"></a><h3>7.&nbsp;Command Syntax</h3>
5714
5715 <p>The grammar of the control protocol as descibed in <a class="info" href="#control_commands">Section&nbsp;6<span> (</span><span class="info">Description for control commands</span><span>)</span></a>
5716 is defined below using Backus-Naur Form (BNF as described in <a class="info" href="#RFC2234">[RFC2234]<span> (</span><span class="info">Crocker, D. and P. Overell, &ldquo;Augmented BNF for Syntax Specifications,&rdquo; 1997.</span><span>)</span></a>)
5717 where applicable.
5718
5719 </p>
5720 <p>input =
5721 </p>
5722 <blockquote class="text">
5723 <p>line LF
5724
5725 </p>
5726 <p>/ line CR LF
5727
5728 </p>
5729 </blockquote><p>
5730
5731 </p>
5732 <p>line =
5733 </p>
5734 <blockquote class="text">
5735 <p>/* epsilon (empty line ignored) */
5736
5737 </p>
5738 <p>/ comment
5739
5740 </p>
5741 <p>/ command
5742
5743 </p>
5744 <p>/ error
5745
5746 </p>
5747 </blockquote><p>
5748
5749 </p>
5750 <p>comment =
5751 </p>
5752 <blockquote class="text">
5753 <p>'#'
5754
5755 </p>
5756 <p>/ comment '#'
5757
5758 </p>
5759 <p>/ comment SP
5760
5761 </p>
5762 <p>/ comment number
5763
5764 </p>
5765 <p>/ comment string
5766
5767 </p>
5768 </blockquote><p>
5769
5770 </p>
5771 <p>command =
5772 </p>
5773 <blockquote class="text">
5774 <p>ADD SP CHANNEL
5775
5776 </p>
5777 <p>/ MAP SP map_instruction
5778
5779 </p>
5780 <p>/ UNMAP SP unmap_instruction
5781
5782 </p>
5783 <p>/ GET SP get_instruction
5784
5785 </p>
5786 <p>/ CREATE SP create_instruction
5787
5788 </p>
5789 <p>/ DESTROY SP destroy_instruction
5790
5791 </p>
5792 <p>/ LIST SP list_instruction
5793
5794 </p>
5795 <p>/ LOAD SP load_instruction
5796
5797 </p>
5798 <p>/ REMOVE SP remove_instruction
5799
5800
5801 </p>
5802 <p>/ SET SP set_instruction
5803
5804 </p>
5805 <p>/ SUBSCRIBE SP subscribe_event
5806
5807 </p>
5808 <p>/ UNSUBSCRIBE SP unsubscribe_event
5809
5810 </p>
5811 <p>/ SELECT SP text
5812
5813 </p>
5814 <p>/ RESET SP reset_instruction
5815
5816 </p>
5817 <p>/ CLEAR SP clear_instruction
5818
5819 </p>
5820 <p>/ RESET
5821
5822 </p>
5823 <p>/ QUIT
5824
5825 </p>
5826 </blockquote><p>
5827
5828 </p>
5829 <p>subscribe_event =
5830 </p>
5831 <blockquote class="text">
5832 <p>CHANNEL_COUNT
5833
5834 </p>
5835 <p>/ VOICE_COUNT
5836
5837 </p>
5838 <p>/ STREAM_COUNT
5839
5840 </p>
5841 <p>/ BUFFER_FILL
5842
5843 </p>
5844 <p>/ CHANNEL_INFO
5845
5846 </p>
5847 <p>/ MISCELLANEOUS
5848
5849 </p>
5850 <p>/ TOTAL_VOICE_COUNT
5851
5852 </p>
5853 </blockquote><p>
5854
5855 </p>
5856 <p>unsubscribe_event =
5857 </p>
5858 <blockquote class="text">
5859 <p>CHANNEL_COUNT
5860
5861 </p>
5862 <p>/ VOICE_COUNT
5863
5864 </p>
5865 <p>/ STREAM_COUNT
5866
5867 </p>
5868 <p>/ BUFFER_FILL
5869
5870 </p>
5871 <p>/ CHANNEL_INFO
5872
5873 </p>
5874 <p>/ MISCELLANEOUS
5875
5876 </p>
5877 <p>/ TOTAL_VOICE_COUNT
5878
5879 </p>
5880 </blockquote><p>
5881
5882 </p>
5883 <p>map_instruction =
5884 </p>
5885 <blockquote class="text">
5886 <p>MIDI_INSTRUMENT SP midi_bank_msb SP midi_bank_lsb SP midi_prog SP engine_name SP filename SP instrument_index SP volume_value
5887
5888 </p>
5889 <p>/ MIDI_INSTRUMENT SP midi_bank_msb SP midi_bank_lsb SP midi_prog SP engine_name SP filename SP instrument_index SP volume_value SP instr_load_mode
5890
5891 </p>
5892 <p>/ MIDI_INSTRUMENT SP midi_bank_msb SP midi_bank_lsb SP midi_prog SP engine_name SP filename SP instrument_index SP volume_value SP entry_name
5893
5894 </p>
5895 <p>/ MIDI_INSTRUMENT SP midi_bank_msb SP midi_bank_lsb SP midi_prog SP engine_name SP filename SP instrument_index SP volume_value SP instr_load_mode SP entry_name
5896
5897 </p>
5898 </blockquote><p>
5899
5900 </p>
5901 <p>unmap_instruction =
5902 </p>
5903 <blockquote class="text">
5904 <p>MIDI_INSTRUMENT SP midi_bank_msb SP midi_bank_lsb SP midi_prog
5905
5906 </p>
5907 </blockquote><p>
5908
5909 </p>
5910 <p>remove_instruction =
5911 </p>
5912 <blockquote class="text">
5913 <p>CHANNEL SP sampler_channel
5914
5915 </p>
5916 </blockquote><p>
5917
5918 </p>
5919 <p>get_instruction =
5920 </p>
5921 <blockquote class="text">
5922 <p>AVAILABLE_ENGINES
5923
5924 </p>
5925 <p>/ AVAILABLE_MIDI_INPUT_DRIVERS
5926
5927 </p>
5928 <p>/ MIDI_INPUT_DRIVER SP INFO SP string
5929
5930 </p>
5931 <p>/ MIDI_INPUT_DRIVER_PARAMETER SP INFO SP string SP string
5932
5933 </p>
5934 <p>/ MIDI_INPUT_DRIVER_PARAMETER SP INFO SP string SP string SP key_val_list
5935
5936 </p>
5937 <p>/ AVAILABLE_AUDIO_OUTPUT_DRIVERS
5938
5939 </p>
5940 <p>/ AUDIO_OUTPUT_DRIVER SP INFO SP string
5941
5942 </p>
5943 <p>/ AUDIO_OUTPUT_DRIVER_PARAMETER SP INFO SP string SP string
5944
5945 </p>
5946 <p>/ AUDIO_OUTPUT_DRIVER_PARAMETER SP INFO SP string SP string SP key_val_list
5947
5948 </p>
5949 <p>/ AUDIO_OUTPUT_DEVICES
5950
5951 </p>
5952 <p>/ MIDI_INPUT_DEVICES
5953
5954 </p>
5955 <p>/ AUDIO_OUTPUT_DEVICE SP INFO SP number
5956
5957 </p>
5958 <p>/ MIDI_INPUT_DEVICE SP INFO SP number
5959
5960 </p>
5961 <p>/ MIDI_INPUT_PORT SP INFO SP number SP number
5962
5963 </p>
5964 <p>/ MIDI_INPUT_PORT_PARAMETER SP INFO SP number SP number SP string
5965
5966 </p>
5967 <p>/ AUDIO_OUTPUT_CHANNEL SP INFO SP number SP number
5968
5969 </p>
5970 <p>/ AUDIO_OUTPUT_CHANNEL_PARAMETER SP INFO SP number SP number SP string
5971
5972 </p>
5973 <p>/ CHANNELS
5974
5975 </p>
5976 <p>/ CHANNEL SP INFO SP sampler_channel
5977
5978 </p>
5979 <p>/ CHANNEL SP BUFFER_FILL SP buffer_size_type SP sampler_channel
5980
5981 </p>
5982 <p>/ CHANNEL SP STREAM_COUNT SP sampler_channel
5983
5984 </p>
5985 <p>/ CHANNEL SP VOICE_COUNT SP sampler_channel
5986
5987 </p>
5988 <p>/ ENGINE SP INFO SP engine_name
5989
5990 </p>
5991 <p>/ SERVER SP INFO
5992
5993 </p>
5994 <p>/ TOTAL_VOICE_COUNT
5995
5996 </p>
5997 <p>/ TOTAL_VOICE_COUNT_MAX
5998
5999 </p>
6000 <p>/ MIDI_INSTRUMENTS
6001
6002 </p>
6003 <p>/ MIDI_INSTRUMENT SP INFO SP midi_bank_msb SP midi_bank_lsb SP midi_prog
6004
6005 </p>
6006 </blockquote><p>
6007
6008 </p>
6009 <p>set_instruction =
6010 </p>
6011 <blockquote class="text">
6012 <p>AUDIO_OUTPUT_DEVICE_PARAMETER SP number SP string '=' param_val_list
6013
6014 </p>
6015 <p>/ AUDIO_OUTPUT_CHANNEL_PARAMETER SP number SP number SP string '=' param_val_list
6016
6017 </p>
6018 <p>/ MIDI_INPUT_DEVICE_PARAMETER SP number SP string '=' param_val_list
6019
6020 </p>
6021 <p>/ MIDI_INPUT_PORT_PARAMETER SP number SP number SP string '=' param_val_list
6022
6023 </p>
6024 <p>/ CHANNEL SP set_chan_instruction
6025
6026 </p>
6027 <p>/ ECHO SP boolean
6028
6029 </p>
6030 </blockquote><p>
6031
6032 </p>
6033 <p>create_instruction =
6034 </p>
6035 <blockquote class="text">
6036 <p>AUDIO_OUTPUT_DEVICE SP string SP key_val_list
6037
6038 </p>
6039 <p>/ AUDIO_OUTPUT_DEVICE SP string
6040
6041 </p>
6042 <p>/ MIDI_INPUT_DEVICE SP string SP key_val_list
6043
6044 </p>
6045 <p>/ MIDI_INPUT_DEVICE SP string
6046
6047 </p>
6048 </blockquote><p>
6049
6050 </p>
6051 <p>reset_instruction =
6052 </p>
6053 <blockquote class="text">
6054 <p>CHANNEL SP sampler_channel
6055
6056 </p>
6057 </blockquote><p>
6058
6059 </p>
6060 <p>clear_instruction =
6061 </p>
6062 <blockquote class="text">
6063 <p>MIDI_INSTRUMENTS
6064
6065 </p>
6066 </blockquote><p>
6067
6068 </p>
6069 <p>destroy_instruction =
6070 </p>
6071 <blockquote class="text">
6072 <p>AUDIO_OUTPUT_DEVICE SP number
6073
6074 </p>
6075 <p>/ MIDI_INPUT_DEVICE SP number
6076
6077 </p>
6078 </blockquote><p>
6079
6080 </p>
6081 <p>load_instruction =
6082 </p>
6083 <blockquote class="text">
6084 <p>INSTRUMENT SP load_instr_args
6085
6086 </p>
6087 <p>/ ENGINE SP load_engine_args
6088
6089 </p>
6090 </blockquote><p>
6091
6092 </p>
6093 <p>set_chan_instruction =
6094 </p>
6095 <blockquote class="text">
6096 <p>AUDIO_OUTPUT_DEVICE SP sampler_channel SP device_index
6097
6098 </p>
6099 <p>/ AUDIO_OUTPUT_CHANNEL SP sampler_channel SP audio_channel_index SP audio_channel_index
6100
6101 </p>
6102 <p>/ AUDIO_OUTPUT_TYPE SP sampler_channel SP audio_output_type_name
6103
6104 </p>
6105 <p>/ MIDI_INPUT SP sampler_channel SP device_index SP midi_input_port_index SP midi_input_channel_index
6106
6107 </p>
6108 <p>/ MIDI_INPUT_DEVICE SP sampler_channel SP device_index
6109
6110 </p>
6111 <p>/ MIDI_INPUT_PORT SP sampler_channel SP midi_input_port_index
6112
6113 </p>
6114 <p>/ MIDI_INPUT_CHANNEL SP sampler_channel SP midi_input_channel_index
6115
6116 </p>
6117 <p>/ MIDI_INPUT_TYPE SP sampler_channel SP midi_input_type_name
6118
6119 </p>
6120 <p>/ VOLUME SP sampler_channel SP volume_value
6121
6122 </p>
6123 <p>/ MUTE SP sampler_channel SP boolean
6124
6125 </p>
6126 <p>/ SOLO SP sampler_channel SP boolean
6127
6128 </p>
6129 </blockquote><p>
6130
6131 </p>
6132 <p>key_val_list =
6133 </p>
6134 <blockquote class="text">
6135 <p>string '=' param_val_list
6136
6137 </p>
6138 <p>/ key_val_list SP string '=' param_val_list
6139
6140 </p>
6141 </blockquote><p>
6142
6143 </p>
6144 <p>buffer_size_type =
6145 </p>
6146 <blockquote class="text">
6147 <p>BYTES
6148
6149 </p>
6150 <p>/ PERCENTAGE
6151
6152 </p>
6153 </blockquote><p>
6154
6155 </p>
6156 <p>list_instruction =
6157 </p>
6158 <blockquote class="text">
6159 <p>AUDIO_OUTPUT_DEVICES
6160
6161 </p>
6162 <p>/ MIDI_INPUT_DEVICES
6163
6164 </p>
6165 <p>/ CHANNELS
6166
6167 </p>
6168 <p>/ AVAILABLE_ENGINES
6169
6170 </p>
6171 <p>/ AVAILABLE_MIDI_INPUT_DRIVERS
6172
6173 </p>
6174 <p>/ AVAILABLE_AUDIO_OUTPUT_DRIVERS
6175
6176 </p>
6177 <p>/ MIDI_INSTRUMENTS
6178
6179 </p>
6180 </blockquote><p>
6181
6182 </p>
6183 <p>load_instr_args =
6184 </p>
6185 <blockquote class="text">
6186 <p>filename SP instrument_index SP sampler_channel
6187
6188 </p>
6189 <p>/ NON_MODAL SP filename SP instrument_index SP sampler_channel
6190
6191 </p>
6192 </blockquote><p>
6193
6194 </p>
6195 <p>load_engine_args =
6196 </p>
6197 <blockquote class="text">
6198 <p>engine_name SP sampler_channel
6199
6200 </p>
6201 </blockquote><p>
6202
6203 </p>
6204 <p>instr_load_mode =
6205 </p>
6206 <blockquote class="text">
6207 <p>ON_DEMAND
6208
6209 </p>
6210 <p>/ ON_DEMAND_HOLD
6211
6212 </p>
6213 <p>/ PERSISTENT
6214
6215 </p>
6216 </blockquote><p>
6217
6218 </p>
6219 <p>device_index =
6220 </p>
6221 <blockquote class="text">
6222 <p>number
6223
6224 </p>
6225 </blockquote><p>
6226
6227 </p>
6228 <p>audio_channel_index =
6229 </p>
6230 <blockquote class="text">
6231 <p>number
6232
6233 </p>
6234 </blockquote><p>
6235
6236 </p>
6237 <p>audio_output_type_name =
6238 </p>
6239 <blockquote class="text">
6240 <p>string
6241
6242 </p>
6243 </blockquote><p>
6244
6245 </p>
6246 <p>midi_input_port_index =
6247 </p>
6248 <blockquote class="text">
6249 <p>number
6250
6251 </p>
6252 </blockquote><p>
6253
6254 </p>
6255 <p>midi_input_channel_index =
6256 </p>
6257 <blockquote class="text">
6258 <p>number
6259
6260 </p>
6261 <p>/ ALL
6262
6263 </p>
6264 </blockquote><p>
6265
6266 </p>
6267 <p>midi_input_type_name =
6268 </p>
6269 <blockquote class="text">
6270 <p>string
6271
6272 </p>
6273 </blockquote><p>
6274
6275 </p>
6276 <p>midi_bank_msb =
6277 </p>
6278 <blockquote class="text">
6279 <p>number
6280
6281 </p>
6282 </blockquote><p>
6283
6284 </p>
6285 <p>midi_bank_lsb =
6286 </p>
6287 <blockquote class="text">
6288 <p>number
6289
6290 </p>
6291 </blockquote><p>
6292
6293 </p>
6294 <p>midi_prog =
6295 </p>
6296 <blockquote class="text">
6297 <p>number
6298
6299 </p>
6300 </blockquote><p>
6301
6302 </p>
6303 <p>volume_value =
6304 </p>
6305 <blockquote class="text">
6306 <p>dotnum
6307
6308 </p>
6309 <p>/ number
6310
6311 </p>
6312 </blockquote><p>
6313
6314 </p>
6315 <p>sampler_channel =
6316 </p>
6317 <blockquote class="text">
6318 <p>number
6319
6320 </p>
6321 </blockquote><p>
6322
6323 </p>
6324 <p>instrument_index =
6325 </p>
6326 <blockquote class="text">
6327 <p>number
6328
6329 </p>
6330 </blockquote><p>
6331
6332 </p>
6333 <p>engine_name =
6334 </p>
6335 <blockquote class="text">
6336 <p>string
6337
6338 </p>
6339 </blockquote><p>
6340
6341 </p>
6342 <p>filename =
6343 </p>
6344 <blockquote class="text">
6345 <p>stringval
6346
6347 </p>
6348 </blockquote><p>
6349
6350 </p>
6351 <p>entry_name =
6352 </p>
6353 <blockquote class="text">
6354 <p>stringval
6355
6356 </p>
6357 </blockquote><p>
6358
6359 </p>
6360 <p>param_val_list =
6361 </p>
6362 <blockquote class="text">
6363 <p>param_val
6364
6365 </p>
6366 <p>/ param_val_list','param_val
6367
6368 </p>
6369 </blockquote><p>
6370
6371 </p>
6372 <p>param_val =
6373 </p>
6374 <blockquote class="text">
6375 <p>string
6376
6377 </p>
6378 <p>/ stringval
6379
6380 </p>
6381 <p>/ number
6382
6383 </p>
6384 <p>/ dotnum
6385
6386 </p>
6387 </blockquote><p>
6388
6389 </p>
6390 <a name="events"></a><br /><hr />
6391 <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>
6392 <a name="rfc.section.8"></a><h3>8.&nbsp;Events</h3>
6393
6394 <p>This chapter will describe all currently defined events supported by LinuxSampler.
6395 </p>
6396 <a name="SUBSCRIBE CHANNEL"></a><br /><hr />
6397 <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>
6398 <a name="rfc.section.8.1"></a><h3>8.1.&nbsp;Number of sampler channels changed</h3>
6399
6400 <p>Client may want to be notified when the total number of channels on the
6401 back-end changes by issuing the following command:
6402 </p>
6403 <p>
6404 </p>
6405 <blockquote class="text">
6406 <p>SUBSCRIBE CHANNEL_COUNT
6407 </p>
6408 </blockquote><p>
6409
6410 </p>
6411 <p>Server will start sending the following notification messages:
6412 </p>
6413 <p>
6414 </p>
6415 <blockquote class="text">
6416 <p>"NOTIFY:CHANNEL_COUNT:&lt;channels&gt;"
6417 </p>
6418 </blockquote><p>
6419
6420 </p>
6421 <p>where &lt;channels&gt; will be replaced by the new number
6422 of sampler channels.
6423 </p>
6424 <a name="SUBSCRIBE VOICE_COUNT"></a><br /><hr />
6425 <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>
6426 <a name="rfc.section.8.2"></a><h3>8.2.&nbsp;Number of active voices changed</h3>
6427
6428 <p>Client may want to be notified when the number of voices on the
6429 back-end changes by issuing the following command:
6430 </p>
6431 <p>
6432 </p>
6433 <blockquote class="text">
6434 <p>SUBSCRIBE VOICE_COUNT
6435 </p>
6436 </blockquote><p>
6437
6438 </p>
6439 <p>Server will start sending the following notification messages:
6440 </p>
6441 <p>
6442 </p>
6443 <blockquote class="text">
6444 <p>"NOTIFY:VOICE_COUNT:&lt;sampler-channel&gt; &lt;voices&gt;
6445 </p>
6446 </blockquote><p>
6447
6448 </p>
6449 <p>where &lt;sampler-channel&gt; will be replaced by the sampler channel the
6450 voice count change occurred and &lt;voices&gt; by the new number of
6451 active voices on that channel.
6452 </p>
6453 <a name="SUBSCRIBE STREAM_COUNT"></a><br /><hr />
6454 <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>
6455 <a name="rfc.section.8.3"></a><h3>8.3.&nbsp;Number of active disk streams changed</h3>
6456
6457 <p>Client may want to be notified when the number of streams on the back-end
6458 changes by issuing the following command: SUBSCRIBE STREAM_COUNT
6459 </p>
6460 <p>
6461 </p>
6462 <blockquote class="text">
6463 <p>SUBSCRIBE STREAM_COUNT
6464 </p>
6465 </blockquote><p>
6466
6467 </p>
6468 <p>Server will start sending the following notification messages:
6469 </p>
6470 <p>
6471 </p>
6472 <blockquote class="text">
6473 <p>"NOTIFY:STREAM_COUNT:&lt;sampler-channel&gt; &lt;streams&gt;"
6474 </p>
6475 </blockquote><p>
6476
6477 </p>
6478 <p>where &lt;sampler-channel&gt; will be replaced by the sampler channel the
6479 stream count change occurred and &lt;streams&gt; by the new number of
6480 active disk streams on that channel.
6481 </p>
6482 <a name="SUBSCRIBE BUFFER_FILL"></a><br /><hr />
6483 <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>
6484 <a name="rfc.section.8.4"></a><h3>8.4.&nbsp;Disk stream buffer fill state changed</h3>
6485
6486 <p>Client may want to be notified when the buffer fill state of a disk stream
6487 on the back-end changes by issuing the following command:
6488 </p>
6489 <p>
6490 </p>
6491 <blockquote class="text">
6492 <p>SUBSCRIBE BUFFER_FILL
6493 </p>
6494 </blockquote><p>
6495
6496 </p>
6497 <p>Server will start sending the following notification messages:
6498 </p>
6499 <p>
6500 </p>
6501 <blockquote class="text">
6502 <p>"NOTIFY:BUFFER_FILL:&lt;sampler-channel&gt; &lt;fill-data&gt;"
6503 </p>
6504 </blockquote><p>
6505
6506 </p>
6507 <p>where &lt;sampler-channel&gt; will be replaced by the sampler channel the
6508 buffer fill state change occurred on and &lt;fill-data&gt; will be replaced by the
6509 buffer fill data for this channel as described in <a class="info" href="#GET CHANNEL BUFFER_FILL">Section&nbsp;6.4.13<span> (</span><span class="info">Current fill state of disk stream buffers</span><span>)</span></a>
6510 as if the <a class="info" href="#GET CHANNEL BUFFER_FILL">"GET CHANNEL BUFFER_FILL PERCENTAGE"<span> (</span><span class="info">Current fill state of disk stream buffers</span><span>)</span></a> command was issued on this channel.
6511 </p>
6512 <a name="SUBSCRIBE INFO"></a><br /><hr />
6513 <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>
6514 <a name="rfc.section.8.5"></a><h3>8.5.&nbsp;Channel information changed</h3>
6515
6516 <p>Client may want to be notified when changes were made to sampler channels on the
6517 back-end by issuing the following command:
6518 </p>
6519 <p>
6520 </p>
6521 <blockquote class="text">
6522 <p>SUBSCRIBE CHANNEL_INFO
6523 </p>
6524 </blockquote><p>
6525
6526 </p>
6527 <p>Server will start sending the following notification messages:
6528 </p>
6529 <p>
6530 </p>
6531 <blockquote class="text">
6532 <p>"NOTIFY:CHANNEL_INFO:&lt;sampler-channel&gt;"
6533 </p>
6534 </blockquote><p>
6535
6536 </p>
6537 <p>where &lt;sampler-channel&gt; will be replaced by the sampler channel the
6538 channel info change occurred. The front-end will have to send
6539 the respective command to actually get the channel info. Because these messages
6540 will be triggered by LSCP commands issued by other clients rather than real
6541 time events happening on the server, it is believed that an empty notification
6542 message is sufficient here.
6543 </p>
6544 <a name="SUBSCRIBE TOTAL_VOICE_COUNT"></a><br /><hr />
6545 <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>
6546 <a name="rfc.section.8.6"></a><h3>8.6.&nbsp;Total number of active voices changed</h3>
6547
6548 <p>Client may want to be notified when the total number of voices on the
6549 back-end changes by issuing the following command:
6550 </p>
6551 <p>
6552 </p>
6553 <blockquote class="text">
6554 <p>SUBSCRIBE TOTAL_VOICE_COUNT
6555 </p>
6556 </blockquote><p>
6557
6558 </p>
6559 <p>Server will start sending the following notification messages:
6560 </p>
6561 <p>
6562 </p>
6563 <blockquote class="text">
6564 <p>"NOTIFY:TOTAL_VOICE_COUNT:&lt;voices&gt;
6565 </p>
6566 </blockquote><p>
6567
6568 </p>
6569 <p>where &lt;voices&gt; will be replaced by the new number of
6570 all currently active voices.
6571 </p>
6572 <a name="SUBSCRIBE MISCELLANEOUS"></a><br /><hr />
6573 <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>
6574 <a name="rfc.section.8.7"></a><h3>8.7.&nbsp;Miscellaneous and debugging events</h3>
6575
6576 <p>Client may want to be notified of miscellaneous and debugging events occurring at
6577 the server by issuing the following command:
6578 </p>
6579 <p>
6580 </p>
6581 <blockquote class="text">
6582 <p>SUBSCRIBE MISCELLANEOUS
6583 </p>
6584 </blockquote><p>
6585
6586 </p>
6587 <p>Server will start sending the following notification messages:
6588 </p>
6589 <p>
6590 </p>
6591 <blockquote class="text">
6592 <p>"NOTIFY:MISCELLANEOUS:&lt;string&gt;"
6593 </p>
6594 </blockquote><p>
6595
6596 </p>
6597 <p>where &lt;string&gt; will be replaced by whatever data server
6598 wants to send to the client. Client MAY display this data to the
6599 user AS IS to facilitate debugging.
6600 </p>
6601 <a name="anchor15"></a><br /><hr />
6602 <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>
6603 <a name="rfc.section.9"></a><h3>9.&nbsp;Security Considerations</h3>
6604
6605 <p>As there is so far no method of authentication and authorization
6606 defined and so not required for a client applications to succeed to
6607 connect, running LinuxSampler might be a security risk for the host
6608 system the LinuxSampler instance is running on.
6609 </p>
6610 <a name="anchor16"></a><br /><hr />
6611 <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>
6612 <a name="rfc.section.10"></a><h3>10.&nbsp;Acknowledgments</h3>
6613
6614 <p>This document has benefited greatly from the comments of the
6615 following people, discussed on the LinuxSampler developer's mailing
6616 list:
6617 </p>
6618 <p>
6619 </p>
6620 <blockquote class="text">
6621 <p>Rui Nuno Capela
6622 </p>
6623 <p>Vladimir Senkov
6624 </p>
6625 <p>Mark Knecht
6626 </p>
6627 <p>Grigor Iliev
6628 </p>
6629 </blockquote><p>
6630
6631 </p>
6632 <a name="rfc.references1"></a><br /><hr />
6633 <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>
6634 <h3>11.&nbsp;References</h3>
6635 <table width="99%" border="0">
6636 <tr><td class="author-text" valign="top"><a name="RFC2119">[RFC2119]</a></td>
6637 <td class="author-text">Bradner, S., &ldquo;<a href="ftp://ftp.isi.edu/in-notes/rfc2119.txt">Key words for use in RFCs to Indicate Requirement Levels</a>,&rdquo; RFC&nbsp;2119, 1997.</td></tr>
6638 <tr><td class="author-text" valign="top"><a name="RFC2234">[RFC2234]</a></td>
6639 <td class="author-text">Crocker, D. and P. Overell, &ldquo;<a href="ftp://ftp.isi.edu/in-notes/rfc2234.txt">Augmented BNF for Syntax Specifications</a>,&rdquo; RFC&nbsp;2234, 1997.</td></tr>
6640 <tr><td class="author-text" valign="top"><a name="RFC793">[RFC793]</a></td>
6641 <td class="author-text">Defense Advanced Research Projects Agency, &ldquo;<a href="ftp://ftp.isi.edu/in-notes/rfc793.txt">TRANSMISSION CONTROL PROTOCOL</a>,&rdquo; RFC&nbsp;793, 1981.</td></tr>
6642 </table>
6643
6644 <a name="rfc.authors"></a><br /><hr />
6645 <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>
6646 <h3>Author's Address</h3>
6647 <table width="99%" border="0" cellpadding="0" cellspacing="0">
6648 <tr><td class="author-text">&nbsp;</td>
6649 <td class="author-text">C.
6650 Schoenebeck</td></tr>
6651 <tr><td class="author-text">&nbsp;</td>
6652 <td class="author-text">Interessengemeinschaft Software Engineering e. V.</td></tr>
6653 <tr><td class="author-text">&nbsp;</td>
6654 <td class="author-text">Max-Planck-Str. 39</td></tr>
6655 <tr><td class="author-text">&nbsp;</td>
6656 <td class="author-text">74081 Heilbronn</td></tr>
6657 <tr><td class="author-text">&nbsp;</td>
6658 <td class="author-text">Germany</td></tr>
6659 <tr><td class="author" align="right">Email:&nbsp;</td>
6660 <td class="author-text"><a href="mailto:schoenebeck at software minus engineering dot org">schoenebeck at software minus engineering dot org</a></td></tr>
6661 </table>
6662 <a name="rfc.copyright"></a><br /><hr />
6663 <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>
6664 <h3>Intellectual Property Statement</h3>
6665 <p class='copyright'>
6666 The IETF takes no position regarding the validity or scope of
6667 any intellectual property or other rights that might be claimed
6668 to pertain to the implementation or use of the technology
6669 described in this document or the extent to which any license
6670 under such rights might or might not be available; neither does
6671 it represent that it has made any effort to identify any such
6672 rights. Information on the IETF's procedures with respect to
6673 rights in standards-track and standards-related documentation
6674 can be found in BCP&nbsp;11. Copies of claims of rights made
6675 available for publication and any assurances of licenses to
6676 be made available, or the result of an attempt made
6677 to obtain a general license or permission for the use of such
6678 proprietary rights by implementors or users of this
6679 specification can be obtained from the IETF Secretariat.</p>
6680 <p class='copyright'>
6681 The IETF invites any interested party to bring to its
6682 attention any copyrights, patents or patent applications, or
6683 other proprietary rights which may cover technology that may be
6684 required to practice this standard. Please address the
6685 information to the IETF Executive Director.</p>
6686 <h3>Full Copyright Statement</h3>
6687 <p class='copyright'>
6688 Copyright &copy; The Internet Society (2006). All Rights Reserved.</p>
6689 <p class='copyright'>
6690 This document and translations of it may be copied and furnished to
6691 others, and derivative works that comment on or otherwise explain it
6692 or assist in its implementation may be prepared, copied, published and
6693 distributed, in whole or in part, without restriction of any kind,
6694 provided that the above copyright notice and this paragraph are
6695 included on all such copies and derivative works. However, this
6696 document itself may not be modified in any way, such as by removing
6697 the copyright notice or references to the Internet Society or other
6698 Internet organizations, except as needed for the purpose of
6699 developing Internet standards in which case the procedures for
6700 copyrights defined in the Internet Standards process must be
6701 followed, or as required to translate it into languages other than
6702 English.</p>
6703 <p class='copyright'>
6704 The limited permissions granted above are perpetual and will not be
6705 revoked by the Internet Society or its successors or assignees.</p>
6706 <p class='copyright'>
6707 This document and the information contained herein is provided on an
6708 &ldquo;AS IS&rdquo; basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
6709 TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
6710 BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
6711 HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
6712 MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.</p>
6713 <h3>Acknowledgment</h3>
6714 <p class='copyright'>
6715 Funding for the RFC Editor function is currently provided by the
6716 Internet Society.</p>
6717 </body></html>

  ViewVC Help
Powered by ViewVC