--- web/trunk/www.linuxsampler.org/api/draft-linuxsampler-protocol.html 2005/05/24 03:18:31 574 +++ web/trunk/www.linuxsampler.org/api/draft-linuxsampler-protocol.html 2005/05/24 03:26:22 575 @@ -110,11 +110,11 @@
- - + +
LinuxSampler DevelopersC. Schoenebeck
Internet-DraftInteressengemeinschaft Software
Expires: November 19, 2005Engineering e. V.
 May 21, 2005
Expires: November 22, 2005Engineering e. V.
 May 24, 2005

LinuxSampler Control Protocol
-

lscp.txt
+

LSCP 1.0

Status of this Memo

@@ -137,7 +137,7 @@ The list of Internet-Draft Shadow Directories can be accessed at http://www.ietf.org/shadow.html.

-This Internet-Draft will expire on November 19, 2005.

+This Internet-Draft will expire on November 22, 2005.

Copyright Notice

@@ -147,170 +147,174 @@

The LinuxSampler Control Protocol (LSCP) is an application-level protocol primarily intended for local and - remote controlling the LinuxSampler main application, which is a - sophisticated console application essentially playing back audio - samples and manipulating the samples in real time to certain - extent. + 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.



Table of Contents

1.  Requirements notation
-2.  +2.  +Versioning of this specification
+3.  Introduction
-3.  +4.  Focus of this protocol
-4.  +5.  Communication Overview
-    4.1  +    5.1  Request/response communication method
-        4.1.1  +        5.1.1  Result format
-    4.2  +    5.2  Subscribe/notify communication method
-5.  +6.  Description for control commands
-    5.1  +    6.1  Ignored lines and comments
-    5.2  +    6.2  Configuring audio drivers
-        5.2.1  +        6.2.1  Getting amount of available audio output drivers
-        5.2.2  +        6.2.2  Getting all available audio output drivers
-        5.2.3  +        6.2.3  Getting information about a specific audio output driver
-        5.2.4  +        6.2.4  Getting information about specific audio output driver parameter
-        5.2.5  +        6.2.5  Creating an audio output device
-        5.2.6  +        6.2.6  Destroying an audio output device
-        5.2.7  +        6.2.7  Getting all created audio output device count
-        5.2.8  +        6.2.8  Getting all created audio output device list
-        5.2.9  +        6.2.9  Getting current settings of an audio output device
-        5.2.10  +        6.2.10  Changing settings of audio output devices
-        5.2.11  +        6.2.11  Getting information about an audio channel
-        5.2.12  +        6.2.12  Getting information about specific audio channel parameter
-        5.2.13  +        6.2.13  Changing settings of audio output channels
-    5.3  +    6.3  Configuring MIDI input drivers
-        5.3.1  +        6.3.1  Getting amount of available MIDI input drivers
-        5.3.2  +        6.3.2  Getting all available MIDI input drivers
-        5.3.3  +        6.3.3  Getting information about a specific MIDI input driver
-        5.3.4  +        6.3.4  Getting information about specific MIDI input driver parameter
-        5.3.5  +        6.3.5  Creating a MIDI input device
-        5.3.6  +        6.3.6  Destroying a MIDI input device
-        5.3.7  +        6.3.7  Getting all created MIDI input device count
-        5.3.8  +        6.3.8  Getting all created MIDI input device list
-        5.3.9  +        6.3.9  Getting current settings of a MIDI input device
-        5.3.10  +        6.3.10  Changing settings of MIDI input devices
-        5.3.11  +        6.3.11  Getting information about a MIDI port
-        5.3.12  +        6.3.12  Getting information about specific MIDI port parameter
-        5.3.13  +        6.3.13  Changing settings of MIDI input ports
-    5.4  +    6.4  Configuring sampler channels
-        5.4.1  +        6.4.1  Loading an instrument
-        5.4.2  +        6.4.2  Loading a sampler engine
-        5.4.3  +        6.4.3  Getting all created sampler channel count
-        5.4.4  +        6.4.4  Getting all created sampler channel list
-        5.4.5  +        6.4.5  Adding a new sampler channel
-        5.4.6  +        6.4.6  Removing a sampler channel
-        5.4.7  +        6.4.7  Getting amount of available engines
-        5.4.8  +        6.4.8  Getting all available engines
-        5.4.9  +        6.4.9  Getting information about an engine
-        5.4.10  +        6.4.10  Getting sampler channel information
-        5.4.11  +        6.4.11  Current number of active voices
-        5.4.12  +        6.4.12  Current number of active disk streams
-        5.4.13  +        6.4.13  Current fill state of disk stream buffers
-        5.4.14  +        6.4.14  Setting audio output device
-        5.4.15  +        6.4.15  Setting audio output type
-        5.4.16  +        6.4.16  Setting audio output channel
-        5.4.17  +        6.4.17  Setting MIDI input device
-        5.4.18  +        6.4.18  Setting MIDI input type
-        5.4.19  +        6.4.19  Setting MIDI input port
-        5.4.20  +        6.4.20  Setting MIDI input channel
-        5.4.21  +        6.4.21  Setting channel volume
-        5.4.22  +        6.4.22  Resetting a sampler channel
-    5.5  +    6.5  Controlling connection
-        5.5.1  +        6.5.1  Register front-end for receiving event messages
-        5.5.2  +        6.5.2  Unregister front-end for not receiving event messages
-        5.5.3  +        6.5.3  Enable or disable echo of commands
-        5.5.4  +        6.5.4  Close client connection
-    5.6  +    6.6  Global commands
-        5.6.1  +        6.6.1  Reset sampler
-6.  +        6.6.2  +General sampler informations
+7.  Command Syntax
-7.  +8.  Events
-    7.1  +    8.1  Number of sampler channels changed
-    7.2  +    8.2  Number of active voices changed
-    7.3  +    8.3  Number of active disk streams changed
-    7.4  +    8.4  Disk stream buffer fill state changed
-    7.5  +    8.5  Channel information changed
-    7.6  +    8.6  Miscellaneous and debugging events
-8.  +9.  Security Considerations
-9.  +10.  Acknowledgments
-10.  +11.  References
§  Author's Address
@@ -326,7 +330,7 @@

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 [RFC2119]Bradner, S., Key words for use in RFCs to Indicate Requirement Levels, March 1997.. + described in [RFC2119]Bradner, S., Key words for use in RFCs to Indicate Requirement Levels, 1997..

