--- linuxsampler/trunk/Documentation/lscp.xml 2005/04/06 19:24:39 494 +++ linuxsampler/trunk/Documentation/lscp.xml 2006/11/24 17:43:09 937 @@ -13,7 +13,7 @@ - + LinuxSampler Control Protocol + The frontend's LSCP minor version is less or equal than + the sampler's LSCP minor version. + + + + Compatibility can only be claimed if both rules are true. + The frontend can use the + "GET SERVER INFO" command to + get the version of the LSCP specification the sampler complies with. + + +
LinuxSampler is a so called software sampler application capable to playback audio samples from a computer's Random @@ -124,7 +161,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 @@ -154,7 +191,8 @@ methods will be described next.
- This simple communication method is based on TCP. The + This simple communication method is based on + TCP. 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 @@ -234,7 +272,7 @@ C: "GET AUDIO_OUTPUT_DEVICE INFO 123456" S: "ERR:9:There is no audio output device with index 123456." - + Normal result sets could be: @@ -379,7 +417,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 chapter 6. + a list of supported events see . Example: the fill states of disk stream buffers have changed on sampler channel 4 and the LinuxSampler instance @@ -425,10 +463,11 @@
-
+
This chapter will describe the available control commands that can be sent on the TCP connection in detail. Some certain - commands (e.g. "GET CHANNEL INFO" or "GET ENGINE INFO") lead to + commands (e.g. "GET CHANNEL INFO" + or "GET ENGINE INFO") lead to multiple-line responses. In this case LinuxSampler signals the end of the response by a "." (single dot) line. @@ -472,13 +511,38 @@ what parameters drivers are offering, how to retrieve their possible values, etc. -
+
+ Use the following command to get the number of + audio output drivers currently available for the + LinuxSampler instance: + + + GET AVAILABLE_AUDIO_OUTPUT_DRIVERS + + + Possible Answers: + + + LinuxSampler will answer by sending the + number of audio output drivers. + + + Example: + + + C: "GET AVAILABLE_AUDIO_OUTPUT_DRIVERS" + S: "2" + + +
+ +
Use the following command to list all audio output drivers currently available for the LinuxSampler instance: - GET AVAILABLE_AUDIO_OUTPUT_DRIVERS + LIST AVAILABLE_AUDIO_OUTPUT_DRIVERS Possible Answers: @@ -492,14 +556,14 @@ Example: - C: "GET AVAILABLE_AUDIO_OUTPUT_DRIVERS" + C: "LIST AVAILABLE_AUDIO_OUTPUT_DRIVERS" S: "ALSA,JACK"
+ output driver" anchor="GET AUDIO_OUTPUT_DRIVER INFO"> Use the following command to get detailed information about a specific audio output driver: @@ -509,8 +573,8 @@ Where <audio-output-driver> is the name of the - audio output driver, returned by the "GET - AVAILABLE_AUDIO_OUTPUT_DRIVERS" command. + audio output driver, returned by the + "LIST AVAILABLE_AUDIO_OUTPUT_DRIVERS" command. Possible Answers: @@ -572,7 +636,7 @@
+ output driver parameter" anchor="GET AUDIO_OUTPUT_DRIVER_PARAMETER INFO"> Use the following command to get detailed information about a specific audio output driver parameter: @@ -581,9 +645,11 @@ Where <audio> is the name of the audio output - driver as returned by the "GET AVAILABLE_AUDIO_OUTPUT_DRIVERS" command, + driver as returned by the + "LIST AVAILABLE_AUDIO_OUTPUT_DRIVERS" command, <prm> a specific parameter name for which information should be - obtained (as returned by the "GET AUDIO_OUTPUT_DRIVER INFO" command) and + obtained (as returned by the + "GET AUDIO_OUTPUT_DRIVER INFO" command) and <deplist> is an optional list of parameters on which the sought parameter <prm> depends on, <deplist> is a list of key-value pairs in form of "key1=val1 key2=val2 ...", where character string values @@ -630,8 +696,8 @@ either true or false, defines if this parameter must be given when the device is to be created with the - 'CREATE AUDIO_OUTPUT_DEVICE' command - (always returned, no matter which driver parameter) + 'CREATE AUDIO_OUTPUT_DEVICE' + command (always returned, no matter which driver parameter) @@ -639,8 +705,8 @@ either true or false, if false then this parameter can be changed at any time, once the device is created by - the 'CREATE AUDIO_OUTPUT_DEVICE' command - (always returned, no matter which driver parameter) + the 'CREATE AUDIO_OUTPUT_DEVICE' + command (always returned, no matter which driver parameter) @@ -655,7 +721,7 @@ DEPENDS - - comma separated list of paramters this parameter depends + 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 @@ -672,7 +738,8 @@ reflects the default value for this parameter which is used when the device is created and not explicitly - given with the 'CREATE AUDIO_OUTPUT_DEVICE' command, + given with the + 'CREATE AUDIO_OUTPUT_DEVICE' command, in case of MULTIPLCITY=true, this is a comma separated list, that's why character strings are encapsulated into apostrophes (') @@ -757,7 +824,7 @@
-
+
Use the following command to create a new audio output device for the desired audio output system: @@ -767,7 +834,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" + 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 @@ -815,7 +884,7 @@
-
+
Use the following command to destroy a created output device: @@ -823,8 +892,10 @@ Where <device-id> should be replaced by the numerical ID of the - audio output device as given by the "CREATE AUDIO_OUTPUT_DEVICE" or - "GET AUDIO_OUTPUT_DEVICES" command. + audio output device as given by the + "CREATE AUDIO_OUTPUT_DEVICE" + or "LIST AUDIO_OUTPUT_DEVICES" + command. Possible Answers: @@ -859,7 +930,7 @@
-
+
Use the following command to count all created audio output devices: @@ -882,7 +953,7 @@
-
+
Use the following command to list all created audio output devices: @@ -905,7 +976,7 @@
-
+
Use the following command to get current settings of a specific, created audio output device: @@ -914,7 +985,7 @@ Where <device-id> should be replaced by numerical ID of the audio output device as e.g. returned by the - "LIST AUDIO_OUTPUT_DEVICES" command. + "LIST AUDIO_OUTPUT_DEVICES" command. Possible Answers: LinuxSampler will answer by sending a <CRLF> separated list. Each answer line begins with the information category name @@ -928,7 +999,9 @@ DRIVER - identifier of the used audio output driver, as also - returned by the "GET AVAILABLE_AUDIO_OUTPUT_DRIVERS" + returned by the + + "LIST AVAILABLE_AUDIO_OUTPUT_DRIVERS" command @@ -957,8 +1030,8 @@ 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 - "GET AUDIO_OUTPUT_DRIVER INFO" command) which are also returned - by this command. + ) + which are also returned by this command. Example: @@ -976,7 +1049,7 @@
-
+
Use the following command to alter a specific setting of a created audio output device: @@ -984,7 +1057,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" + or "LIST AUDIO_OUTPUT_DEVICES" + command, <key> by the name of the parameter to change and <value> by the new value for this parameter. Possible Answers: @@ -1018,15 +1094,17 @@
-
+
Use the following command to get information about an audio channel: GET AUDIO_OUTPUT_CHANNEL INFO <device-id> <audio-chan> - 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" + or "LIST AUDIO_OUTPUT_DEVICES" + command and <audio-chan> the audio channel number. Possible Answers: @@ -1116,7 +1194,7 @@
-
+
Use the following command to get detailed information about specific audio channel parameter: @@ -1125,10 +1203,13 @@ - Where <dev-id> is the numerical ID of the audio output device as returned - by the "GET AUDIO_OUTPUT_DEVICES" command, <chan> the audio channel number + Where <dev-id> is the numerical ID of the audio output device as returned by the + "CREATE AUDIO_OUTPUT_DEVICE" + or "LIST AUDIO_OUTPUT_DEVICES" + 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" command). + be obtained (as returned by the + "GET AUDIO_OUTPUT_CHANNEL INFO" command). Possible Answers: @@ -1219,15 +1300,17 @@
-
+
Use the following command to alter a specific setting of an audio output channel: SET AUDIO_OUTPUT_CHANNEL_PARAMETER <dev-id> <chn> <key>=<value> - 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" + or "LIST AUDIO_OUTPUT_DEVICES" + 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: @@ -1295,12 +1378,37 @@ showing how to retrieve what parameters drivers are offering, how to retrieve their possible values, etc. -
+
+ Use the following command to get the number of + MIDI input drivers currently available for the + LinuxSampler instance: + + + GET AVAILABLE_MIDI_INPUT_DRIVERS + + + Possible Answers: + + + LinuxSampler will answer by sending the + number of available MIDI input drivers. + + + Example: + + + C: "GET AVAILABLE_MIDI_INPUT_DRIVERS" + S: "2" + + +
+ +
Use the following command to list all MIDI input drivers currently available for the LinuxSampler instance: - GET AVAILABLE_MIDI_INPUT_DRIVERS + LIST AVAILABLE_MIDI_INPUT_DRIVERS Possible Answers: @@ -1313,20 +1421,22 @@ Example: - C: "GET AVAILABLE_MIDI_INPUT_DRIVERS" + C: "LIST AVAILABLE_MIDI_INPUT_DRIVERS" S: "ALSA,JACK"
-
+
Use the following command to get detailed information about a specific MIDI input driver: GET MIDI_INPUT_DRIVER INFO <midi-input-driver> - 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" command. Possible Answers: @@ -1373,7 +1483,7 @@
-
+
Use the following command to get detailed information about a specific parameter of a specific MIDI input driver: @@ -1381,10 +1491,12 @@ - Where <midi-t> is the name of the MIDI input driver as returned - by the "GET AVAILABLE_MIDI_INPUT_DRIVERS" command, <param> a specific + Where <midit> is the name of the MIDI input driver as returned + by the + "LIST AVAILABLE_MIDI_INPUT_DRIVERS" command, <param> a specific parameter name for which information should be obtained (as returned by the - "GET MIDI_INPUT_DRIVER INFO" command) and <deplist> is an optional list + + "GET MIDI_INPUT_DRIVER INFO" command) and <deplist> is an optional list of parameters on which the sought parameter <param> depends on, <deplist> is a key-value pair list in form of "key1=val1 key2=val2 ...", where character string values are encapsulated into apostrophes ('). Arguments @@ -1425,7 +1537,8 @@ either true or false, defines if this parameter must be given when the device is to be created with the - 'CREATE MIDI_INPUT_DEVICE' command + + 'CREATE MIDI_INPUT_DEVICE' command (always returned, no matter which driver parameter) @@ -1434,7 +1547,8 @@ either true or false, if false then this parameter can be changed at any time, once the device is created by - the 'CREATE MIDI_INPUT_DEVICE' command + the + 'CREATE MIDI_INPUT_DEVICE' command (always returned, no matter which driver parameter) @@ -1450,7 +1564,7 @@ DEPENDS - - comma separated list of paramters this parameter depends + 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 @@ -1467,7 +1581,8 @@ reflects the default value for this parameter which is used when the device is created and not explicitly - given with the 'CREATE MIDI_INPUT_DEVICE' command, + given with the + 'CREATE MIDI_INPUT_DEVICE' command, in case of MULTIPLCITY=true, this is a comma separated list, that's why character strings are encapsulated into apostrophes (') @@ -1523,7 +1638,7 @@
-
+
Use the following command to create a new MIDI input device for the desired MIDI input system: @@ -1531,7 +1646,9 @@ - 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" 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 @@ -1571,14 +1688,17 @@
-
+
Use the following command to destroy a created MIDI input device: DESTROY MIDI_INPUT_DEVICE <device-id> - 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" + or "LIST MIDI_INPUT_DEVICES" + command. Possible Answers: @@ -1610,7 +1730,7 @@
-
+
Use the following command to count all created MIDI input devices: @@ -1634,7 +1754,7 @@
-
+
Use the following command to list all created MIDI input devices: @@ -1663,14 +1783,17 @@
-
+
Use the following command to get current settings of a specific, created MIDI input device: GET MIDI_INPUT_DEVICE INFO <device-id> - 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" + or "LIST MIDI_INPUT_DEVICES" + command. Possible Answers: @@ -1687,7 +1810,8 @@ DRIVER - identifier of the used MIDI input driver, as e.g. - returned by the "GET AVAILABLE_MIDI_INPUT_DRIVERS" + returned by the + "LIST AVAILABLE_MIDI_INPUT_DRIVERS" command @@ -1710,7 +1834,8 @@ 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 - "GET MIDI_INPUT_DRIVER INFO" command) which are also returned + + "GET MIDI_INPUT_DRIVER INFO" command) which are also returned by this command. Example: @@ -1724,7 +1849,7 @@
-
+
Use the following command to alter a specific setting of a created MIDI input device: @@ -1733,7 +1858,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" + or "LIST MIDI_INPUT_DEVICES" + command, <key> by the name of the parameter to change and <value> by the new value for this parameter. Possible Answers: @@ -1767,15 +1895,17 @@
-
+
Use the following command to get information about a MIDI port: GET MIDI_INPUT_PORT INFO <device-id> <midi-port> - 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" + or "LIST MIDI_INPUT_DEVICES" + command and <midi-port> the MIDI input port number. Possible Answers: @@ -1809,7 +1939,7 @@
-
+
Use the following command to get detailed information about specific MIDI port parameter: @@ -1817,10 +1947,13 @@ - Where <dev-id> is the numerical ID of the MIDI input device as returned - by the "LIST MIDI_INPUT_DEVICES" 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" + or "LIST MIDI_INPUT_DEVICES" + 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" command). + obtained (as returned by the + "GET MIDI_INPUT_PORT INFO" command). Possible Answers: @@ -1911,7 +2044,7 @@
-
+
Use the following command to alter a specific setting of a MIDI input port: @@ -1920,7 +2053,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" + or "LIST MIDI_INPUT_DEVICES" + 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. @@ -1956,10 +2092,11 @@
- 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. -
+
An instrument file can be loaded and assigned to a sampler channel by one of the following commands: @@ -1977,7 +2114,8 @@ 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. GET CHANNEL INFO command can be used to obtain loading + on the channel. The GET CHANNEL INFO + 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 @@ -2015,8 +2153,8 @@
-
- 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: @@ -2025,10 +2163,19 @@ Where <engine-name> is an engine name as obtained by the - "GET 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" command and <sampler-channel> + the sampler channel as returned by the + "ADD CHANNEL" or + "LIST CHANNELS" 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: @@ -2061,7 +2208,7 @@
-
+
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: @@ -2085,7 +2232,7 @@
-
+
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: @@ -2110,7 +2257,7 @@
-
+
A new sampler channel can be added to the end of the sampler channel list by sending the following command: @@ -2134,8 +2281,8 @@ in case a new sampler channel could be added, where <sampler-channel> reflects the channel number of the new - created sampler channel which should the be used to set up - the sampler channel by sending subsequent intialization + created sampler channel which should be used to set up + the sampler channel by sending subsequent initialization commands @@ -2162,7 +2309,7 @@
-
+
A sampler channel can be removed by sending the following command: @@ -2170,9 +2317,12 @@ - This will decrement the sampler channel count by one and also - decrement the channel numbers of all subsequent sampler channels by - one. + Where <sampler-channel> should be replaced by the + number of the sampler channel as given by the + "ADD CHANNEL" + or "LIST CHANNELS" + command. The channel numbers of all subsequent sampler channels + remain the same. Possible Answers: @@ -2205,8 +2355,8 @@
-
- The front-end can ask for all available engines by sending the following command: +
+ The front-end can ask for the number of available engines by sending the following command: GET AVAILABLE_ENGINES @@ -2215,21 +2365,44 @@ Possible Answers: - LinuxSampler will answer by sending a comma separated character - string of the engines' names. Engine names can consist of lower and - upper cases, digits and underlines ("_" character). + LinuxSampler will answer by sending the number of available engines. Example: C: "GET AVAILABLE_ENGINES" - S: "GigEngine,AkaiEngine,DLSEngine,JoesCustomEngine" + S: "4" + + +
+ +
+ The front-end can ask for a list of all available engines by sending the following command: + + + LIST AVAILABLE_ENGINES + + + Possible Answers: + + + LinuxSampler will answer by sending a comma separated list + of the engines' names encapsulated into apostrophes ('). + Engine names can consist of lower and upper cases, + digits and underlines ("_" character). + + + Example: + + + C: "LIST AVAILABLE_ENGINES" + S: "'GigEngine','AkaiEngine','DLSEngine','JoesCustomEngine'"
-
+
The front-end can ask for information about a specific engine by sending the following command: @@ -2238,7 +2411,8 @@ Where <engine-name> is an engine name as obtained by the - "GET AVAILABLE_ENGINES" command. + + "LIST AVAILABLE_ENGINES" command. Possible Answers: @@ -2278,7 +2452,7 @@
-
+
The front-end can ask for the current settings of a sampler channel by sending the following command: @@ -2286,7 +2460,9 @@ GET CHANNEL INFO <sampler-channel> - 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" + or "LIST CHANNELS" command. Possible Answers: @@ -2300,8 +2476,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 @@ -2380,6 +2556,21 @@ 1.0 means amplification) + MUTE - + + Determines whether the channel is muted, "true" if the + channel is muted, "false" if the channel is not muted, and + "MUTED_BY_SOLO" if the channel is muted because of the + presence of a solo channel and will be unmuted when + there are no solo channels left + + + SOLO - + + Determines whether this is a solo channel, "true" if + the channel is a solo channel; "false" otherwise + + @@ -2407,7 +2598,7 @@
-
+
The front-end can ask for the current number of active voices on a sampler channel by sending the following command: @@ -2415,7 +2606,9 @@ GET CHANNEL VOICE_COUNT <sampler-channel> - 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" + or "LIST CHANNELS" command. Possible Answers: @@ -2432,7 +2625,7 @@
-
+
The front-end can ask for the current number of active disk streams on a sampler channel by sending the following command: @@ -2440,7 +2633,9 @@ GET CHANNEL STREAM_COUNT <sampler-channel> - 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" + or "LIST CHANNELS" command. Possible Answers: @@ -2459,7 +2654,7 @@
-
+
The front-end can ask for the current fill state of all disk streams on a sampler channel by sending the following command: @@ -2474,7 +2669,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" + or "LIST CHANNELS" command. Possible Answers: @@ -2510,7 +2707,7 @@
-
+
The front-end can set the audio output device on a specific sampler channel by sending the following command: @@ -2518,9 +2715,13 @@ SET CHANNEL AUDIO_OUTPUT_DEVICE <sampler-channel> <audio-device-id> - 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" + or "LIST CHANNELS" command and + <audio-device-id> is the numerical ID of the audio output device as given by the + "CREATE AUDIO_OUTPUT_DEVICE" + or "LIST AUDIO_OUTPUT_DEVICES" + command. Possible Answers: @@ -2552,7 +2753,7 @@
-
+
DEPRECATED: THIS COMMAND WILL DISAPPEAR SOON! The front-end can alter the audio output type on a specific sampler @@ -2595,7 +2796,7 @@
-
+
The front-end can alter the audio output channel on a specific sampler channel by sending the following command: @@ -2603,9 +2804,11 @@ SET CHANNEL AUDIO_OUTPUT_CHANNEL <sampler-chan> <audio-out> <audio-in> - Where <sampler-chan> is the sampler channel, <audio-out> is the - sampler channel's audio output channel which should be - rerouted and <audio-in> the audio channel of the selected audio + Where <sampler-chan> is the sampler channel number + as returned by the "ADD CHANNEL" + or "LIST CHANNELS" 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. Possible Answers: @@ -2638,7 +2841,7 @@
-
+
The front-end can set the MIDI input device on a specific sampler channel by sending the following command: @@ -2646,7 +2849,12 @@ SET CHANNEL MIDI_INPUT_DEVICE <sampler-channel> <midi-device-id> - + Where <sampler-channel> is the sampler channel number + as returned by the "ADD CHANNEL" + or "LIST CHANNELS" command + and <midi-device-id> is the numerical ID of the MIDI input device as returned by the + "CREATE MIDI_INPUT_DEVICE" + or "LIST MIDI_INPUT_DEVICES" command. Possible Answers: @@ -2678,7 +2886,7 @@
-
+
DEPRECATED: THIS COMMAND WILL DISAPPEAR SOON! The front-end can alter the MIDI input type on a specific sampler @@ -2721,8 +2929,8 @@
-
- The front-end can alter the input MIDI port on a specific sampler +
+ The front-end can alter the MIDI input port on a specific sampler channel by sending the following command: @@ -2750,7 +2958,7 @@ "ERR:<error-code>:<error-message>" - - in case it failed, providing an appropriate error code and error messag + in case it failed, providing an appropriate error code and error message @@ -2763,7 +2971,7 @@
-
+
The front-end can alter the MIDI channel a sampler channel should listen to by sending the following command: @@ -2771,7 +2979,7 @@ SET CHANNEL MIDI_INPUT_CHANNEL <sampler-channel> <midi-input-chan> - Where <midi-input-chan> is the new MIDI input channel where + Where <midi-input-chan> is the number of the new MIDI input channel where <sampler-channel> should listen to or "ALL" to listen on all 16 MIDI channels. @@ -2805,7 +3013,7 @@
-
+
The front-end can alter the volume of a sampler channel by sending the following command: @@ -2848,7 +3056,95 @@
-
+
+ The front-end can mute/unmute a specific sampler + channel by sending the following command: + + + SET CHANNEL MUTE <sampler-channel> <mute> + + + Where <sampler-channel> is the respective sampler channel + number as returned by the "ADD CHANNEL" + or "LIST CHANNELS" command and + <mute> should be replaced either by "1" to mute the channel or "0" + to unmute the channel. + + Possible Answers: + + + "OK" - + + on success + + + "WRN:<warning-code>:<warning-message>" - + + if the channel was muted/unmuted, but there are noteworthy + issue(s) related, providing an appropriate warning code and + warning message + + + "ERR:<error-code>:<error-message>" - + + in case it failed, providing an appropriate error code and error message + + + + + Examples: + + + + + +
+ +
+ The front-end can solo/unsolo a specific sampler channel + by sending the following command: + + + SET CHANNEL SOLO <sampler-channel> <solo> + + + Where <sampler-channel> is the respective sampler channel + number as returned by the "ADD CHANNEL" + or "LIST CHANNELS" command and + <solo> should be replaced either by "1" to solo the channel or "0" + to unsolo the channel. + + Possible Answers: + + + "OK" - + + on success + + + "WRN:<warning-code>:<warning-message>" - + + if the channel was soloed/unsoloed, but there are noteworthy + issue(s) related, providing an appropriate warning code and + warning message + + + "ERR:<error-code>:<error-message>" - + + in case it failed, providing an appropriate error code and error message + + + + + Examples: + + + + + +
+ +
The front-end can reset a particular sampler channel by sending the following command: @@ -2896,7 +3192,7 @@
The following commands are used to control the connection to LinuxSampler. -
+
The front-end can register itself to the LinuxSampler application to be informed about noteworthy events by sending this command: @@ -2938,7 +3234,7 @@
-
+
The front-end can unregister itself if it doesn't want to receive event messages anymore by sending the following command: @@ -2980,7 +3276,7 @@
-
+
To enable or disable back sending of commands to the client the following command can be used: @@ -3018,7 +3314,7 @@
-
+
The client can close its network connection to LinuxSampler by sending the following command: @@ -3033,7 +3329,43 @@
The following commands have global impact on the sampler. -
+
+ The front-end can ask for the current number of active voices on + the sampler by sending the following command: + + + GET TOTAL_VOICE_COUNT + + + + Possible Answers: + + + LinuxSampler will answer by returning the number of all active + voices on the sampler. + + +
+ +
+ The front-end can ask for the maximum number of active voices + by sending the following command: + + + GET TOTAL_VOICE_COUNT_MAX + + + + Possible Answers: + + + LinuxSampler will answer by returning the maximum number + of active voices. + + +
+ +
The front-end can reset the whole sampler by sending the following command: @@ -3058,37 +3390,454 @@
+ +
+ 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 for details) + + + + + + + The mentioned fields above don't have to be in particular order. + Other fields might be added in future. +
-
- 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. +
+ The grammar of the control protocol as descibed in + is defined below using Backus-Naur Form (BNF as described in ) + 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 + + / TOTAL_VOICE_COUNT + + + +unsubscribe_event = + + CHANNEL_COUNT + + / VOICE_COUNT + + / STREAM_COUNT + + / BUFFER_FILL + + / CHANNEL_INFO + + / MISCELLANEOUS + + / TOTAL_VOICE_COUNT + + + +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 + + / TOTAL_VOICE_COUNT + + / TOTAL_VOICE_COUNT_MAX + + + +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 + + / MUTE SP sampler_channel SP boolean + + / SOLO SP sampler_channel SP boolean + + + +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 + + + +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 + + / stringval + + / number + + / dotnum + + + + +
-
+
This chapter will describe all currently defined events supported by LinuxSampler. -
+
Client may want to be notified when the total number of channels on the back-end changes by issuing the following command: - SUBSCRIBE CHANNELS + SUBSCRIBE CHANNEL_COUNT Server will start sending the following notification messages: - "NOTIFY:CHANNELS:<channels>" + "NOTIFY:CHANNEL_COUNT:<channels>" where <channels> will be replaced by the new number of sampler channels.
-
+
Client may want to be notified when the number of voices on the back-end changes by issuing the following command: @@ -3099,15 +3848,15 @@ Server will start sending the following notification messages: - "NOTIFY:VOICE_COUNT:<sampler-channel> <voices>> + "NOTIFY:VOICE_COUNT:<sampler-channel> <voices> where <sampler-channel> will be replaced by the sampler channel the - voice count change occurred and <voices>> by the new number of + voice count change occurred and <voices> by the new number of active voices on that channel.
-
+
Client may want to be notified when the number of streams on the back-end changes by issuing the following command: SUBSCRIBE STREAM_COUNT @@ -3126,9 +3875,9 @@ active disk streams on that channel.
-
- Client may want to be notified when the number of streams on the back-end - changes by issuing the following command: +
+ 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: SUBSCRIBE BUFFER_FILL @@ -3141,23 +3890,24 @@ where <sampler-channel> will be replaced by the sampler channel the - buffer fill state change occurred and <fill-data> will be replaced by the - buffer fill data for this channel as described in 4.4.12 as if the - "GET CHANNEL BUFFER_FILL PERCENTAGE" was issued on this channel. + buffer fill state change occurred on and <fill-data> will be replaced by the + buffer fill data for this channel as described in + as if the + "GET CHANNEL BUFFER_FILL PERCENTAGE" command was issued on this channel.
-
+
Client may want to be notified when changes were made to sampler channels on the - back-end changes by issuing the following command: + back-end by issuing the following command: - SUBSCRIBE INFO + SUBSCRIBE CHANNEL_INFO Server will start sending the following notification messages: - "NOTIFY:INFO:<sampler-channel>" + "NOTIFY:CHANNEL_INFO:<sampler-channel>" where <sampler-channel> will be replaced by the sampler channel the @@ -3168,7 +3918,25 @@ message is sufficient here.
-
+
+ Client may want to be notified when the total number of voices on the + back-end changes by issuing the following command: + + + SUBSCRIBE TOTAL_VOICE_COUNT + + + Server will start sending the following notification messages: + + + "NOTIFY:TOTAL_VOICE_COUNT:<voices> + + + where <voices> will be replaced by the new number of + all currently active voices. +
+ +
Client may want to be notified of miscellaneous and debugging events occurring at the server by issuing the following command: @@ -3204,6 +3972,7 @@ Rui Nuno Capela Vladimir Senkov Mark Knecht + Grigor Iliev
@@ -3211,7 +3980,41 @@ - &rfc2119; + + + + Key words for use in RFCs to Indicate Requirement Levels + + Harvard University + + + + + + + + TRANSMISSION CONTROL PROTOCOL + + Defense Advanced Research Projects Agency + + + + + + + + Augmented BNF for Syntax Specifications + + Internet Mail Consortium + + + Demon Internet Ltd + + + + + +