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