This protocol is always case-sensitive if not explicitly claimed the opposite. @@ -393,9 +397,54 @@

where again <CR> and <LF> symbolize the carriage return and line feed characters respectively.

+

+
 TOC 
+

2. Versioning of this specification

+ +

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: + +

+

+
+

"1.2" +

+
+ +

+ 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: + +

+

Compatibility: +

+

+
    +
  1. The frontend's LSCP major version and the sampler's LSCP + major version are exactly equal. +
  2. +
  3. The frontend's LSCP minor version is less or equal than + the sampler's LSCP minor version. +
  4. +
+ +

+ Compatibility can only be claimed if both rules are true. + The frontend can use the + "GET SERVER INFO"General sampler informations command to + get the version of the LSCP specification the sampler complies with. + +



 TOC 
-

2. Introduction

+

3. Introduction

LinuxSampler is a so called software sampler application capable to playback audio samples from a computer's Random @@ -408,7 +457,7 @@ 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 - engine will be assigned an own instance of one of the available + 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 @@ -416,7 +465,7 @@



 TOC 
-

3. Focus of this protocol

+

4. Focus of this protocol

Main focus of this protocol is to provide a way to configure a running LinuxSampler instance and to retrieve information @@ -428,7 +477,7 @@



 TOC 
-

4. Communication Overview

+

5. Communication Overview

There are two distinct methods of communication between a running instance of LinuxSampler and one or more control @@ -441,9 +490,10 @@ implemented in the front-end application. The two communication methods will be described next.

-

4.1 Request/response communication method

+

5.1 Request/response communication method

-

This simple communication method is based on TCP. The +

This simple communication method is based on + TCPDefense Advanced Research Projects Agency, TRANSMISSION CONTROL PROTOCOL, 1981.[RFC793]. 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 @@ -483,7 +533,7 @@ processed in the order they were received and result sets MUST be sent back in the same order.

-

4.1.1 Result format

+

5.1.1 Result format

Result set could be one of the following types:

@@ -647,7 +697,7 @@

-

4.2 Subscribe/notify communication method

+

5.2 Subscribe/notify communication method

This more sophisticated communication method is actually only an extension of the simple request/response @@ -716,7 +766,7 @@

where <event-id> will be replace by the respective event that client is no longer interested in receiving. For - a list of supported events see Section 7Events. + a list of supported events see Section 8Events.

Example: the fill states of disk stream buffers have changed on sampler channel 4 and the LinuxSampler instance @@ -759,9 +809,9 @@ If client reconnects it MUST resubscribe to all events that it wants to receive.

-

+

 TOC 
-

5. Description for control commands

+

6. Description for control commands

This chapter will describe the available control commands that can be sent on the TCP connection in detail. Some certain @@ -770,7 +820,7 @@ multiple-line responses. In this case LinuxSampler signals the end of the response by a "." (single dot) line.

-

5.1 Ignored lines and comments

+

6.1 Ignored lines and comments

White lines, that is lines which only contain space and tabulator characters, and lines that start with a "#" @@ -778,7 +828,7 @@ group commands and to place comments in a LSCP script file.

-

5.2 Configuring audio drivers

+

6.2 Configuring audio drivers

Instances of drivers in LinuxSampler are called devices. You can use multiple audio devices simultaneously, e.g. to @@ -811,7 +861,7 @@ what parameters drivers are offering, how to retrieve their possible values, etc.

-

5.2.1 Getting amount of available audio output drivers

+

6.2.1 Getting amount of available audio output drivers

Use the following command to get the number of audio output drivers currently available for the @@ -842,7 +892,7 @@

-

5.2.2 Getting all available audio output drivers

+

6.2.2 Getting all available audio output drivers

Use the following command to list all audio output drivers currently available for the LinuxSampler @@ -874,7 +924,7 @@

-

5.2.3 Getting information about a specific audio +

6.2.3 Getting information about a specific audio output driver

Use the following command to get detailed information @@ -960,7 +1010,7 @@

-

5.2.4 Getting information about specific audio +

6.2.4 Getting information about specific audio output driver parameter

Use the following command to get detailed information @@ -1190,7 +1240,7 @@

-

5.2.5 Creating an audio output device

+

6.2.5 Creating an audio output device

Use the following command to create a new audio output device for the desired audio output system:

@@ -1201,7 +1251,9 @@

