/[svn]/linuxsampler/trunk/Documentation/lscp.xml
ViewVC logotype

Annotation of /linuxsampler/trunk/Documentation/lscp.xml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 571 - (hide annotations) (download) (as text)
Mon May 23 17:41:34 2005 UTC (18 years, 10 months ago) by schoenebeck
File MIME type: text/xml
File size: 186517 byte(s)
- added some crosslinks (patch by Grigor Iliev)
- added section "Versioning of this specification"
- added field "PROTOCOL_VERSION" to command "GET SERVER INFO"
- minor cleanup

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

  ViewVC Help
Powered by ViewVC