--- linuxsampler/trunk/Documentation/lscp.xml 2007/04/16 15:51:18 1161 +++ linuxsampler/trunk/Documentation/lscp.xml 2008/09/30 02:16:41 1782 @@ -16,7 +16,7 @@ to an annoying "missing Normative/Informative References" error message --> - + LinuxSampler Control Protocol + S: "OK" + + + + + C: "SET MIDI_INPUT_PORT_PARAMETER 0 0 ALSA_SEQ_BINDINGS=NONE" + S: "OK" @@ -2113,6 +2121,12 @@ number of the sampler channel the instrument should be assigned to. Each sampler channel can only have one instrument. + Notice: since LSCP 1.2 the <filename> argument supports + escape characters for special characters (see chapter + "Character Set and Escape Sequences" + for details) and accordingly backslash characters in the filename + MUST now be escaped as well! + 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 @@ -2148,10 +2162,18 @@ - Example: + Example (Unix): - + C: LOAD INSTRUMENT '/home/joe/gigs/cello.gig' 0 0 + S: OK + + + Example (Windows): + + + C: LOAD INSTRUMENT 'D:/MySounds/cello.gig' 0 0 + S: OK @@ -2429,7 +2451,9 @@ DESCRIPTION - - arbitrary description text about the engine + arbitrary description text about the engine + (note that the character string may contain + escape sequences) VERSION - @@ -2513,7 +2537,8 @@ the file name of the loaded instrument, "NONE" if there's no instrument yet loaded for this sampler - channel + channel (note: since LSCP 1.2 this path may contain + escape sequences) INSTRUMENT_NR - @@ -2523,7 +2548,9 @@ INSTRUMENT_NAME - - the instrument name of the loaded instrument + the instrument name of the loaded instrument + (note: since LSCP 1.2 this character string may contain + escape sequences) INSTRUMENT_STATUS - @@ -3241,7 +3268,9 @@ sampler channel on which the effect send should be created on, <midi-ctrl> is a number between 0..127 defining the MIDI controller which can alter the effect send level and <name> is an optional argument defining a name - for the effect send entity. The name does not have to be unique. + for the effect send entity. The name does not have to be unique, but MUST be + encapsulated into apostrophes and supports escape sequences as described in chapter + "Character Set and Escape Sequences". By default, that is as initial routing, the effect send's audio channels are automatically routed to the last audio channels of the sampler channel's @@ -3431,7 +3460,9 @@ NAME - - name of the effect send entity + name of the effect send entity + (note that this character string may contain + escape sequences) MIDI_CONTROLLER - @@ -3494,7 +3525,10 @@ as returned by the "CREATE FX_SEND" or "LIST FX_SENDS" command and <name> is the new name of the effect send entity, which - does not have to be unique. + does not have to be unique (name MUST be encapsulated into apostrophes + and supports escape sequences as described in chapter + "Character Set and Escape Sequences"). + Possible Answers: @@ -3677,6 +3711,63 @@ +
+ The front-end can send MIDI events to specific sampler channel + by sending the following command: + + + SEND CHANNEL MIDI_DATA <midi-msg> <sampler-chan> <arg1> <arg2> + + + Where <sampler-chan> is the sampler channel number + as returned by the "ADD CHANNEL" + or "LIST CHANNELS" command, + <arg1> and <arg2> arguments depend on the <midi-msg> argument, which + specifies the MIDI message type. Currently, the following MIDI messages are supported: + + + "NOTE_ON" - + + For turning on MIDI notes, where <arg1> + specifies the key number and <arg2> the velocity + as described in the MIDI specification. + + + "NOTE_OFF" - + + For turning a currently playing MIDI note off, where <arg1> + specifies the key number and <arg2> the velocity + as described in the MIDI specification. + + + + + CAUTION: This command is provided for implementations of virtual MIDI keyboards + and no realtime guarantee whatsoever will be made! + Possible Answers: + + + "OK" - + + on success + + + "ERR:<error-code>:<error-message>" - + + in case it failed, providing an appropriate error code and error message + + + + + Example: + + + C: "SEND CHANNEL MIDI_DATA NOTE_ON 0 56 112" + S: "OK" + + +
+
The front-end can reset a particular sampler channel by sending the following command: @@ -3898,6 +3989,24 @@
+
+ The front-end can ask for the current number of active disk streams on + the sampler by sending the following command: + + + GET TOTAL_STREAM_COUNT + + + + Possible Answers: + + + LinuxSampler will answer by returning the number of all active + disk streams on the sampler. + + +
+
The front-end can reset the whole sampler by sending the following command: @@ -3945,7 +4054,9 @@ DESCRIPTION - - arbitrary textual description about the sampler + arbitrary textual description about the sampler + (note that the character string may contain + escape sequences) VERSION - @@ -4061,7 +4172,7 @@ cause the sampler to switch to the respective instrument as reflected by the current MIDI instrument map. -
+
The front-end can add a new MIDI instrument map by sending the following command: @@ -4071,7 +4182,10 @@ Where <name> is an optional argument allowing to assign a custom name to the new map. MIDI instrument Map - names do not have to be unique. + names do not have to be unique, but MUST be encapsulated + into apostrophes and support escape sequences as described + in chapter "Character Set and Escape Sequences". + Possible Answers: @@ -4242,7 +4356,9 @@ NAME - custom name of the given map, - which does not have to be unique + which does not have to be unique + (note that this character string may contain + escape sequences) DEFAULT - @@ -4278,7 +4394,10 @@ Where <map> is the numerical ID of the map and <name> the new custom name of the map, which does not - have to be unique. + have to be unique (name MUST be encapsulated into apostrophes + and supports escape sequences as described in chapter + "Character Set and Escape Sequences"). + Possible Answers: @@ -4325,7 +4444,9 @@ index, <engine_name> a sampler engine name as returned by the "LIST AVAILABLE_ENGINES" command (not encapsulated into apostrophes), <filename> the name - of the instrument's file to be deployed (encapsulated into apostrophes), + of the instrument's file to be deployed (encapsulated into apostrophes, + supporting escape sequences as described in chapter + "Character Set and Escape Sequences"), <instrument_index> the index (integer value) of the instrument within the given file, <volume_value> reflects the master volume of the instrument as optionally dotted number (where a @@ -4407,9 +4528,10 @@ load modes of entries, the frontend should retrieve the actual mode by i.e. sending "GET MIDI_INSTRUMENT INFO" - command(s). Finally the OPTIONAL <name> argument allows to - set a custom name (encapsulated into apostrophes) for the mapping - entry, useful for frontends for displaying an appropriate name for + command(s). Finally the OPTIONAL <name> argument allows to set a custom name + (encapsulated into apostrophes, supporting escape sequences as described in chapter + "Character Set and Escape Sequences") for the + mapping entry, useful for frontends for displaying an appropriate name for mapped instruments (using "GET MIDI_INSTRUMENT INFO"). @@ -4633,7 +4755,9 @@ name for this mapped instrument. It can be set and changed with the "MAP MIDI_INSTRUMENT" - command and does not have to be unique. + command and does not have to be unique. + (note that this character string may contain + escape sequences) "ENGINE_NAME" - @@ -4644,7 +4768,9 @@ "INSTRUMENT_FILE" - - File name of the instrument. + File name of the instrument + (note that this path may contain + escape sequences). "INSTRUMENT_NR" - @@ -4656,7 +4782,8 @@ Name of the loaded instrument as reflected by its file. In contrast to the "NAME" field, the "INSTRUMENT_NAME" field - cannot be changed. + cannot be changed (note that this character string may contain + escape sequences). "LOAD_MODE" - @@ -4744,6 +4871,18 @@
The following commands describe how to use and manage the instruments database. + Notice: + + + All command arguments representing a path or + instrument/directory name support escape sequences as described in chapter + "Character Set and Escape Sequences". + + All occurrences of a forward slash in instrument and directory + names are escaped with its hex (\x2f) or octal (\057) escape sequence. + + +
The front-end can add a new instrument directory to the @@ -4827,11 +4966,13 @@ directories in a specific directory by sending the following command: - GET DB_INSTRUMENT_DIRECTORIES <dir> + GET DB_INSTRUMENT_DIRECTORIES [RECURSIVE] <dir> Where <dir> should be replaced by the absolute path - name of the directory. + name of the directory. If RECURSIVE is specified, the number of + all directories, including those located in subdirectories of the + specified directory, will be returned. Possible Answers: @@ -4860,11 +5001,13 @@ in specific directory by sending the following command: - LIST DB_INSTRUMENT_DIRECTORIES <dir> + LIST DB_INSTRUMENT_DIRECTORIES [RECURSIVE] <dir> Where <dir> should be replaced by the absolute path - name of the directory. + name of the directory. If RECURSIVE is specified, the absolute path names + of all directories, including those located in subdirectories of the + specified directory, will be returned. Possible Answers: @@ -4885,6 +5028,12 @@ S: "'Piano Collection','Percussion Collection'" + + + C: "LIST DB_INSTRUMENT_DIRECTORIES RECURSIVE '/'" + S: "'/Piano Collection','/Piano Collection/Acoustic','/Piano Collection/Acoustic/New','/Percussion Collection'" + +
@@ -4911,7 +5060,9 @@ DESCRIPTION - - A brief description of the directory content + A brief description of the directory content. + Note that the character string may contain + escape sequences. CREATED - @@ -5024,6 +5175,48 @@
+
+ The front-end can copy a specific + instrument directory by sending the following command: + + + COPY DB_INSTRUMENT_DIRECTORY <dir> <dst> + + + Where <dir> is the absolute path name of the directory + to copy and <dst> is the location where the directory will + be copied to. + + Possible Answers: + + + "OK" - + + on success + + + "ERR:<error-code>:<error-message>" - + + in case a given directory does not exists, + or if a directory with name equal to the name + of the specified directory already exists in + the destination directory. Error is also thrown + when trying to copy a directory to a subdirectory + of itself. + + + + + + Example: + + + C: "COPY DB_INSTRUMENT_DIRECTORY '/Piano Collection/Acoustic' '/Acoustic/Pianos'" + S: "OK" + + +
+
The front-end can alter the description of a specific instrument directory by sending the following command: @@ -5033,7 +5226,9 @@ Where <dir> is the absolute path name of the directory and - <desc> is the new description for the directory. + <desc> is the new description for the directory + (encapsulated into apostrophes, supporting escape sequences as described in chapter + "Character Set and Escape Sequences"). Possible Answers: @@ -5060,12 +5255,102 @@
+
+ The front-end can search for directories + in specific directory by sending the following command: + + + FIND DB_INSTRUMENT_DIRECTORIES [NON_RECURSIVE] <dir> <criteria-list> + + + Where <dir> should be replaced by the absolute path + name of the directory to search in. If NON_RECURSIVE is specified, the + directories located in subdirectories of the specified directory will not + be searched. <criteria-list> is a list of search criterias + in form of "key1=val1 key2=val2 ...". The following criterias are + allowed: + + NAME='<search-string>' + + Restricts the search to directories, which names + satisfy the supplied search string (encapsulated into apostrophes, + supporting escape sequences as described in chapter + "Character Set and Escape Sequences"). + + + + CREATED='[<date-after>]..[<date-before>]' + + Restricts the search to directories, which creation + date satisfies the specified period, where <date-after> + and <date-before> are in "YYYY-MM-DD HH:MM:SS" format. + If <date-after> is omitted the search is restricted to + directories created before <date-before>. If + <date-before> is omitted, the search is restricted + to directories created after <date-after>. + + + + MODIFIED='[<date-after>]..[<date-before>]' + + Restricts the search to directories, which + date of last modification satisfies the specified period, where + <date-after> and <date-before> are in "YYYY-MM-DD HH:MM:SS" + format. If <date-after> is omitted the search is restricted to + directories, which are last modified before <date-before>. If + <date-before> is omitted, the search is restricted to directories, + which are last modified after <date-after>. + + + + DESCRIPTION='<search-string>' + + Restricts the search to directories with description + that satisfies the supplied search string + (encapsulated into apostrophes, supporting escape + sequences as described in chapter + "Character Set and Escape Sequences"). + + + + + Where <search-string> is either a regular expression, or a + word list separated with spaces for OR search and with '+' for AND search. + + Possible Answers: + + + A comma separated list with the absolute path names (encapsulated into + apostrophes) of all directories in the specified directory that satisfy + the supplied search criterias. + "ERR:<error-code>:<error-message>" - + + if the given directory does not exist. + + + + + Example: + + + C: "FIND DB_INSTRUMENT_DIRECTORIES '/' NAME='Piano'" + S: "'/Piano Collection'" + + + + + C: "FIND DB_INSTRUMENT_DIRECTORIES '/' CREATED='..2007-04-01 09:30:13'" + S: "'/Piano Collection','/Percussions'" + + +
+
The front-end can add one or more instruments to the instruments database by sending the following command: - ADD DB_INSTRUMENTS [<mode>] <db_dir> <file_path> [<instr_index>] + ADD DB_INSTRUMENTS [NON_MODAL] [<mode>[ FILE_AS_DIR]] <db_dir> <file_path> [<instr_index>] Where <db_dir> is the absolute path name of a directory @@ -5083,6 +5368,14 @@ scanning will be done and has exactly the following possibilities: + "RECURSIVE" - + + All instruments will be processed, including those + in the subdirectories, and the respective subdirectory + tree structure will be recreated in the instruments + database + + "NON_RECURSIVE" - Only the instruments in the specified directory @@ -5099,23 +5392,33 @@ the specified database directory. - not supplied - - - The subdirectory tree structure will be recreated - in the instruments database and all instruments will be - processed and added to the respective subdirectory - in the instruments database. - - + If FILE_AS_DIR argument is supplied, all instruments in an instrument + file will be added to a separate directory in the instruments database, which + name will be the name of the instrument file with the file extension stripped off. + + The difference between regular and NON_MODAL versions of the command + is that the regular command returns when the scanning is finished + while NON_MODAL version returns immediately and a background process is launched. + The GET DB_INSTRUMENTS_JOB INFO + command can be used to monitor the scanning progress. + Possible Answers: "OK" - - on success + on success when NON_MODAL is not supplied + + + "OK[<job-id>]" - + + on success when NON_MODAL is supplied, where <job-id> + is a numerical ID used to obtain status information about the job progress. + See GET DB_INSTRUMENTS_JOB INFO + "ERR:<error-code>:<error-message>" - @@ -5177,11 +5480,13 @@ instruments in a specific directory by sending the following command: - GET DB_INSTRUMENTS <dir> + GET DB_INSTRUMENTS [RECURSIVE] <dir> Where <dir> should be replaced by the absolute path name - of the directory. + of the directory. If RECURSIVE is specified, the number of all + instruments, including those located in subdirectories of the + specified directory, will be returned. Possible Answers: @@ -5210,11 +5515,13 @@ in specific directory by sending the following command: - LIST DB_INSTRUMENTS <dir> + LIST DB_INSTRUMENTS [RECURSIVE] <dir> Where <dir> should be replaced by the absolute path - name of the directory. + name of the directory. If RECURSIVE is specified, the absolute path + names of all instruments, including those located in subdirectories + of the specified directory, will be returned. Possible Answers: @@ -5235,6 +5542,12 @@ S: "'Bosendorfer 290','Steinway D'" + + + C: "LIST DB_INSTRUMENTS RECURSIVE '/Piano Collection'" + S: "'/Piano Collection/Bosendorfer 290','/Piano Collection/Steinway D','/Piano Collection/Lite/Free Piano'" + +
@@ -5261,7 +5574,9 @@ INSTRUMENT_FILE - - File name of the instrument. + File name of the instrument. + Note that the character string may contain + escape sequences. INSTRUMENT_NR - @@ -5300,7 +5615,9 @@ DESCRIPTION - - A brief description of the instrument + A brief description of the instrument. + Note that the character string may contain + escape sequences. IS_DRUM - @@ -5311,18 +5628,24 @@ PRODUCT - - The product title of the instrument + The product title of the instrument. + Note that the character string may contain + escape sequences. ARTISTS - - Lists the artist names + Lists the artist names. + Note that the character string may contain + escape sequences. KEYWORDS - Provides a list of keywords that refer to the instrument. - Keywords are separated with semicolon and blank. + Keywords are separated with semicolon and blank. + Note that the character string may contain + escape sequences. @@ -5430,6 +5753,46 @@
+
+ The front-end can copy a specific instrument to another directory by + sending the following command: + + + COPY DB_INSTRUMENT <instr> <dst> + + + Where <instr> is the absolute path name of the instrument + to copy and <dst> is the directory where the instrument will + be copied to. + + Possible Answers: + + + "OK" - + + on success + + + "ERR:<error-code>:<error-message>" - + + in case the given instrument does not exists, + or if an instrument with name equal to the name of the + specified instrument already exists in the destination + directory. + + + + + + Example: + + + C: "COPY DB_INSTRUMENT '/Piano Collection/Bosendorfer 290' '/Acoustic/Pianos/'" + S: "OK" + + +
+
The front-end can alter the description of a specific instrument by sending the following command: @@ -5439,7 +5802,9 @@ Where <instr> is the absolute path name of the instrument and - <desc> is the new description for the instrument. + <desc> is the new description for the instrument + (encapsulated into apostrophes, supporting escape sequences as described in chapter + "Character Set and Escape Sequences"). Possible Answers: @@ -5466,11 +5831,579 @@
+
+ The front-end can search for instruments + in specific directory by sending the following command: + + + FIND DB_INSTRUMENTS [NON_RECURSIVE] <dir> <criteria-list> + + + Where <dir> should be replaced by the absolute path + name of the directory to search in. If NON_RECURSIVE is specified, the + directories located in subdirectories of the specified directory will not + be searched. <criteria-list> is a list of search criterias + in form of "key1=val1 key2=val2 ...". The following criterias are + allowed: + + NAME='<search-string>' + + Restricts the search to instruments, which names + satisfy the supplied search string (encapsulated into apostrophes, + supporting escape sequences as described in chapter + "Character Set and Escape Sequences"). + + + + SIZE=[<min>]..[<max>] + + Restricts the search to instruments, which + size is in the specified range. If <min> is omitted, + the search results are restricted to instruments with size less then + or equal to <max>. If <max> is omitted, the + search is restricted to instruments with size greater then + or equal to <min>. + + + + CREATED='[<date-after>]..[<date-before>]' + + Restricts the search to instruments, which creation + date satisfies the specified period, where <date-after> + and <date-before> are in "YYYY-MM-DD HH:MM:SS" format. + If <date-after> is omitted the search is restricted to + instruments created before <date-before>. If + <date-before> is omitted, the search is restricted + to instruments created after <date-after>. + + + + MODIFIED='[<date-after>]..[<date-before>]' + + Restricts the search to instruments, which + date of last modification satisfies the specified period, where + <date-after> and <date-before> are in "YYYY-MM-DD HH:MM:SS" + format. If <date-after> is omitted the search is restricted to + instruments, which are last modified before <date-before>. If + <date-before> is omitted, the search is restricted to instruments, + which are last modified after <date-after>. + + + + DESCRIPTION='<search-string>' + + Restricts the search to instruments with description + that satisfies the supplied search string (encapsulated into apostrophes, + supporting escape sequences as described in chapter + "Character Set and Escape Sequences"). + + + + PRODUCT='<search-string>' + + Restricts the search to instruments with product info + that satisfies the supplied search string (encapsulated into apostrophes, + supporting escape sequences as described in chapter + "Character Set and Escape Sequences"). + + + + ARTISTS='<search-string>' + + Restricts the search to instruments with artists info + that satisfies the supplied search string (encapsulated into apostrophes, + supporting escape sequences as described in chapter + "Character Set and Escape Sequences"). + + + + KEYWORDS='<search-string>' + + Restricts the search to instruments with keyword list + that satisfies the supplied search string (encapsulated into apostrophes, + supporting escape sequences as described in chapter + "Character Set and Escape Sequences"). + + + + IS_DRUM=true | false + + Either true or false. Restricts the search to + drum kits or chromatic instruments. + + + + FORMAT_FAMILIES='<format-list>' + + Restricts the search to instruments of the supplied format families, + where <format-list> is a comma separated list of format families. + + + + + Where <search-string> is either a regular expression, or a + word list separated with spaces for OR search and with '+' for AND search. + + Possible Answers: + + + A comma separated list with the absolute path names (encapsulated into + apostrophes) of all instruments in the specified directory that satisfy + the supplied search criterias. + "ERR:<error-code>:<error-message>" - + + if the given directory does not exist. + + + + + Example: + + + C: "FIND DB_INSTRUMENTS '/Piano Collection' NAME='bosendorfer+290'" + S: "'/Piano Collection/Bosendorfer 290'" + + + + + C: "FIND DB_INSTRUMENTS '/Piano Collection' CREATED='2007-04-01 09:30:13..'" + S: "'/Piano Collection/Bosendorfer 290','/Piano Collection/Steinway D'" + + +
+ +
+ The front-end can ask for the current status of a + particular database instruments job by sending the following command: + + + GET DB_INSTRUMENTS_JOB INFO <job-id> + + + Where <job-id> should be replaced by the numerical ID + of the job the front-end is interested in. + + Possible Answers: + + + LinuxSampler will answer by sending a <CRLF> separated list. + Each answer line begins with the settings category name + followed by a colon and then a space character <SP> and finally + the info character string to that setting category. At the + moment the following categories are defined: + + + + FILES_TOTAL - + + The total number of files scheduled for scanning + + + FILES_SCANNED - + + The current number of scanned files + + + SCANNING - + + The absolute path name of the file which is currently + being scanned + + + STATUS - + + An integer value between 0 and 100 indicating the + scanning progress percentage of the file which is + currently being scanned + + + + + + + The mentioned fields above don't have to be in particular order. + + Example: + + + C: "GET DB_INSTRUMENTS_JOB INFO 2" + S: "FILES_TOTAL: 12" +    "FILES_SCANNED: 7" +    "SCANNING: /home/me/gigs/Bosendorfer 290.gig" +    "STATUS: 42" +    "." + + +
+ +
+ The front-end can remove all instruments and directories and re-create + the instruments database structure (e.g., in case of a database corruption) + by sending the following command: + + + FORMAT INSTRUMENTS_DB + + + + Possible Answers: + + + "OK" - + + on success + + + "ERR:<error-code>:<error-message>" - + + If the formatting of the instruments database + failed. + + + + +
+ +
+ The front-end can retrieve the list of all instrument files in the instruments database + that don't exist in the filesystem by sending the following command: + + + FIND LOST DB_INSTRUMENT_FILES + + + + Possible Answers: + + + A comma separated list with the absolute path names + (encapsulated into apostrophes) of all lost instrument files. + "ERR:<error-code>:<error-message>" - + + in case it failed, providing an appropriate error code and error message. + + + + + Example: + + + C: "FIND LOST DB_INSTRUMENT_FILES" + S: "'/gigs/Bosendorfer 290.gig','/gigs/Steinway D.gig','/gigs/Free Piano.gig'" + + +
+ +
+ The front-end can substitute all occurrences of an instrument file + in the instruments database with a new one by sending the following command: + + + SET DB_INSTRUMENT FILE_PATH <old_path> <new_path> + + + Where <old_path> is the absolute path name of the instrument file + to substitute with <new_path>. + + Possible Answers: + + + "OK" - + + on success + + + "ERR:<error-code>:<error-message>" - + + in case it failed, providing an appropriate error code and error message. + + + + + + Example: + + + C: "SET DB_INSTRUMENT FILE_PATH '/gigs/Bosendorfer 290.gig' '/gigs/pianos/Bosendorfer 290.gig'" + S: "OK" + + +
+
-
+
+ The sampler allows to edit instruments while playing with the + sampler by spawning an external (3rd party) instrument editor + application for a given instrument. The 3rd party instrument + editor applications have to place a respective plugin DLL file + into the sampler's plugins directory. The sampler will + automatically try to load all plugin DLLs in that directory on + startup and only on startup! + At the moment there is only one command for this feature set, + but this will most probably change in future. + +
+ The front-end can request to open an appropriate instrument + editor application by sending the following command: + + + EDIT CHANNEL INSTRUMENT <sampler-channel> + + + Where <sampler-channel> should be replaced by the + number of the sampler channel as given by the + "ADD CHANNEL" + or "LIST CHANNELS" + command. + + The sampler will try to ask all registered instrument + editors (or to be more specific: their sampler plugins) + whether they are capable to handle the instrument on the + given sampler channel. The sampler will simply use the first + instrument editor application which replied with a positive + answer and spawn that instrument editor application within + the sampler's process and provide that application access + to the instrument's data structures, so both applications + can share and access the same instruments data at the same + time, thus allowing to immediately hear changes with the + sampler made by the instrument editor. + + Note: consequently instrument editors are always spawned + locally on the same machine where the sampler is running + on! + + Possible Answers: + + + "OK" - + + when an appropriate instrument editor was + launched + + + "WRN:<warning-code>:<warning-message>" - + + when an appropriate instrument editor was + launched, but there are noteworthy issues + + + "ERR:<error-code>:<error-message>" - + + when an appropriate instrument editor + could not be launched + + + + + + Examples: + + + C: "EDIT CHANNEL INSTRUMENT 0" + S: "OK" + + +
+
+ +
+ You can query detailed informations about files located + at the same system where the sampler instance is running on. + Using this command set allows to retrieve file informations + even remotely from another machine. + +
+ The front-end can retrieve the amount of instruments + within a given instrument file by sending the + following command: + + + GET FILE INSTRUMENTS <filename> + + + Where <filename> is the name of the instrument + file (encapsulated into apostrophes, supporting escape + sequences as described in chapter + "Character Set and Escape + Sequences"). + + The sampler will try to ask all sampler engines, + whether they support the given file and ask the first + engine with a positive answer for the amount of + instruments. + + Possible Answers: + + + On success, the sampler will answer by + returning the amount of instruments. + + "ERR:<error-code>:<error-message>" - + + if the file could not be handled + + + + + + Examples: + + + C: "GET FILE INSTRUMENTS 'D:/Sounds/Foo.gig'" + S: "10" + + +
+ +
+ The front-end can retrieve a list of all instruments + within a given instrument file by sending the + following command: + + + LIST FILE INSTRUMENTS <filename> + + + Where <filename> is the name of the instrument + file (encapsulated into apostrophes, supporting escape + sequences as described in chapter + "Character Set and Escape + Sequences"). + + The sampler will try to ask all sampler engines, + whether they support the given file and ask the first + engine with a positive answer for a list of IDs for the + instruments in the given file. + + Possible Answers: + + + On success, the sampler will answer by + returning a comma separated list of + instrument IDs. + + "ERR:<error-code>:<error-message>" - + + if the file could not be handled + + + + + + Examples: + + + C: "LIST FILE INSTRUMENTS 'D:/Sounds/Foo.gig'" + S: "0,1,2,3,4,5,6,7,8,9" + + +
+ +
+ The front-end can retrieve detailed informations + about a specific instrument within a given instrument + file by sending the following command: + + + GET FILE INSTRUMENT INFO <filename> + <instr-id> + + + Where <filename> is the name of the instrument + file (encapsulated into apostrophes, supporting escape + sequences as described in chapter + "Character Set and Escape + Sequences") and <instr-id> is the numeric + instrument ID as returned by the + + "LIST FILE INSTRUMENTS" command. + + The sampler will try to ask all sampler engines, + whether they support the given file and ask the first + engine with a positive answer for informations about the + specific instrument in the given file. + + Possible Answers: + + + LinuxSampler will answer by sending a <CRLF> separated list. + Each answer line begins with the settings category name + followed by a colon and then a space character <SP> and finally + the info character string to that setting category. At the + moment the following categories are defined: + + + + NAME - + + name of the instrument as + stored in the instrument file + + + FORMAT_FAMILY - + + name of the sampler format + of the given instrument + + + FORMAT_VERSION - + + version of the sampler format + the instrumen is stored as + + + PRODUCT - + + official product name of the + instrument as stored in the file + + + + ARTISTS - + + artists / sample library + vendor of the instrument + + + KEY_BINDINGS - + + comma separated list of integer values representing + the instrument's key mapping in the range between 0 .. 127, + reflecting the analog meaning of the MIDI specification. + + + KEYSWITCH_BINDINGS - + + comma separated list of integer values representing + the instrument's keyswitch mapping in the range between 0 .. 127, + reflecting the analog meaning of the MIDI specification. + + + + + + + The mentioned fields above don't have to be in particular order. + + Example: + + + C: "GET FILE INSTRUMENT INFO 'D:/Sounds/Foo.gig' 0" + S: "NAME: Lunatic Loops" +    "FORMAT_FAMILY: GIG" +    "FORMAT_VERSION: 3" +    "PRODUCT: The Backbone Bongo Beats" +    "ARTISTS: Jimmy the Fish" +    "." + + +
+
+
+
The grammar of the control protocol as descibed in is defined below using Backus-Naur Form (BNF as described in ) @@ -5547,8 +6480,18 @@ / CLEAR SP clear_instruction + / FIND SP find_instruction + / MOVE SP move_instruction + / COPY SP copy_instruction + + / EDIT SP edit_instruction + + / FORMAT SP format_instruction + + / SEND SP send_instruction + / RESET / QUIT @@ -5559,15 +6502,23 @@ CHANNEL - / DB_INSTRUMENT_DIRECTORY SP pathname + / DB_INSTRUMENT_DIRECTORY SP db_path + + / DB_INSTRUMENTS SP NON_MODAL SP scan_mode SP db_path SP filename + + / DB_INSTRUMENTS SP NON_MODAL SP scan_mode SP FILE_AS_DIR SP db_path SP filename + + / DB_INSTRUMENTS SP scan_mode SP db_path SP filename + + / DB_INSTRUMENTS SP scan_mode SP FILE_AS_DIR SP db_path SP filename - / DB_INSTRUMENTS SP FLAT SP pathname SP pathname + / DB_INSTRUMENTS SP NON_MODAL SP db_path SP filename - / DB_INSTRUMENTS SP NON_RECURSIVE SP pathname SP pathname + / DB_INSTRUMENTS SP NON_MODAL SP db_path SP filename SP instrument_index - / DB_INSTRUMENTS SP pathname SP pathname + / DB_INSTRUMENTS SP db_path SP filename - / DB_INSTRUMENTS SP pathname SP pathname SP instrument_index + / DB_INSTRUMENTS SP db_path SP filename SP instrument_index / MIDI_INSTRUMENT_MAP @@ -5587,6 +6538,10 @@ / CHANNEL_COUNT + / CHANNEL_MIDI + + / DEVICE_MIDI + / VOICE_COUNT / STREAM_COUNT @@ -5615,8 +6570,12 @@ / DB_INSTRUMENT_INFO + / DB_INSTRUMENTS_JOB_INFO + / MISCELLANEOUS + / TOTAL_STREAM_COUNT + / TOTAL_VOICE_COUNT / GLOBAL_INFO @@ -5635,6 +6594,10 @@ / CHANNEL_COUNT + / CHANNEL_MIDI + + / DEVICE_MIDI + / VOICE_COUNT / STREAM_COUNT @@ -5663,8 +6626,12 @@ / DB_INSTRUMENT_INFO + / DB_INSTRUMENTS_JOB_INFO + / MISCELLANEOUS + / TOTAL_STREAM_COUNT + / TOTAL_VOICE_COUNT / GLOBAL_INFO @@ -5697,11 +6664,11 @@ / MIDI_INSTRUMENT_MAP SP ALL - / DB_INSTRUMENT_DIRECTORY SP FORCE SP pathname + / DB_INSTRUMENT_DIRECTORY SP FORCE SP db_path - / DB_INSTRUMENT_DIRECTORY SP pathname + / DB_INSTRUMENT_DIRECTORY SP db_path - / DB_INSTRUMENT SP pathname + / DB_INSTRUMENT SP db_path @@ -5755,6 +6722,8 @@ / SERVER SP INFO + / TOTAL_STREAM_COUNT + / TOTAL_VOICE_COUNT / TOTAL_VOICE_COUNT_MAX @@ -5773,16 +6742,26 @@ / FX_SEND SP INFO SP sampler_channel SP fx_send_id - / DB_INSTRUMENT_DIRECTORIES SP pathname + / DB_INSTRUMENT_DIRECTORIES SP RECURSIVE SP db_path - / DB_INSTRUMENT_DIRECTORY SP INFO SP pathname + / DB_INSTRUMENT_DIRECTORIES SP db_path - / DB_INSTRUMENTS SP pathname + / DB_INSTRUMENT_DIRECTORY SP INFO SP db_path - / DB_INSTRUMENT SP INFO SP pathname + / DB_INSTRUMENTS SP RECURSIVE SP db_path + + / DB_INSTRUMENTS SP db_path + + / DB_INSTRUMENT SP INFO SP db_path + + / DB_INSTRUMENTS_JOB SP INFO SP number / VOLUME + / FILE SP INSTRUMENTS SP filename + + / FILE SP INSTRUMENT SP INFO SP filename SP instrument_index + set_instruction = @@ -5793,6 +6772,8 @@ / MIDI_INPUT_DEVICE_PARAMETER SP number SP string '=' param_val_list + / MIDI_INPUT_PORT_PARAMETER SP number SP number SP string '=' NONE + / MIDI_INPUT_PORT_PARAMETER SP number SP number SP string '=' param_val_list / CHANNEL SP set_chan_instruction @@ -5807,13 +6788,15 @@ / FX_SEND SP LEVEL SP sampler_channel SP fx_send_id SP volume_value - / DB_INSTRUMENT_DIRECTORY SP NAME SP pathname SP dirname + / DB_INSTRUMENT_DIRECTORY SP NAME SP db_path SP stringval_escaped + + / DB_INSTRUMENT_DIRECTORY SP DESCRIPTION SP db_path SP stringval_escaped - / DB_INSTRUMENT_DIRECTORY SP DESCRIPTION SP pathname SP stringval + / DB_INSTRUMENT SP NAME SP db_path SP stringval_escaped - / DB_INSTRUMENT SP NAME SP pathname SP dirname + / DB_INSTRUMENT SP DESCRIPTION SP db_path SP stringval_escaped - / DB_INSTRUMENT SP DESCRIPTION SP pathname SP stringval + / DB_INSTRUMENT SP FILE_PATH SP filename SP filename / ECHO SP boolean @@ -5851,11 +6834,33 @@ +find_instruction = + + DB_INSTRUMENTS SP NON_RECURSIVE SP db_path SP query_val_list + + / DB_INSTRUMENTS SP db_path SP query_val_list + + / DB_INSTRUMENT_DIRECTORIES SP NON_RECURSIVE SP db_path SP query_val_list + + / DB_INSTRUMENT_DIRECTORIES SP db_path SP query_val_list + + / LOST SP DB_INSTRUMENT_FILES + + + move_instruction = - DB_INSTRUMENT_DIRECTORY SP pathname SP pathname + DB_INSTRUMENT_DIRECTORY SP db_path SP db_path + + / DB_INSTRUMENT SP db_path SP db_path + + + +copy_instruction = + + DB_INSTRUMENT_DIRECTORY SP db_path SP db_path - / DB_INSTRUMENT SP pathname SP pathname + / DB_INSTRUMENT SP db_path SP db_path @@ -5909,6 +6914,18 @@ +edit_instruction = + + CHANNEL SP INSTRUMENT SP sampler_channel + + + +format_instruction = + + INSTRUMENTS_DB + + + modal_arg = /* epsilon (empty argument) */ @@ -5955,9 +6972,21 @@ / FX_SENDS SP sampler_channel - / DB_INSTRUMENT_DIRECTORIES SP pathname + / DB_INSTRUMENT_DIRECTORIES SP RECURSIVE SP db_path + + / DB_INSTRUMENT_DIRECTORIES SP db_path - / DB_INSTRUMENTS SP pathname + / DB_INSTRUMENTS SP RECURSIVE SP db_path + + / DB_INSTRUMENTS SP db_path + + / FILE SP INSTRUMENTS SP filename + + + +send_instruction = + + CHANNEL SP MIDI_DATA SP string SP sampler_channel SP number SP number @@ -6079,39 +7108,33 @@ -pathname = - - stringval - - - -dirname = +filename = - stringval + path -filename = +db_path = - stringval + path map_name = - stringval + stringval_escaped entry_name = - stringval + stringval_escaped fx_send_name = - stringval + stringval_escaped @@ -6123,6 +7146,7 @@ + param_val = string @@ -6135,8 +7159,149 @@ +query_val_list = + + string '=' query_val + + / query_val_list SP string '=' query_val + + + +query_val = + + text_escaped + + / stringval_escaped + + + +scan_mode = + + RECURSIVE + + / NON_RECURSIVE + + / FLAT + + + + +
+ Older versions of this protocol up to and including v1.1 only + supported the standard ASCII character set (ASCII code 0 - 127) + , all younger versions of this protocol + however support the Extended ASCII character set (ASCII code + 0 - 255). The same group of younger protocols also support + escape sequences, but only for certain, explicitly declared + parts of the protocol. The supported escape sequences are + defined as follows: + + ASCII Character Sequence + Translated into (Name) + \n new line + \r carriage return + \f form feed + \t horizontal tab + \v vertical tab + \' apostrophe + \" quotation mark + \\ backslash + \OOO three digit octal ASCII code of the character + \xHH two digit hex ASCII code of the character + + Notice: due to the transition of certain parts of the + protocol which now support escape sequences, a slight backward + incompatibility to protocols version v1.1 and younger has been + introduced. The only difference is that in parts of the protocol + where escape characters are now supported, a backslash characters + MUST be escaped as well (that is as double backslash), whereas + in the old versions a single backslash was sufficient. + + The following LSCP commands support escape sequences as part + of their filename / path based arguments and / or may contain + a filename / path with escape sequences in their response: + + "LOAD INSTRUMENT" + "GET CHANNEL INFO" + "MAP MIDI_INSTRUMENT" + "GET MIDI_INSTRUMENT INFO" + "ADD DB_INSTRUMENT_DIRECTORY" + "ADD DB_INSTRUMENTS" + "REMOVE DB_INSTRUMENT_DIRECTORY" + "REMOVE DB_INSTRUMENT" + "GET DB_INSTRUMENT_DIRECTORIES" + "LIST DB_INSTRUMENT_DIRECTORIES" + "GET DB_INSTRUMENT_DIRECTORY INFO" + "GET DB_INSTRUMENTS" + "LIST DB_INSTRUMENTS" + "GET DB_INSTRUMENT INFO" + "SET DB_INSTRUMENT_DIRECTORY NAME" + "SET DB_INSTRUMENT_DIRECTORY DESCRIPTION" + "SET DB_INSTRUMENT NAME" + "SET DB_INSTRUMENT DESCRIPTION" + "FIND DB_INSTRUMENTS" + "FIND DB_INSTRUMENT_DIRECTORIES" + "MOVE DB_INSTRUMENT" + "MOVE DB_INSTRUMENT_DIRECTORY" + "COPY DB_INSTRUMENT" + "COPY DB_INSTRUMENT_DIRECTORY" + "FIND LOST DB_INSTRUMENT_FILES" + "SET DB_INSTRUMENT FILE_PATH" + "GET FILE INSTRUMENTS" + "LIST FILE INSTRUMENTS" + "GET FILE INSTRUMENT INFO" + + Note that the forward slash character ('/') has a special meaning in + filename / path based arguments: it acts as separator of the nodes in + the path, thus if a directory- or filename includes a forward slash + (not intended as path node separator), you MUST escape that slash + either with the respective hex escape sequence ("\x2f") or with the + respective octal escape sequence ("\057"). + + + + Note for Windows: file path arguments in LSCP are expected + to use forward slashes as directory node separator similar + to Unix based operating systems. In contrast to Unix however + a Windows typical drive character is expected to be + prefixed to the path. That is an original Windows file path + like "D:\Sounds\My.gig" would become in LSCP: + "D:/Sounds/My.gig". + + + + The following LSCP commands even support escape sequences as + part of at least one of their text-based arguments (i.e. entity name, + description) and / or may contain escape sequences in at least one of + their text-based fields in their response: + + "GET SERVER INFO" + "GET ENGINE INFO" + "GET CHANNEL INFO" + "CREATE FX_SEND" + "GET FX_SEND INFO" + "SET FX_SEND NAME" + "GET MIDI_INSTRUMENT INFO" + "GET MIDI_INSTRUMENT_MAP INFO" + "ADD MIDI_INSTRUMENT_MAP" + "MAP MIDI_INSTRUMENT" + "SET MIDI_INSTRUMENT_MAP NAME" + "GET DB_INSTRUMENT_DIRECTORY INFO" + "SET DB_INSTRUMENT_DIRECTORY NAME" + "SET DB_INSTRUMENT_DIRECTORY DESCRIPTION" + "FIND DB_INSTRUMENT_DIRECTORIES" + "GET DB_INSTRUMENT INFO" + "SET DB_INSTRUMENT NAME" + "SET DB_INSTRUMENT DESCRIPTION" + "FIND DB_INSTRUMENTS" + + Please note that these lists are manually maintained. If you + find a command that also supports escape sequences we forgot to + mention here, please report it! + +
@@ -6240,6 +7405,56 @@ of sampler channels.
+
+ Client may want to be notified when MIDI data arrive on sampler channels on + back-end side, by issuing the following command: + + + SUBSCRIBE CHANNEL_MIDI + + + Server will start sending one of the the following notification messages: + + + "NOTIFY:CHANNEL_MIDI:<channel-id> NOTE_ON <note> <velocity>" + "NOTIFY:CHANNEL_MIDI:<channel-id> NOTE_OFF <note> <velocity>" + + + where <channel-id> will be replaced by the ID of the sampler channel where the MIDI + data arrived. <note> and <velocity> are integer values in the range between + 0 .. 127, reflecting the analog meaning of the MIDI specification. + + CAUTION: no guarantee whatsoever will be made that MIDI events are actually all + delivered by this mechanism! With other words: events could be lost at any time! + This restriction was made to keep the RT-safeness of the backend's MIDI and audio + thread unaffected by this feature. +
+ +
+ Client may want to be notified when MIDI data arrive on MIDI input devices by issuing the following command: + + + SUBSCRIBE DEVICE_MIDI + + + Server will start sending one of the the following notification messages: + + + "NOTIFY:DEVICE_MIDI:<device-id> <port-id> NOTE_ON <note> <velocity>" + "NOTIFY:DEVICE_MIDI:<device-id> <port-id> NOTE_OFF <note> <velocity>" + + + where <device-id> <port-id> will be replaced + by the IDs of the respective MIDI input device and the device's MIDI port where the MIDI + data arrived. <note> and <velocity> are integer values in the range between + 0 .. 127, reflecting the analog meaning of the MIDI specification. + + CAUTION: no guarantee whatsoever will be made that MIDI events are actually all + delivered by this mechanism! With other words: events could be lost at any time! + This restriction was made to keep the RT-safeness of the backend's MIDI and audio + thread unaffected by this feature. +
+
Client may want to be notified when the number of voices on the back-end changes by issuing the following command: @@ -6322,7 +7537,7 @@
- Client may want to be notified when the number of effect sends on + Client may want to be notified when the number of effect sends on a particular sampler channel is changed by issuing the following command: @@ -6377,6 +7592,24 @@ all currently active voices.
+
+ Client may want to be notified when the total number of disk streams on the + back-end changes by issuing the following command: + + + SUBSCRIBE TOTAL_STREAM_COUNT + + + Server will start sending the following notification messages: + + + "NOTIFY:TOTAL_STREAM_COUNT:<streams>" + + + where <streams> will be replaced by the new number of + all currently active disk streams. +
+
Client may want to be notified when the number of MIDI instrument maps on the back-end changes by issuing the following command: @@ -6582,6 +7815,28 @@ the new name of the instrument, encapsulated into apostrophes.
+
+ Client may want to be notified when the status of particular database + instruments job is changed by issuing the following command: + + + SUBSCRIBE DB_INSTRUMENTS_JOB_INFO + + + Server will start sending the following notification messages: + + + "NOTIFY:DB_INSTRUMENTS_JOB_INFO:<job-id>" + + + where <job-id> will be replaced by the numerical ID of the job, + which status is changed. The front-end will have to send the respective + command to actually get the status info. Because these messages + will be triggered by LSCP commands issued by other clients rather than real + time events happening on the server, it is believed that an empty notification + message is sufficient here. +
+
Client may want to be notified of miscellaneous and debugging events occurring at the server by issuing the following command: @@ -6660,6 +7915,16 @@ + + + ASCII format for Network Interchange + + UCLA + + + + +