Where <audio-output-driver> should be replaced by the desired audio - output system and <param-list> by an optional list of driver + output system as returned by the + "LIST AVAILABLE_AUDIO_OUTPUT_DRIVERS"Getting all available audio output drivers + command and <param-list> 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 @@ -1259,7 +1311,7 @@

-

5.2.6 Destroying an audio output device

+

6.2.6 Destroying an audio output device

Use the following command to destroy a created output device:

@@ -1317,7 +1369,7 @@

-

5.2.7 Getting all created audio output device count

+

6.2.7 Getting all created audio output device count

Use the following command to count all created audio output devices:

@@ -1346,7 +1398,7 @@

-

5.2.8 Getting all created audio output device list

+

6.2.8 Getting all created audio output device list

Use the following command to list all created audio output devices:

@@ -1375,7 +1427,7 @@

-

5.2.9 Getting current settings of an audio output device

+

6.2.9 Getting current settings of an audio output device

Use the following command to get current settings of a specific, created audio output device:

@@ -1442,7 +1494,7 @@ 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 - Section 5.2.3Getting information about a specific audio output driver) + Section 6.2.3Getting information about a specific audio output driver) which are also returned by this command.

Example: @@ -1469,7 +1521,7 @@

-

5.2.10 Changing settings of audio output devices

+

6.2.10 Changing settings of audio output devices

Use the following command to alter a specific setting of a created audio output device:

@@ -1480,7 +1532,10 @@

Where <device-id> should be replaced by the numerical ID of the - audio output device, <key> by the name of the parameter to change + audio output device as given by the + "CREATE AUDIO_OUTPUT_DEVICE"Creating an audio output device + or "LIST AUDIO_OUTPUT_DEVICES"Getting all created audio output device list + command, <key> by the name of the parameter to change and <value> by the new value for this parameter.

Possible Answers: @@ -1523,7 +1578,7 @@

-

5.2.11 Getting information about an audio channel

+

6.2.11 Getting information about an audio channel

Use the following command to get information about an audio channel:

@@ -1533,8 +1588,10 @@

-

Where <device-id> is the numerical ID of the audio output device - and <audio-chan> the audio channel number. +

Where <device-id> is the numerical ID of the audio output device as given by the + "CREATE AUDIO_OUTPUT_DEVICE"Creating an audio output device + or "LIST AUDIO_OUTPUT_DEVICES"Getting all created audio output device list + command and <audio-chan> the audio channel number.

Possible Answers:

@@ -1644,7 +1701,7 @@

-

5.2.12 Getting information about specific audio channel parameter

+

6.2.12 Getting information about specific audio channel parameter

Use the following command to get detailed information about specific audio channel parameter:

@@ -1654,8 +1711,9 @@

-

Where <dev-id> is the numerical ID of the audio output device as returned - by the "LIST AUDIO_OUTPUT_DEVICES"Getting all created audio output device list +

Where <dev-id> is the numerical ID of the audio output device as returned by the + "CREATE AUDIO_OUTPUT_DEVICE"Creating an audio output device + or "LIST AUDIO_OUTPUT_DEVICES"Getting all created audio output device list command, <chan> the audio channel number and <param> a specific channel parameter name for which information should be obtained (as returned by the "GET AUDIO_OUTPUT_CHANNEL INFO"Getting information about an audio channel command). @@ -1772,7 +1830,7 @@

-

5.2.13 Changing settings of audio output channels

+

6.2.13 Changing settings of audio output channels

Use the following command to alter a specific setting of an audio output channel:

@@ -1782,8 +1840,10 @@

-

Where <dev-id> should be replaced by the numerical ID of the audio - device, <chn> by the audio channel number, <key> by the name of the +

Where <dev-id> should be replaced by the numerical ID of the audio output device as returned by the + "CREATE AUDIO_OUTPUT_DEVICE"Creating an audio output device + or "LIST AUDIO_OUTPUT_DEVICES"Getting all created audio output device list + command, <chn> by the audio channel number, <key> by the name of the parameter to change and <value> by the new value for this parameter.

Possible Answers: @@ -1834,7 +1894,7 @@

-

5.3 Configuring MIDI input drivers

+

6.3 Configuring MIDI input drivers

Instances of drivers in LinuxSampler are called devices. You can use multiple MIDI devices simultaneously, e.g. to use MIDI over ethernet as @@ -1862,7 +1922,7 @@ showing how to retrieve what parameters drivers are offering, how to retrieve their possible values, etc.

-

5.3.1 Getting amount of available MIDI input drivers

+

6.3.1 Getting amount of available MIDI input drivers

Use the following command to get the number of MIDI input drivers currently available for the @@ -1893,7 +1953,7 @@

-

5.3.2 Getting all available MIDI input drivers

+

6.3.2 Getting all available MIDI input drivers

Use the following command to list all MIDI input drivers currently available for the LinuxSampler instance: @@ -1923,7 +1983,7 @@

-

5.3.3 Getting information about a specific MIDI input driver

+

6.3.3 Getting information about a specific MIDI input driver

Use the following command to get detailed information about a specific MIDI input driver:

@@ -1933,7 +1993,8 @@

-

Where <midi-input-driver> is the name of the MIDI input driver. +

Where <midi-input-driver> is the name of the MIDI input driver as returned + by the "LIST AVAILABLE_MIDI_INPUT_DRIVERS"Getting all available MIDI input drivers command.

Possible Answers:

@@ -1990,7 +2051,7 @@

-

5.3.4 Getting information about specific MIDI input driver parameter

+

6.3.4 Getting information about specific MIDI input driver parameter

