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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 944 - (hide annotations) (download) (as text)
Sun Nov 26 16:29:57 2006 UTC (17 years, 4 months ago) by schoenebeck
File MIME type: text/xml
File size: 226492 byte(s)
* updated LSCP specification: added new command set for
  managing MIDI instrument mappings, bumped LSCP spec
  version to v1.2
  (not implemented on server side yet)

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 944 <rfc category="std" ipr="full2026" docName="LSCP 1.2">
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 944
3438    
3439     <section title="MIDI Instrument Mapping">
3440     <t>The MIDI protocol provides a way to switch between instruments
3441     by sending so called MIDI bank select and MIDI program change
3442     messages which are essentially just numbers. The following commands
3443     allow to actually map arbitrary MIDI bank select / program change
3444     numbers with real instruments.</t>
3445     <t>By default, that is when the sampler is launched, this map will
3446     be empty, thus the sampler will simply ignore all program change
3447     messages. The front-end has to explicitly add entries to the map
3448     so the sampler knows how to react on a given program change
3449     message, that is by switching to the respectively defined engine
3450     type and loading the respective instrument.</t>
3451     <t>Also note per MIDI specification a bank select message does not
3452     cause to switch to another instrument. Instead when receiving a
3453     bank select message the bank value will be stored and a subsequent
3454     program change message (which may occur at any time) will finally
3455     cause the sampler to switch to the respective instrument as
3456     reflected by the current MIDI instrument map.</t>
3457    
3458     <section title="Create or replace a MIDI instrument map entry" anchor="MAP MIDI_INSTRUMENT">
3459     <t>The front-end can create a new or replace an existing entry
3460     in the sampler's MIDI instrument map by sending the following
3461     command:</t>
3462     <t>
3463     <list>
3464     <t>MAP MIDI_INSTRUMENT &lt;midi_bank_msb&gt;
3465     &lt;midi_bank_lsb&gt; &lt;midi_prog&gt; &lt;engine_name&gt;
3466     &lt;filename&gt; &lt;instrument_index&gt; &lt;volume_value&gt;
3467     [&lt;instr_load_mode&gt;] [&lt;name&gt;]</t>
3468     </list>
3469     </t>
3470     <t>Where &lt;midi_bank_msb&gt; is an integer value between
3471     0..127 reflecting the MIDI bank select MSB (coarse) index,
3472     &lt;midi_bank_lsb&gt; an integer value between 0..127 reflecting
3473     the MIDI bank select LSB (fine) index, &lt;midi_prog&gt; an
3474     integer value between 0..127 reflecting the MIDI program change
3475     index, &lt;engine_name&gt; a sampler engine name as returned by
3476     the <xref target="LIST AVAILABLE_ENGINES">"LIST AVAILABLE_ENGINES"</xref>
3477     command (not encapsulated into apostrophes), &lt;filename&gt; the name
3478     of the instrument's file to be deployed (encapsulated into apostrophes), &lt;instrument_index&gt; the index (integer value) of the instrument
3479     within the given file, &lt;volume_value&gt; reflects the master
3480     volume of the instrument as optionally dotted number (where a
3481     value < 1.0 means attenuation and a value > 1.0 means
3482     amplification). This parameter easily allows to adjust the
3483     volume of all intruments within a custom instrument map
3484     without having to adjust their instrument files. The
3485     OPTIONAL &lt;instr_load_mode&gt; argument defines the life
3486     time of the instrument, that is when the instrument should
3487     be loaded, when freed and has exactly the following
3488     possibilities:</t>
3489     <t>
3490     <list>
3491     <t>"ON_DEMAND" -
3492     <list>
3493     <t>The instrument will be loaded when needed,
3494     that is when demanded by at least one sampler
3495     channel. It will immediately be freed from memory
3496     when not needed by any sampler channel anymore.</t>
3497     </list>
3498     </t>
3499     <t>"ON_DEMAND_HOLD" -
3500     <list>
3501     <t>The instrument will be loaded when needed,
3502     that is when demanded by at least one sampler
3503     channel. It will be kept in memory even when
3504     not needed by any sampler channel anymore.
3505     Instruments with this mode are only freed
3506     when the sampler is reset or all mapping
3507     entries with this mode (and respective
3508     instrument) are explicitly changed to
3509     "ON_DEMAND" and no sampler channel is using
3510     the instrument anymore.</t>
3511     </list>
3512     </t>
3513     <t>"PERSISTENT" -
3514     <list>
3515     <t>The instrument will immediately be loaded
3516     into memory in the background when this mapping
3517     command is sent and the instrument is kept all
3518     the time. Instruments with this mode are
3519     only freed when the sampler is reset or all
3520     mapping entries with this mode (and
3521     respective instrument) are explicitly
3522     changed to "ON_DEMAND" and no sampler
3523     channel is using the instrument anymore.</t>
3524     </list>
3525     </t>
3526     <t>not supplied -
3527     <list>
3528     <t>In case there is no &lt;instr_load_mode&gt;
3529     argument given, it will be up to the
3530     InstrumentManager to decide which mode to use.
3531     Usually it will use "ON_DEMAND" if an entry
3532     for the given instrument does not exist in
3533     the InstrumentManager's list yet, otherwise
3534     if an entry already exists, it will simply
3535     stick with the mode currently reflected by
3536     the already existing entry, that is it will
3537     not change the mode.</t>
3538     </list>
3539     </t>
3540     </list>
3541     </t>
3542     <t>
3543     The &lt;instr_load_mode&gt; argument thus allows to define an
3544     appropriate strategy (low memory consumption vs. fast
3545     instrument switching) for each instrument individually. Note, the
3546     following restrictions apply to this argument: "ON_DEMAND_HOLD" and
3547     "PERSISTENT" have to be supported by the respective sampler engine
3548     (which is technically the case when the engine provides an
3549     InstrumentManager for its format). If this is not the case the
3550     argument will automatically fall back to the default value
3551     "ON_DEMAND". Also the load mode of one instrument may
3552     automatically change the laod mode of other instrument(s), i.e.
3553     because the instruments are part of the same file and the
3554     engine does not allow a way to manage load modes for them
3555     individually. Due to this, in case the frontend shows the
3556     load modes of entries, the frontend should retrieve the actual
3557     mode by i.e. sending
3558     <xref target="GET MIDI_INSTRUMENT INFO">"GET MIDI_INSTRUMENT INFO"</xref>
3559     command(s). Finally the OPTIONAL &lt;name&gt; argument allows to
3560     set a custom name (encapsulated into apostrophes) for the mapping
3561     entry, useful for frontends for displaying an appropriate name for
3562     mapped instruments (using
3563     <xref target="GET MIDI_INSTRUMENT INFO">"GET MIDI_INSTRUMENT INFO"</xref>).
3564     </t>
3565     <t>
3566     The "MAP MIDI_INSTRUMENT" command
3567     will immediately return, thus it will not block when an
3568     instrument is to be loaded due to a "PERSISTENT" type
3569     entry as instruments are loaded in the background. As a
3570     consequence this command may not necessarily return an error
3571     i.e. when the given instrument file does not exist or may
3572     turn out to be corrupt.
3573     </t>
3574    
3575     <t>Possible Answers:</t>
3576     <t>
3577     <list>
3578     <t>"OK" -
3579     <list>
3580     <t>usually</t>
3581     </list>
3582     </t>
3583     <t>"ERR:&lt;error-code&gt;:&lt;error-message&gt;" -
3584     <list>
3585     <t>when the given engine does not exist or a value
3586     is out of range</t>
3587     </list>
3588     </t>
3589     </list>
3590     </t>
3591    
3592     <t>Examples:</t>
3593     <t>
3594     <list>
3595     <t>C: "MAP MIDI_INSTRUMENT 3 0 0 gig '/usr/share/Steinway D.gig' 0 0.8 PERSISTENT"</t>
3596     <t>S: "OK"</t>
3597     </list>
3598     </t>
3599     <t>
3600     <list>
3601     <t>C: "MAP MIDI_INSTRUMENT 127 4 50 gig '/home/john/foostrings.gig' 7 1.0"</t>
3602     <t>S: "OK"</t>
3603     </list>
3604     </t>
3605     <t>
3606     <list>
3607     <t>C: "MAP MIDI_INSTRUMENT 0 0 0 gig '/usr/share/piano.gig' 0 1.0 'Normal Piano'"</t>
3608     <t>S: "OK"</t>
3609     <t>C: "MAP MIDI_INSTRUMENT 1 0 0 gig '/usr/share/piano.gig' 0 0.25 'Silent Piano'"</t>
3610     <t>S: "OK"</t>
3611     </list>
3612     </t>
3613     <t>
3614     <list>
3615     <t>C: "MAP MIDI_INSTRUMENT 99 8 120 gig '/home/joe/foodrums.gig' 0 1.0 PERSISTENT 'Foo Drumkit'"</t>
3616     <t>S: "OK"</t>
3617     </list>
3618     </t>
3619     </section>
3620    
3621     <section title="Getting ammount of MIDI instrument map entries" anchor="GET MIDI_INSTRUMENTS">
3622     <t>The front-end can query the amount of currently existing MIDI
3623     instrument map entries by sending the following
3624     command:</t>
3625     <t>
3626     <list>
3627     <t>GET MIDI_INSTRUMENTS</t>
3628     </list>
3629     </t>
3630     <t>Possible Answers:</t>
3631     <t>
3632     <list>
3633     <t>LinuxSampler will answer by sending the current number of
3634     entries in the sampler's MIDI instrument map.</t>
3635     </list>
3636     </t>
3637    
3638     <t>Example:</t>
3639     <t>
3640     <list>
3641     <t>C: "GET MIDI_INSTRUMENTS"</t>
3642     <t>S: "634"</t>
3643     </list>
3644     </t>
3645     </section>
3646    
3647     <section title="Getting indeces of all MIDI instrument map entries" anchor="LIST MIDI_INSTRUMENTS">
3648     <t>The front-end can query a list of all currently existing MIDI
3649     instrument map entries by sending the following command:</t>
3650     <t>
3651     <list>
3652     <t>LIST MIDI_INSTRUMENTS</t>
3653     </list>
3654     </t>
3655     <t>Possible Answers:</t>
3656     <t>
3657     <list>
3658     <t>LinuxSampler will answer by sending a comma separated
3659     list of MIDI bank MSB (coarse) - MIDI bank LSB (fine) -
3660     MIDI program triples, where each triple is encapsulated
3661     into curly braces. The list is returned in one single
3662     line. Each triple just reflects the key of the respective
3663     map entry, thus subsequent
3664     <xref target="GET MIDI_INSTRUMENT INFO">"GET MIDI_INSTRUMENT INFO"</xref>
3665     command(s) are necessary to retrieve detailed informations
3666     about each entry.</t>
3667     </list>
3668     </t>
3669    
3670     <t>Example:</t>
3671     <t>
3672     <list>
3673     <t>C: "LIST MIDI_INSTRUMENTS"</t>
3674     <t>S: "{0,0,0},{0,0,1},{120,0,3},{120,0,4},{23,127,127}"</t>
3675     </list>
3676     </t>
3677     </section>
3678    
3679     <section title="Remove an entry from the MIDI instrument map" anchor="UNMAP MIDI_INSTRUMENT">
3680     <t>The front-end can delete an entry from the MIDI instrument
3681     map by sending the following command:</t>
3682     <t>
3683     <list>
3684     <t>UNMAP MIDI_INSTRUMENT &lt;midi_bank_msb&gt; &lt;midi_bank_lsb&gt; &lt;midi_prog&gt;</t>
3685     </list>
3686     </t>
3687     <t>
3688     Where &lt;midi_bank_msb&gt; is an integer value between 0..127
3689     reflecting the MIDI bank MSB (coarse) value, &lt;midi_bank_lsb&gt;
3690     an integer value between 0..127 reflecting the MIDI bank LSB
3691     (fine) value and &lt;midi_prog&gt; an integer value between
3692     0..127 reflecting the MIDI program value of the map entrie's key
3693     index triple.
3694     </t>
3695    
3696     <t>Possible Answers:</t>
3697     <t>
3698     <list>
3699     <t>"OK" -
3700     <list>
3701     <t>usually</t>
3702     </list>
3703     </t>
3704     <t>"ERR:&lt;error-code&gt;:&lt;error-message&gt;" -
3705     <list>
3706     <t>when index out of bounds</t>
3707     </list>
3708     </t>
3709     </list>
3710     </t>
3711    
3712     <t>Example:</t>
3713     <t>
3714     <list>
3715     <t>C: "UNMAP MIDI_INSTRUMENT 2 40 127"</t>
3716     <t>S: "OK"</t>
3717     </list>
3718     </t>
3719     </section>
3720    
3721     <section title="Get current settings of MIDI instrument map entry" anchor="GET MIDI_INSTRUMENT INFO">
3722     <t>The front-end can retrieve the current settings of a certain
3723     instrument map entry by sending the following command:</t>
3724     <t>
3725     <list>
3726     <t>GET MIDI_INSTRUMENT INFO &lt;midi_bank_msb&gt; &lt;midi_bank_lsb&gt; &lt;midi_prog&gt;</t>
3727     </list>
3728     </t>
3729     <t>
3730     Where &lt;midi_bank_msb&gt; is an integer value between 0..127
3731     reflecting the MIDI bank MSB (coarse) value, &lt;midi_bank_lsb&gt;
3732     an integer value between 0..127 reflecting the MIDI bank LSB
3733     (fine) value and &lt;midi_prog&gt; an integer value between
3734     0..127 reflecting the MIDI program value of the map entrie's key
3735     index triple.
3736     </t>
3737    
3738     <t>Possible Answers:</t>
3739     <t>
3740     <list>
3741     <t>LinuxSampler will answer by sending a &lt;CRLF&gt;
3742     separated list. Each answer line begins with the
3743     information category name followed by a colon and then
3744     a space character &lt;SP&gt; and finally the info
3745     character string to that info category. At the moment
3746     the following categories are defined:</t>
3747     <t>"NAME" -
3748     <list>
3749     <t>Name for this MIDI instrument map entry (if defined).
3750     This name shall be used by frontends for displaying a
3751     name for this mapped instrument. It can be set and
3752     changed with the
3753     <xref target="MAP MIDI_INSTRUMENT">"MAP MIDI_INSTRUMENT"</xref>
3754     command and does not have to be unique.</t>
3755     </list>
3756     </t>
3757     <t>"ENGINE_NAME" -
3758     <list>
3759     <t>Name of the engine to be deployed for this
3760     instrument.</t>
3761     </list>
3762     </t>
3763     <t>"INSTRUMENT_FILE" -
3764     <list>
3765     <t>File name of the instrument.</t>
3766     </list>
3767     </t>
3768     <t>"INSTRUMENT_NR" -
3769     <list>
3770     <t>Index of the instrument within the file.</t>
3771     </list>
3772     </t>
3773     <t>"INSTRUMENT_NAME" -
3774     <list>
3775     <t>Name of the loaded instrument as reflected by its file.
3776     In contrast to the "NAME" field, the "INSTRUMENT_NAME" field
3777     cannot be changed.</t>
3778     </list>
3779     </t>
3780     <t>"LOAD_MODE" -
3781     <list>
3782     <t>Life time of instrument
3783     (see <xref target="MAP MIDI_INSTRUMENT">"MAP MIDI_INSTRUMENT"</xref> for details about this setting).</t>
3784     </list>
3785     </t>
3786     <t>"VOLUME" -
3787     <list>
3788     <t>master volume of the instrument as optionally
3789     dotted number (where a value < 1.0 means attenuation
3790     and a value > 1.0 means amplification)</t>
3791     </list>
3792     </t>
3793     <t>The mentioned fields above don't have to be in particular order.</t>
3794     </list>
3795     </t>
3796    
3797     <t>Example:</t>
3798     <t>
3799     <list>
3800     <t>C: "GET MIDI_INSTRUMENT INFO 3 45 120"</t>
3801     <t>S: "NAME: Drums for Foo Song"</t>
3802     <t>&nbsp;&nbsp;&nbsp;"ENGINE_NAME: GigEngine"</t>
3803     <t>&nbsp;&nbsp;&nbsp;"INSTRUMENT_FILE: /usr/share/joesdrumkit.gig"</t>
3804     <t>&nbsp;&nbsp;&nbsp;"INSTRUMENT_NR: 0"</t>
3805     <t>&nbsp;&nbsp;&nbsp;"INSTRUMENT_NAME: Joe's Drumkit"</t>
3806     <t>&nbsp;&nbsp;&nbsp;"LOAD_MODE: PERSISTENT"</t>
3807     <t>&nbsp;&nbsp;&nbsp;"VOLUME: 1.0"</t>
3808     <t>&nbsp;&nbsp;&nbsp;"."</t>
3809     </list>
3810     </t>
3811     </section>
3812    
3813     <section title="Clear MIDI instrument map" anchor="CLEAR MIDI_INSTRUMENTS">
3814     <t>The front-end can clear the whole MIDI instrument map, that
3815     is delete all entries by sending the following command:</t>
3816     <t>
3817     <list>
3818     <t>CLEAR MIDI_INSTRUMENTS</t>
3819     </list>
3820     </t>
3821    
3822     <t>Possible Answers:</t>
3823     <t>
3824     <list>
3825     <t>"OK" -
3826     <list>
3827     <t>always</t>
3828     </list>
3829     </t>
3830     </list>
3831     </t>
3832    
3833     <t>Example:</t>
3834     <t>
3835     <list>
3836     <t>C: "CLEAR MIDI_INSTRUMENTS"</t>
3837     <t>S: "OK"</t>
3838     </list>
3839     </t>
3840     </section>
3841     </section>
3842    
3843 schoenebeck 151 </section>
3844    
3845 schoenebeck 944
3846 schoenebeck 534 <section title="Command Syntax" anchor="command_syntax">
3847 schoenebeck 573 <t>The grammar of the control protocol as descibed in <xref target="control_commands"/>
3848     is defined below using Backus-Naur Form (BNF as described in <xref target="RFC2234"/>)
3849     where applicable.
3850     </t>
3851     <!--
3852     This section is automatically generated by scripts/update_grammar.pl
3853     from src/network/lscp.y (yacc input file). Do not modify this section
3854     manually !
3855     -->
3856     <!-- GRAMMAR_BNF_BEGIN - do NOT delete or modify this line !!! -->
3857 schoenebeck 937
3858     <t>input =
3859     <list>
3860     <t>line LF
3861     </t>
3862     <t>/ line CR LF
3863     </t>
3864     </list>
3865     </t>
3866     <t>line =
3867     <list>
3868     <t>/* epsilon (empty line ignored) */
3869     </t>
3870     <t>/ comment
3871     </t>
3872     <t>/ command
3873     </t>
3874     <t>/ error
3875     </t>
3876     </list>
3877     </t>
3878     <t>comment =
3879     <list>
3880     <t>'#'
3881     </t>
3882     <t>/ comment '#'
3883     </t>
3884     <t>/ comment SP
3885     </t>
3886     <t>/ comment number
3887     </t>
3888     <t>/ comment string
3889     </t>
3890     </list>
3891     </t>
3892     <t>command =
3893     <list>
3894     <t>ADD SP CHANNEL
3895     </t>
3896 schoenebeck 944 <t>/ MAP SP map_instruction
3897     </t>
3898     <t>/ UNMAP SP unmap_instruction
3899     </t>
3900 schoenebeck 937 <t>/ GET SP get_instruction
3901     </t>
3902     <t>/ CREATE SP create_instruction
3903     </t>
3904     <t>/ DESTROY SP destroy_instruction
3905     </t>
3906     <t>/ LIST SP list_instruction
3907     </t>
3908     <t>/ LOAD SP load_instruction
3909     </t>
3910 schoenebeck 944 <t>/ REMOVE SP remove_instruction
3911    
3912 schoenebeck 937 </t>
3913     <t>/ SET SP set_instruction
3914     </t>
3915     <t>/ SUBSCRIBE SP subscribe_event
3916     </t>
3917     <t>/ UNSUBSCRIBE SP unsubscribe_event
3918     </t>
3919     <t>/ SELECT SP text
3920     </t>
3921 schoenebeck 944 <t>/ RESET SP reset_instruction
3922 schoenebeck 937 </t>
3923 schoenebeck 944 <t>/ CLEAR SP clear_instruction
3924     </t>
3925 schoenebeck 937 <t>/ RESET
3926     </t>
3927     <t>/ QUIT
3928     </t>
3929     </list>
3930     </t>
3931     <t>subscribe_event =
3932     <list>
3933     <t>CHANNEL_COUNT
3934     </t>
3935     <t>/ VOICE_COUNT
3936     </t>
3937     <t>/ STREAM_COUNT
3938     </t>
3939     <t>/ BUFFER_FILL
3940     </t>
3941     <t>/ CHANNEL_INFO
3942     </t>
3943     <t>/ MISCELLANEOUS
3944     </t>
3945     <t>/ TOTAL_VOICE_COUNT
3946     </t>
3947     </list>
3948     </t>
3949     <t>unsubscribe_event =
3950     <list>
3951     <t>CHANNEL_COUNT
3952     </t>
3953     <t>/ VOICE_COUNT
3954     </t>
3955     <t>/ STREAM_COUNT
3956     </t>
3957     <t>/ BUFFER_FILL
3958     </t>
3959     <t>/ CHANNEL_INFO
3960     </t>
3961     <t>/ MISCELLANEOUS
3962     </t>
3963     <t>/ TOTAL_VOICE_COUNT
3964     </t>
3965     </list>
3966     </t>
3967 schoenebeck 944 <t>map_instruction =
3968     <list>
3969     <t>MIDI_INSTRUMENT SP midi_bank_msb SP midi_bank_lsb SP midi_prog SP engine_name SP filename SP instrument_index SP volume_value
3970     </t>
3971     <t>/ MIDI_INSTRUMENT SP midi_bank_msb SP midi_bank_lsb SP midi_prog SP engine_name SP filename SP instrument_index SP volume_value SP instr_load_mode
3972     </t>
3973     <t>/ MIDI_INSTRUMENT SP midi_bank_msb SP midi_bank_lsb SP midi_prog SP engine_name SP filename SP instrument_index SP volume_value SP entry_name
3974     </t>
3975     <t>/ MIDI_INSTRUMENT SP midi_bank_msb SP midi_bank_lsb SP midi_prog SP engine_name SP filename SP instrument_index SP volume_value SP instr_load_mode SP entry_name
3976     </t>
3977     </list>
3978     </t>
3979     <t>unmap_instruction =
3980     <list>
3981     <t>MIDI_INSTRUMENT SP midi_bank_msb SP midi_bank_lsb SP midi_prog
3982     </t>
3983     </list>
3984     </t>
3985     <t>remove_instruction =
3986     <list>
3987     <t>CHANNEL SP sampler_channel
3988     </t>
3989     </list>
3990     </t>
3991 schoenebeck 937 <t>get_instruction =
3992     <list>
3993     <t>AVAILABLE_ENGINES
3994     </t>
3995     <t>/ AVAILABLE_MIDI_INPUT_DRIVERS
3996     </t>
3997     <t>/ MIDI_INPUT_DRIVER SP INFO SP string
3998     </t>
3999     <t>/ MIDI_INPUT_DRIVER_PARAMETER SP INFO SP string SP string
4000     </t>
4001     <t>/ MIDI_INPUT_DRIVER_PARAMETER SP INFO SP string SP string SP key_val_list
4002     </t>
4003     <t>/ AVAILABLE_AUDIO_OUTPUT_DRIVERS
4004     </t>
4005     <t>/ AUDIO_OUTPUT_DRIVER SP INFO SP string
4006     </t>
4007     <t>/ AUDIO_OUTPUT_DRIVER_PARAMETER SP INFO SP string SP string
4008     </t>
4009     <t>/ AUDIO_OUTPUT_DRIVER_PARAMETER SP INFO SP string SP string SP key_val_list
4010     </t>
4011     <t>/ AUDIO_OUTPUT_DEVICES
4012     </t>
4013     <t>/ MIDI_INPUT_DEVICES
4014     </t>
4015     <t>/ AUDIO_OUTPUT_DEVICE SP INFO SP number
4016     </t>
4017     <t>/ MIDI_INPUT_DEVICE SP INFO SP number
4018     </t>
4019     <t>/ MIDI_INPUT_PORT SP INFO SP number SP number
4020     </t>
4021     <t>/ MIDI_INPUT_PORT_PARAMETER SP INFO SP number SP number SP string
4022     </t>
4023     <t>/ AUDIO_OUTPUT_CHANNEL SP INFO SP number SP number
4024     </t>
4025     <t>/ AUDIO_OUTPUT_CHANNEL_PARAMETER SP INFO SP number SP number SP string
4026     </t>
4027     <t>/ CHANNELS
4028     </t>
4029     <t>/ CHANNEL SP INFO SP sampler_channel
4030     </t>
4031     <t>/ CHANNEL SP BUFFER_FILL SP buffer_size_type SP sampler_channel
4032     </t>
4033     <t>/ CHANNEL SP STREAM_COUNT SP sampler_channel
4034     </t>
4035     <t>/ CHANNEL SP VOICE_COUNT SP sampler_channel
4036     </t>
4037     <t>/ ENGINE SP INFO SP engine_name
4038     </t>
4039     <t>/ SERVER SP INFO
4040     </t>
4041     <t>/ TOTAL_VOICE_COUNT
4042     </t>
4043     <t>/ TOTAL_VOICE_COUNT_MAX
4044     </t>
4045 schoenebeck 944 <t>/ MIDI_INSTRUMENTS
4046     </t>
4047     <t>/ MIDI_INSTRUMENT SP INFO SP midi_bank_msb SP midi_bank_lsb SP midi_prog
4048     </t>
4049 schoenebeck 937 </list>
4050     </t>
4051     <t>set_instruction =
4052     <list>
4053     <t>AUDIO_OUTPUT_DEVICE_PARAMETER SP number SP string '=' param_val_list
4054     </t>
4055     <t>/ AUDIO_OUTPUT_CHANNEL_PARAMETER SP number SP number SP string '=' param_val_list
4056     </t>
4057     <t>/ MIDI_INPUT_DEVICE_PARAMETER SP number SP string '=' param_val_list
4058     </t>
4059     <t>/ MIDI_INPUT_PORT_PARAMETER SP number SP number SP string '=' param_val_list
4060     </t>
4061     <t>/ CHANNEL SP set_chan_instruction
4062     </t>
4063     <t>/ ECHO SP boolean
4064     </t>
4065     </list>
4066     </t>
4067     <t>create_instruction =
4068     <list>
4069     <t>AUDIO_OUTPUT_DEVICE SP string SP key_val_list
4070     </t>
4071     <t>/ AUDIO_OUTPUT_DEVICE SP string
4072     </t>
4073     <t>/ MIDI_INPUT_DEVICE SP string SP key_val_list
4074     </t>
4075     <t>/ MIDI_INPUT_DEVICE SP string
4076     </t>
4077     </list>
4078     </t>
4079 schoenebeck 944 <t>reset_instruction =
4080     <list>
4081     <t>CHANNEL SP sampler_channel
4082     </t>
4083     </list>
4084     </t>
4085     <t>clear_instruction =
4086     <list>
4087     <t>MIDI_INSTRUMENTS
4088     </t>
4089     </list>
4090     </t>
4091 schoenebeck 937 <t>destroy_instruction =
4092     <list>
4093     <t>AUDIO_OUTPUT_DEVICE SP number
4094     </t>
4095     <t>/ MIDI_INPUT_DEVICE SP number
4096     </t>
4097     </list>
4098     </t>
4099     <t>load_instruction =
4100     <list>
4101     <t>INSTRUMENT SP load_instr_args
4102     </t>
4103     <t>/ ENGINE SP load_engine_args
4104     </t>
4105     </list>
4106     </t>
4107     <t>set_chan_instruction =
4108     <list>
4109     <t>AUDIO_OUTPUT_DEVICE SP sampler_channel SP device_index
4110     </t>
4111     <t>/ AUDIO_OUTPUT_CHANNEL SP sampler_channel SP audio_channel_index SP audio_channel_index
4112     </t>
4113     <t>/ AUDIO_OUTPUT_TYPE SP sampler_channel SP audio_output_type_name
4114     </t>
4115     <t>/ MIDI_INPUT SP sampler_channel SP device_index SP midi_input_port_index SP midi_input_channel_index
4116     </t>
4117     <t>/ MIDI_INPUT_DEVICE SP sampler_channel SP device_index
4118     </t>
4119     <t>/ MIDI_INPUT_PORT SP sampler_channel SP midi_input_port_index
4120     </t>
4121     <t>/ MIDI_INPUT_CHANNEL SP sampler_channel SP midi_input_channel_index
4122     </t>
4123     <t>/ MIDI_INPUT_TYPE SP sampler_channel SP midi_input_type_name
4124     </t>
4125     <t>/ VOLUME SP sampler_channel SP volume_value
4126     </t>
4127     <t>/ MUTE SP sampler_channel SP boolean
4128     </t>
4129     <t>/ SOLO SP sampler_channel SP boolean
4130     </t>
4131     </list>
4132     </t>
4133     <t>key_val_list =
4134     <list>
4135     <t>string '=' param_val_list
4136     </t>
4137     <t>/ key_val_list SP string '=' param_val_list
4138     </t>
4139     </list>
4140     </t>
4141     <t>buffer_size_type =
4142     <list>
4143     <t>BYTES
4144     </t>
4145     <t>/ PERCENTAGE
4146     </t>
4147     </list>
4148     </t>
4149     <t>list_instruction =
4150     <list>
4151     <t>AUDIO_OUTPUT_DEVICES
4152     </t>
4153     <t>/ MIDI_INPUT_DEVICES
4154     </t>
4155     <t>/ CHANNELS
4156     </t>
4157     <t>/ AVAILABLE_ENGINES
4158     </t>
4159     <t>/ AVAILABLE_MIDI_INPUT_DRIVERS
4160     </t>
4161     <t>/ AVAILABLE_AUDIO_OUTPUT_DRIVERS
4162     </t>
4163 schoenebeck 944 <t>/ MIDI_INSTRUMENTS
4164     </t>
4165 schoenebeck 937 </list>
4166     </t>
4167     <t>load_instr_args =
4168     <list>
4169     <t>filename SP instrument_index SP sampler_channel
4170     </t>
4171     <t>/ NON_MODAL SP filename SP instrument_index SP sampler_channel
4172     </t>
4173     </list>
4174     </t>
4175     <t>load_engine_args =
4176     <list>
4177     <t>engine_name SP sampler_channel
4178     </t>
4179     </list>
4180     </t>
4181 schoenebeck 944 <t>instr_load_mode =
4182     <list>
4183     <t>ON_DEMAND
4184     </t>
4185     <t>/ ON_DEMAND_HOLD
4186     </t>
4187     <t>/ PERSISTENT
4188     </t>
4189     </list>
4190     </t>
4191 schoenebeck 937 <t>device_index =
4192     <list>
4193     <t>number
4194     </t>
4195     </list>
4196     </t>
4197     <t>audio_channel_index =
4198     <list>
4199     <t>number
4200     </t>
4201     </list>
4202     </t>
4203     <t>audio_output_type_name =
4204     <list>
4205     <t>string
4206     </t>
4207     </list>
4208     </t>
4209     <t>midi_input_port_index =
4210     <list>
4211     <t>number
4212     </t>
4213     </list>
4214     </t>
4215     <t>midi_input_channel_index =
4216     <list>
4217     <t>number
4218     </t>
4219     <t>/ ALL
4220     </t>
4221     </list>
4222     </t>
4223     <t>midi_input_type_name =
4224     <list>
4225     <t>string
4226     </t>
4227     </list>
4228     </t>
4229 schoenebeck 944 <t>midi_bank_msb =
4230     <list>
4231     <t>number
4232     </t>
4233     </list>
4234     </t>
4235     <t>midi_bank_lsb =
4236     <list>
4237     <t>number
4238     </t>
4239     </list>
4240     </t>
4241     <t>midi_prog =
4242     <list>
4243     <t>number
4244     </t>
4245     </list>
4246     </t>
4247 schoenebeck 937 <t>volume_value =
4248     <list>
4249     <t>dotnum
4250     </t>
4251     <t>/ number
4252     </t>
4253     </list>
4254     </t>
4255     <t>sampler_channel =
4256     <list>
4257     <t>number
4258     </t>
4259     </list>
4260     </t>
4261     <t>instrument_index =
4262     <list>
4263     <t>number
4264     </t>
4265     </list>
4266     </t>
4267     <t>engine_name =
4268     <list>
4269     <t>string
4270     </t>
4271     </list>
4272     </t>
4273     <t>filename =
4274     <list>
4275     <t>stringval
4276     </t>
4277     </list>
4278     </t>
4279 schoenebeck 944 <t>entry_name =
4280     <list>
4281     <t>stringval
4282     </t>
4283     </list>
4284     </t>
4285 schoenebeck 937 <t>param_val_list =
4286     <list>
4287     <t>param_val
4288     </t>
4289     <t>/ param_val_list','param_val
4290     </t>
4291     </list>
4292     </t>
4293     <t>param_val =
4294     <list>
4295     <t>string
4296     </t>
4297     <t>/ stringval
4298     </t>
4299     <t>/ number
4300     </t>
4301     <t>/ dotnum
4302     </t>
4303     </list>
4304     </t>
4305    
4306 schoenebeck 573 <!-- GRAMMAR_BNF_END - do NOT delete or modify this line !!! -->
4307 schoenebeck 151 </section>
4308    
4309 schoenebeck 534 <section title="Events" anchor="events">
4310 schoenebeck 151 <t>This chapter will describe all currently defined events supported by LinuxSampler.</t>
4311    
4312 schoenebeck 534 <section title="Number of sampler channels changed" anchor="SUBSCRIBE CHANNEL">
4313 schoenebeck 151 <t>Client may want to be notified when the total number of channels on the
4314     back-end changes by issuing the following command:</t>
4315     <t>
4316     <list>
4317 schoenebeck 556 <t>SUBSCRIBE CHANNEL_COUNT</t>
4318 schoenebeck 151 </list>
4319     </t>
4320     <t>Server will start sending the following notification messages:</t>
4321     <t>
4322     <list>
4323 schoenebeck 556 <t>"NOTIFY:CHANNEL_COUNT:&lt;channels&gt;"</t>
4324 schoenebeck 151 </list>
4325     </t>
4326     <t>where &lt;channels&gt; will be replaced by the new number
4327     of sampler channels.</t>
4328     </section>
4329    
4330 schoenebeck 534 <section title="Number of active voices changed" anchor="SUBSCRIBE VOICE_COUNT">
4331 schoenebeck 151 <t>Client may want to be notified when the number of voices on the
4332     back-end changes by issuing the following command:</t>
4333     <t>
4334     <list>
4335     <t>SUBSCRIBE VOICE_COUNT</t>
4336     </list>
4337     </t>
4338     <t>Server will start sending the following notification messages:</t>
4339     <t>
4340     <list>
4341 schoenebeck 499 <t>"NOTIFY:VOICE_COUNT:&lt;sampler-channel&gt; &lt;voices&gt;</t>
4342 schoenebeck 151 </list>
4343     </t>
4344     <t>where &lt;sampler-channel&gt; will be replaced by the sampler channel the
4345 schoenebeck 499 voice count change occurred and &lt;voices&gt; by the new number of
4346 schoenebeck 151 active voices on that channel.</t>
4347     </section>
4348    
4349 schoenebeck 534 <section title="Number of active disk streams changed" anchor="SUBSCRIBE STREAM_COUNT">
4350 schoenebeck 151 <t>Client may want to be notified when the number of streams on the back-end
4351     changes by issuing the following command: SUBSCRIBE STREAM_COUNT</t>
4352     <t>
4353     <list>
4354     <t>SUBSCRIBE STREAM_COUNT</t>
4355     </list>
4356     </t>
4357     <t>Server will start sending the following notification messages:</t>
4358     <t>
4359     <list>
4360     <t>"NOTIFY:STREAM_COUNT:&lt;sampler-channel&gt; &lt;streams&gt;"</t>
4361     </list>
4362     </t>
4363     <t>where &lt;sampler-channel&gt; will be replaced by the sampler channel the
4364     stream count change occurred and &lt;streams&gt; by the new number of
4365     active disk streams on that channel.</t>
4366     </section>
4367    
4368 schoenebeck 534 <section title="Disk stream buffer fill state changed" anchor="SUBSCRIBE BUFFER_FILL">
4369 schoenebeck 499 <t>Client may want to be notified when the buffer fill state of a disk stream
4370     on the back-end changes by issuing the following command:</t>
4371 schoenebeck 151 <t>
4372     <list>
4373     <t>SUBSCRIBE BUFFER_FILL</t>
4374     </list>
4375     </t>
4376     <t>Server will start sending the following notification messages:</t>
4377     <t>
4378     <list>
4379     <t>"NOTIFY:BUFFER_FILL:&lt;sampler-channel&gt; &lt;fill-data&gt;"</t>
4380     </list>
4381     </t>
4382     <t>where &lt;sampler-channel&gt; will be replaced by the sampler channel the
4383 schoenebeck 534 buffer fill state change occurred on and &lt;fill-data&gt; will be replaced by the
4384     buffer fill data for this channel as described in <xref target="GET CHANNEL BUFFER_FILL" />
4385     as if the <xref target="GET CHANNEL BUFFER_FILL">
4386     "GET CHANNEL BUFFER_FILL PERCENTAGE"</xref> command was issued on this channel.</t>
4387 schoenebeck 151 </section>
4388    
4389 schoenebeck 534 <section title="Channel information changed" anchor="SUBSCRIBE INFO">
4390 schoenebeck 151 <t>Client may want to be notified when changes were made to sampler channels on the
4391 schoenebeck 561 back-end by issuing the following command:</t>
4392 schoenebeck 151 <t>
4393     <list>
4394 schoenebeck 556 <t>SUBSCRIBE CHANNEL_INFO</t>
4395 schoenebeck 151 </list>
4396     </t>
4397     <t>Server will start sending the following notification messages:</t>
4398     <t>
4399     <list>
4400 schoenebeck 556 <t>"NOTIFY:CHANNEL_INFO:&lt;sampler-channel&gt;"</t>
4401 schoenebeck 151 </list>
4402     </t>
4403     <t>where &lt;sampler-channel&gt; will be replaced by the sampler channel the
4404     channel info change occurred. The front-end will have to send
4405     the respective command to actually get the channel info. Because these messages
4406     will be triggered by LSCP commands issued by other clients rather than real
4407     time events happening on the server, it is believed that an empty notification
4408     message is sufficient here.</t>
4409     </section>
4410    
4411 iliev 778 <section title="Total number of active voices changed" anchor="SUBSCRIBE TOTAL_VOICE_COUNT">
4412     <t>Client may want to be notified when the total number of voices on the
4413     back-end changes by issuing the following command:</t>
4414     <t>
4415     <list>
4416     <t>SUBSCRIBE TOTAL_VOICE_COUNT</t>
4417     </list>
4418     </t>
4419     <t>Server will start sending the following notification messages:</t>
4420     <t>
4421     <list>
4422     <t>"NOTIFY:TOTAL_VOICE_COUNT:&lt;voices&gt;</t>
4423     </list>
4424     </t>
4425     <t>where &lt;voices&gt; will be replaced by the new number of
4426     all currently active voices.</t>
4427     </section>
4428    
4429 schoenebeck 534 <section title="Miscellaneous and debugging events" anchor="SUBSCRIBE MISCELLANEOUS">
4430 schoenebeck 151 <t>Client may want to be notified of miscellaneous and debugging events occurring at
4431     the server by issuing the following command:</t>
4432     <t>
4433     <list>
4434     <t>SUBSCRIBE MISCELLANEOUS</t>
4435     </list>
4436     </t>
4437     <t>Server will start sending the following notification messages:</t>
4438     <t>
4439     <list>
4440     <t>"NOTIFY:MISCELLANEOUS:&lt;string&gt;"</t>
4441     </list>
4442     </t>
4443     <t>where &lt;string&gt; will be replaced by whatever data server
4444     wants to send to the client. Client MAY display this data to the
4445     user AS IS to facilitate debugging.</t>
4446     </section>
4447     </section>
4448    
4449     <section title="Security Considerations">
4450     <t>As there is so far no method of authentication and authorization
4451     defined and so not required for a client applications to succeed to
4452     connect, running LinuxSampler might be a security risk for the host
4453     system the LinuxSampler instance is running on.</t>
4454     </section>
4455    
4456     <section title="Acknowledgments">
4457     <t>This document has benefited greatly from the comments of the
4458     following people, discussed on the LinuxSampler developer's mailing
4459     list:</t>
4460     <t>
4461     <list>
4462     <t>Rui Nuno Capela</t>
4463     <t>Vladimir Senkov</t>
4464     <t>Mark Knecht</t>
4465 schoenebeck 561 <t>Grigor Iliev</t>
4466 schoenebeck 151 </list>
4467     </t>
4468     </section>
4469    
4470     </middle>
4471    
4472     <back>
4473 schoenebeck 571 <references>
4474     <reference anchor="RFC2119">
4475     <front>
4476     <title>Key words for use in RFCs to Indicate Requirement Levels</title>
4477     <author initials="S." surname="Bradner" fullname="Scott Bradner">
4478     <organization>Harvard University</organization>
4479     </author>
4480     <date year="1997"></date>
4481     </front>
4482     <seriesInfo name="RFC" value="2119" />
4483     </reference>
4484     <reference anchor="RFC793">
4485     <front>
4486     <title>TRANSMISSION CONTROL PROTOCOL</title>
4487     <author>
4488     <organization>Defense Advanced Research Projects Agency</organization>
4489     </author>
4490     <date year="1981"></date>
4491     </front>
4492     <seriesInfo name="RFC" value="793" />
4493     </reference>
4494 schoenebeck 573 <reference anchor="RFC2234">
4495     <front>
4496     <title>Augmented BNF for Syntax Specifications</title>
4497     <author initials="D.H." surname="Crocker" fullname="David H. Crocker">
4498     <organization>Internet Mail Consortium</organization>
4499     </author>
4500     <author initials="P." surname="Overell" fullname="Paul Overell">
4501     <organization>Demon Internet Ltd</organization>
4502     </author>
4503     <date year="1997"></date>
4504     </front>
4505     <seriesInfo name="RFC" value="2234" />
4506     </reference>
4507 schoenebeck 571 </references>
4508 schoenebeck 151 </back>
4509    
4510     </rfc>

  ViewVC Help
Powered by ViewVC