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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 937 - (hide annotations) (download) (as text)
Fri Nov 24 17:43:09 2006 UTC (17 years, 4 months ago) by schoenebeck
File MIME type: text/xml
File size: 202175 byte(s)
* preparations for release 0.4.0

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 schoenebeck 705 <rfc category="std" ipr="full2026" docName="LSCP 1.1">
17 schoenebeck 151 <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 937 <date month="November" year="2006"/>
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 schoenebeck 573 following rules:
134 schoenebeck 571 </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 schoenebeck 573 <section title="Description for control commands" anchor="control_commands">
467 schoenebeck 151 <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 iliev 706 <t>MUTE -
2560     <list>
2561     <t>Determines whether the channel is muted, "true" if the
2562 schoenebeck 709 channel is muted, "false" if the channel is not muted, and
2563     "MUTED_BY_SOLO" if the channel is muted because of the
2564     presence of a solo channel and will be unmuted when
2565 iliev 706 there are no solo channels left</t>
2566     </list>
2567     </t>
2568     <t>SOLO -
2569     <list>
2570     <t>Determines whether this is a solo channel, "true" if
2571     the channel is a solo channel; "false" otherwise</t>
2572     </list>
2573     </t>
2574 schoenebeck 151 </list>
2575     </t>
2576     </list>
2577     </t>
2578     <t>The mentioned fields above don't have to be in particular order.</t>
2579    
2580     <t>Example:</t>
2581     <t>
2582     <list>
2583     <t>C: "GET CHANNEL INFO 34"</t>
2584     <t>S: "ENGINE_NAME: GigEngine"</t>
2585     <t>&nbsp;&nbsp;&nbsp;"VOLUME: 1.0"</t>
2586     <t>&nbsp;&nbsp;&nbsp;"AUDIO_OUTPUT_DEVICE: 0"</t>
2587     <t>&nbsp;&nbsp;&nbsp;"AUDIO_OUTPUT_CHANNELS: 2"</t>
2588     <t>&nbsp;&nbsp;&nbsp;"AUDIO_OUTPUT_ROUTING: 0,1"</t>
2589     <t>&nbsp;&nbsp;&nbsp;"INSTRUMENT_FILE: /home/joe/FazioliPiano.gig"</t>
2590     <t>&nbsp;&nbsp;&nbsp;"INSTRUMENT_NR: 0"</t>
2591 senkov 377 <t>&nbsp;&nbsp;&nbsp;"INSTRUMENT_NAME: Fazioli Piano"</t>
2592 schoenebeck 151 <t>&nbsp;&nbsp;&nbsp;"INSTRUMENT_STATUS: 100"</t>
2593     <t>&nbsp;&nbsp;&nbsp;"MIDI_INPUT_DEVICE: 0"</t>
2594     <t>&nbsp;&nbsp;&nbsp;"MIDI_INPUT_PORT: 0"</t>
2595     <t>&nbsp;&nbsp;&nbsp;"MIDI_INPUT_CHANNEL: 5"</t>
2596     <t>&nbsp;&nbsp;&nbsp;"."</t>
2597     </list>
2598     </t>
2599     </section>
2600    
2601 schoenebeck 534 <section title="Current number of active voices" anchor="GET CHANNEL VOICE_COUNT">
2602 schoenebeck 151 <t>The front-end can ask for the current number of active voices on a
2603     sampler channel by sending the following command:</t>
2604     <t>
2605     <list>
2606 schoenebeck 206 <t>GET CHANNEL VOICE_COUNT &lt;sampler-channel&gt;</t>
2607 schoenebeck 151 </list>
2608     </t>
2609 schoenebeck 571 <t>Where &lt;sampler-channel&gt; is the sampler channel number the front-end is interested in
2610     as returned by the <xref target="ADD CHANNEL">"ADD CHANNEL"</xref>
2611     or <xref target="LIST CHANNELS">"LIST CHANNELS"</xref> command.</t>
2612 schoenebeck 206
2613 schoenebeck 151 <t>Possible Answers:</t>
2614     <t>
2615     <list>
2616     <t>LinuxSampler will answer by returning the number of active
2617     voices on that channel.</t>
2618     </list>
2619     </t>
2620     <t>Example:</t>
2621     <t>
2622     <list>
2623     <t></t>
2624     </list>
2625     </t>
2626     </section>
2627    
2628 schoenebeck 534 <section title="Current number of active disk streams" anchor="GET CHANNEL STREAM_COUNT">
2629 schoenebeck 151 <t>The front-end can ask for the current number of active disk streams
2630     on a sampler channel by sending the following command:</t>
2631     <t>
2632     <list>
2633     <t>GET CHANNEL STREAM_COUNT &lt;sampler-channel&gt;</t>
2634     </list>
2635     </t>
2636 schoenebeck 571 <t>Where &lt;sampler-channel&gt; is the sampler channel number the front-end is interested in
2637     as returned by the <xref target="ADD CHANNEL">"ADD CHANNEL"</xref>
2638     or <xref target="LIST CHANNELS">"LIST CHANNELS"</xref> command.</t>
2639 schoenebeck 151
2640     <t>Possible Answers:</t>
2641     <t>
2642     <list>
2643     <t>LinuxSampler will answer by returning the number of active
2644     disk streams on that channel in case the engine supports disk
2645     streaming, if the engine doesn't support disk streaming it will
2646     return "NA" for not available.</t>
2647     </list>
2648     </t>
2649     <t>Example:</t>
2650     <t>
2651     <list>
2652     <t></t>
2653     </list>
2654     </t>
2655     </section>
2656    
2657 schoenebeck 534 <section title="Current fill state of disk stream buffers" anchor="GET CHANNEL BUFFER_FILL">
2658 schoenebeck 151 <t>The front-end can ask for the current fill state of all disk streams
2659     on a sampler channel by sending the following command:</t>
2660     <t>
2661     <list>
2662     <t>GET CHANNEL BUFFER_FILL BYTES &lt;sampler-channel&gt;</t>
2663     </list>
2664     </t>
2665     <t>to get the fill state in bytes or</t>
2666     <t>
2667     <list>
2668     <t>GET CHANNEL BUFFER_FILL PERCENTAGE &lt;sampler-channel&gt;</t>
2669     </list>
2670     </t>
2671     <t>to get the fill state in percent, where &lt;sampler-channel&gt; is the
2672 schoenebeck 571 sampler channel number the front-end is interested in
2673     as returned by the <xref target="ADD CHANNEL">"ADD CHANNEL"</xref>
2674     or <xref target="LIST CHANNELS">"LIST CHANNELS"</xref> command.</t>
2675 schoenebeck 151
2676     <t>Possible Answers:</t>
2677     <t>
2678     <list>
2679     <t>LinuxSampler will either answer by returning a comma separated
2680     string with the fill state of all disk stream buffers on that
2681     channel or an empty line if there are no active disk streams or
2682     "NA" for *not available* in case the engine which is deployed
2683     doesn't support disk streaming. Each entry in the answer list
2684     will begin with the stream's ID in brackets followed by the
2685     numerical representation of the fill size (either in bytes or
2686     percentage). Note: due to efficiency reasons the fill states in
2687     the response are not in particular order, thus the front-end has
2688     to sort them by itself if necessary.</t>
2689     </list>
2690     </t>
2691     <t>Examples:</t>
2692     <t>
2693     <list>
2694     <t>C: "GET CHANNEL BUFFER_FILL BYTES 4"</t>
2695     <t>S: "[115]420500,[116]510300,[75]110000,[120]230700"</t>
2696     </list>
2697    
2698     <list>
2699     <t>C: "GET CHANNEL BUFFER_FILL PERCENTAGE 4"</t>
2700     <t>S: "[115]90%,[116]98%,[75]40%,[120]62%"</t>
2701     </list>
2702    
2703     <list>
2704     <t>C: "GET CHANNEL BUFFER_FILL PERCENTAGE 4"</t>
2705     <t>S: ""</t>
2706     </list>
2707     </t>
2708     </section>
2709    
2710 schoenebeck 534 <section title="Setting audio output device" anchor="SET CHANNEL AUDIO_OUTPUT_DEVICE">
2711 schoenebeck 151 <t>The front-end can set the audio output device on a specific sampler
2712     channel by sending the following command:</t>
2713     <t>
2714     <list>
2715     <t>SET CHANNEL AUDIO_OUTPUT_DEVICE &lt;sampler-channel&gt; &lt;audio-device-id&gt;</t>
2716     </list>
2717     </t>
2718 schoenebeck 571 <t>Where &lt;sampler-channel&gt; is the respective sampler channel
2719     number as returned by the <xref target="ADD CHANNEL">"ADD CHANNEL"</xref>
2720     or <xref target="LIST CHANNELS">"LIST CHANNELS"</xref> command and
2721     &lt;audio-device-id&gt; is the numerical ID of the audio output device as given by the
2722     <xref target="CREATE AUDIO_OUTPUT_DEVICE">"CREATE AUDIO_OUTPUT_DEVICE"</xref>
2723     or <xref target="LIST AUDIO_OUTPUT_DEVICES">"LIST AUDIO_OUTPUT_DEVICES"</xref>
2724     command.</t>
2725 schoenebeck 151
2726     <t>Possible Answers:</t>
2727     <t>
2728     <list>
2729     <t>"OK" -
2730     <list>
2731     <t>on success</t>
2732     </list>
2733     </t>
2734     <t>"WRN:&lt;warning-code&gt;:&lt;warning-message&gt;" -
2735     <list>
2736     <t>if audio output device was set, but there are noteworthy
2737     issue(s) related, providing an appropriate warning code and
2738     warning message</t>
2739     </list>
2740     </t>
2741     <t>"ERR:&lt;error-code&gt;:&lt;error-message&gt;" -
2742     <list>
2743     <t>in case it failed, providing an appropriate error code and error message</t>
2744     </list>
2745     </t>
2746     </list>
2747     </t>
2748     <t>Examples:</t>
2749     <t>
2750     <list>
2751     <t></t>
2752     </list>
2753     </t>
2754     </section>
2755    
2756 schoenebeck 534 <section title="Setting audio output type" anchor="SET CHANNEL AUDIO_OUTPUT_TYP">
2757 schoenebeck 151 <t>DEPRECATED: THIS COMMAND WILL DISAPPEAR SOON!</t>
2758    
2759     <t>The front-end can alter the audio output type on a specific sampler
2760     channel by sending the following command:</t>
2761     <t>
2762     <list>
2763     <t>SET CHANNEL AUDIO_OUTPUT_TYPE &lt;sampler-channel&gt; &lt;audio-output-type&gt;</t>
2764     </list>
2765     </t>
2766 schoenebeck 222 <t>Where &lt;audio-output-type&gt; is currently either "ALSA" or "JACK" and
2767 schoenebeck 151 &lt;sampler-channel&gt; is the respective sampler channel number.</t>
2768    
2769     <t>Possible Answers:</t>
2770     <t>
2771     <list>
2772     <t>"OK" -
2773     <list>
2774     <t>on success</t>
2775     </list>
2776     </t>
2777     <t>"WRN:&lt;warning-code&gt;:&lt;warning-message&gt;" -
2778     <list>
2779     <t>if audio output type was set, but there are noteworthy
2780     issue(s) related, providing an appropriate warning code and
2781     warning message</t>
2782     </list>
2783     </t>
2784     <t>"ERR:&lt;error-code&gt;:&lt;error-message&gt;" -
2785     <list>
2786     <t>in case it failed, providing an appropriate error code and error message</t>
2787     </list>
2788     </t>
2789     </list>
2790     </t>
2791     <t>Examples:</t>
2792     <t>
2793     <list>
2794     <t></t>
2795     </list>
2796     </t>
2797     </section>
2798    
2799 schoenebeck 534 <section title="Setting audio output channel" anchor="SET CHANNEL AUDIO_OUTPUT_CHANNEL">
2800 schoenebeck 151 <t>The front-end can alter the audio output channel on a specific
2801     sampler channel by sending the following command:</t>
2802     <t>
2803     <list>
2804     <t>SET CHANNEL AUDIO_OUTPUT_CHANNEL &lt;sampler-chan&gt; &lt;audio-out&gt; &lt;audio-in&gt;</t>
2805     </list>
2806     </t>
2807 schoenebeck 571 <t>Where &lt;sampler-chan&gt; is the sampler channel number
2808     as returned by the <xref target="ADD CHANNEL">"ADD CHANNEL"</xref>
2809     or <xref target="LIST CHANNELS">"LIST CHANNELS"</xref> command, &lt;audio-out&gt; is the
2810 schoenebeck 499 numerical ID of the sampler channel's audio output channel which should be
2811     rerouted and &lt;audio-in&gt; is the numerical ID of the audio channel of the selected audio
2812 schoenebeck 151 output device where &lt;audio-out&gt; should be routed to.</t>
2813    
2814     <t>Possible Answers:</t>
2815     <t>
2816     <list>
2817     <t>"OK" -
2818     <list>
2819     <t>on success</t>
2820     </list>
2821     </t>
2822     <t>"WRN:&lt;warning-code&gt;:&lt;warning-message&gt;" -
2823     <list>
2824     <t>if audio output channel was set, but there are noteworthy
2825     issue(s) related, providing an appropriate warning code and
2826     warning message</t>
2827     </list>
2828     </t>
2829     <t>"ERR:&lt;error-code&gt;:&lt;error-message&gt;" -
2830     <list>
2831     <t>in case it failed, providing an appropriate error code and error message</t>
2832     </list>
2833     </t>
2834     </list>
2835     </t>
2836     <t>Examples:</t>
2837     <t>
2838     <list>
2839     <t></t>
2840     </list>
2841     </t>
2842     </section>
2843    
2844 schoenebeck 534 <section title="Setting MIDI input device" anchor="SET CHANNEL MIDI_INPUT_DEVICE">
2845 schoenebeck 151 <t>The front-end can set the MIDI input device on a specific sampler
2846     channel by sending the following command:</t>
2847     <t>
2848     <list>
2849     <t>SET CHANNEL MIDI_INPUT_DEVICE &lt;sampler-channel&gt; &lt;midi-device-id&gt;</t>
2850     </list>
2851     </t>
2852 schoenebeck 571 <t>Where &lt;sampler-channel&gt; is the sampler channel number
2853     as returned by the <xref target="ADD CHANNEL">"ADD CHANNEL"</xref>
2854     or <xref target="LIST CHANNELS">"LIST CHANNELS"</xref> command
2855     and &lt;midi-device-id&gt; is the numerical ID of the MIDI input device as returned by the
2856     <xref target="CREATE MIDI_INPUT_DEVICE">"CREATE MIDI_INPUT_DEVICE"</xref>
2857     or <xref target="LIST MIDI_INPUT_DEVICES">"LIST MIDI_INPUT_DEVICES"</xref> command.</t>
2858 schoenebeck 151
2859     <t>Possible Answers:</t>
2860     <t>
2861     <list>
2862     <t>"OK" -
2863     <list>
2864     <t>on success</t>
2865     </list>
2866     </t>
2867     <t>"WRN:&lt;warning-code&gt;:&lt;warning-message&gt;" -
2868     <list>
2869     <t>if MIDI input device was set, but there are noteworthy
2870     issue(s) related, providing an appropriate warning code and
2871     warning message</t>
2872     </list>
2873     </t>
2874     <t>"ERR:&lt;error-code&gt;:&lt;error-message&gt;" -
2875     <list>
2876     <t>in case it failed, providing an appropriate error code and error message</t>
2877     </list>
2878     </t>
2879     </list>
2880     </t>
2881     <t>Examples:</t>
2882     <t>
2883     <list>
2884     <t></t>
2885     </list>
2886     </t>
2887     </section>
2888    
2889 schoenebeck 534 <section title="Setting MIDI input type" anchor="SET CHANNEL MIDI_INPUT_TYPE">
2890 schoenebeck 151 <t>DEPRECATED: THIS COMMAND WILL DISAPPEAR SOON!</t>
2891    
2892     <t>The front-end can alter the MIDI input type on a specific sampler
2893     channel by sending the following command:</t>
2894     <t>
2895     <list>
2896     <t>SET CHANNEL MIDI_INPUT_TYPE &lt;sampler-channel&gt; &lt;midi-input-type&gt;</t>
2897     </list>
2898     </t>
2899 schoenebeck 222 <t>Where &lt;midi-input-type&gt; is currently only "ALSA" and
2900 schoenebeck 151 &lt;sampler-channel&gt; is the respective sampler channel number.</t>
2901    
2902     <t>Possible Answers:</t>
2903     <t>
2904     <list>
2905     <t>"OK" -
2906     <list>
2907     <t>on success</t>
2908     </list>
2909     </t>
2910     <t>"WRN:&lt;warning-code&gt;:&lt;warning-message&gt;" -
2911     <list>
2912     <t>if MIDI input type was set, but there are noteworthy
2913     issue(s) related, providing an appropriate warning code and
2914     warning message</t>
2915     </list>
2916     </t>
2917     <t>"ERR:&lt;error-code&gt;:&lt;error-message&gt;" -
2918     <list>
2919     <t>in case it failed, providing an appropriate error code and error message</t>
2920     </list>
2921     </t>
2922     </list>
2923     </t>
2924     <t>Examples:</t>
2925     <t>
2926     <list>
2927     <t></t>
2928     </list>
2929     </t>
2930     </section>
2931    
2932 schoenebeck 534 <section title="Setting MIDI input port" anchor="SET CHANNEL MIDI_INPUT_PORT">
2933 schoenebeck 499 <t>The front-end can alter the MIDI input port on a specific sampler
2934 schoenebeck 151 channel by sending the following command:</t>
2935     <t>
2936     <list>
2937     <t>SET CHANNEL MIDI_INPUT_PORT &lt;sampler-channel&gt; &lt;midi-input-port&gt;</t>
2938     </list>
2939     </t>
2940     <t>Where &lt;midi-input-port&gt; is a MIDI input port number of the
2941     MIDI input device connected to the sampler channel given by
2942     &lt;sampler-channel&gt;.</t>
2943    
2944     <t>Possible Answers:</t>
2945     <t>
2946     <list>
2947     <t>"OK" -
2948     <list>
2949     <t>on success</t>
2950     </list>
2951     </t>
2952     <t>"WRN:&lt;warning-code&gt;:&lt;warning-message&gt;" -
2953     <list>
2954     <t>if MIDI input port was set, but there are noteworthy
2955     issue(s) related, providing an appropriate warning code and
2956     warning message</t>
2957     </list>
2958     </t>
2959     <t>"ERR:&lt;error-code&gt;:&lt;error-message&gt;" -
2960     <list>
2961 schoenebeck 561 <t>in case it failed, providing an appropriate error code and error message</t>
2962 schoenebeck 151 </list>
2963     </t>
2964     </list>
2965     </t>
2966     <t>Examples:</t>
2967     <t>
2968     <list>
2969     <t></t>
2970     </list>
2971     </t>
2972     </section>
2973    
2974 schoenebeck 534 <section title="Setting MIDI input channel" anchor="SET CHANNEL MIDI_INPUT_CHANNEL">
2975 schoenebeck 151 <t>The front-end can alter the MIDI channel a sampler channel should
2976     listen to by sending the following command:</t>
2977     <t>
2978     <list>
2979     <t>SET CHANNEL MIDI_INPUT_CHANNEL &lt;sampler-channel&gt; &lt;midi-input-chan&gt;</t>
2980     </list>
2981     </t>
2982 schoenebeck 499 <t>Where &lt;midi-input-chan&gt; is the number of the new MIDI input channel where
2983 schoenebeck 151 &lt;sampler-channel&gt; should listen to or "ALL" to listen on all 16 MIDI
2984     channels.</t>
2985    
2986     <t>Possible Answers:</t>
2987     <t>
2988     <list>
2989     <t>"OK" -
2990     <list>
2991     <t>on success</t>
2992     </list>
2993     </t>
2994     <t>"WRN:&lt;warning-code&gt;:&lt;warning-message&gt;" -
2995     <list>
2996     <t>if MIDI input channel was set, but there are noteworthy
2997     issue(s) related, providing an appropriate warning code and
2998     warning message</t>
2999     </list>
3000     </t>
3001     <t>"ERR:&lt;error-code&gt;:&lt;error-message&gt;" -
3002     <list>
3003     <t>in case it failed, providing an appropriate error code and error message</t>
3004     </list>
3005     </t>
3006     </list>
3007     </t>
3008     <t>Examples:</t>
3009     <t>
3010     <list>
3011     <t></t>
3012     </list>
3013     </t>
3014     </section>
3015    
3016 schoenebeck 534 <section title="Setting channel volume" anchor="SET CHANNEL VOLUME">
3017 schoenebeck 151 <t>The front-end can alter the volume of a sampler channel by sending
3018     the following command:</t>
3019     <t>
3020     <list>
3021     <t>SET CHANNEL VOLUME &lt;sampler-channel&gt; &lt;volume&gt;</t>
3022     </list>
3023     </t>
3024     <t>Where &lt;volume&gt; is an optionally dotted positive number (a value
3025     smaller than 1.0 means attenuation, whereas a value greater than
3026     1.0 means amplification) and &lt;sampler-channel&gt; defines the sampler
3027     channel where this volume factor should be set.</t>
3028    
3029     <t>Possible Answers:</t>
3030     <t>
3031     <list>
3032     <t>"OK" -
3033     <list>
3034     <t>on success</t>
3035     </list>
3036     </t>
3037     <t>"WRN:&lt;warning-code&gt;:&lt;warning-message&gt;" -
3038     <list>
3039     <t>if channel volume was set, but there are noteworthy
3040     issue(s) related, providing an appropriate warning code and
3041     warning message</t>
3042     </list>
3043     </t>
3044     <t>"ERR:&lt;error-code&gt;:&lt;error-message&gt;" -
3045     <list>
3046     <t>in case it failed, providing an appropriate error code and error message</t>
3047     </list>
3048     </t>
3049     </list>
3050     </t>
3051     <t>Examples:</t>
3052     <t>
3053     <list>
3054     <t></t>
3055     </list>
3056     </t>
3057     </section>
3058    
3059 iliev 706 <section title="Muting a sampler channel" anchor="SET CHANNEL MUTE">
3060     <t>The front-end can mute/unmute a specific sampler
3061     channel by sending the following command:</t>
3062     <t>
3063     <list>
3064     <t>SET CHANNEL MUTE &lt;sampler-channel&gt; &lt;mute&gt;</t>
3065     </list>
3066     </t>
3067     <t>Where &lt;sampler-channel&gt; is the respective sampler channel
3068     number as returned by the <xref target="ADD CHANNEL">"ADD CHANNEL"</xref>
3069     or <xref target="LIST CHANNELS">"LIST CHANNELS"</xref> command and
3070     &lt;mute&gt; should be replaced either by "1" to mute the channel or "0"
3071     to unmute the channel.</t>
3072    
3073     <t>Possible Answers:</t>
3074     <t>
3075     <list>
3076     <t>"OK" -
3077     <list>
3078     <t>on success</t>
3079     </list>
3080     </t>
3081     <t>"WRN:&lt;warning-code&gt;:&lt;warning-message&gt;" -
3082     <list>
3083     <t>if the channel was muted/unmuted, but there are noteworthy
3084     issue(s) related, providing an appropriate warning code and
3085     warning message</t>
3086     </list>
3087     </t>
3088     <t>"ERR:&lt;error-code&gt;:&lt;error-message&gt;" -
3089     <list>
3090     <t>in case it failed, providing an appropriate error code and error message</t>
3091     </list>
3092     </t>
3093     </list>
3094     </t>
3095     <t>Examples:</t>
3096     <t>
3097     <list>
3098     <t></t>
3099     </list>
3100     </t>
3101     </section>
3102    
3103     <section title="Soloing a sampler channel" anchor="SET CHANNEL SOLO">
3104     <t>The front-end can solo/unsolo a specific sampler channel
3105     by sending the following command:</t>
3106     <t>
3107     <list>
3108     <t>SET CHANNEL SOLO &lt;sampler-channel&gt; &lt;solo&gt;</t>
3109     </list>
3110     </t>
3111     <t>Where &lt;sampler-channel&gt; is the respective sampler channel
3112     number as returned by the <xref target="ADD CHANNEL">"ADD CHANNEL"</xref>
3113     or <xref target="LIST CHANNELS">"LIST CHANNELS"</xref> command and
3114     &lt;solo&gt; should be replaced either by "1" to solo the channel or "0"
3115     to unsolo the channel.</t>
3116    
3117     <t>Possible Answers:</t>
3118     <t>
3119     <list>
3120     <t>"OK" -
3121     <list>
3122     <t>on success</t>
3123     </list>
3124     </t>
3125     <t>"WRN:&lt;warning-code&gt;:&lt;warning-message&gt;" -
3126     <list>
3127     <t>if the channel was soloed/unsoloed, but there are noteworthy
3128     issue(s) related, providing an appropriate warning code and
3129     warning message</t>
3130     </list>
3131     </t>
3132     <t>"ERR:&lt;error-code&gt;:&lt;error-message&gt;" -
3133     <list>
3134     <t>in case it failed, providing an appropriate error code and error message</t>
3135     </list>
3136     </t>
3137     </list>
3138     </t>
3139     <t>Examples:</t>
3140     <t>
3141     <list>
3142     <t></t>
3143     </list>
3144     </t>
3145     </section>
3146    
3147 schoenebeck 534 <section title="Resetting a sampler channel" anchor="RESET CHANNEL">
3148 schoenebeck 151 <t>The front-end can reset a particular sampler channel by sending the following command:</t>
3149     <t>
3150     <list>
3151     <t>RESET CHANNEL &lt;sampler-channel&gt;</t>
3152     </list>
3153     </t>
3154     <t>
3155     Where &lt;sampler-channel&gt; defines the sampler channel to be reset.
3156     This will cause the engine on that sampler channel, its voices and
3157     eventually disk streams and all control and status variables to be
3158     reset.</t>
3159    
3160     <t>Possible Answers:</t>
3161     <t>
3162     <list>
3163     <t>"OK" -
3164     <list>
3165     <t>on success</t>
3166     </list>
3167     </t>
3168     <t>"WRN:&lt;warning-code&gt;:&lt;warning-message&gt;" -
3169     <list>
3170     <t>if channel was reset, but there are noteworthy issue(s)
3171     related, providing an appropriate warning code and warning
3172     message</t>
3173     </list>
3174     </t>
3175     <t>"ERR:&lt;error-code&gt;:&lt;error-message&gt;" -
3176     <list>
3177     <t>in case it failed, providing an appropriate error code and
3178     error message</t>
3179     </list>
3180     </t>
3181     </list>
3182     </t>
3183     <t>Examples:</t>
3184     <t>
3185     <list>
3186     <t></t>
3187     </list>
3188     </t>
3189     </section>
3190     </section>
3191    
3192     <section title="Controlling connection">
3193     <t>The following commands are used to control the connection to LinuxSampler.</t>
3194    
3195 schoenebeck 534 <section title="Register front-end for receiving event messages" anchor="SUBSCRIBE">
3196 schoenebeck 151 <t>The front-end can register itself to the LinuxSampler application to
3197     be informed about noteworthy events by sending this command:</t>
3198     <t>
3199     <list>
3200     <t>SUBSCRIBE &lt;event-id&gt;</t>
3201     </list>
3202     </t>
3203     <t>where &lt;event-id&gt; will be replaced by the respective event that
3204     client wants to subscribe to.</t>
3205    
3206     <t>Possible Answers:</t>
3207     <t>
3208     <list>
3209     <t>"OK" -
3210     <list>
3211     <t>on success</t>
3212     </list>
3213     </t>
3214     <t>"WRN:&lt;warning-code&gt;:&lt;warning-message&gt;" -
3215     <list>
3216     <t>if registration succeeded, but there are noteworthy
3217     issue(s) related, providing an appropriate warning code and
3218     warning message</t>
3219     </list>
3220     </t>
3221     <t>"ERR:&lt;error-code&gt;:&lt;error-message&gt;" -
3222     <list>
3223     <t>in case it failed, providing an appropriate error code and
3224     error message</t>
3225     </list>
3226     </t>
3227     </list>
3228     </t>
3229     <t>Examples:</t>
3230     <t>
3231     <list>
3232     <t></t>
3233     </list>
3234     </t>
3235     </section>
3236    
3237 schoenebeck 534 <section title="Unregister front-end for not receiving event messages" anchor="UNSUBSCRIBE">
3238 schoenebeck 151 <t>The front-end can unregister itself if it doesn't want to receive event
3239     messages anymore by sending the following command:</t>
3240     <t>
3241     <list>
3242     <t>UNSUBSCRIBE &lt;event-id&gt;</t>
3243     </list>
3244     </t>
3245     <t>Where &lt;event-id&gt; will be replaced by the respective event that
3246     client doesn't want to receive anymore.</t>
3247    
3248     <t>Possible Answers:</t>
3249     <t>
3250     <list>
3251     <t>"OK" -
3252     <list>
3253     <t>on success</t>
3254     </list>
3255     </t>
3256     <t>"WRN:&lt;warning-code&gt;:&lt;warning-message&gt;" -
3257     <list>
3258     <t>if unregistration succeeded, but there are noteworthy
3259     issue(s) related, providing an appropriate warning code and
3260     warning message</t>
3261     </list>
3262     </t>
3263     <t>"ERR:&lt;error-code&gt;:&lt;error-message&gt;" -
3264     <list>
3265     <t>in case it failed, providing an appropriate error code and
3266     error message</t>
3267     </list>
3268     </t>
3269     </list>
3270     </t>
3271     <t>Examples:</t>
3272     <t>
3273     <list>
3274     <t></t>
3275     </list>
3276     </t>
3277     </section>
3278    
3279 schoenebeck 534 <section title="Enable or disable echo of commands" anchor="SET ECHO">
3280 schoenebeck 151 <t>To enable or disable back sending of commands to the client the following command can be used:</t>
3281     <t>
3282     <list>
3283     <t>SET ECHO &lt;value&gt;</t>
3284     </list>
3285     </t>
3286     <t>Where &lt;value&gt; should be replaced either by "1" to enable echo mode
3287     or "0" to disable echo mode. When echo mode is enabled, all
3288     commands send to LinuxSampler will be immediately send back and
3289     after this echo the actual response to the command will be
3290     returned. Echo mode will only be altered for the client connection
3291     that issued the "SET ECHO" command, not globally for all client
3292     connections.</t>
3293    
3294     <t>Possible Answers:</t>
3295     <t>
3296     <list>
3297     <t>"OK" -
3298     <list>
3299     <t>usually</t>
3300     </list>
3301     </t>
3302     <t>"ERR:&lt;error-code&gt;:&lt;error-message&gt;" -
3303     <list>
3304     <t>on syntax error, e.g. non boolean value</t>
3305     </list>
3306     </t>
3307     </list>
3308     </t>
3309     <t>Examples:</t>
3310     <t>
3311     <list>
3312     <t></t>
3313     </list>
3314     </t>
3315     </section>
3316    
3317 schoenebeck 534 <section title="Close client connection" anchor="QUIT">
3318 schoenebeck 151 <t>The client can close its network connection to LinuxSampler by sending the following command:</t>
3319     <t>
3320     <list>
3321     <t>QUIT</t>
3322     </list>
3323     </t>
3324     <t>This is probably more interesting for manual telnet connections to
3325     LinuxSampler than really useful for a front-end implementation.</t>
3326     </section>
3327     </section>
3328 schoenebeck 212
3329     <section title="Global commands">
3330     <t>The following commands have global impact on the sampler.</t>
3331    
3332 iliev 778 <section title="Current number of active voices" anchor="GET TOTAL_VOICE_COUNT">
3333     <t>The front-end can ask for the current number of active voices on
3334     the sampler by sending the following command:</t>
3335     <t>
3336     <list>
3337     <t>GET TOTAL_VOICE_COUNT</t>
3338     </list>
3339     </t>
3340    
3341     <t>Possible Answers:</t>
3342     <t>
3343     <list>
3344     <t>LinuxSampler will answer by returning the number of all active
3345     voices on the sampler.</t>
3346     </list>
3347     </t>
3348     </section>
3349    
3350     <section title="Maximum amount of active voices" anchor="GET TOTAL_VOICE_COUNT_MAX">
3351     <t>The front-end can ask for the maximum number of active voices
3352     by sending the following command:</t>
3353     <t>
3354     <list>
3355     <t>GET TOTAL_VOICE_COUNT_MAX</t>
3356     </list>
3357     </t>
3358    
3359     <t>Possible Answers:</t>
3360     <t>
3361     <list>
3362     <t>LinuxSampler will answer by returning the maximum number
3363     of active voices.</t>
3364     </list>
3365     </t>
3366     </section>
3367    
3368 schoenebeck 534 <section title="Reset sampler" anchor="RESET">
3369 schoenebeck 212 <t>The front-end can reset the whole sampler by sending the following command:</t>
3370     <t>
3371     <list>
3372     <t>RESET</t>
3373     </list>
3374     </t>
3375    
3376     <t>Possible Answers:</t>
3377     <t>
3378     <list>
3379     <t>"OK" -
3380     <list>
3381     <t>always</t>
3382     </list>
3383     </t>
3384     </list>
3385     </t>
3386     <t>Examples:</t>
3387     <t>
3388     <list>
3389     <t></t>
3390     </list>
3391     </t>
3392     </section>
3393 schoenebeck 571
3394     <section title="General sampler informations" anchor="GET SERVER INFO">
3395     <t>The client can ask for general informations about the LinuxSampler
3396     instance by sending the following command:</t>
3397     <t>
3398     <list>
3399     <t>GET SERVER INFO</t>
3400     </list>
3401     </t>
3402     <t>Possible Answers:</t>
3403     <t>
3404     <list>
3405     <t>LinuxSampler will answer by sending a &lt;CRLF&gt; separated list.
3406 schoenebeck 573 Each answer line begins with the information category name
3407 schoenebeck 571 followed by a colon and then a space character &lt;SP&gt; and finally
3408     the info character string to that information category. At the
3409     moment the following categories are defined:
3410     </t>
3411     <t>
3412     <list>
3413     <t>DESCRIPTION -
3414     <list>
3415     <t>arbitrary textual description about the sampler</t>
3416     </list>
3417     </t>
3418     <t>VERSION -
3419     <list>
3420     <t>version of the sampler</t>
3421     </list>
3422     </t>
3423     <t>PROTOCOL_VERSION -
3424     <list>
3425     <t>version of the LSCP specification the sampler
3426     complies with (see <xref target="LSCP versioning" /> for details)</t>
3427     </list>
3428     </t>
3429     </list>
3430     </t>
3431     </list>
3432     </t>
3433     <t>The mentioned fields above don't have to be in particular order.
3434     Other fields might be added in future.</t>
3435     </section>
3436 schoenebeck 212 </section>
3437 schoenebeck 151 </section>
3438    
3439 schoenebeck 534 <section title="Command Syntax" anchor="command_syntax">
3440 schoenebeck 573 <t>The grammar of the control protocol as descibed in <xref target="control_commands"/>
3441     is defined below using Backus-Naur Form (BNF as described in <xref target="RFC2234"/>)
3442     where applicable.
3443     </t>
3444     <!--
3445     This section is automatically generated by scripts/update_grammar.pl
3446     from src/network/lscp.y (yacc input file). Do not modify this section
3447     manually !
3448     -->
3449     <!-- GRAMMAR_BNF_BEGIN - do NOT delete or modify this line !!! -->
3450 schoenebeck 937
3451     <t>input =
3452     <list>
3453     <t>line LF
3454     </t>
3455     <t>/ line CR LF
3456     </t>
3457     </list>
3458     </t>
3459     <t>line =
3460     <list>
3461     <t>/* epsilon (empty line ignored) */
3462     </t>
3463     <t>/ comment
3464     </t>
3465     <t>/ command
3466     </t>
3467     <t>/ error
3468     </t>
3469     </list>
3470     </t>
3471     <t>comment =
3472     <list>
3473     <t>'#'
3474     </t>
3475     <t>/ comment '#'
3476     </t>
3477     <t>/ comment SP
3478     </t>
3479     <t>/ comment number
3480     </t>
3481     <t>/ comment string
3482     </t>
3483     </list>
3484     </t>
3485     <t>command =
3486     <list>
3487     <t>ADD SP CHANNEL
3488     </t>
3489     <t>/ GET SP get_instruction
3490     </t>
3491     <t>/ CREATE SP create_instruction
3492     </t>
3493     <t>/ DESTROY SP destroy_instruction
3494     </t>
3495     <t>/ LIST SP list_instruction
3496     </t>
3497     <t>/ LOAD SP load_instruction
3498     </t>
3499     <t>/ REMOVE SP CHANNEL SP sampler_channel
3500     </t>
3501     <t>/ SET SP set_instruction
3502     </t>
3503     <t>/ SUBSCRIBE SP subscribe_event
3504     </t>
3505     <t>/ UNSUBSCRIBE SP unsubscribe_event
3506     </t>
3507     <t>/ SELECT SP text
3508     </t>
3509     <t>/ RESET SP CHANNEL SP sampler_channel
3510     </t>
3511     <t>/ RESET
3512     </t>
3513     <t>/ QUIT
3514     </t>
3515     </list>
3516     </t>
3517     <t>subscribe_event =
3518     <list>
3519     <t>CHANNEL_COUNT
3520     </t>
3521     <t>/ VOICE_COUNT
3522     </t>
3523     <t>/ STREAM_COUNT
3524     </t>
3525     <t>/ BUFFER_FILL
3526     </t>
3527     <t>/ CHANNEL_INFO
3528     </t>
3529     <t>/ MISCELLANEOUS
3530     </t>
3531     <t>/ TOTAL_VOICE_COUNT
3532     </t>
3533     </list>
3534     </t>
3535     <t>unsubscribe_event =
3536     <list>
3537     <t>CHANNEL_COUNT
3538     </t>
3539     <t>/ VOICE_COUNT
3540     </t>
3541     <t>/ STREAM_COUNT
3542     </t>
3543     <t>/ BUFFER_FILL
3544     </t>
3545     <t>/ CHANNEL_INFO
3546     </t>
3547     <t>/ MISCELLANEOUS
3548     </t>
3549     <t>/ TOTAL_VOICE_COUNT
3550     </t>
3551     </list>
3552     </t>
3553     <t>get_instruction =
3554     <list>
3555     <t>AVAILABLE_ENGINES
3556     </t>
3557     <t>/ AVAILABLE_MIDI_INPUT_DRIVERS
3558     </t>
3559     <t>/ MIDI_INPUT_DRIVER SP INFO SP string
3560     </t>
3561     <t>/ MIDI_INPUT_DRIVER_PARAMETER SP INFO SP string SP string
3562     </t>
3563     <t>/ MIDI_INPUT_DRIVER_PARAMETER SP INFO SP string SP string SP key_val_list
3564     </t>
3565     <t>/ AVAILABLE_AUDIO_OUTPUT_DRIVERS
3566     </t>
3567     <t>/ AUDIO_OUTPUT_DRIVER SP INFO SP string
3568     </t>
3569     <t>/ AUDIO_OUTPUT_DRIVER_PARAMETER SP INFO SP string SP string
3570     </t>
3571     <t>/ AUDIO_OUTPUT_DRIVER_PARAMETER SP INFO SP string SP string SP key_val_list
3572     </t>
3573     <t>/ AUDIO_OUTPUT_DEVICES
3574     </t>
3575     <t>/ MIDI_INPUT_DEVICES
3576     </t>
3577     <t>/ AUDIO_OUTPUT_DEVICE SP INFO SP number
3578     </t>
3579     <t>/ MIDI_INPUT_DEVICE SP INFO SP number
3580     </t>
3581     <t>/ MIDI_INPUT_PORT SP INFO SP number SP number
3582     </t>
3583     <t>/ MIDI_INPUT_PORT_PARAMETER SP INFO SP number SP number SP string
3584     </t>
3585     <t>/ AUDIO_OUTPUT_CHANNEL SP INFO SP number SP number
3586     </t>
3587     <t>/ AUDIO_OUTPUT_CHANNEL_PARAMETER SP INFO SP number SP number SP string
3588     </t>
3589     <t>/ CHANNELS
3590     </t>
3591     <t>/ CHANNEL SP INFO SP sampler_channel
3592     </t>
3593     <t>/ CHANNEL SP BUFFER_FILL SP buffer_size_type SP sampler_channel
3594     </t>
3595     <t>/ CHANNEL SP STREAM_COUNT SP sampler_channel
3596     </t>
3597     <t>/ CHANNEL SP VOICE_COUNT SP sampler_channel
3598     </t>
3599     <t>/ ENGINE SP INFO SP engine_name
3600     </t>
3601     <t>/ SERVER SP INFO
3602     </t>
3603     <t>/ TOTAL_VOICE_COUNT
3604     </t>
3605     <t>/ TOTAL_VOICE_COUNT_MAX
3606     </t>
3607     </list>
3608     </t>
3609     <t>set_instruction =
3610     <list>
3611     <t>AUDIO_OUTPUT_DEVICE_PARAMETER SP number SP string '=' param_val_list
3612     </t>
3613     <t>/ AUDIO_OUTPUT_CHANNEL_PARAMETER SP number SP number SP string '=' param_val_list
3614     </t>
3615     <t>/ MIDI_INPUT_DEVICE_PARAMETER SP number SP string '=' param_val_list
3616     </t>
3617     <t>/ MIDI_INPUT_PORT_PARAMETER SP number SP number SP string '=' param_val_list
3618     </t>
3619     <t>/ CHANNEL SP set_chan_instruction
3620     </t>
3621     <t>/ ECHO SP boolean
3622     </t>
3623     </list>
3624     </t>
3625     <t>create_instruction =
3626     <list>
3627     <t>AUDIO_OUTPUT_DEVICE SP string SP key_val_list
3628     </t>
3629     <t>/ AUDIO_OUTPUT_DEVICE SP string
3630     </t>
3631     <t>/ MIDI_INPUT_DEVICE SP string SP key_val_list
3632     </t>
3633     <t>/ MIDI_INPUT_DEVICE SP string
3634     </t>
3635     </list>
3636     </t>
3637     <t>destroy_instruction =
3638     <list>
3639     <t>AUDIO_OUTPUT_DEVICE SP number
3640     </t>
3641     <t>/ MIDI_INPUT_DEVICE SP number
3642     </t>
3643     </list>
3644     </t>
3645     <t>load_instruction =
3646     <list>
3647     <t>INSTRUMENT SP load_instr_args
3648     </t>
3649     <t>/ ENGINE SP load_engine_args
3650     </t>
3651     </list>
3652     </t>
3653     <t>set_chan_instruction =
3654     <list>
3655     <t>AUDIO_OUTPUT_DEVICE SP sampler_channel SP device_index
3656     </t>
3657     <t>/ AUDIO_OUTPUT_CHANNEL SP sampler_channel SP audio_channel_index SP audio_channel_index
3658     </t>
3659     <t>/ AUDIO_OUTPUT_TYPE SP sampler_channel SP audio_output_type_name
3660     </t>
3661     <t>/ MIDI_INPUT SP sampler_channel SP device_index SP midi_input_port_index SP midi_input_channel_index
3662     </t>
3663     <t>/ MIDI_INPUT_DEVICE SP sampler_channel SP device_index
3664     </t>
3665     <t>/ MIDI_INPUT_PORT SP sampler_channel SP midi_input_port_index
3666     </t>
3667     <t>/ MIDI_INPUT_CHANNEL SP sampler_channel SP midi_input_channel_index
3668     </t>
3669     <t>/ MIDI_INPUT_TYPE SP sampler_channel SP midi_input_type_name
3670     </t>
3671     <t>/ VOLUME SP sampler_channel SP volume_value
3672     </t>
3673     <t>/ MUTE SP sampler_channel SP boolean
3674     </t>
3675     <t>/ SOLO SP sampler_channel SP boolean
3676     </t>
3677     </list>
3678     </t>
3679     <t>key_val_list =
3680     <list>
3681     <t>string '=' param_val_list
3682     </t>
3683     <t>/ key_val_list SP string '=' param_val_list
3684     </t>
3685     </list>
3686     </t>
3687     <t>buffer_size_type =
3688     <list>
3689     <t>BYTES
3690     </t>
3691     <t>/ PERCENTAGE
3692     </t>
3693     </list>
3694     </t>
3695     <t>list_instruction =
3696     <list>
3697     <t>AUDIO_OUTPUT_DEVICES
3698     </t>
3699     <t>/ MIDI_INPUT_DEVICES
3700     </t>
3701     <t>/ CHANNELS
3702     </t>
3703     <t>/ AVAILABLE_ENGINES
3704     </t>
3705     <t>/ AVAILABLE_MIDI_INPUT_DRIVERS
3706     </t>
3707     <t>/ AVAILABLE_AUDIO_OUTPUT_DRIVERS
3708     </t>
3709     </list>
3710     </t>
3711     <t>load_instr_args =
3712     <list>
3713     <t>filename SP instrument_index SP sampler_channel
3714     </t>
3715     <t>/ NON_MODAL SP filename SP instrument_index SP sampler_channel
3716     </t>
3717     </list>
3718     </t>
3719     <t>load_engine_args =
3720     <list>
3721     <t>engine_name SP sampler_channel
3722     </t>
3723     </list>
3724     </t>
3725     <t>device_index =
3726     <list>
3727     <t>number
3728     </t>
3729     </list>
3730     </t>
3731     <t>audio_channel_index =
3732     <list>
3733     <t>number
3734     </t>
3735     </list>
3736     </t>
3737     <t>audio_output_type_name =
3738     <list>
3739     <t>string
3740     </t>
3741     </list>
3742     </t>
3743     <t>midi_input_port_index =
3744     <list>
3745     <t>number
3746     </t>
3747     </list>
3748     </t>
3749     <t>midi_input_channel_index =
3750     <list>
3751     <t>number
3752     </t>
3753     <t>/ ALL
3754     </t>
3755     </list>
3756     </t>
3757     <t>midi_input_type_name =
3758     <list>
3759     <t>string
3760     </t>
3761     </list>
3762     </t>
3763     <t>volume_value =
3764     <list>
3765     <t>dotnum
3766     </t>
3767     <t>/ number
3768     </t>
3769     </list>
3770     </t>
3771     <t>sampler_channel =
3772     <list>
3773     <t>number
3774     </t>
3775     </list>
3776     </t>
3777     <t>instrument_index =
3778     <list>
3779     <t>number
3780     </t>
3781     </list>
3782     </t>
3783     <t>engine_name =
3784     <list>
3785     <t>string
3786     </t>
3787     </list>
3788     </t>
3789     <t>filename =
3790     <list>
3791     <t>stringval
3792     </t>
3793     </list>
3794     </t>
3795     <t>param_val_list =
3796     <list>
3797     <t>param_val
3798     </t>
3799     <t>/ param_val_list','param_val
3800     </t>
3801     </list>
3802     </t>
3803     <t>param_val =
3804     <list>
3805     <t>string
3806     </t>
3807     <t>/ stringval
3808     </t>
3809     <t>/ number
3810     </t>
3811     <t>/ dotnum
3812     </t>
3813     </list>
3814     </t>
3815    
3816 schoenebeck 573 <!-- GRAMMAR_BNF_END - do NOT delete or modify this line !!! -->
3817 schoenebeck 151 </section>
3818    
3819 schoenebeck 534 <section title="Events" anchor="events">
3820 schoenebeck 151 <t>This chapter will describe all currently defined events supported by LinuxSampler.</t>
3821    
3822 schoenebeck 534 <section title="Number of sampler channels changed" anchor="SUBSCRIBE CHANNEL">
3823 schoenebeck 151 <t>Client may want to be notified when the total number of channels on the
3824     back-end changes by issuing the following command:</t>
3825     <t>
3826     <list>
3827 schoenebeck 556 <t>SUBSCRIBE CHANNEL_COUNT</t>
3828 schoenebeck 151 </list>
3829     </t>
3830     <t>Server will start sending the following notification messages:</t>
3831     <t>
3832     <list>
3833 schoenebeck 556 <t>"NOTIFY:CHANNEL_COUNT:&lt;channels&gt;"</t>
3834 schoenebeck 151 </list>
3835     </t>
3836     <t>where &lt;channels&gt; will be replaced by the new number
3837     of sampler channels.</t>
3838     </section>
3839    
3840 schoenebeck 534 <section title="Number of active voices changed" anchor="SUBSCRIBE VOICE_COUNT">
3841 schoenebeck 151 <t>Client may want to be notified when the number of voices on the
3842     back-end changes by issuing the following command:</t>
3843     <t>
3844     <list>
3845     <t>SUBSCRIBE VOICE_COUNT</t>
3846     </list>
3847     </t>
3848     <t>Server will start sending the following notification messages:</t>
3849     <t>
3850     <list>
3851 schoenebeck 499 <t>"NOTIFY:VOICE_COUNT:&lt;sampler-channel&gt; &lt;voices&gt;</t>
3852 schoenebeck 151 </list>
3853     </t>
3854     <t>where &lt;sampler-channel&gt; will be replaced by the sampler channel the
3855 schoenebeck 499 voice count change occurred and &lt;voices&gt; by the new number of
3856 schoenebeck 151 active voices on that channel.</t>
3857     </section>
3858    
3859 schoenebeck 534 <section title="Number of active disk streams changed" anchor="SUBSCRIBE STREAM_COUNT">
3860 schoenebeck 151 <t>Client may want to be notified when the number of streams on the back-end
3861     changes by issuing the following command: SUBSCRIBE STREAM_COUNT</t>
3862     <t>
3863     <list>
3864     <t>SUBSCRIBE STREAM_COUNT</t>
3865     </list>
3866     </t>
3867     <t>Server will start sending the following notification messages:</t>
3868     <t>
3869     <list>
3870     <t>"NOTIFY:STREAM_COUNT:&lt;sampler-channel&gt; &lt;streams&gt;"</t>
3871     </list>
3872     </t>
3873     <t>where &lt;sampler-channel&gt; will be replaced by the sampler channel the
3874     stream count change occurred and &lt;streams&gt; by the new number of
3875     active disk streams on that channel.</t>
3876     </section>
3877    
3878 schoenebeck 534 <section title="Disk stream buffer fill state changed" anchor="SUBSCRIBE BUFFER_FILL">
3879 schoenebeck 499 <t>Client may want to be notified when the buffer fill state of a disk stream
3880     on the back-end changes by issuing the following command:</t>
3881 schoenebeck 151 <t>
3882     <list>
3883     <t>SUBSCRIBE BUFFER_FILL</t>
3884     </list>
3885     </t>
3886     <t>Server will start sending the following notification messages:</t>
3887     <t>
3888     <list>
3889     <t>"NOTIFY:BUFFER_FILL:&lt;sampler-channel&gt; &lt;fill-data&gt;"</t>
3890     </list>
3891     </t>
3892     <t>where &lt;sampler-channel&gt; will be replaced by the sampler channel the
3893 schoenebeck 534 buffer fill state change occurred on and &lt;fill-data&gt; will be replaced by the
3894     buffer fill data for this channel as described in <xref target="GET CHANNEL BUFFER_FILL" />
3895     as if the <xref target="GET CHANNEL BUFFER_FILL">
3896     "GET CHANNEL BUFFER_FILL PERCENTAGE"</xref> command was issued on this channel.</t>
3897 schoenebeck 151 </section>
3898    
3899 schoenebeck 534 <section title="Channel information changed" anchor="SUBSCRIBE INFO">
3900 schoenebeck 151 <t>Client may want to be notified when changes were made to sampler channels on the
3901 schoenebeck 561 back-end by issuing the following command:</t>
3902 schoenebeck 151 <t>
3903     <list>
3904 schoenebeck 556 <t>SUBSCRIBE CHANNEL_INFO</t>
3905 schoenebeck 151 </list>
3906     </t>
3907     <t>Server will start sending the following notification messages:</t>
3908     <t>
3909     <list>
3910 schoenebeck 556 <t>"NOTIFY:CHANNEL_INFO:&lt;sampler-channel&gt;"</t>
3911 schoenebeck 151 </list>
3912     </t>
3913     <t>where &lt;sampler-channel&gt; will be replaced by the sampler channel the
3914     channel info change occurred. The front-end will have to send
3915     the respective command to actually get the channel info. Because these messages
3916     will be triggered by LSCP commands issued by other clients rather than real
3917     time events happening on the server, it is believed that an empty notification
3918     message is sufficient here.</t>
3919     </section>
3920    
3921 iliev 778 <section title="Total number of active voices changed" anchor="SUBSCRIBE TOTAL_VOICE_COUNT">
3922     <t>Client may want to be notified when the total number of voices on the
3923     back-end changes by issuing the following command:</t>
3924     <t>
3925     <list>
3926     <t>SUBSCRIBE TOTAL_VOICE_COUNT</t>
3927     </list>
3928     </t>
3929     <t>Server will start sending the following notification messages:</t>
3930     <t>
3931     <list>
3932     <t>"NOTIFY:TOTAL_VOICE_COUNT:&lt;voices&gt;</t>
3933     </list>
3934     </t>
3935     <t>where &lt;voices&gt; will be replaced by the new number of
3936     all currently active voices.</t>
3937     </section>
3938    
3939 schoenebeck 534 <section title="Miscellaneous and debugging events" anchor="SUBSCRIBE MISCELLANEOUS">
3940 schoenebeck 151 <t>Client may want to be notified of miscellaneous and debugging events occurring at
3941     the server by issuing the following command:</t>
3942     <t>
3943     <list>
3944     <t>SUBSCRIBE MISCELLANEOUS</t>
3945     </list>
3946     </t>
3947     <t>Server will start sending the following notification messages:</t>
3948     <t>
3949     <list>
3950     <t>"NOTIFY:MISCELLANEOUS:&lt;string&gt;"</t>
3951     </list>
3952     </t>
3953     <t>where &lt;string&gt; will be replaced by whatever data server
3954     wants to send to the client. Client MAY display this data to the
3955     user AS IS to facilitate debugging.</t>
3956     </section>
3957     </section>
3958    
3959     <section title="Security Considerations">
3960     <t>As there is so far no method of authentication and authorization
3961     defined and so not required for a client applications to succeed to
3962     connect, running LinuxSampler might be a security risk for the host
3963     system the LinuxSampler instance is running on.</t>
3964     </section>
3965    
3966     <section title="Acknowledgments">
3967     <t>This document has benefited greatly from the comments of the
3968     following people, discussed on the LinuxSampler developer's mailing
3969     list:</t>
3970     <t>
3971     <list>
3972     <t>Rui Nuno Capela</t>
3973     <t>Vladimir Senkov</t>
3974     <t>Mark Knecht</t>
3975 schoenebeck 561 <t>Grigor Iliev</t>
3976 schoenebeck 151 </list>
3977     </t>
3978     </section>
3979    
3980     </middle>
3981    
3982     <back>
3983 schoenebeck 571 <references>
3984     <reference anchor="RFC2119">
3985     <front>
3986     <title>Key words for use in RFCs to Indicate Requirement Levels</title>
3987     <author initials="S." surname="Bradner" fullname="Scott Bradner">
3988     <organization>Harvard University</organization>
3989     </author>
3990     <date year="1997"></date>
3991     </front>
3992     <seriesInfo name="RFC" value="2119" />
3993     </reference>
3994     <reference anchor="RFC793">
3995     <front>
3996     <title>TRANSMISSION CONTROL PROTOCOL</title>
3997     <author>
3998     <organization>Defense Advanced Research Projects Agency</organization>
3999     </author>
4000     <date year="1981"></date>
4001     </front>
4002     <seriesInfo name="RFC" value="793" />
4003     </reference>
4004 schoenebeck 573 <reference anchor="RFC2234">
4005     <front>
4006     <title>Augmented BNF for Syntax Specifications</title>
4007     <author initials="D.H." surname="Crocker" fullname="David H. Crocker">
4008     <organization>Internet Mail Consortium</organization>
4009     </author>
4010     <author initials="P." surname="Overell" fullname="Paul Overell">
4011     <organization>Demon Internet Ltd</organization>
4012     </author>
4013     <date year="1997"></date>
4014     </front>
4015     <seriesInfo name="RFC" value="2234" />
4016     </reference>
4017 schoenebeck 571 </references>
4018 schoenebeck 151 </back>
4019    
4020     </rfc>

  ViewVC Help
Powered by ViewVC