Use the following command to get detailed information about a specific parameter of a specific MIDI input driver:

@@ -2159,7 +2220,7 @@

-

5.3.5 Creating a MIDI input device

+

6.3.5 Creating a MIDI input device

Use the following command to create a new MIDI input device for the desired MIDI input system:

@@ -2169,7 +2230,8 @@

-

Where <midi-input-driver> should be replaced by the desired MIDI input system and <param-list> by an +

Where <midi-input-driver> should be replaced by the desired MIDI input system as returned + by the "LIST AVAILABLE_MIDI_INPUT_DRIVERS"Getting all available MIDI input drivers command and <param-list> 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 @@ -2217,7 +2279,7 @@

-

5.3.6 Destroying a MIDI input device

+

6.3.6 Destroying a MIDI input device

Use the following command to destroy a created MIDI input device:

@@ -2227,7 +2289,10 @@

-

Where <device-id> should be replaced by the device's numerical ID. +

Where <device-id> should be replaced by the device's numerical ID as returned by the + "CREATE MIDI_INPUT_DEVICE"Creating a MIDI input device + or "LIST MIDI_INPUT_DEVICES"Getting all created MIDI input device list + command.

Possible Answers:

@@ -2268,7 +2333,7 @@

-

5.3.7 Getting all created MIDI input device count

+

6.3.7 Getting all created MIDI input device count

Use the following command to count all created MIDI input devices:

@@ -2297,7 +2362,7 @@

-

5.3.8 Getting all created MIDI input device list

+

6.3.8 Getting all created MIDI input device list

Use the following command to list all created MIDI input devices:

@@ -2334,7 +2399,7 @@

-

5.3.9 Getting current settings of a MIDI input device

+

6.3.9 Getting current settings of a MIDI input device

Use the following command to get current settings of a specific, created MIDI input device:

@@ -2344,7 +2409,10 @@

-

Where <device-id> is the numerical ID of the MIDI input device. +

Where <device-id> is the numerical ID of the MIDI input device as returned by the + "CREATE MIDI_INPUT_DEVICE"Creating a MIDI input device + or "LIST MIDI_INPUT_DEVICES"Getting all created MIDI input device list + command.

Possible Answers:

@@ -2406,7 +2474,7 @@

-

5.3.10 Changing settings of MIDI input devices

+

6.3.10 Changing settings of MIDI input devices

Use the following command to alter a specific setting of a created MIDI input device:

@@ -2417,7 +2485,10 @@

Where <device-id> should be replaced by the numerical ID of the - MIDI input device, <key> by the name of the parameter to change and + MIDI input device as returned by the + "CREATE MIDI_INPUT_DEVICE"Creating a MIDI input device + or "LIST MIDI_INPUT_DEVICES"Getting all created MIDI input device list + command, <key> by the name of the parameter to change and <value> by the new value for this parameter.

Possible Answers: @@ -2459,7 +2530,7 @@

-

5.3.11 Getting information about a MIDI port

+

6.3.11 Getting information about a MIDI port

Use the following command to get information about a MIDI port:

@@ -2469,8 +2540,10 @@

-

Where <device-id> is the numerical ID of the MIDI input device - and <midi-port> the MIDI input port number. +

Where <device-id> is the numerical ID of the MIDI input device as returned by the + "CREATE MIDI_INPUT_DEVICE"Creating a MIDI input device + or "LIST MIDI_INPUT_DEVICES"Getting all created MIDI input device list + command and <midi-port> the MIDI input port number.

Possible Answers:

@@ -2510,7 +2583,7 @@

-

5.3.12 Getting information about specific MIDI port parameter

+

6.3.12 Getting information about specific MIDI port parameter

Use the following command to get detailed information about specific MIDI port parameter:

@@ -2520,8 +2593,10 @@

-

Where <dev-id> is the numerical ID of the MIDI input device as returned - by the "LIST MIDI_INPUT_DEVICES"Getting all created MIDI input device list command, <port> the MIDI port number and +

Where <dev-id> is the numerical ID of the MIDI input device as returned by the + "CREATE MIDI_INPUT_DEVICE"Creating a MIDI input device + or "LIST MIDI_INPUT_DEVICES"Getting all created MIDI input device list + command, <port> the MIDI port number and <param> a specific port parameter name for which information should be obtained (as returned by the "GET MIDI_INPUT_PORT INFO"Getting information about a MIDI port command).

@@ -2634,7 +2709,7 @@

-

5.3.13 Changing settings of MIDI input ports

+

6.3.13 Changing settings of MIDI input ports

Use the following command to alter a specific setting of a MIDI input port:

@@ -2645,7 +2720,10 @@

Where <device-id> should be replaced by the numerical ID of the - MIDI device, <port> by the MIDI port number, <key> by the name of + MIDI device as returned by the + "CREATE MIDI_INPUT_DEVICE"Creating a MIDI input device + or "LIST MIDI_INPUT_DEVICES"Getting all created MIDI input device list + command, <port> by the MIDI port number, <key> by the name of the parameter to change and <value> by the new value for this parameter.

@@ -2686,12 +2764,13 @@

-

5.4 Configuring sampler channels

+

6.4 Configuring sampler channels

-

The following commands describe how to add and remove sampler channels, deploy - sampler engines, load instruments and connect sampler channels to MIDI and audio devices. +

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.

-

5.4.1 Loading an instrument

+

6.4.1 Loading an instrument

An instrument file can be loaded and assigned to a sampler channel by one of the following commands:

