<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
    <!ENTITY rfc2119 PUBLIC ''
      'http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml'>
]>

<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>

<?rfc toc="yes" ?>
<?rfc symrefs="yes" ?>
<?rfc sortrefs="yes"?>
<?rfc iprnotified="no" ?>

<!-- FIXME: next attribute should actually be "yes", temporarily disbled due
     to an annoying "missing Normative/Informative References" error message -->
<?rfc strict="no" ?>

<rfc category="std" ipr="full3978" docName="LSCP 1.2">
    <front>
        <title>LinuxSampler Control Protocol</title>
        <author initials='C.S.' surname="Schoenebeck" fullname='C.
Schoenebeck'>
            <organization>
                Interessengemeinschaft Software Engineering e. V.
            </organization>
            <address>
                <postal>
                    <street>Max-Planck-Str. 39</street>
<!--                    <code>74081</code> -->
                    <city>74081 Heilbronn</city>
                    <country>Germany</country>
                </postal>
                <email>schoenebeck at software minus engineering dot org</email>
            </address>
        </author>
        <date month="October" year="2007"/>
        <workgroup>LinuxSampler Developers</workgroup>
        <keyword>LSCP</keyword>
        <abstract>
            <t>The LinuxSampler Control Protocol (LSCP) is an
            application-level protocol primarily intended for local and
            remote controlling the LinuxSampler backend application, which is a
            sophisticated server-like console application essentially playing
            back audio samples and manipulating the samples in real time to
            certain extent.</t>
	</abstract>
    </front>

    <middle>
        <section title="Requirements notation">
            <t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL",
            "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY",
            and "OPTIONAL" in this document are to be interpreted as
            described in <xref target="RFC2119"/>.</t>

            <t>This protocol is always case-sensitive if not explicitly
            claimed the opposite.</t>

            <t>In examples, "C:" and "S:" indicate lines sent by the client
            (front-end) and server (LinuxSampler) respectively. Lines in
            examples must be interpreted as every line being CRLF
            terminated (carriage return character followed by line feed
            character as defined in the ASCII standard <xref target="RFC20"/>),
            thus the following example:</t>

            <t>
                <list>
                    <t>C: "some line"</t>
                    <t>&nbsp;&nbsp;&nbsp;"another line"</t>
                </list>
            </t>

            <t>must actually be interpreted as client sending the following
            message:</t>

            <t>
                <list>
                    <t>"some line&lt;CR&gt;&lt;LF&gt;another
                    line&lt;CR&gt;&lt;LF&gt;"</t>
                </list>
            </t>

            <t>where &lt;CR&gt; symbolizes the carriage return character and
            &lt;LF&gt; the line feed character as defined in the ASCII
            standard.</t>

            <t>Due to technical reasons, messages can arbitrary be
            fragmented, means the following example:</t>

            <t>
                <list>
                    <t>S: "abcd"</t>
                </list>
            </t>

            <t>could also happen to be sent in three messages like in the
            following sequence scenario:</t>

            <t>
                <list style="symbols">
                    <t>server sending message "a"</t>
                    <t>followed by a delay (pause) with
                    arbitrary duration</t>
                    <t>followed by server sending message
                    "bcd&lt;CR&gt;"</t>
                    <t>again followed by a delay (pause) with arbitrary
                    duration</t>
                    <t>followed by server sending the message
                    "&lt;LF&gt;"</t>
                </list>
            </t>

            <t>where again &lt;CR&gt; and &lt;LF&gt; symbolize the carriage
            return and line feed characters respectively.</t>
        </section>

        <section title="Versioning of this specification" anchor="LSCP versioning">
            <t>LSCP will certainly be extended and enhanced by-and-by. Each official
            release of the LSCP specification will be tagged with a unique version
            tuple. The version tuple consists at least of a major and minor version
            number like:
            </t>
            <t>
                <list>
                    <t>"1.2"</t>
                </list>
            </t>
            <t>
            In this example the major version number would be "1" and the minor
            version number would be "2". Note that the version tuple might also
            have more than two elements. The major version number defines a
            group of backward compatible versions. That means a frontend is
            compatible to the connected sampler if and only if the LSCP versions
            to which each of the two parties complies to, match both of the
            following rules:
            </t>
            <t>Compatibility:</t>
            <t>
                <list style="numbers">
                    <t>The frontend's LSCP major version and the sampler's LSCP
                    major version are exactly equal.</t>
                    <t>The frontend's LSCP minor version is less or equal than
                    the sampler's LSCP minor version.</t>
                </list>
            </t>
            <t>
            Compatibility can only be claimed if both rules are true.
            The frontend can use the
            <xref target="GET SERVER INFO">"GET SERVER INFO"</xref> command to
            get the version of the LSCP specification the sampler complies with.
            </t>
        </section>

        <section title="Introduction">
            <t>LinuxSampler is a so called software sampler application
            capable to playback audio samples from a computer's Random
            Access Memory (RAM) as well as directly streaming it from disk.
            LinuxSampler is designed to be modular. It provides several so
            called "sampler engines" where each engine is specialized for a
            certain purpose. LinuxSampler has virtual channels which will be
            referred in this document as "sampler channels". The channels
            are in such way virtual as they can be connected to an
            arbitrary MIDI input method and arbitrary MIDI channel (e.g.
            sampler channel 17 could be connected to an ALSA sequencer
            device 64:0 and listening to MIDI channel 1 there). Each sampler
            channel will be associated with an instance of one of the available
            sampler engines (e.g. GigEngine, DLSEngine). The audio output of
            each sampler channel can be routed to an arbitrary audio output
            method (ALSA / JACK) and an arbitrary audio output channel
            there.</t>
        </section>

        <section title="Focus of this protocol">
            <t>Main focus of this protocol is to provide a way to configure
            a running LinuxSampler instance and to retrieve information
            about it. The focus of this protocol is not to provide a way to
            control synthesis parameters or even to trigger or release
            notes. Or in other words; the focus are those functionalities
            which are not covered by MIDI or which may at most be handled
            via MIDI System Exclusive Messages.</t>
        </section>

        <section title="Communication Overview">
            <t>There are two distinct methods of communication between a
            running instance of LinuxSampler and one or more control
            applications, so called "front-ends": a simple request/response
            communication method used by the clients to give commands to the
            server as well as to inquire about server's status and a
            subscribe/notify communication method used by the client to
            subscribe to and receive notifications of certain events as they
            happen on the server. The latter needs more effort to be
            implemented in the front-end application. The two communication
            methods will be described next.</t>

            <section title="Request/response communication method">
                <t>This simple communication method is based on
                <xref target="RFC793">TCP</xref>. The
                front-end application establishes a TCP connection to the
                LinuxSampler instance on a certain host system. Then the
                front-end application will send certain ASCII based commands
                as defined in this document (every command line must be CRLF
                terminated - see "Conventions used in this document" at the
                beginning of this document) and the LinuxSampler application
                will response after a certain process time with an
                appropriate ASCII based answer, also as defined in this
                document. So this TCP communication is simply based on query
                and answer paradigm. That way LinuxSampler is only able to
                answer on queries from front-ends, but not able to
                automatically send messages to the client if it's not asked
                to. The fronted should not reconnect to LinuxSampler for
                every single command, instead it should keep the connection
                established and simply resend message(s) for subsequent
                commands. To keep information in the front-end up-to-date
                the front-end has to periodically send new requests to get
                the current information from the LinuxSampler instance. This
                is often referred to as "polling". While polling is simple
                to implement and may be OK to use in some cases, there may
                be disadvantages to polling such as network traffic overhead
                and information being out of date.
                It is possible for a client or several clients to open more
                than one connection to the server at the same time. It is
                also possible to send more than one request to the server
                at the same time but if those requests are sent over the
                same connection server MUST execute them sequentially. Upon
                executing a request server will produce a result set and
                send it to the client. Each and every request made by the
                client MUST result in a result set being sent back to the
                client. No other data other than a result set may be sent by
                a server to a client. No result set may be sent to a client
                without the client sending request to the server first. On
                any particular connection, result sets MUST be sent in their
                entirety without being interrupted by other result sets. If
                several requests got queued up at the server they MUST be
                processed in the order they were received and result sets
                MUST be sent back in the same order.</t>

                <section title="Result format">
                    <t>Result set could be one of the following types:</t>
                    <t>
                        <list style="numbers">
                            <t>Normal</t>
                            <t>Warning</t>
                            <t>Error</t>
                        </list>
                    </t>
                    <t>Warning and Error result sets MUST be single line and
                    have the following format:</t>
                    <t>
                        <list style="symbols">
                   <t>"WRN:&lt;warning-code&gt;:&lt;warning-message&gt;"</t>
                   <t>"ERR:&lt;error-code&gt;:&lt;error-message&gt;"</t>
                        </list>
                    </t>
                    <t>Where &lt;warning-code&gt; and &lt;error-code&gt; are
                    numeric unique identifiers of the warning or error and
                    &lt;warning-message&gt; and &lt;error-message&gt; are
                    human readable descriptions of the warning or error
                    respectively.</t>
                    <t>Examples:</t>
                    <t>
                        <list>
                            <t>C: "LOAD INSTRUMENT '/home/me/Boesendorfer24bit.gig" 0 0</t>
                            <t>S: "WRN:32:This is a 24 bit patch which is not supported natively yet."</t>
                        </list>
                    </t>
                    <t>
                        <list>
                            <t>C: "GET AUDIO_OUTPUT_DRIVER_PARAMETER INFO ALSA EAR"</t>
                            <t>S: "ERR:3456:Audio output driver 'ALSA' does not have a parameter 'EAR'."</t>
                        </list>
                    </t>
                    <t>
                        <list>
                            <t>C: "GET AUDIO_OUTPUT_DEVICE INFO 123456"</t>
                            <t>S: "ERR:9:There is no audio output device with index 123456."</t>
                        </list>
                    </t>
                    <t>Normal result sets could be:</t>
                    <t>
                        <list style="numbers">
                            <t>Empty</t>
                            <t>Single line</t>
                            <t>Multi-line</t>
                        </list>
                    </t>
                    <t> Empty result set is issued when the server only
                    needed to acknowledge the fact that the request was
                    received and it was processed successfully and no
                    additional information is available. This result set has
                    the following format:</t>
                    <t>
                        <list>
                            <t>"OK"</t>
                        </list>
                    </t>
                    <t>Example:</t>
                    <t>
                        <list>
                            <t>C: "SET AUDIO_OUTPUT_DEVICE_PARAMETER 0 CHANNELS=4"</t>
                            <t>S: "OK"</t>
                        </list>
                    </t>
                    <t>Single line result sets are command specific. One
                    example of a single line result set is an empty line.
                    Multi-line result sets are command specific and may
                    include one or more lines of information. They MUST
                    always end with the following line:</t>
                    <t>
                        <list>
                            <t>"."</t>
                        </list>
                    </t>
                    <t>Example:</t>
                    <t>
                        <list>
                            <t>C: "GET AUDIO_OUTPUT_DEVICE INFO 0"</t>
                            <t>S: "DRIVER: ALSA"</t>
                            <t>&nbsp;&nbsp;&nbsp;"CHANNELS: 2"</t>
                            <t>&nbsp;&nbsp;&nbsp;"SAMPLERATE: 44100"</t>
                            <t>&nbsp;&nbsp;&nbsp;"ACTIVE: true"</t>
                            <t>&nbsp;&nbsp;&nbsp;"FRAGMENTS: 2"</t>
                            <t>&nbsp;&nbsp;&nbsp;"FRAGMENTSIZE: 128"</t>
                            <t>&nbsp;&nbsp;&nbsp;"CARD: '0,0'"</t>
                            <t>&nbsp;&nbsp;&nbsp;"."</t>
                        </list>
                    </t>
                    <t>In addition to above mentioned formats, warnings and
                    empty result sets MAY be indexed. In this case, they
                    have the following formats respectively:</t>
                    <t>
                        <list style="symbols">
                            <t>"WRN[&lt;index&gt;]:&lt;warning-code&gt;:&lt;warning-message&gt;"</t>
                            <t>"OK[&lt;index&gt;]"</t>
                        </list>
                    </t>
                    <t>where &lt;index&gt; is command specific and is used
                    to indicate channel number that the result set was
                    related to or other integer value.</t>
                    <t>Each line of the result set MUST end with
                    &lt;CRLF&gt;.</t>
                    <t>Examples:</t>
                    <t>
                        <list>
                            <t>C: "ADD CHANNEL"</t>
                            <t>S: "OK[12]"</t>
                        </list>
                    </t>
                    <t>
                        <list>
                            <t>C: "CREATE AUDIO_OUTPUT_DEVICE ALSA SAMPLERATE=96000"</t>
                            <t>S: "WRN[0]:32:Sample rate not supported, using 44100 instead."</t>
                        </list>
                    </t>
                </section>
            </section>
            <section title="Subscribe/notify communication method">
                <t>This more sophisticated communication method is actually
                only an extension of the simple request/response
                communication method. The front-end still uses a TCP
                connection and sends the same commands on the TCP
                connection. Two extra commands are SUBSCRIBE and UNSUBSCRIBE
                commands that allow a client to tell the server that it is
                interested in receiving notifications about certain events
                as they happen on the server. The SUBSCRIBE command has the
                following syntax:</t>

                <t>
                    <list>
                        <t>SUBSCRIBE &lt;event-id&gt;</t>
                    </list>
                </t>

                <t>where &lt;event-id&gt; will be replaced by the respective
                event that client wants to subscribe to. Upon receiving such
                request, server SHOULD respond with OK and start sending
                EVENT notifications when a given even has occurred to the
                front-end when an event has occurred. It MAY be possible
                certain events may be sent before OK response during real
                time nature of their generation. Event messages have the
                following format:</t>

                <t>
                    <list>
                        <t>NOTIFY:&lt;event-id&gt;:&lt;custom-event-data&gt;</t>
                    </list>
                </t>

                <t>where &lt;event-id&gt; uniquely identifies the event that
                has occurred and &lt;custom-event-data&gt; is event
                specific.</t>

                <t>Several rules must be followed by the server when
                generating events:</t>

                <t>
                    <list style="numbers">
                        <t>Events MUST NOT be sent to any client who has not
                        issued an appropriate SUBSCRIBE command.</t>
                        <t>Events MUST only be sent using the same
                        connection that was used to subscribe to them.</t>
                        <t>When response is being sent to the client, event
                        MUST be inserted in the stream before or after the
                        response, but NOT in the middle. Same is true about
                        the response. It should never be inserted in the
                        middle of the event message as well as any other
                        response.</t>
                    </list>
                </t>

                <t>If the client is not interested in a particular event
                anymore it MAY issue UNSUBSCRIBE command using the following
                syntax:</t>

                <t>
                    <list>
                        <t>UNSUBSCRIBE &lt;event-id&gt;</t>
                    </list>
                </t>

                <t>where &lt;event-id&gt; will be replace by the respective
                event that client is no longer interested in receiving. For
                a list of supported events see <xref target="events" />.</t>

                <t>Example: the fill states of disk stream buffers have
                changed on sampler channel 4 and the LinuxSampler instance
                will react by sending the following message to all clients
                who subscribed to this event:</t>

                <t>
                    <list>
                        <t>NOTIFY:CHANNEL_BUFFER_FILL:4 [35]62%,[33]80%,[37]98%</t>
                    </list>
                </t>

                <t>Which means there are currently three active streams on
                sampler channel 4, where the stream with ID "35" is filled
                by 62%, stream with ID 33 is filled by 80% and stream with
                ID 37 is filled by 98%.</t>

                <t>Clients may choose to open more than one connection to
                the server and use some connections to receive notifications
                while using other connections to issue commands to the
                back-end. This is entirely legal and up to the
                implementation. This does not change the protocol in any way
                and no special restrictions exist on the server to allow or
                disallow this or to track what connections belong to what
                front-ends. Server will listen on a single port, accept
                multiple connections and support protocol described in this
                specification in it's entirety on this single port on each
                connection that it accepted.</t>

                <t>Due to the fact that TCP is used for this communication,
                dead peers will be detected automatically by the OS TCP
                stack. While it may take a while to detect dead peers if no
                traffic is being sent from server to client (TCP keep-alive
                timer is set to 2 hours on many OSes) it will not be an
                issue here as when notifications are sent by the server,
                dead client will be detected quickly.</t>

                <t>When connection is closed for any reason server MUST
                forget all subscriptions that were made on this connection.
                If client reconnects it MUST resubscribe to all events that
                it wants to receive.</t>

            </section>
        </section>

        <section title="Description for control commands" anchor="control_commands">
            <t>This chapter will describe the available control commands
            that can be sent on the TCP connection in detail. Some certain
            commands (e.g. <xref target="GET CHANNEL INFO">"GET CHANNEL INFO"</xref>
            or <xref target="GET ENGINE INFO">"GET ENGINE INFO"</xref>) lead to
            multiple-line responses. In this case LinuxSampler signals the
            end of the response by a "." (single dot) line.</t>

            <section title="Ignored lines and comments">
                <t>White lines, that is lines which only contain space and
                tabulator characters, and lines that start with a "#"
                character are ignored, thus it's possible for example to
                group commands and to place comments in a LSCP script
                file.</t>
            </section>

            <section title="Configuring audio drivers">
                <t>Instances of drivers in LinuxSampler are called devices.
                You can use multiple audio devices simultaneously, e.g. to
                output the sound of one sampler channel using the ALSA audio
                output driver, and on another sampler channel you might want
                to use the JACK audio output driver. For particular audio
                output systems it's also possible to create several devices
                of the same audio output driver, e.g. two separate ALSA
                audio output devices for using two different sound cards at
                the same time. This chapter describes all commands to
                configure LinuxSampler's audio output devices and their
                parameters.</t>

                <t>Instead of defining commands and parameters for each
                driver individually, all possible parameters, their meanings
                and possible values have to be obtained at runtime. This
                makes the protocol a bit abstract, but has the advantage,
                that front-ends can be written independently of what drivers
                are currently implemented and what parameters these drivers
                are actually offering. This means front-ends can even handle
                drivers which are implemented somewhere in future without
                modifying the front-end at all.</t>

                <t>Note: examples in this chapter showing particular
                parameters of drivers are not meant as specification of the
                drivers' parameters. Driver implementations in LinuxSampler
                might have complete different parameter names and meanings
                than shown in these examples or might change in future, so
                these examples are only meant for showing how to retrieve
                what parameters drivers are offering, how to retrieve their
                possible values, etc.</t>

                <section title="Getting amount of available audio output drivers" anchor="GET AVAILABLE_AUDIO_OUTPUT_DRIVERS">
                    <t>Use the following command to get the number of
                    audio output drivers currently available for the
                    LinuxSampler instance:</t>
                    <t>
                        <list>
                            <t>GET AVAILABLE_AUDIO_OUTPUT_DRIVERS</t>
                        </list>
                    </t>
                    <t>Possible Answers:</t>
                    <t>
                        <list>
                            <t>LinuxSampler will answer by sending the
                            number of audio output drivers.</t>
                        </list>
                    </t>
                    <t>Example:</t>
                    <t>
                        <list>
                            <t>C: "GET AVAILABLE_AUDIO_OUTPUT_DRIVERS"</t>
                            <t>S: "2"</t>
                        </list>
                    </t>
                </section>

                <section title="Getting all available audio output drivers" anchor="LIST AVAILABLE_AUDIO_OUTPUT_DRIVERS">
                    <t>Use the following command to list all audio output
                    drivers currently available for the LinuxSampler
                    instance:</t>
                    <t>
                        <list>
                            <t>LIST AVAILABLE_AUDIO_OUTPUT_DRIVERS</t>
                        </list>
                    </t>
                    <t>Possible Answers:</t>
                    <t>
                        <list>
                            <t>LinuxSampler will answer by sending comma
                            separated character strings, each symbolizing an
                            audio output driver.</t>
                        </list>
                    </t>
                    <t>Example:</t>
                    <t>
                        <list>
                            <t>C: "LIST AVAILABLE_AUDIO_OUTPUT_DRIVERS"</t>
                            <t>S: "ALSA,JACK"</t>
                        </list>
                    </t>
                </section>

                <section title="Getting information about a specific audio
                output driver" anchor="GET AUDIO_OUTPUT_DRIVER INFO">
                    <t>Use the following command to get detailed information
                    about a specific audio output driver:</t>
                    <t>
                        <list>
                            <t>GET AUDIO_OUTPUT_DRIVER INFO
                             &lt;audio-output-driver&gt;</t>
                        </list>
                    </t>
                    <t>Where &lt;audio-output-driver&gt; is the name of the
                    audio output driver, returned by the
                    <xref target="LIST AVAILABLE_AUDIO_OUTPUT_DRIVERS">"LIST AVAILABLE_AUDIO_OUTPUT_DRIVERS"</xref> command.</t>
                    <t>Possible Answers:</t>
                    <t>
                        <list>
                            <t>LinuxSampler will answer by sending a
                            &lt;CRLF&gt; separated list. Each answer line
                            begins with the information category name
                            followed by a colon and then a space character
                            &lt;SP&gt; and finally the info character string
                            to that info category. At the moment the
                            following information categories are
                            defined:</t>

                            <t>
                              <list>
                                  <t>DESCRIPTION -
                                    <list>
                                      <t> character string describing the
                                      audio output driver</t>
                                    </list>
                                  </t>

                                  <t>VERSION -
                                    <list>
                                      <t>character string reflecting the
                                      driver's version</t>
                                    </list>
                                  </t>

                                  <t>PARAMETERS -
                                    <list>
                                      <t>comma separated list of all
                                      parameters available for the given
                                      audio output driver, at least
                                      parameters 'channels', 'samplerate'
                                      and 'active' are offered by all audio
                                      output drivers</t>
                                    </list>
                                  </t>
                              </list>
                            </t>

                            <t>The mentioned fields above don't have to be
                            in particular order.</t>
                        </list>
                    </t>
                    <t>Example:</t>
                    <t>
                      <list>
                          <t>C: "GET AUDIO_OUTPUT_DRIVER INFO ALSA"</t>
                          <t>S: "DESCRIPTION: Advanced Linux Sound
                          Architecture"</t>
                          <t>&nbsp;&nbsp;&nbsp;"VERSION: 1.0"</t>
                          <t>&nbsp;&nbsp;&nbsp;"PARAMETERS:
                          DRIVER,CHANNELS,SAMPLERATE,ACTIVE,FRAGMENTS,
                          FRAGMENTSIZE,CARD"</t>
                          <t>&nbsp;&nbsp;&nbsp;"."</t>
                      </list>
                    </t>
                </section>

                <section title="Getting information about specific audio
                output driver parameter" anchor="GET AUDIO_OUTPUT_DRIVER_PARAMETER INFO">
                    <t>Use the following command to get detailed information
                    about a  specific audio output driver parameter:</t>
                    <t>
                        <list>
                            <t>GET AUDIO_OUTPUT_DRIVER_PARAMETER INFO &lt;audio&gt; &lt;prm&gt; [&lt;deplist&gt;]</t>
                        </list>
                    </t>
                    <t>Where &lt;audio&gt; is the name of the audio output
                    driver as returned by the <xref target="LIST AVAILABLE_AUDIO_OUTPUT_DRIVERS">
                    "LIST AVAILABLE_AUDIO_OUTPUT_DRIVERS"</xref> command,
                    &lt;prm&gt; a specific parameter name for which information should be
                    obtained (as returned by the
                    <xref target="GET AUDIO_OUTPUT_DRIVER INFO">"GET AUDIO_OUTPUT_DRIVER INFO"</xref> command) and
                    &lt;deplist&gt; is an optional list of parameters on which the sought
                    parameter &lt;prm&gt; depends on, &lt;deplist&gt; is a list of key-value
                    pairs in form of "key1=val1 key2=val2 ...", where character string values
                    are encapsulated into apostrophes ('). Arguments given with &lt;deplist&gt;
                    which are not dependency parameters of &lt;prm&gt; will be ignored, means
                    the front-end application can simply put all parameters into &lt;deplist&gt;
                    with the values already selected by the user.</t>
                    <t>Possible Answers:</t>
                    <t>
                        <list>
                            <t>LinuxSampler will answer by sending a
                            &lt;CRLF&gt; separated list.
                            Each answer line begins with the information category name
                            followed by a colon and then a space character &lt;SP&gt; and
                            finally
                            the info character string to that info category. There are
                            information which is always returned, independently of the
                            given driver parameter and there are optional information
                            which is only shown dependently to given driver parameter. At
                            the moment the following information categories are defined:</t>
                        </list>
                    </t>

                    <t>
                        <list>
                            <t>TYPE -
                              <list>
                                <t>either "BOOL" for boolean value(s) or
                                "INT" for integer
                                value(s) or "FLOAT" for dotted number(s) or "STRING" for
                                character string(s)
                                (always returned, no matter which driver parameter)</t>
                              </list>
                            </t>

                            <t>DESCRIPTION -
                              <list>
                                <t>arbitrary text describing the purpose of the parameter
                                (always returned, no matter which driver parameter)</t>
                              </list>
                            </t>

                            <t>MANDATORY -
                              <list>
                                <t>either true or false, defines if this parameter must be
                                given when the device is to be created with the
                                <xref target="CREATE AUDIO_OUTPUT_DEVICE">'CREATE AUDIO_OUTPUT_DEVICE'</xref>
                                command (always returned, no matter which driver parameter)</t>
                              </list>
                            </t>

                            <t>FIX -
                              <list>
                                <t>either true or false, if false then this parameter can
                                be changed at any time, once the device is created by
                                the <xref target="CREATE AUDIO_OUTPUT_DEVICE">'CREATE AUDIO_OUTPUT_DEVICE'</xref>
                                command (always returned, no matter which driver parameter)</t>
                              </list>
                            </t>

                            <t>MULTIPLICITY -
                              <list>
                                <t>either true or false, defines if this parameter allows
                                only one value or a list of values, where true means
                                multiple values and false only a single value allowed
                                (always returned, no matter which driver parameter)</t>
                              </list>
                            </t>

                            <t>DEPENDS -
                              <list>
                                <t>comma separated list of parameters this parameter depends
                                on, means the values for fields 'DEFAULT', 'RANGE_MIN',
                                'RANGE_MAX' and 'POSSIBILITIES' might depend on these
                                listed parameters, for example assuming that an audio
                                driver (like the ALSA driver) offers parameters 'card'
                                and 'samplerate' then parameter 'samplerate' would
                                depend on 'card' because the possible values for
                                'samplerate' depends on the sound card which can be
                                chosen by the 'card' parameter
                                (optionally returned, dependent to driver parameter)</t>
                              </list>
                            </t>

                            <t>DEFAULT -
                              <list>
                                <t>reflects the default value for this parameter which is
                                used when the device is created and not explicitly
                                given with the <xref target="CREATE AUDIO_OUTPUT_DEVICE">
                                'CREATE AUDIO_OUTPUT_DEVICE'</xref> command,
                                in case of MULTIPLCITY=true, this is a comma separated
                                list, that's why character strings are encapsulated into
                                apostrophes (')
                                (optionally returned, dependent to driver parameter)</t>
                              </list>
                            </t>

                            <t>RANGE_MIN -
                              <list>
                                <t>defines lower limit of the allowed value range for this
                                parameter, can be an integer value as well as a dotted
                                number, this parameter is often used in conjunction
                                with RANGE_MAX, but may also appear without
                                (optionally returned, dependent to driver parameter)</t>
                              </list>
                            </t>

                            <t>RANGE_MAX -
                              <list>
                                <t>defines upper limit of the allowed value range for this
                                parameter, can be an integer value as well as a dotted
                                number, this parameter is often used in conjunction with
                                RANGE_MIN, but may also appear without
                                (optionally returned, dependent to driver parameter)</t>
                              </list>
                            </t>

                            <t>POSSIBILITIES -
                              <list>
                                <t>comma separated list of possible values for this
                                parameter, character strings are encapsulated into
                                apostrophes
                                (optionally returned, dependent to driver parameter)</t>
                              </list>
                            </t>
                        </list>
                    </t>

                    <t>The mentioned fields above don't have to be in particular order.</t>

                    <t>Examples:</t>
                    <t>
                        <list>
                            <t>C: "GET AUDIO_OUTPUT_DRIVER_PARAMETER INFO ALSA CARD"</t>
                            <t>S: "DESCRIPTION: sound card to be used"</t>
                            <t>&nbsp;&nbsp;&nbsp;"TYPE: STRING"</t>
                            <t>&nbsp;&nbsp;&nbsp;"MANDATORY: false"</t>
                            <t>&nbsp;&nbsp;&nbsp;"FIX: true"</t>
                            <t>&nbsp;&nbsp;&nbsp;"MULTIPLICITY: false"</t>
                            <t>&nbsp;&nbsp;&nbsp;"DEFAULT: '0,0'"</t>
                            <t>&nbsp;&nbsp;&nbsp;"POSSIBILITIES: '0,0','1,0','2,0'"</t>
                            <t>&nbsp;&nbsp;&nbsp;"."</t>
                        </list>
                    </t>
                    <t>
                        <list>
                            <t>C: "GET AUDIO_OUTPUT_DRIVER_PARAMETER INFO ALSA SAMPLERATE"</t>
                            <t>S: "DESCRIPTION: output sample rate in Hz"</t>
                            <t>&nbsp;&nbsp;&nbsp;"TYPE: INT"</t>
                            <t>&nbsp;&nbsp;&nbsp;"MANDATORY: false"</t>
                            <t>&nbsp;&nbsp;&nbsp;"FIX: false"</t>
                            <t>&nbsp;&nbsp;&nbsp;"MULTIPLICITY: false"</t>
                            <t>&nbsp;&nbsp;&nbsp;"DEPENDS: card"</t>
                            <t>&nbsp;&nbsp;&nbsp;"DEFAULT: 44100"</t>
                            <t>&nbsp;&nbsp;&nbsp;"."</t>
                        </list>
                    </t>
                    <t>
                        <list>
                            <t>C: "GET AUDIO_OUTPUT_DRIVER_PARAMETER INFO ALSA SAMPLERATE CARD='0,0'"</t>
                            <t>S: "DESCRIPTION: output sample rate in Hz"</t>
                            <t>&nbsp;&nbsp;&nbsp;"TYPE: INT"</t>
                            <t>&nbsp;&nbsp;&nbsp;"MANDATORY: false"</t>
                            <t>&nbsp;&nbsp;&nbsp;"FIX: false"</t>
                            <t>&nbsp;&nbsp;&nbsp;"MULTIPLICITY: false"</t>
                            <t>&nbsp;&nbsp;&nbsp;"DEPENDS: card"</t>
                            <t>&nbsp;&nbsp;&nbsp;"DEFAULT: 44100"</t>
                            <t>&nbsp;&nbsp;&nbsp;"RANGE_MIN: 22050"</t>
                            <t>&nbsp;&nbsp;&nbsp;"RANGE_MAX: 96000"</t>
                            <t>&nbsp;&nbsp;&nbsp;"."</t>
                        </list>
                    </t>
                </section>

                <section title="Creating an audio output device" anchor="CREATE AUDIO_OUTPUT_DEVICE">
                    <t>Use the following command to create a new audio output device for  the desired audio output system:</t>

                    <t>
                        <list>
                            <t>CREATE AUDIO_OUTPUT_DEVICE &lt;audio-output-driver&gt; [&lt;param-list&gt;]</t>
                        </list>
                    </t>

                    <t>Where &lt;audio-output-driver&gt; should be replaced by the desired audio
                    output system as returned by the
                    <xref target="LIST AVAILABLE_AUDIO_OUTPUT_DRIVERS">"LIST AVAILABLE_AUDIO_OUTPUT_DRIVERS"</xref>
                    command and &lt;param-list&gt; by an optional list of driver
                    specific parameters in form of "key1=val1 key2=val2 ...", where
                    character string values should be encapsulated into apostrophes (').
                    Note that there might be drivers which require parameter(s) to be
                    given with this command. Use the previously described commands in
                    this chapter to get this information.</t>

                    <t>Possible Answers:</t>
                    <t>
                        <list>
                            <t>"OK[&lt;device-id&gt;]" -
                                <list>
                                    <t>in case the device was successfully created, where
                                    &lt;device-id&gt; is the numerical ID of the new device</t>
                                </list>
                            </t>
                            <t>"WRN[&lt;device-id&gt;]:&lt;warning-code&gt;:&lt;warning-message&gt;" -
                                <list>
                                    <t>in case the device was created successfully, where
                                    &lt;device-id&gt; is the numerical ID of the new device, but there
                                    are noteworthy issue(s) related (e.g. sound card doesn't
                                    support given hardware parameters and the driver is using
                                    fall-back values), providing an appropriate warning code and
                                    warning message</t>
                                </list>
                            </t>
                            <t>"ERR:&lt;error-code&gt;:&lt;error-message&gt;" -
                                <list>
                                    <t>in case it failed, providing an appropriate error code and error message</t>
                                </list>
                            </t>
                        </list>
                    </t>
                    <t>Examples:</t>
                    <t>
                        <list>
                            <t>C: "CREATE AUDIO_OUTPUT_DEVICE ALSA"</t>
                            <t>S: "OK[0]"</t>
                        </list>
                    </t>
                    <t>
                        <list>
                            <t>C: "CREATE AUDIO_OUTPUT_DEVICE ALSA CARD='2,0' SAMPLERATE=96000"</t>
                            <t>S: "OK[1]"</t>
                        </list>
                    </t>
                </section>

                <section title="Destroying an audio output device" anchor="DESTROY AUDIO_OUTPUT_DEVICE">
                    <t>Use the following command to destroy a created output device:</t>
                    <t>
                        <list>
                            <t>DESTROY AUDIO_OUTPUT_DEVICE &lt;device-id&gt;</t>
                        </list>
                    </t>
                    <t>Where &lt;device-id&gt; should be replaced by the numerical ID of the
                    audio output device as given by the
                    <xref target="CREATE AUDIO_OUTPUT_DEVICE">"CREATE AUDIO_OUTPUT_DEVICE"</xref>
                    or <xref target="LIST AUDIO_OUTPUT_DEVICES">"LIST AUDIO_OUTPUT_DEVICES"</xref>
                    command.</t>
                    <t>Possible Answers:</t>
                    <t>
                        <list>
                            <t>"OK" -
                                <list>
                                    <t>in case the device was successfully destroyed</t>
                                </list>
                            </t>
                            <t>"WRN:&lt;warning-code&gt;:&lt;warning-message&gt;" -
                                <list>
                                    <t>in case the device was destroyed successfully, but there are
                                    noteworthy issue(s) related (e.g. an audio over ethernet
                                    driver was unloaded but the other host might not be
                                    informed about this situation), providing an appropriate
                                    warning code and warning message</t>
                                </list>
                            </t>
                            <t>"ERR:&lt;error-code&gt;:&lt;error-message&gt;" -
                                <list>
                                    <t>in case it failed, providing an appropriate error code and
                                    error message</t>
                                </list>
                            </t>
                        </list>
                    </t>
                    <t>Example:</t>
                    <t>
                        <list>
                            <t>C: "DESTROY AUDIO_OUTPUT_DEVICE 0"</t>
                            <t>S: "OK"</t>
                        </list>
                    </t>
                </section>

                <section title="Getting all created audio output device count" anchor="GET AUDIO_OUTPUT_DEVICES">
                    <t>Use the following command to count all created audio output devices:</t>
                    <t>
                        <list>
                            <t>GET AUDIO_OUTPUT_DEVICES</t>
                        </list>
                    </t>
                    <t>Possible Answers:</t>
                    <t>
                        <list>
                            <t>LinuxSampler will answer by sending the current number of all
                            audio output devices.</t>
                        </list>
                    </t>
                    <t>Example:</t>
                    <t>
                        <list>
                            <t>C: "GET AUDIO_OUTPUT_DEVICES"</t>
                            <t>S: "4"</t>
                        </list>
                    </t>
                </section>

                <section title="Getting all created audio output device list" anchor="LIST AUDIO_OUTPUT_DEVICES">
                    <t>Use the following command to list all created audio output devices:</t>
                    <t>
                        <list>
                            <t>LIST AUDIO_OUTPUT_DEVICES</t>
                        </list>
                    </t>
                    <t>Possible Answers:</t>
                    <t>
                        <list>
                            <t>LinuxSampler will answer by sending a comma separated list with
                            the numerical IDs of all audio output devices.</t>
                        </list>
                    </t>
                    <t>Example:</t>
                    <t>
                        <list>
                            <t>C: "LIST AUDIO_OUTPUT_DEVICES"</t>
                            <t>S: "0,1,4,5"</t>
                        </list>
                    </t>
                </section>

                <section title="Getting current settings of an audio output device" anchor="GET AUDIO_OUTPUT_DEVICE INFO">
                    <t>Use the following command to get current settings of a specific, created audio output device:</t>
                    <t>
                        <list>
                            <t>GET AUDIO_OUTPUT_DEVICE INFO &lt;device-id&gt;</t>
                        </list>
                    </t>
                    <t>Where &lt;device-id&gt; should be replaced by numerical ID
                    of the audio output device as e.g. returned by the
                    <xref target="LIST AUDIO_OUTPUT_DEVICES">"LIST AUDIO_OUTPUT_DEVICES"</xref> command.</t>
                    <t>Possible Answers:</t>
                    <t>LinuxSampler will answer by sending a &lt;CRLF&gt; separated list.
                    Each answer line begins with the information category name
                    followed by a colon and then a space character &lt;SP&gt; and finally
                    the info character string to that info category. As some
                    parameters might allow multiple values, character strings are
                    encapsulated into apostrophes ('). At the moment the following
                    information categories are defined (independently of device):</t>
                    <t>
                        <list>
                            <t>DRIVER -
                                <list>
                                    <t>identifier of the used audio output driver, as also
                                    returned by the
                                    <xref target="LIST AVAILABLE_AUDIO_OUTPUT_DRIVERS">
                                    "LIST AVAILABLE_AUDIO_OUTPUT_DRIVERS"</xref>
                                    command</t>
                                </list>
                            </t>
                            <t>CHANNELS -
                                <list>
                                    <t>amount of audio output channels this device currently
                                    offers</t>
                                </list>
                            </t>
                            <t>SAMPLERATE -
                                <list>
                                    <t>playback sample rate the device uses</t>
                                </list>
                            </t>
                            <t>ACTIVE -
                                <list>
                                    <t>either true or false, if false then the audio device is
                                    inactive and doesn't output any sound, nor do the
                                    sampler channels connected to this audio device render
                                    any audio</t>
                                </list>
                            </t>
                        </list>
                    </t>
                    <t>The mentioned fields above don't have to be in particular
                    order. The fields above are only those fields which are
                    returned by all audio output devices. Every audio output driver
                    might have its own, additional driver specific parameters (see
                    <xref target="GET AUDIO_OUTPUT_DRIVER INFO" />)
                    which are also returned by this command.</t>
                    <t>Example:</t>
                    <t>
                        <list>
                            <t>C: "GET AUDIO_OUTPUT_DEVICE INFO 0"</t>
                            <t>S: "DRIVER: ALSA"</t>
                            <t>&nbsp;&nbsp;&nbsp;"CHANNELS: 2"</t>
                            <t>&nbsp;&nbsp;&nbsp;"SAMPLERATE: 44100"</t>
                            <t>&nbsp;&nbsp;&nbsp;"ACTIVE: true"</t>
                            <t>&nbsp;&nbsp;&nbsp;"FRAGMENTS: 2"</t>
                            <t>&nbsp;&nbsp;&nbsp;"FRAGMENTSIZE: 128"</t>
                            <t>&nbsp;&nbsp;&nbsp;"CARD: '0,0'"</t>
                            <t>&nbsp;&nbsp;&nbsp;"."</t>
                        </list>
                    </t>
                </section>


                <section title="Changing settings of audio output devices" anchor="SET AUDIO_OUTPUT_DEVICE_PARAMETER">
                    <t>Use the following command to alter a specific setting of a created audio output device:</t>
                    <t>
                        <list>
                            <t>SET AUDIO_OUTPUT_DEVICE_PARAMETER &lt;device-id&gt; &lt;key&gt;=&lt;value&gt;</t>
                        </list>
                    </t>
                    <t>Where &lt;device-id&gt; should be replaced by the numerical ID of the
                    audio output device as given by the
                    <xref target="CREATE AUDIO_OUTPUT_DEVICE">"CREATE AUDIO_OUTPUT_DEVICE"</xref>
                    or <xref target="LIST AUDIO_OUTPUT_DEVICES">"LIST AUDIO_OUTPUT_DEVICES"</xref>
                    command, &lt;key&gt; by the name of the parameter to change
                    and &lt;value&gt; by the new value for this parameter.</t>
                    <t>Possible Answers:</t>
                    <t>
                        <list>
                            <t>"OK" -
                                <list>
                                    <t>in case setting was successfully changed</t>
                                </list>
                            </t>
                            <t>"WRN:&lt;warning-code&gt;:&lt;warning-message&gt;" -
                                <list>
                                    <t>in case setting was changed successfully, but there are
                                    noteworthy issue(s) related, providing an appropriate
                                    warning code and warning message</t>
                                </list>
                            </t>
                            <t>"ERR:&lt;error-code&gt;:&lt;error-message&gt;" -
                                <list>
                                    <t>in case it failed, providing an appropriate error code and
                                    error message</t>
                                </list>
                            </t>
                        </list>
                    </t>
                    <t>Example:</t>
                    <t>
                        <list>
                            <t>C: "SET AUDIO_OUTPUT_DEVICE_PARAMETER 0 FRAGMENTSIZE=128"</t>
                            <t>S: "OK"</t>
                        </list>
                    </t>
                </section>

                <section title="Getting information about an audio channel" anchor="GET AUDIO_OUTPUT_CHANNEL INFO">
                    <t>Use the following command to get information about an audio channel:</t>
                    <t>
                        <list>
                            <t>GET AUDIO_OUTPUT_CHANNEL INFO &lt;device-id&gt; &lt;audio-chan&gt;</t>
                        </list>
                    </t>
                    <t>Where &lt;device-id&gt; is the numerical ID of the audio output device as given by the
                    <xref target="CREATE AUDIO_OUTPUT_DEVICE">"CREATE AUDIO_OUTPUT_DEVICE"</xref>
                    or <xref target="LIST AUDIO_OUTPUT_DEVICES">"LIST AUDIO_OUTPUT_DEVICES"</xref>
                    command and &lt;audio-chan&gt; the audio channel number.</t>
                    <t>Possible Answers:</t>
                    <t>
                        <list>
                            <t>LinuxSampler will answer by sending a &lt;CRLF&gt; separated list.
                            Each answer line begins with the information category name
                            followed by a colon and then a space character &lt;SP&gt; and finally
                            the info character string to that info category. At the moment
                            the following information categories are defined:</t>

                            <t>
                                <list>
                                    <t>NAME -
                                        <list>
                                            <t>arbitrary character string naming the channel, which
                                            doesn't have to be unique (always returned by all audio channels)</t>
                                        </list>
                                    </t>
                                    <t>IS_MIX_CHANNEL -
                                        <list>
                                            <t>either true or false, a mix-channel is not a real,
                                            independent audio channel, but a virtual channel which
                                            is mixed to another real channel, this mechanism is
                                            needed for sampler engines which need more audio
                                            channels than the used audio system might be able to offer
                                            (always returned by all audio channels)</t>
                                        </list>
                                    </t>
                                    <t>MIX_CHANNEL_DESTINATION -
                                        <list>
                                            <t>numerical ID (positive integer including 0)
                                            which reflects the real audio channel (of the same audio
                                            output device) this mix channel refers to, means where
                                            the audio signal actually will be routed / added to
                                            (only returned in case the audio channel is mix channel)</t>
                                        </list>
                                    </t>
                                </list>
                            </t>
                        </list>
                    </t>

                    <t>The mentioned fields above don't have to be in particular
                    order. The fields above are only those fields which are
                    generally returned for the described cases by all audio
                    channels regardless of the audio driver. Every audio channel
                    might have its own, additional driver and channel specific
                    parameters.</t>

                    <t>Examples:</t>

                    <t>
                        <list>
                            <t>C: "GET AUDIO_OUTPUT_CHANNEL INFO 0 0"</t>
                            <t>S: "NAME: studio monitor left"</t>
                            <t>&nbsp;&nbsp;&nbsp;"IS_MIX_CHANNEL: false"</t>
                            <t>&nbsp;&nbsp;&nbsp;"."</t>
                        </list>
                    </t>

                    <t>
                        <list>
                            <t>C: "GET AUDIO_OUTPUT_CHANNEL INFO 0 1"</t>
                            <t>S: "NAME: studio monitor right"</t>
                            <t>&nbsp;&nbsp;&nbsp;"IS_MIX_CHANNEL: false"</t>
                            <t>&nbsp;&nbsp;&nbsp;"."</t>
                         </list>
                    </t>

                    <t>
                        <list>
                            <t>C: "GET AUDIO_OUTPUT_CHANNEL INFO 0 2"</t>
                            <t>S: "NAME: studio monitor left"</t>
                            <t>&nbsp;&nbsp;&nbsp;"IS_MIX_CHANNEL: true"</t>
                            <t>&nbsp;&nbsp;&nbsp;"MIX_CHANNEL_DESTINATION: 1"</t>
                            <t>&nbsp;&nbsp;&nbsp;"."</t>
                        </list>
                    </t>

                    <t>
                        <list>
                            <t>C: "GET AUDIO_OUTPUT_CHANNEL INFO 1 0"</t>
                            <t>S: "NAME: 'ardour (left)'"</t>
                            <t>&nbsp;&nbsp;&nbsp;"IS_MIX_CHANNEL: false"</t>
                            <t>&nbsp;&nbsp;&nbsp;"JACK_BINDINGS: 'ardour:0'"</t>
                            <t>&nbsp;&nbsp;&nbsp;"."</t>
                        </list>
                    </t>
                </section>

                <section title="Getting information about specific audio channel parameter" anchor="GET AUDIO_OUTPUT_CHANNEL_PARAMETER INFO">
                    <t>Use the following command to get detailed information about specific audio channel parameter:</t>

                    <t>
                        <list>
                            <t>GET AUDIO_OUTPUT_CHANNEL_PARAMETER INFO &lt;dev-id&gt; &lt;chan&gt; &lt;param&gt;</t>
                        </list>
                    </t>

                    <t>Where &lt;dev-id&gt; is the numerical ID of the audio output device as returned by the
                    <xref target="CREATE AUDIO_OUTPUT_DEVICE">"CREATE AUDIO_OUTPUT_DEVICE"</xref>
                    or <xref target="LIST AUDIO_OUTPUT_DEVICES">"LIST AUDIO_OUTPUT_DEVICES"</xref>
                    command, &lt;chan&gt; the audio channel number
                    and &lt;param&gt; a specific channel parameter name for which information should
                    be obtained (as returned by the <xref target="GET AUDIO_OUTPUT_CHANNEL INFO">
                    "GET AUDIO_OUTPUT_CHANNEL INFO"</xref> command).</t>
                    <t>Possible Answers:</t>

                    <t>
                        <list>
                            <t>LinuxSampler will answer by sending a &lt;CRLF&gt; separated list.
                            Each answer line begins with the information category name
                            followed by a colon and then a space character &lt;SP&gt; and finally
                            the info character string to that info category. There are
                            information which is always returned, independently of the
                            given channel parameter and there is optional information
                            which is only shown dependently to the given audio channel. At
                            the moment the following information categories are defined:</t>
                            <t>
                                <list>
                                    <t>TYPE -
                                        <list>
                                            <t>either "BOOL" for boolean value(s) or "INT" for integer
                                            value(s) or "FLOAT" for dotted number(s) or "STRING" for
                                            character string(s)
                                            (always returned)</t>
                                        </list>
                                    </t>
                                    <t>DESCRIPTION -
                                        <list>
                                            <t>arbitrary text describing the purpose of the parameter (always returned)</t>
                                        </list>
                                    </t>
                                    <t>FIX -
                                        <list>
                                            <t>either true or false, if true then this parameter is
                                            read only, thus cannot be altered
                                            (always returned)</t>
                                        </list>
                                    </t>
                                    <t>MULTIPLICITY -
                                        <list>
                                            <t>either true or false, defines if this parameter allows
                                            only one value or a list of values, where true means
                                            multiple values and false only a single value allowed
                                            (always returned)</t>
                                        </list>
                                    </t>
                                    <t>RANGE_MIN -
                                        <list>
                                            <t>defines lower limit of the allowed value range for this
                                            parameter, can be an integer value as well as a dotted
                                            number, usually used in conjunction with 'RANGE_MAX',
                                            but may also appear without
                                            (optionally returned, dependent to driver and channel
                                            parameter)</t>
                                        </list>
                                    </t>
                                    <t>RANGE_MAX -
                                        <list>
                                            <t>defines upper limit of the allowed value range for this
                                            parameter, can be an integer value as well as a dotted
                                            number, usually used in conjunction with 'RANGE_MIN',
                                            but may also appear without
                                            (optionally returned, dependent to driver and channel
                                            parameter)</t>
                                        </list>
                                    </t>
                                    <t>POSSIBILITIES -
                                        <list>
                                            <t>comma separated list of possible values for this
                                            parameter, character strings are encapsulated into
                                            apostrophes
                                            (optionally returned, dependent to driver and channel
                                            parameter)</t>
                                        </list>
                                    </t>
                                </list>
                            </t>
                            <t>The mentioned fields above don't have to be in particular order.</t>
                        </list>
                    </t>
                    <t>Example:</t>
                    <t>
                        <list>
                            <t>C: "GET AUDIO_OUTPUT_CHANNEL_PARAMETER INFO 1 0 JACK_BINDINGS"</t>
                            <t>S: "DESCRIPTION: bindings to other JACK clients"</t>
                            <t>&nbsp;&nbsp;&nbsp;"TYPE: STRING"</t>
                            <t>&nbsp;&nbsp;&nbsp;"FIX: false"</t>
                            <t>&nbsp;&nbsp;&nbsp;"MULTIPLICITY: true"</t>
                            <t>&nbsp;&nbsp;&nbsp;"POSSIBILITIES: 'PCM:0','PCM:1','ardour:0','ardour:1'"</t>
                            <t>&nbsp;&nbsp;&nbsp;"."</t>
                        </list>
                    </t>
                </section>

                <section title="Changing settings of audio output channels" anchor="SET AUDIO_OUTPUT_CHANNEL_PARAMETER">
                    <t>Use the following command to alter a specific setting of an audio output channel:</t>
                    <t>
                        <list>
                            <t>SET AUDIO_OUTPUT_CHANNEL_PARAMETER &lt;dev-id&gt; &lt;chn&gt; &lt;key&gt;=&lt;value&gt;</t>
                        </list>
                    </t>
                    <t>Where &lt;dev-id&gt; should be replaced by the numerical ID of the audio output device as returned by the
                    <xref target="CREATE AUDIO_OUTPUT_DEVICE">"CREATE AUDIO_OUTPUT_DEVICE"</xref>
                    or <xref target="LIST AUDIO_OUTPUT_DEVICES">"LIST AUDIO_OUTPUT_DEVICES"</xref>
                    command, &lt;chn&gt; by the audio channel number, &lt;key&gt; by the name of the
                    parameter to change and &lt;value&gt; by the new value for this parameter.</t>
                    <t>Possible Answers:</t>
                    <t>
                        <list>
                            <t>"OK" -
                                <list>
                                   <t>in case setting was successfully changed</t>
                                </list>
                            </t>
                            <t>"WRN:&lt;warning-code&gt;:&lt;warning-message&gt;" -
                                <list>
                                   <t>in case setting was changed successfully, but there are
                                   noteworthy issue(s) related, providing an appropriate
                                   warning code and warning message</t>
                                </list>
                            </t>
                            <t>"ERR:&lt;error-code&gt;:&lt;error-message&gt;" -
                                <list>
                                   <t>in case it failed, providing an appropriate error code and
                                   error message</t>
                                </list>
                            </t>
                        </list>
                    </t>
                    <t>Example:</t>
                    <t>
                        <list>
                            <t>C: "SET AUDIO_OUTPUT_CHANNEL PARAMETER 0 0 JACK_BINDINGS='PCM:0'"</t>
                            <t>S: "OK"</t>
                        </list>
                    </t>
                    <t>
                        <list>
                            <t>C: "SET AUDIO_OUTPUT_CHANNEL PARAMETER 0 0 NAME='monitor left'"</t>
                            <t>S: "OK"</t>
                        </list>
                    </t>
                </section>
            </section>

            <section title="Configuring MIDI input drivers">
                <t>Instances of drivers in LinuxSampler are called devices. You can use
                multiple MIDI devices simultaneously, e.g. to use MIDI over ethernet as
                MIDI input on one sampler channel and ALSA as MIDI input on another sampler
                channel. For particular MIDI input systems it's also possible to create
                several devices of the same MIDI input type. This chapter describes all
                commands to configure LinuxSampler's MIDI input devices and their parameters.</t>

                <t>Instead of defining commands and parameters for each driver individually,
                all possible parameters, their meanings and possible values have to be obtained
                at runtime. This makes the protocol a bit abstract, but has the advantage, that
                front-ends can be written independently of what drivers are currently implemented
                and what parameters these drivers are actually offering. This means front-ends can
                even handle drivers which are implemented somewhere in future without modifying
                the front-end at all.</t>

                <t>Commands for configuring MIDI input devices are pretty much the same as the
                commands for configuring audio output drivers, already described in the last
                chapter.</t>

                <t>Note: examples in this chapter showing particular parameters of drivers are
                not meant as specification of the drivers' parameters. Driver implementations in
                LinuxSampler might have complete different parameter names and meanings than shown
                in these examples or might change in future, so these examples are only meant for
                showing how to retrieve what parameters drivers are offering, how to retrieve their
                possible values, etc.</t>

                <section title="Getting amount of available MIDI input drivers" anchor="GET AVAILABLE_MIDI_INPUT_DRIVERS">
                    <t>Use the following command to get the number of
                    MIDI input drivers currently available for the
                    LinuxSampler instance:</t>
                    <t>
                        <list>
                            <t>GET AVAILABLE_MIDI_INPUT_DRIVERS</t>
                        </list>
                    </t>
                    <t>Possible Answers:</t>
                    <t>
                        <list>
                            <t>LinuxSampler will answer by sending the
                            number of available MIDI input drivers.</t>
                        </list>
                    </t>
                    <t>Example:</t>
                    <t>
                        <list>
                            <t>C: "GET AVAILABLE_MIDI_INPUT_DRIVERS"</t>
                            <t>S: "2"</t>
                        </list>
                    </t>
                </section>

                <section title="Getting all available MIDI input drivers" anchor="LIST AVAILABLE_MIDI_INPUT_DRIVERS">
                    <t>Use the following command to list all MIDI input drivers currently available
                    for the LinuxSampler instance:</t>
                    <t>
                        <list>
                            <t>LIST AVAILABLE_MIDI_INPUT_DRIVERS</t>
                        </list>
                    </t>
                    <t>Possible Answers:</t>
                    <t>
                        <list>
                            <t>LinuxSampler will answer by sending comma separated character
                            strings, each symbolizing a MIDI input driver.</t>
                        </list>
                    </t>
                    <t>Example:</t>
                    <t>
                        <list>
                            <t>C: "LIST AVAILABLE_MIDI_INPUT_DRIVERS"</t>
                            <t>S: "ALSA,JACK"</t>
                        </list>
                    </t>
                </section>

                <section title="Getting information about a specific MIDI input driver" anchor="GET MIDI_INPUT_DRIVER INFO">
                    <t>Use the following command to get detailed information about a specific MIDI input driver:</t>
                    <t>
                        <list>
                            <t>GET MIDI_INPUT_DRIVER INFO &lt;midi-input-driver&gt;</t>
                        </list>
                    </t>
                    <t>Where &lt;midi-input-driver&gt; is the name of the MIDI input driver as returned
                    by the <xref target="LIST AVAILABLE_MIDI_INPUT_DRIVERS">
                    "LIST AVAILABLE_MIDI_INPUT_DRIVERS"</xref> command.</t>
                    <t>Possible Answers:</t>
                    <t>
                        <list>
                            <t>LinuxSampler will answer by sending a &lt;CRLF&gt; separated list.
                            Each answer line begins with the information category name
                            followed by a colon and then a space character &lt;SP&gt; and finally
                            the info character string to that info category. At the moment
                            the following information categories are defined:</t>

                            <t>
                                <list>
                                    <t>DESCRIPTION -
                                        <list>
                                            <t>arbitrary description text about the MIDI input driver</t>
                                        </list>
                                    </t>
                                    <t>VERSION -
                                        <list>
                                            <t>arbitrary character string regarding the driver's version</t>
                                        </list>
                                    </t>
                                    <t>PARAMETERS -
                                        <list>
                                            <t>comma separated list of all parameters available for the given MIDI input driver</t>
                                        </list>
                                    </t>
                                </list>
                            </t>

                            <t>The mentioned fields above don't have to be in particular order.</t>
                        </list>
                    </t>

                    <t>Example:</t>

                    <t>
                        <list>
                            <t>C: "GET MIDI_INPUT_DRIVER INFO ALSA"</t>
                            <t>S: "DESCRIPTION: Advanced Linux Sound Architecture"</t>
                            <t>&nbsp;&nbsp;&nbsp;"VERSION: 1.0"</t>
                            <t>&nbsp;&nbsp;&nbsp;"PARAMETERS: DRIVER,ACTIVE"</t>
                            <t>&nbsp;&nbsp;&nbsp;"."</t>
                        </list>
                    </t>
                </section>

                <section title="Getting information about specific MIDI input driver parameter" anchor="GET MIDI_INPUT_DRIVER_PARAMETER INFO">
                    <t>Use the following command to get detailed information about a specific parameter of a specific MIDI input driver:</t>
                    <t>
                        <list>
                            <t>GET MIDI_INPUT_DRIVER_PARAMETER INFO &lt;midit&gt; &lt;param&gt; [&lt;deplist&gt;]</t>
                        </list>
                    </t>

                    <t>Where &lt;midit&gt; is the name of the MIDI input driver as returned
                    by the <xref target="LIST AVAILABLE_MIDI_INPUT_DRIVERS">
                    "LIST AVAILABLE_MIDI_INPUT_DRIVERS"</xref> command, &lt;param&gt; a specific
                    parameter name for which information should be obtained (as returned by the
                    <xref target="GET MIDI_INPUT_DRIVER INFO">
                    "GET MIDI_INPUT_DRIVER INFO"</xref> command) and &lt;deplist&gt; is an optional list
                    of parameters on which the sought parameter &lt;param&gt; depends on,
                    &lt;deplist&gt; is a key-value pair list in form of "key1=val1 key2=val2 ...",
                    where character string values are encapsulated into apostrophes ('). Arguments
                    given with &lt;deplist&gt; which are not dependency parameters of &lt;param&gt;
                    will be ignored, means the front-end application can simply put all parameters
                    in &lt;deplist&gt; with the values selected by the user.</t>

                    <t>Possible Answers:</t>

                    <t>LinuxSampler will answer by sending a &lt;CRLF> separated list.
                    Each answer line begins with the information category name
                    followed by a colon and then a space character &lt;SP> and finally
                    the info character string to that info category. There is
                    information which is always returned, independent of the
                    given driver parameter and there is optional information
                    which is only shown dependent to given driver parameter. At
                    the moment the following information categories are defined:</t>

                    <t>
                        <list>
                            <t>TYPE -
                              <list>
                                <t>either "BOOL" for boolean value(s) or "INT" for integer
                                value(s) or "FLOAT" for dotted number(s) or "STRING" for
                                character string(s)
                                (always returned, no matter which driver parameter)</t>
                              </list>
                            </t>

                            <t>DESCRIPTION -
                              <list>
                                <t>arbitrary text describing the purpose of the parameter
                                (always returned, no matter which driver parameter)</t>
                              </list>
                            </t>

                            <t>MANDATORY -
                              <list>
                                <t>either true or false, defines if this parameter must be
                                given when the device is to be created with the
                                <xref target="CREATE MIDI_INPUT_DEVICE">
                                'CREATE MIDI_INPUT_DEVICE'</xref> command
                                (always returned, no matter which driver parameter)</t>
                              </list>
                            </t>

                            <t>FIX -
                              <list>
                                <t>either true or false, if false then this parameter can
                                be changed at any time, once the device is created by
                                the <xref target="CREATE MIDI_INPUT_DEVICE">
                                'CREATE MIDI_INPUT_DEVICE'</xref> command
                                (always returned, no matter which driver parameter)</t>
                              </list>
                            </t>

                            <t>MULTIPLICITY -
                              <list>
                                <t>either true or false, defines if this parameter allows
                                only one value or a list of values, where true means
                                multiple values and false only a single value allowed
                                (always returned, no matter which driver parameter)</t>
                              </list>
                            </t>

                            <t>DEPENDS -
                              <list>
                                <t>comma separated list of parameters this parameter depends
                                on, means the values for fields 'DEFAULT', 'RANGE_MIN',
                                'RANGE_MAX' and 'POSSIBILITIES' might depend on these
                                listed parameters, for example assuming that an audio
                                driver (like the ALSA driver) offers parameters 'card'
                                and 'samplerate' then parameter 'samplerate' would
                                depend on 'card' because the possible values for
                                'samplerate' depends on the sound card which can be
                                chosen by the 'card' parameter
                                (optionally returned, dependent to driver parameter)</t>
                              </list>
                            </t>

                            <t>DEFAULT -
                              <list>
                                <t>reflects the default value for this parameter which is
                                used when the device is created and not explicitly
                                given with the <xref target="CREATE MIDI_INPUT_DEVICE">
                                'CREATE MIDI_INPUT_DEVICE'</xref> command,
                                in case of MULTIPLCITY=true, this is a comma separated
                                list, that's why character strings are encapsulated into
                                apostrophes (')
                                (optionally returned, dependent to driver parameter)</t>
                              </list>
                            </t>

                            <t>RANGE_MIN -
                              <list>
                                <t>defines lower limit of the allowed value range for this
                                parameter, can be an integer value as well as a dotted
                                number, this parameter is often used in conjunction
                                with RANGE_MAX, but may also appear without
                                (optionally returned, dependent to driver parameter)</t>
                              </list>
                            </t>

                            <t>RANGE_MAX -
                              <list>
                                <t>defines upper limit of the allowed value range for this
                                parameter, can be an integer value as well as a dotted
                                number, this parameter is often used in conjunction with
                                RANGE_MIN, but may also appear without
                                (optionally returned, dependent to driver parameter)</t>
                              </list>
                            </t>

                            <t>POSSIBILITIES -
                              <list>
                                <t>comma separated list of possible values for this
                                parameter, character strings are encapsulated into
                                apostrophes
                                (optionally returned, dependent to driver parameter)</t>
                              </list>
                            </t>
                        </list>
                    </t>

                    <t>The mentioned fields above don't have to be in particular order.</t>

                    <t>Example:</t>
                    <t>
                        <list>
                            <t>C: "GET MIDI_INPUT_DRIVER_PARAMETER INFO ALSA ACTIVE"</t>
                            <t>S: "DESCRIPTION: Whether device is enabled"</t>
                            <t>&nbsp;&nbsp;&nbsp;"TYPE: BOOL"</t>
                            <t>&nbsp;&nbsp;&nbsp;"MANDATORY: false"</t>
                            <t>&nbsp;&nbsp;&nbsp;"FIX: false"</t>
                            <t>&nbsp;&nbsp;&nbsp;"MULTIPLICITY: false"</t>
                            <t>&nbsp;&nbsp;&nbsp;"DEFAULT: true"</t>
                            <t>&nbsp;&nbsp;&nbsp;"."</t>
                        </list>
                    </t>
                </section>

                <section title="Creating a MIDI input device" anchor="CREATE MIDI_INPUT_DEVICE">
                    <t>Use the following command to create a new MIDI input device for  the desired MIDI input system:</t>
                    <t>
                        <list>
                            <t>CREATE MIDI_INPUT_DEVICE &lt;midi-input-driver&gt; [&lt;param-list&gt;]</t>
                        </list>
                    </t>

                    <t>Where &lt;midi-input-driver&gt; should be replaced by the desired MIDI input system as returned
                    by the <xref target="LIST AVAILABLE_MIDI_INPUT_DRIVERS">
                    "LIST AVAILABLE_MIDI_INPUT_DRIVERS"</xref> command and &lt;param-list&gt; by an
                    optional list of driver specific parameters in form of "key1=val1 key2=val2 ...", where
                    character string values should be encapsulated into apostrophes (').
                    Note that there might be drivers which require parameter(s) to be
                    given with this command. Use the previously described commands in
                    this chapter to get that information.</t>

                    <t>Possible Answers:</t>
                    <t>
                        <list>
                            <t>"OK[&lt;device-id&gt;]" -
                                <list>
                                    <t>in case the device was successfully created, where
                                    &lt;device-id&gt; is the numerical ID of the new device</t>
                                </list>
                            </t>
                            <t>"WRN[&lt;device-id&gt;]:&lt;warning-code&gt;:&lt;warning-message&gt;" -
                                <list>
                                    <t>in case the driver was loaded successfully, where
                                    &lt;device-id&gt; is the numerical ID of the new device, but
                                    there are noteworthy issue(s) related, providing an
                                    appropriate warning code and warning message</t>
                                </list>
                            </t>
                            <t>"ERR:&lt;error-code&gt;:&lt;error-message&gt;" -
                                <list>
                                    <t>in case it failed, providing an appropriate error code and error message</t>
                                </list>
                            </t>
                        </list>
                    </t>
                    <t>Example:</t>
                    <t>
                        <list>
                            <t>C: "CREATE MIDI_INPUT_DEVICE ALSA"</t>
                            <t>S: "OK[0]"</t>
                        </list>
                    </t>
                </section>

                <section title="Destroying a MIDI input device" anchor="DESTROY MIDI_INPUT_DEVICE">
                    <t>Use the following command to destroy a created MIDI input device:</t>
                    <t>
                        <list>
                            <t>DESTROY MIDI_INPUT_DEVICE &lt;device-id&gt;</t>
                        </list>
                    </t>
                    <t>Where &lt;device-id&gt; should be replaced by the device's numerical ID as returned by the
                    <xref target="CREATE MIDI_INPUT_DEVICE">"CREATE MIDI_INPUT_DEVICE"</xref>
                    or <xref target="LIST MIDI_INPUT_DEVICES">"LIST MIDI_INPUT_DEVICES"</xref>
                    command.</t>
                    <t>Possible Answers:</t>
                    <t>
                        <list>
                            <t>"OK" -
                                <list>
                                    <t>in case the device was successfully destroyed</t>
                                </list>
                            </t>
                            <t>"WRN:&lt;warning-code&gt;:&lt;warning-message&gt;" -
                                <list>
                                    <t>in case the device was destroyed, but there are noteworthy
                                    issue(s) related, providing an appropriate warning code and
                                    warning message</t>
                                </list>
                            </t>
                            <t>"ERR:&lt;error-code&gt;:&lt;error-message&gt;" -
                                <list>
                                    <t>in case it failed, providing an appropriate error code and error message</t>
                                </list>
                            </t>
                        </list>
                    </t>
                    <t>Example:</t>
                    <t>
                        <list>
                            <t>C: "DESTROY MIDI_INPUT_DEVICE 0"</t>
                            <t>S: "OK"</t>
                        </list>
                    </t>
                </section>

                <section title="Getting all created MIDI input device count" anchor="GET MIDI_INPUT_DEVICES">
                    <t>Use the following command to count all created MIDI input devices:</t>
                    <t>
                        <list>
                            <t>GET MIDI_INPUT_DEVICES</t>
                        </list>
                    </t>
                    <t>Possible Answers:</t>
                    <t>
                        <list>
                            <t>LinuxSampler will answer by sending the current number of all
                            MIDI input devices.</t>
                        </list>
                    </t>
                    <t>Example:</t>
                    <t>
                        <list>
                            <t>C: "GET MIDI_INPUT_DEVICES"</t>
                            <t>S: "3"</t>
                        </list>
                    </t>
                </section>


                <section title="Getting all created MIDI input device list" anchor="LIST MIDI_INPUT_DEVICES">
                    <t>Use the following command to list all created MIDI input devices:</t>
                    <t>
                        <list>
                            <t>LIST MIDI_INPUT_DEVICES</t>
                        </list>
                    </t>
                    <t>Possible Answers:</t>
                    <t>
                        <list>
                            <t>LinuxSampler will answer by sending a comma separated list
                            with the numerical Ids of all created MIDI input devices.</t>
                        </list>
                    </t>
                    <t>Examples:</t>
                    <t>
                        <list>
                            <t>C: "LIST MIDI_INPUT_DEVICES"</t>
                            <t>S: "0,1,2"</t>
                        </list>
                    </t>
                    <t>
                        <list>
                            <t>C: "LIST MIDI_INPUT_DEVICES"</t>
                            <t>S: "1,3"</t>
                        </list>
                    </t>
                </section>

                <section title="Getting current settings of a MIDI input device" anchor="GET MIDI_INPUT_DEVICE INFO">
                    <t>Use the following command to get current settings of a specific, created MIDI input device:</t>
                    <t>
                        <list>
                            <t>GET MIDI_INPUT_DEVICE INFO &lt;device-id&gt;</t>
                        </list>
                    </t>
                    <t>Where &lt;device-id&gt; is the numerical ID of the MIDI input device as returned by the
                    <xref target="CREATE MIDI_INPUT_DEVICE">"CREATE MIDI_INPUT_DEVICE"</xref>
                    or <xref target="LIST MIDI_INPUT_DEVICES">"LIST MIDI_INPUT_DEVICES"</xref>
                    command.</t>
                    <t>Possible Answers:</t>
                    <t>
                        <list>
                            <t>LinuxSampler will answer by sending a &lt;CRLF&gt; separated list.
                            Each answer line begins with the information category name
                            followed by a colon and then a space character &lt;SP&gt; and finally
                            the info character string to that info category. As some
                            parameters might allow multiple values, character strings are
                            encapsulated into apostrophes ('). At the moment the following
                            information categories are defined (independent of driver):</t>

                            <t>
                                <list>
                                    <t>DRIVER -
                                        <list>
                                            <t>identifier of the used MIDI input driver, as e.g.
                                            returned by the <xref target="LIST AVAILABLE_MIDI_INPUT_DRIVERS">
                                            "LIST AVAILABLE_MIDI_INPUT_DRIVERS"</xref>
                                            command</t>
                                        </list>
                                    </t>
                                </list>
                                <list>
                                    <t>ACTIVE -
                                        <list>
                                            <t>either true or false, if false then the MIDI device is
                                            inactive and doesn't listen to any incoming MIDI events
                                            and thus doesn't forward them to connected sampler
                                            channels</t>
                                        </list>
                                    </t>
                                </list>
                            </t>
                        </list>
                    </t>

                    <t>The mentioned fields above don't have to be in particular
                    order. The fields above are only those fields which are
                    returned by all MIDI input devices. Every MIDI input driver
                    might have its own, additional driver specific parameters (see
                    <xref target="GET MIDI_INPUT_DRIVER INFO">
                    "GET MIDI_INPUT_DRIVER INFO"</xref> command) which are also returned
                    by this command.</t>

                    <t>Example:</t>
                    <t>
                        <list>
                            <t>C: "GET MIDI_INPUT_DEVICE INFO 0"</t>
                            <t>S: "DRIVER: ALSA"</t>
                            <t>&nbsp;&nbsp;&nbsp;"ACTIVE: true"</t>
                            <t>&nbsp;&nbsp;&nbsp;"."</t>
                        </list>
                    </t>
                </section>

                <section title="Changing settings of MIDI input devices" anchor="SET MIDI_INPUT_DEVICE_PARAMETER">
                    <t>Use the following command to alter a specific setting of a created MIDI input device:</t>
                    <t>
                        <list>
                            <t>SET MIDI_INPUT_DEVICE_PARAMETER &lt;device-id&gt; &lt;key&gt;=&lt;value&gt;</t>
                        </list>
                    </t>

                    <t>Where &lt;device-id&gt; should be replaced by the numerical ID of the
                    MIDI input device as returned by the
                    <xref target="CREATE MIDI_INPUT_DEVICE">"CREATE MIDI_INPUT_DEVICE"</xref>
                    or <xref target="LIST MIDI_INPUT_DEVICES">"LIST MIDI_INPUT_DEVICES"</xref>
                    command, &lt;key&gt; by the name of the parameter to change and
                    &lt;value&gt; by the new value for this parameter.</t>

                    <t>Possible Answers:</t>
                    <t>
                        <list>
                            <t>"OK" -
                                <list>
                                    <t>in case setting was successfully changed</t>
                                </list>
                            </t>
                            <t>"WRN:&lt;warning-code&gt;:&lt;warning-message&gt;" -
                                <list>
                                    <t>in case setting was changed successfully, but there are
                                    noteworthy issue(s) related, providing an appropriate
                                    warning code and warning message</t>
                                </list>
                            </t>
                            <t>"ERR:&lt;error-code&gt;:&lt;error-message&gt;" -
                                <list>
                                    <t>in case it failed, providing an appropriate error code and error message</t>
                                </list>
                            </t>
                        </list>
                    </t>
                    <t>Example:</t>
                    <t>
                        <list>
                            <t>C: "SET MIDI_INPUT_DEVICE_PARAMETER 0 ACTIVE=false"</t>
                            <t>S: "OK"</t>
                        </list>
                    </t>
                </section>

                <section title="Getting information about a MIDI port" anchor="GET MIDI_INPUT_PORT INFO">
                    <t>Use the following command to get information about a MIDI port:</t>
                    <t>
                        <list>
                            <t>GET MIDI_INPUT_PORT INFO &lt;device-id&gt; &lt;midi-port&gt;</t>
                        </list>
                    </t>
                    <t>Where &lt;device-id&gt; is the numerical ID of the MIDI input device as returned by the
                    <xref target="CREATE MIDI_INPUT_DEVICE">"CREATE MIDI_INPUT_DEVICE"</xref>
                    or <xref target="LIST MIDI_INPUT_DEVICES">"LIST MIDI_INPUT_DEVICES"</xref>
                    command and &lt;midi-port&gt; the MIDI input port number.</t>
                    <t>Possible Answers:</t>
                    <t>
                        <list>
                            <t>LinuxSampler will answer by sending a &lt;CRLF&gt; separated list.
                            Each answer line begins with the information category name
                            followed by a colon and then a space character &lt;SP&gt; and finally
                            the info character string to that info category. At the moment
                            the following information categories are defined:</t>

                            <t>NAME -
                                <list>
                                    <t>arbitrary character string naming the port</t>
                                </list>
                            </t>
                        </list>
                    </t>

                    <t>The field above is only the one which is returned by all MIDI
                    ports regardless of the MIDI driver and port. Every MIDI port
                    might have its own, additional driver and port specific
                    parameters.</t>

                    <t>Example:</t>
                    <t>
                        <list>
                            <t>C: "GET MIDI_INPUT_PORT INFO 0 0"</t>
                            <t>S: "NAME: 'Masterkeyboard'"</t>
                            <t>&nbsp;&nbsp;&nbsp;"ALSA_SEQ_BINDINGS: '64:0'"</t>
                            <t>&nbsp;&nbsp;&nbsp;"."</t>
                        </list>
                    </t>
                </section>

                <section title="Getting information about specific MIDI port parameter" anchor="GET MIDI_INPUT_PORT_PARAMETER INFO">
                    <t>Use the following command to get detailed information about specific MIDI port parameter:</t>
                    <t>
                        <list>
                            <t>GET MIDI_INPUT_PORT_PARAMETER INFO &lt;dev-id&gt; &lt;port&gt; &lt;param&gt;</t>
                        </list>
                    </t>

                    <t>Where &lt;dev-id&gt; is the numerical ID of the MIDI input device as returned by the
                    <xref target="CREATE MIDI_INPUT_DEVICE">"CREATE MIDI_INPUT_DEVICE"</xref>
                    or <xref target="LIST MIDI_INPUT_DEVICES">"LIST MIDI_INPUT_DEVICES"</xref>
                    command, &lt;port&gt; the MIDI port number and
                    &lt;param&gt; a specific port parameter name for which information should be
                    obtained (as returned by the <xref target="GET MIDI_INPUT_PORT INFO">
                    "GET MIDI_INPUT_PORT INFO"</xref> command).</t>

                    <t>Possible Answers:</t>
                    <t>
                        <list>
                            <t>LinuxSampler will answer by sending a &lt;CRLF&gt; separated list.
                            Each answer line begins with the information category name
                            followed by a colon and then a space character &lt;SP&gt; and finally
                            the info character string to that info category. There is
                            information which is always returned, independently of the
                            given channel parameter and there is optional information
                            which are only shown dependently to the given MIDI port. At the
                            moment the following information categories are defined:</t>

                            <t>TYPE -
                                <list>
                                    <t>either "BOOL" for boolean value(s) or "INT" for integer
                                    value(s) or "FLOAT" for dotted number(s) or "STRING" for
                                    character string(s)
                                    (always returned)</t>
                                </list>
                            </t>
                            <t>DESCRIPTION -
                                <list>
                                    <t>arbitrary text describing the purpose of the parameter
                                    (always returned)</t>
                                </list>
                            </t>
                            <t>FIX -
                                <list>
                                    <t>either true or false, if true then this parameter is
                                    read only, thus cannot be altered
                                    (always returned)</t>
                                </list>
                            </t>
                            <t>MULTIPLICITY -
                                <list>
                                    <t>either true or false, defines if this parameter allows
                                    only one value or a list of values, where true means
                                    multiple values and false only a single value allowed
                                    (always returned)</t>
                                </list>
                            </t>
                            <t>RANGE_MIN -
                                <list>
                                    <t>defines lower limit of the allowed value range for this
                                    parameter, can be an integer value as well as a dotted
                                    number, this parameter is usually used in conjunction
                                    with 'RANGE_MAX' but may also appear without
                                    (optionally returned, dependent to driver and port
                                    parameter)</t>
                                </list>
                            </t>
                            <t>RANGE_MAX -
                                <list>
                                    <t>defines upper limit of the allowed value range for this
                                    parameter, can be an integer value as well as a dotted
                                    number, this parameter is usually used in conjunction
                                    with 'RANGE_MIN' but may also appear without
                                    (optionally returned, dependent to driver and port
                                    parameter)</t>
                                </list>
                            </t>
                            <t>POSSIBILITIES -
                                <list>
                                    <t>comma separated list of possible values for this
                                    parameter, character strings are encapsulated into
                                    apostrophes
                                    (optionally returned, dependent to device and port
                                    parameter)</t>
                                </list>
                            </t>
                        </list>
                    </t>

                    <t>The mentioned fields above don't have to be in particular order.</t>

                    <t>Example:</t>
                    <t>
                        <list>
                            <t>C: "GET MIDI_INPUT_PORT_PARAMETER INFO 0 0 ALSA_SEQ_BINDINGS"</t>
                            <t>S: "DESCRIPTION: bindings to other ALSA sequencer clients"</t>
                            <t>&nbsp;&nbsp;&nbsp;"TYPE: STRING"</t>
                            <t>&nbsp;&nbsp;&nbsp;"FIX: false"</t>
                            <t>&nbsp;&nbsp;&nbsp;"MULTIPLICITY: true"</t>
                            <t>&nbsp;&nbsp;&nbsp;"POSSIBILITIES: '64:0','68:0','68:1'"</t>
                            <t>&nbsp;&nbsp;&nbsp;"."</t>
                        </list>
                    </t>
                </section>

                <section title="Changing settings of MIDI input ports" anchor="SET MIDI_INPUT_PORT_PARAMETER">
                    <t>Use the following command to alter a specific setting of a MIDI input port:</t>
                    <t>
                        <list>
                            <t>SET MIDI_INPUT_PORT_PARAMETER &lt;device-id&gt; &lt;port&gt; &lt;key&gt;=&lt;value&gt;</t>
                        </list>
                    </t>

                    <t>Where &lt;device-id&gt; should be replaced by the numerical ID of the
                    MIDI device as returned by the
                    <xref target="CREATE MIDI_INPUT_DEVICE">"CREATE MIDI_INPUT_DEVICE"</xref>
                    or <xref target="LIST MIDI_INPUT_DEVICES">"LIST MIDI_INPUT_DEVICES"</xref>
                    command, &lt;port&gt; by the MIDI port number, &lt;key&gt; by the name of
                    the parameter to change and &lt;value&gt; by the new value for this
                    parameter (encapsulated into apostrophes) or NONE (not encapsulated into apostrophes)
		    for specifying no value for parameters allowing a list of values.</t>

                    <t>Possible Answers:</t>
                    <t>
                        <list>
                            <t>"OK" -
                                <list>
                                    <t>in case setting was successfully changed</t>
                                </list>
                            </t>
                            <t>"WRN:&lt;warning-code&gt;:&lt;warning-message&gt;" -
                                <list>
                                    <t>in case setting was changed successfully, but there are
                                    noteworthy issue(s) related, providing an appropriate
                                    warning code and warning message</t>
                                </list>
                            </t>
                            <t>"ERR:&lt;error-code&gt;:&lt;error-message&gt;" -
                                <list>
                                    <t>in case it failed, providing an appropriate error code and error message</t>
                                </list>
                            </t>
                        </list>
                    </t>
                    <t>Example:</t>
                    <t>
                        <list>
                            <t>C: "SET MIDI_INPUT_PORT_PARAMETER 0 0 ALSA_SEQ_BINDINGS='20:0'"</t>
                            <t>S: "OK"</t>
                        </list>
                    </t>
                    <t>
                        <list>
                            <t>C: "SET MIDI_INPUT_PORT_PARAMETER 0 0 ALSA_SEQ_BINDINGS=NONE"</t>
                            <t>S: "OK"</t>
                        </list>
                    </t>
                </section>
            </section>

            <section title="Configuring sampler channels">
                <t>The following commands describe how to add and remove sampler channels, associate a
                sampler channel with a sampler engine, load instruments and connect sampler channels to
                MIDI and audio devices.</t>

                <section title="Loading an instrument" anchor="LOAD INSTRUMENT">
                    <t>An instrument file can be loaded and assigned to a sampler channel by one of the following commands:</t>
                    <t>
                        <list>
                            <t>LOAD INSTRUMENT [NON_MODAL] '&lt;filename&gt;' &lt;instr-index&gt; &lt;sampler-channel&gt;</t>
                        </list>
                    </t>

                    <t>Where &lt;filename&gt; is the name of the instrument file on the
                    LinuxSampler instance's host system, &lt;instr-index&gt; the index of the
                    instrument in the instrument file and &lt;sampler-channel> is the
                    number of the sampler channel the instrument should be assigned to.
                    Each sampler channel can only have one instrument.</t>

                    <t>Notice: since LSCP 1.2 the &lt;filename&gt; argument supports
                    escape characters for special characters (see chapter
                    "<xref target="character_set">Character Set and Escape Sequences</xref>"
                    for details) and accordingly backslash characters in the filename
                    MUST now be escaped as well!</t>

                    <t>The difference between regular and NON_MODAL versions of the command
                    is that the regular command returns OK only after the instrument has been
                    fully loaded and the channel is ready to be used while NON_MODAL version
                    returns immediately and a background process is launched to load the instrument
                    on the channel. The <xref target="GET CHANNEL INFO">GET CHANNEL INFO</xref>
                    command can be used to obtain loading
                    progress from INSTRUMENT_STATUS field. LOAD command will perform sanity checks
                    such as making sure that the file could be read and it is of a proper format
                    and SHOULD return ERR and SHOULD not launch the background process should any
                    errors be detected at that point.</t>

                    <t>Possible Answers:</t>
                    <t>
                        <list>
                            <t>"OK" -
                                <list>
                                    <t>in case the instrument was successfully loaded</t>
                                </list>
                            </t>
                            <t>"WRN:&lt;warning-code&gt;:&lt;warning-message&gt;" -
                                <list>
                                    <t>in case the instrument was loaded successfully, but there
                                    are noteworthy issue(s) related (e.g. Engine doesn't support
                                    one or more patch parameters provided by the loaded
                                    instrument file), providing an appropriate warning code and
                                    warning message</t>
                                </list>
                            </t>
                            <t>"ERR:&lt;error-code&gt;:&lt;error-message&gt;" -
                                <list>
                                    <t>in case it failed, providing an appropriate error code and error message</t>
                                </list>
                            </t>
                        </list>
                    </t>
                    <t>Example:</t>
                    <t>
                        <list>
                            <t></t>
                        </list>
                    </t>
                </section>

                <section title="Loading a sampler engine" anchor="LOAD ENGINE">
                    <t>A sampler engine type can be associated to a specific sampler
                    channel by the following command:</t>
                    <t>
                        <list>
                            <t>LOAD ENGINE &lt;engine-name&gt; &lt;sampler-channel&gt;</t>
                        </list>
                    </t>

                    <t>Where &lt;engine-name&gt; is an engine name as obtained by the
                    <xref target="LIST AVAILABLE_ENGINES">
                    "LIST AVAILABLE_ENGINES"</xref> command and &lt;sampler-channel&gt;
                    the sampler channel as returned by the
                    <xref target="ADD CHANNEL">"ADD CHANNEL"</xref> or
                    <xref target="LIST CHANNELS">"LIST CHANNELS"</xref> command where
                    the engine type should be assigned to. This command should be issued
                    after adding a new sampler channel and before any other control
                    commands on the new sampler channel. It can also be used to change
                    the engine type of a sampler channel. This command has (currently) no
                    way to define or force if a new engine instance should be created and
                    assigned to the given sampler channel or if an already existing
                    instance of that engine type, shared with other sampler channels,
                    should be used.</t>

                    <t>Possible Answers:</t>
                    <t>
                        <list>
                            <t>"OK" -
                                <list>
                                    <t>in case the engine was successfully deployed</t>
                                </list>
                            </t>
                            <t>"WRN:&lt;warning-code&gt;:&lt;warning-message&gt;" -
                                <list>
                                    <t>in case the engine was deployed successfully, but there
                                    are noteworthy issue(s) related, providing an appropriate
                                    warning code and warning message</t>
                                </list>
                            </t>
                            <t>"ERR:&lt;error-code&gt;:&lt;error-message&gt;" -
                                <list>
                                    <t>in case it failed, providing an appropriate error code and
                                    error message</t>
                                </list>
                            </t>
                        </list>
                    </t>
                    <t>Example:</t>
                    <t>
                        <list>
                            <t></t>
                        </list>
                    </t>
                </section>

                <section title="Getting all created sampler channel count" anchor="GET CHANNELS">
                    <t>The number of sampler channels can change on runtime. To get the
                    current amount of sampler channels, the front-end can send the
                    following command:</t>
                    <t>
                        <list>
                            <t>GET CHANNELS</t>
                        </list>
                    </t>
                    <t>Possible Answers:</t>
                    <t>
                        <list>
                            <t>LinuxSampler will answer by returning the current number of sampler channels.</t>
                        </list>
                    </t>
                    <t>Example:</t>
                    <t>
                        <list>
                            <t>C: "GET CHANNELS"</t>
                            <t>S: "12"</t>
                        </list>
                    </t>
                </section>

                <section title="Getting all created sampler channel list" anchor="LIST CHANNELS">
                    <t>The number of sampler channels can change on runtime. To get the
                    current list of sampler channels, the front-end can send the
                    following command:</t>
                    <t>
                        <list>
                            <t>LIST CHANNELS</t>
                        </list>
                    </t>
                    <t>Possible Answers:</t>
                    <t>
                        <list>
                            <t>LinuxSampler will answer by returning a comma separated list
                            with all sampler channels numerical IDs.</t>
                        </list>
                    </t>
                    <t>Example:</t>
                    <t>
                        <list>
                            <t>C: "LIST CHANNELS"</t>
                            <t>S: "0,1,2,3,4,5,6,9,10,11,15,20"</t>
                        </list>
                    </t>
                </section>

                <section title="Adding a new sampler channel" anchor="ADD CHANNEL">
                    <t>A new sampler channel can be added to the end of the sampler
                    channel list by sending the following command:</t>
                    <t>
                        <list>
                            <t>ADD CHANNEL</t>
                        </list>
                    </t>
                    <t>This will increment the sampler channel count by one and the new
                    sampler channel will be appended to the end of the sampler channel
                    list. The front-end should send the respective, related commands
                    right after to e.g. load an engine, load an instrument and setting
                    input, output method and eventually other commands to initialize
                    the new channel. The front-end should use the sampler channel
                    returned by the answer of this command to perform the previously
                    recommended commands, to avoid race conditions e.g. with other
                    front-ends that might also have sent an "ADD CHANNEL" command.</t>
                    <t>Possible Answers:</t>
                    <t>
                        <list>
                            <t>"OK[&lt;sampler-channel&gt;]" -
                                <list>
                                    <t>in case a new sampler channel could be added, where
                                    &lt;sampler-channel&gt; reflects the channel number of the new
                                    created sampler channel which should be used to set up
                                    the sampler channel by sending subsequent initialization
                                    commands</t>
                                </list>
                            </t>
                            <t>"WRN:&lt;warning-code&gt;:&lt;warning-message&gt;" -
                                <list>
                                    <t>in case a new channel was added successfully, but there are
                                    noteworthy issue(s) related, providing an appropriate
                                    warning code and warning message</t>
                                </list>
                            </t>
                            <t>"ERR:&lt;error-code&gt;:&lt;error-message&gt;" -
                                <list>
                                    <t>in case it failed, providing an appropriate error code and
                                    error message</t>
                                </list>
                            </t>
                        </list>
                    </t>
                    <t>Example:</t>
                    <t>
                        <list>
                            <t></t>
                        </list>
                    </t>
                </section>

                <section title="Removing a sampler channel" anchor="REMOVE CHANNEL">
                    <t>A sampler channel can be removed by sending the following command:</t>
                    <t>
                        <list>
                            <t>REMOVE CHANNEL &lt;sampler-channel&gt;</t>
                        </list>
                    </t>

                    <t>Where &lt;sampler-channel&gt; should be replaced by the
                    number of the sampler channel as given by the
                    <xref target="ADD CHANNEL">"ADD CHANNEL"</xref>
                    or <xref target="LIST CHANNELS">"LIST CHANNELS"</xref>
                    command. The channel numbers of all subsequent sampler channels
                    remain the same.</t>

                    <t>Possible Answers:</t>
                    <t>
                        <list>
                            <t>"OK" -
                                <list>
                                    <t>in case the given sampler channel could be removed</t>
                                </list>
                            </t>
                            <t>"WRN:&lt;warning-code&gt;:&lt;warning-message&gt;" -
                                <list>
                                    <t>in case the given channel was removed, but there are
                                    noteworthy issue(s) related, providing an appropriate
                                    warning code and warning message</t>
                                </list>
                            </t>
                            <t>"ERR:&lt;error-code&gt;:&lt;error-message&gt;" -
                                <list>
                                    <t>in case it failed, providing an appropriate error code and
                                    error message</t>
                                </list>
                            </t>
                        </list>
                    </t>
                    <t>Example:</t>
                    <t>
                        <list>
                            <t></t>
                        </list>
                    </t>
                </section>

                <section title="Getting amount of available engines" anchor="GET AVAILABLE_ENGINES">
                    <t>The front-end can ask for the number of available engines by sending the following command:</t>
                    <t>
                        <list>
                            <t>GET AVAILABLE_ENGINES</t>
                        </list>
                    </t>
                    <t>Possible Answers:</t>
                    <t>
                        <list>
                            <t>LinuxSampler will answer by sending the number o