/[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 992 - (show annotations) (download) (as text)
Wed Dec 20 19:52:00 2006 UTC (17 years, 4 months ago) by iliev
File MIME type: text/html
File size: 266513 byte(s)
www.linuxsampler.org/api/draft-linuxsampler-protocol.txt

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

  ViewVC Help
Powered by ViewVC