@@ -2757,9 +2836,9 @@

-

5.4.2 Loading a sampler engine

+

6.4.2 Loading a sampler engine

-

A sample engine can be deployed and assigned to a specific sampler +

A sampler engine type can be associated to a specific sampler channel by the following command:

@@ -2769,10 +2848,18 @@

Where <engine-name> is an engine name as obtained by the - "LIST AVAILABLE_ENGINES"Getting all available engines command and <sampler-channel> the sampler channel the - deployed engine should be assigned to. Even if the respective - sampler channel has already a deployed engine with that engine - name, a new engine instance will be assigned to the sampler channel. + "LIST AVAILABLE_ENGINES"Getting all available engines command and <sampler-channel> + the sampler channel as returned by the + "ADD CHANNEL"Adding a new sampler channel or + "LIST CHANNELS"Getting all created sampler channel list 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.

Possible Answers:

@@ -2812,7 +2899,7 @@

-

5.4.3 Getting all created sampler channel count

+

6.4.3 Getting all created sampler channel count

The number of sampler channels can change on runtime. To get the current amount of sampler channels, the front-end can send the @@ -2842,7 +2929,7 @@

-

5.4.4 Getting all created sampler channel list

+

6.4.4 Getting all created sampler channel list

The number of sampler channels can change on runtime. To get the current list of sampler channels, the front-end can send the @@ -2873,7 +2960,7 @@

-

5.4.5 Adding a new sampler channel

+

6.4.5 Adding a new sampler channel

A new sampler channel can be added to the end of the sampler channel list by sending the following command: @@ -2936,7 +3023,7 @@

-

5.4.6 Removing a sampler channel

+

6.4.6 Removing a sampler channel

A sampler channel can be removed by sending the following command:

@@ -2991,7 +3078,7 @@

-

5.4.7 Getting amount of available engines

+

6.4.7 Getting amount of available engines

The front-end can ask for the number of available engines by sending the following command:

@@ -3019,7 +3106,7 @@

-

5.4.8 Getting all available engines

+

6.4.8 Getting all available engines

The front-end can ask for a list of all available engines by sending the following command:

@@ -3050,7 +3137,7 @@

-

5.4.9 Getting information about an engine

+

6.4.9 Getting information about an engine

The front-end can ask for information about a specific engine by sending the following command: @@ -3110,7 +3197,7 @@

-

5.4.10 Getting sampler channel information

+

6.4.10 Getting sampler channel information

The front-end can ask for the current settings of a sampler channel by sending the following command: @@ -3121,7 +3208,9 @@

-

Where <sampler-channel> is the sampler channel number the front-end is interested in. +

Where <sampler-channel> is the sampler channel number the front-end is interested in + as returned by the "ADD CHANNEL"Adding a new sampler channel + or "LIST CHANNELS"Getting all created sampler channel list command.

Possible Answers:

@@ -3138,8 +3227,8 @@

ENGINE_NAME -

-

name of the engine that is deployed on the sampler - channel, "NONE" if there's no engine deployed yet for +

name of the engine that is associated with the sampler + channel, "NONE" if there's no engine associated yet for this sampler channel

@@ -3281,7 +3370,7 @@

-

5.4.11 Current number of active voices

+

6.4.11 Current number of active voices

The front-end can ask for the current number of active voices on a sampler channel by sending the following command: @@ -3292,7 +3381,9 @@

-

Where <sampler-channel> is the sampler channel number the front-end is interested in. +

Where <sampler-channel> is the sampler channel number the front-end is interested in + as returned by the "ADD CHANNEL"Adding a new sampler channel + or "LIST CHANNELS"Getting all created sampler channel list command.

Possible Answers:

@@ -3311,7 +3402,7 @@

-

5.4.12 Current number of active disk streams

+

6.4.12 Current number of active disk streams

The front-end can ask for the current number of active disk streams on a sampler channel by sending the following command: @@ -3322,7 +3413,9 @@

-

Where <sampler-channel> is the sampler channel number the front-end is interested in. +

Where <sampler-channel> is the sampler channel number the front-end is interested in + as returned by the "ADD CHANNEL"Adding a new sampler channel + or "LIST CHANNELS"Getting all created sampler channel list command.

Possible Answers:

@@ -3343,7 +3436,7 @@

-

5.4.13 Current fill state of disk stream buffers

+

6.4.13 Current fill state of disk stream buffers

The front-end can ask for the current fill state of all disk streams on a sampler channel by sending the following command: @@ -3363,7 +3456,9 @@

to get the fill state in percent, where <sampler-channel> is the - sampler channel number the front-end is interested in. + sampler channel number the front-end is interested in + as returned by the "ADD CHANNEL"Adding a new sampler channel + or "LIST CHANNELS"Getting all created sampler channel list command.

Possible Answers:

@@ -3404,7 +3499,7 @@

-

5.4.14 Setting audio output device

+

6.4.14 Setting audio output device

The front-end can set the audio output device on a specific sampler channel by sending the following command: @@ -3415,9 +3510,13 @@

-

Where <audio-device-id> is the numerical ID of the audio output - device and <sampler-channel> is the respective sampler channel - number. +

Where <sampler-channel> is the respective sampler channel + number as returned by the "ADD CHANNEL"Adding a new sampler channel + or "LIST CHANNELS"Getting all created sampler channel list command and + <audio-device-id> is the numerical ID of the audio output device as given by the + "CREATE AUDIO_OUTPUT_DEVICE"Creating an audio output device + or "LIST AUDIO_OUTPUT_DEVICES"Getting all created audio output device list + command.

