/[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 1006 - (show annotations) (download) (as text)
Fri Dec 29 20:27:15 2006 UTC (17 years, 3 months ago) by schoenebeck
File MIME type: text/html
File size: 288317 byte(s)
- added two new LSCP commands for altering global volume
  at runtime

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

  ViewVC Help
Powered by ViewVC