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

  ViewVC Help
Powered by ViewVC