Possible Answers:

@@ -3456,7 +3555,7 @@

-

5.4.15 Setting audio output type

+

6.4.15 Setting audio output type

DEPRECATED: THIS COMMAND WILL DISAPPEAR SOON!

@@ -3509,7 +3608,7 @@

-

5.4.16 Setting audio output channel

+

6.4.16 Setting audio output channel

The front-end can alter the audio output channel on a specific sampler channel by sending the following command: @@ -3520,7 +3619,9 @@

-

Where <sampler-chan> is the sampler channel number, <audio-out> is the +

Where <sampler-chan> is the sampler channel number + as returned by the "ADD CHANNEL"Adding a new sampler channel + or "LIST CHANNELS"Getting all created sampler channel list command, <audio-out> is the numerical ID of the sampler channel's audio output channel which should be rerouted and <audio-in> is the numerical ID of the audio channel of the selected audio output device where <audio-out> should be routed to. @@ -3562,7 +3663,7 @@

-

5.4.17 Setting MIDI input device

+

6.4.17 Setting MIDI input device

The front-end can set the MIDI input device on a specific sampler channel by sending the following command: @@ -3573,8 +3674,12 @@

-

Where <sampler-channel> is the sampler channel number and <midi-device-id> is the - the numerical ID of the MIDI input device. +

Where <sampler-channel> is the sampler channel number + as returned by the "ADD CHANNEL"Adding a new sampler channel + or "LIST CHANNELS"Getting all created sampler channel list command + and <midi-device-id> is the numerical ID of the MIDI input device as returned by the + "CREATE MIDI_INPUT_DEVICE"Creating a MIDI input device + or "LIST MIDI_INPUT_DEVICES"Getting all created MIDI input device list command.

Possible Answers:

@@ -3613,7 +3718,7 @@

-

5.4.18 Setting MIDI input type

+

6.4.18 Setting MIDI input type

DEPRECATED: THIS COMMAND WILL DISAPPEAR SOON!

@@ -3666,7 +3771,7 @@

-

5.4.19 Setting MIDI input port

+

6.4.19 Setting MIDI input port

The front-end can alter the MIDI input port on a specific sampler channel by sending the following command: @@ -3718,7 +3823,7 @@

-

5.4.20 Setting MIDI input channel

+

6.4.20 Setting MIDI input channel

The front-end can alter the MIDI channel a sampler channel should listen to by sending the following command: @@ -3770,7 +3875,7 @@

-

5.4.21 Setting channel volume

+

6.4.21 Setting channel volume

The front-end can alter the volume of a sampler channel by sending the following command: @@ -3823,7 +3928,7 @@

-

5.4.22 Resetting a sampler channel

+

6.4.22 Resetting a sampler channel

The front-end can reset a particular sampler channel by sending the following command:

@@ -3877,11 +3982,11 @@

-

5.5 Controlling connection

+

6.5 Controlling connection

The following commands are used to control the connection to LinuxSampler.

-

5.5.1 Register front-end for receiving event messages

+

6.5.1 Register front-end for receiving event messages

The front-end can register itself to the LinuxSampler application to be informed about noteworthy events by sending this command: @@ -3933,7 +4038,7 @@

-

5.5.2 Unregister front-end for not receiving event messages

+

6.5.2 Unregister front-end for not receiving event messages

The front-end can unregister itself if it doesn't want to receive event messages anymore by sending the following command: @@ -3985,7 +4090,7 @@

-

5.5.3 Enable or disable echo of commands

+

6.5.3 Enable or disable echo of commands

To enable or disable back sending of commands to the client the following command can be used:

@@ -4031,7 +4136,7 @@

-

5.5.4 Close client connection

+

6.5.4 Close client connection

The client can close its network connection to LinuxSampler by sending the following command:

@@ -4044,11 +4149,11 @@

This is probably more interesting for manual telnet connections to LinuxSampler than really useful for a front-end implementation.

-

5.6 Global commands

+

6.6 Global commands

The following commands have global impact on the sampler.

-

5.6.1 Reset sampler

+

6.6.1 Reset sampler

The front-end can reset the whole sampler by sending the following command:

@@ -4079,21 +4184,576 @@

+

6.6.2 General sampler informations

+ +

The client can ask for general informations about the LinuxSampler + instance by sending the following command: +

+

+
+

GET SERVER INFO +

+
+ +

Possible Answers: +

+

+
+

LinuxSampler will answer by sending a <CRLF> separated list. + Each answer line begins with the information category name + followed by a colon and then a space character <SP> and finally + the info character string to that information category. At the + moment the following categories are defined: + +

+

+
+

DESCRIPTION - +

+
+

arbitrary textual description about the sampler +

+
+ +

VERSION - +

+
+

version of the sampler +

+
+ +

PROTOCOL_VERSION - +

+
+

version of the LSCP specification the sampler + complies with (see Section 2Versioning of this specification for details) +

+
+ +
+ +
+ +

The mentioned fields above don't have to be in particular order. + Other fields might be added in future. +



 TOC 
-

6. Command Syntax

+

7. Command Syntax

+ +

The grammar of the control protocol as descibed in Section 6Description for control commands + is defined below using Backus-Naur Form (BNF as described in [RFC2234]Crocker, D. and P. Overell, Augmented BNF for Syntax Specifications, 1997.) + where applicable. + +

+

input = +

+
+

line LF + +

+

/ line CR LF + +

+
+ +

line = +

+
+

/* epsilon (empty line ignored) */ + +

+

/ comment + +

+

/ command + +

+

/ error + +

+
+ +

comment = +

+
+

'#' + +

+

/ comment '#' + +

+

/ comment SP + +

+

/ comment number + +

+

/ comment string + +

+
+ +

command = +

+
+

ADD SP CHANNEL + +

+

/ GET SP get_instruction + +

+

/ CREATE SP create_instruction + +

+

/ DESTROY SP destroy_instruction + +

+

/ LIST SP list_instruction + +

+

/ LOAD SP load_instruction + +

+

/ REMOVE SP CHANNEL SP sampler_channel + +

+

/ SET SP set_instruction + +

+

/ SUBSCRIBE SP subscribe_event + +

+

/ UNSUBSCRIBE SP unsubscribe_event + +

+

/ SELECT SP text + +

+

/ RESET SP CHANNEL SP sampler_channel + +

+

/ RESET + +

+

/ QUIT + +

+
+ +

subscribe_event = +

+
+

CHANNEL_COUNT + +

+

/ VOICE_COUNT + +

+

/ STREAM_COUNT + +

+

/ BUFFER_FILL + +

+

/ CHANNEL_INFO + +

+

/ MISCELLANEOUS + +

+
+ +

unsubscribe_event = +

+
+

CHANNEL_COUNT + +

+

/ VOICE_COUNT + +

+

/ STREAM_COUNT + +

+

/ BUFFER_FILL + +

+

/ CHANNEL_INFO + +

+

/ MISCELLANEOUS + +

+
+ +

get_instruction = +

+
+

AVAILABLE_ENGINES + +

+

/ AVAILABLE_MIDI_INPUT_DRIVERS + +

+

/ MIDI_INPUT_DRIVER SP INFO SP string + +

+

/ MIDI_INPUT_DRIVER_PARAMETER SP INFO SP string SP string + +

+

/ MIDI_INPUT_DRIVER_PARAMETER SP INFO SP string SP string SP key_val_list + +

+

/ AVAILABLE_AUDIO_OUTPUT_DRIVERS + +

+

/ AUDIO_OUTPUT_DRIVER SP INFO SP string + +

+

/ AUDIO_OUTPUT_DRIVER_PARAMETER SP INFO SP string SP string + +

+

/ AUDIO_OUTPUT_DRIVER_PARAMETER SP INFO SP string SP string SP key_val_list + +

+

/ AUDIO_OUTPUT_DEVICES + +

+

/ MIDI_INPUT_DEVICES + +

+

/ AUDIO_OUTPUT_DEVICE SP INFO SP number + +

+

/ MIDI_INPUT_DEVICE SP INFO SP number + +

+

/ MIDI_INPUT_PORT SP INFO SP number SP number + +

+

/ MIDI_INPUT_PORT_PARAMETER SP INFO SP number SP number SP string + +

+

/ AUDIO_OUTPUT_CHANNEL SP INFO SP number SP number + +

+

/ AUDIO_OUTPUT_CHANNEL_PARAMETER SP INFO SP number SP number SP string + +

+

/ CHANNELS + +

+

/ CHANNEL SP INFO SP sampler_channel + +

+

/ CHANNEL SP BUFFER_FILL SP buffer_size_type SP sampler_channel + +

+

/ CHANNEL SP STREAM_COUNT SP sampler_channel + +

+

/ CHANNEL SP VOICE_COUNT SP sampler_channel + +

+

/ ENGINE SP INFO SP engine_name + +

+

/ SERVER SP INFO + +

+
+ +

set_instruction = +

+
+

AUDIO_OUTPUT_DEVICE_PARAMETER SP number SP string '=' param_val_list + +

+

/ AUDIO_OUTPUT_CHANNEL_PARAMETER SP number SP number SP string '=' param_val_list + +

+

/ MIDI_INPUT_DEVICE_PARAMETER SP number SP string '=' param_val_list + +

+

/ MIDI_INPUT_PORT_PARAMETER SP number SP number SP string '=' param_val_list + +

+

/ CHANNEL SP set_chan_instruction + +

+

/ ECHO SP boolean + +

+
+ +

create_instruction = +

+
+

AUDIO_OUTPUT_DEVICE SP string SP key_val_list + +

+

/ AUDIO_OUTPUT_DEVICE SP string + +

+

/ MIDI_INPUT_DEVICE SP string SP key_val_list + +

+

/ MIDI_INPUT_DEVICE SP string + +

+
+ +

destroy_instruction = +

+
+

AUDIO_OUTPUT_DEVICE SP number + +

+

/ MIDI_INPUT_DEVICE SP number + +

+
+ +

load_instruction = +

+
+

INSTRUMENT SP load_instr_args + +

+

/ ENGINE SP load_engine_args + +

+
+ +

set_chan_instruction = +

+
+

AUDIO_OUTPUT_DEVICE SP sampler_channel SP device_index + +

+

/ AUDIO_OUTPUT_CHANNEL SP sampler_channel SP audio_channel_index SP audio_channel_index + +

+

/ AUDIO_OUTPUT_TYPE SP sampler_channel SP audio_output_type_name + +

+

/ MIDI_INPUT SP sampler_channel SP device_index SP midi_input_port_index SP midi_input_channel_index + +

+

/ MIDI_INPUT_DEVICE SP sampler_channel SP device_index + +

+

/ MIDI_INPUT_PORT SP sampler_channel SP midi_input_port_index + +

+

/ MIDI_INPUT_CHANNEL SP sampler_channel SP midi_input_channel_index + +

+

/ MIDI_INPUT_TYPE SP sampler_channel SP midi_input_type_name + +

+

/ VOLUME SP sampler_channel SP volume_value + +

+
+ +

key_val_list = +

+
+

string '=' param_val_list + +

+

/ key_val_list SP string '=' param_val_list + +

+
+ +

buffer_size_type = +

+
+

BYTES + +

+

/ PERCENTAGE + +

+
+ +

list_instruction = +

+
+

AUDIO_OUTPUT_DEVICES + +

+

/ MIDI_INPUT_DEVICES + +

+

/ CHANNELS + +

+

/ AVAILABLE_ENGINES + +

+

/ AVAILABLE_MIDI_INPUT_DRIVERS + +

+

/ AVAILABLE_AUDIO_OUTPUT_DRIVERS + +

+
+ +

load_instr_args = +

+
+

filename SP instrument_index SP sampler_channel + +

+

/ NON_MODAL SP filename SP instrument_index SP sampler_channel + +

+
+ +

load_engine_args = +

+
+

engine_name SP sampler_channel + +

+
+ +

device_index = +

+
+

number + +

+
+ +

audio_channel_index = +

+
+

number + +

+
+ +

audio_output_type_name = +

+
+

string + +

+
+ +

midi_input_port_index = +

+
+

number + +

+
+ +

midi_input_channel_index = +

+
+

number + +

+

/ ALL + +

+
+ +

midi_input_type_name = +

+
+

string + +

+
-

TODO: will soon automatically included from src/network/lscp.y, - meanwhile have a look at that file to get the exact definition of - the command syntax. +

volume_value = +

+
+

dotnum + +

+

/ number + +

+
+ +

sampler_channel = +

+
+

number + +

+
+ +

instrument_index = +

+
+

number + +

+
+ +

engine_name = +

+
+

string + +

+
+ +

filename = +

+
+

stringval +

+
+ +

param_val_list = +

+
+

param_val + +

+

/ param_val_list','param_val + +

+
+ +

param_val = +

+
+

string + +

+

/ '\'' string '\'' + +

+

/ '\"' string '\"' + +

+

/ number + +

+

/ dotnum + +

+
+

 TOC 
-

7. Events

+

8. Events

This chapter will describe all currently defined events supported by LinuxSampler.

-

7.1 Number of sampler channels changed

+

8.1 Number of sampler channels changed

Client may want to be notified when the total number of channels on the back-end changes by issuing the following command: @@ -4115,7 +4775,7 @@

where <channels> will be replaced by the new number of sampler channels.

-

7.2 Number of active voices changed

+

8.2 Number of active voices changed

Client may want to be notified when the number of voices on the back-end changes by issuing the following command: @@ -4138,7 +4798,7 @@ voice count change occurred and <voices> by the new number of active voices on that channel.

-

7.3 Number of active disk streams changed

+

8.3 Number of active disk streams changed

Client may want to be notified when the number of streams on the back-end changes by issuing the following command: SUBSCRIBE STREAM_COUNT @@ -4161,7 +4821,7 @@ stream count change occurred and <streams> by the new number of active disk streams on that channel.

-

7.4 Disk stream buffer fill state changed

+

8.4 Disk stream buffer fill state changed

Client may want to be notified when the buffer fill state of a disk stream on the back-end changes by issuing the following command: @@ -4182,10 +4842,10 @@

where <sampler-channel> will be replaced by the sampler channel the buffer fill state change occurred on and <fill-data> will be replaced by the - buffer fill data for this channel as described in Section 5.4.13Current fill state of disk stream buffers + buffer fill data for this channel as described in Section 6.4.13Current fill state of disk stream buffers as if the "GET CHANNEL BUFFER_FILL PERCENTAGE"Current fill state of disk stream buffers command was issued on this channel.

-

7.5 Channel information changed

+

8.5 Channel information changed

Client may want to be notified when changes were made to sampler channels on the back-end by issuing the following command: @@ -4211,7 +4871,7 @@ time events happening on the server, it is believed that an empty notification message is sufficient here.

-

7.6 Miscellaneous and debugging events

+

8.6 Miscellaneous and debugging events

Client may want to be notified of miscellaneous and debugging events occurring at the server by issuing the following command: @@ -4234,18 +4894,18 @@ wants to send to the client. Client MAY display this data to the user AS IS to facilitate debugging.

-

+

 TOC 
-

8. Security Considerations

+

9. Security Considerations

As there is so far no method of authentication and authorization defined and so not required for a client applications to succeed to connect, running LinuxSampler might be a security risk for the host system the LinuxSampler instance is running on.

-

+

 TOC 
-

9. Acknowledgments

+

10. Acknowledgments

This document has benefited greatly from the comments of the following people, discussed on the LinuxSampler developer's mailing @@ -4265,10 +4925,14 @@


 TOC 
-

10 References

+

11 References

- + + + + +
[RFC2119]Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997 (TXT, HTML, XML).
Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", RFC 2119, 1997.
[RFC2234]Crocker, D. and P. Overell, "Augmented BNF for Syntax Specifications", RFC 2234, 1997.
[RFC793]Defense Advanced Research Projects Agency, "TRANSMISSION CONTROL PROTOCOL", RFC 793, 1981.