--- web/trunk/www.linuxsampler.org/api/draft-linuxsampler-protocol.txt 2005/07/21 09:36:52 709 +++ web/trunk/www.linuxsampler.org/api/draft-linuxsampler-protocol.txt 2006/12/29 20:27:15 1006 @@ -3,17 +3,19 @@ LinuxSampler Developers C. Schoenebeck Internet-Draft Interessengemeinschaft Software -Expires: January 22, 2006 Engineering e. V. - July 21, 2005 +Intended status: Standards Track Engineering e. V. +Expires: July 2, 2007 December 29, 2006 LinuxSampler Control Protocol - LSCP 1.1 + LSCP 1.2 Status of this Memo - This document is an Internet-Draft and is in full conformance with - all provisions of Section 10 of RFC 2026. + By submitting this Internet-Draft, each author represents that any + applicable patent or other IPR claims of which he or she is aware + have been or will be disclosed, and any of which he or she becomes + aware will be disclosed, in accordance with Section 6 of BCP 79. Internet-Drafts are working documents of the Internet Engineering Task Force (IETF), its areas, and its working groups. Note that @@ -31,19 +33,13 @@ The list of Internet-Draft Shadow Directories can be accessed at http://www.ietf.org/shadow.html. - This Internet-Draft will expire on January 22, 2006. + This Internet-Draft will expire on July 2, 2007. Copyright Notice - Copyright (C) The Internet Society (2005). All Rights Reserved. + Copyright (C) The Internet Society (2006). -Abstract - The LinuxSampler Control Protocol (LSCP) is an application-level - protocol primarily intended for local and remote controlling the - LinuxSampler backend application, which is a sophisticated server- - like console application essentially playing back audio samples and - manipulating the samples in real time to certain extent. @@ -52,121 +48,181 @@ -Schoenebeck Expires January 22, 2006 [Page 1] -Internet-Draft LinuxSampler Control Protocol July 2005 + + + +Schoenebeck Expires July 2, 2007 [Page 1] + +Internet-Draft LinuxSampler Control Protocol December 2006 + + +Abstract + + The LinuxSampler Control Protocol (LSCP) is an application-level + protocol primarily intended for local and remote controlling the + LinuxSampler backend application, which is a sophisticated server- + like console application essentially playing back audio samples and + manipulating the samples in real time to certain extent. Table of Contents - 1. Requirements notation . . . . . . . . . . . . . . . . . . . 4 - 2. Versioning of this specification . . . . . . . . . . . . . . 5 - 3. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 6 - 4. Focus of this protocol . . . . . . . . . . . . . . . . . . . 7 - 5. Communication Overview . . . . . . . . . . . . . . . . . . . 8 - 5.1 Request/response communication method . . . . . . . . . . 8 - 5.1.1 Result format . . . . . . . . . . . . . . . . . . . . 9 - 5.2 Subscribe/notify communication method . . . . . . . . . . 11 - 6. Description for control commands . . . . . . . . . . . . . . 13 - 6.1 Ignored lines and comments . . . . . . . . . . . . . . . . 13 - 6.2 Configuring audio drivers . . . . . . . . . . . . . . . . 13 - 6.2.1 Getting amount of available audio output drivers . . . 13 - 6.2.2 Getting all available audio output drivers . . . . . . 14 - 6.2.3 Getting information about a specific audio output - driver . . . . . . . . . . . . . . . . . . . . . . . . 14 - 6.2.4 Getting information about specific audio output - driver parameter . . . . . . . . . . . . . . . . . . . 15 - 6.2.5 Creating an audio output device . . . . . . . . . . . 19 - 6.2.6 Destroying an audio output device . . . . . . . . . . 20 - 6.2.7 Getting all created audio output device count . . . . 21 - 6.2.8 Getting all created audio output device list . . . . . 21 - 6.2.9 Getting current settings of an audio output device . . 21 - 6.2.10 Changing settings of audio output devices . . . . . 23 - 6.2.11 Getting information about an audio channel . . . . . 24 - 6.2.12 Getting information about specific audio channel - parameter . . . . . . . . . . . . . . . . . . . . . 25 - 6.2.13 Changing settings of audio output channels . . . . . 27 - 6.3 Configuring MIDI input drivers . . . . . . . . . . . . . . 28 - 6.3.1 Getting amount of available MIDI input drivers . . . . 29 - 6.3.2 Getting all available MIDI input drivers . . . . . . . 29 - 6.3.3 Getting information about a specific MIDI input - driver . . . . . . . . . . . . . . . . . . . . . . . . 30 - 6.3.4 Getting information about specific MIDI input - driver parameter . . . . . . . . . . . . . . . . . . . 31 - 6.3.5 Creating a MIDI input device . . . . . . . . . . . . . 33 - 6.3.6 Destroying a MIDI input device . . . . . . . . . . . . 34 - 6.3.7 Getting all created MIDI input device count . . . . . 35 - 6.3.8 Getting all created MIDI input device list . . . . . . 35 - 6.3.9 Getting current settings of a MIDI input device . . . 36 - 6.3.10 Changing settings of MIDI input devices . . . . . . 37 - 6.3.11 Getting information about a MIDI port . . . . . . . 38 - 6.3.12 Getting information about specific MIDI port - parameter . . . . . . . . . . . . . . . . . . . . . 38 - 6.3.13 Changing settings of MIDI input ports . . . . . . . 40 - 6.4 Configuring sampler channels . . . . . . . . . . . . . . . 41 - 6.4.1 Loading an instrument . . . . . . . . . . . . . . . . 41 - - - -Schoenebeck Expires January 22, 2006 [Page 2] - -Internet-Draft LinuxSampler Control Protocol July 2005 - - - 6.4.2 Loading a sampler engine . . . . . . . . . . . . . . . 42 - 6.4.3 Getting all created sampler channel count . . . . . . 43 - 6.4.4 Getting all created sampler channel list . . . . . . . 43 - 6.4.5 Adding a new sampler channel . . . . . . . . . . . . . 44 - 6.4.6 Removing a sampler channel . . . . . . . . . . . . . . 45 - 6.4.7 Getting amount of available engines . . . . . . . . . 45 - 6.4.8 Getting all available engines . . . . . . . . . . . . 46 - 6.4.9 Getting information about an engine . . . . . . . . . 46 - 6.4.10 Getting sampler channel information . . . . . . . . 47 - 6.4.11 Current number of active voices . . . . . . . . . . 50 - 6.4.12 Current number of active disk streams . . . . . . . 50 - 6.4.13 Current fill state of disk stream buffers . . . . . 51 - 6.4.14 Setting audio output device . . . . . . . . . . . . 52 - 6.4.15 Setting audio output type . . . . . . . . . . . . . 53 - 6.4.16 Setting audio output channel . . . . . . . . . . . . 53 - 6.4.17 Setting MIDI input device . . . . . . . . . . . . . 54 - 6.4.18 Setting MIDI input type . . . . . . . . . . . . . . 55 - 6.4.19 Setting MIDI input port . . . . . . . . . . . . . . 56 - 6.4.20 Setting MIDI input channel . . . . . . . . . . . . . 56 - 6.4.21 Setting channel volume . . . . . . . . . . . . . . . 57 - 6.4.22 Muting a sampler channel . . . . . . . . . . . . . . 58 - 6.4.23 Soloing a sampler channel . . . . . . . . . . . . . 58 - 6.4.24 Resetting a sampler channel . . . . . . . . . . . . 59 - 6.5 Controlling connection . . . . . . . . . . . . . . . . . . 60 - 6.5.1 Register front-end for receiving event messages . . . 60 - 6.5.2 Unregister front-end for not receiving event - messages . . . . . . . . . . . . . . . . . . . . . . . 61 - 6.5.3 Enable or disable echo of commands . . . . . . . . . . 61 - 6.5.4 Close client connection . . . . . . . . . . . . . . . 62 - 6.6 Global commands . . . . . . . . . . . . . . . . . . . . . 62 - 6.6.1 Reset sampler . . . . . . . . . . . . . . . . . . . . 62 - 6.6.2 General sampler informations . . . . . . . . . . . . . 62 - 7. Command Syntax . . . . . . . . . . . . . . . . . . . . . . . 64 - 8. Events . . . . . . . . . . . . . . . . . . . . . . . . . . . 71 - 8.1 Number of sampler channels changed . . . . . . . . . . . . 71 - 8.2 Number of active voices changed . . . . . . . . . . . . . 71 - 8.3 Number of active disk streams changed . . . . . . . . . . 71 - 8.4 Disk stream buffer fill state changed . . . . . . . . . . 72 - 8.5 Channel information changed . . . . . . . . . . . . . . . 72 - 8.6 Miscellaneous and debugging events . . . . . . . . . . . . 72 - 9. Security Considerations . . . . . . . . . . . . . . . . . . 74 - 10. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . 75 - 11. References . . . . . . . . . . . . . . . . . . . . . . . . . 75 - Author's Address . . . . . . . . . . . . . . . . . . . . . . 75 - Intellectual Property and Copyright Statements . . . . . . . 76 + 1. Requirements notation . . . . . . . . . . . . . . . . . . . . 5 + 2. Versioning of this specification . . . . . . . . . . . . . . 6 + 3. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 7 + 4. Focus of this protocol . . . . . . . . . . . . . . . . . . . 8 + 5. Communication Overview . . . . . . . . . . . . . . . . . . . 9 + 5.1. Request/response communication method . . . . . . . . . . 9 + 5.1.1. Result format . . . . . . . . . . . . . . . . . . . . 10 + 5.2. Subscribe/notify communication method . . . . . . . . . . 12 + 6. Description for control commands . . . . . . . . . . . . . . 14 + 6.1. Ignored lines and comments . . . . . . . . . . . . . . . 14 + 6.2. Configuring audio drivers . . . . . . . . . . . . . . . . 14 + 6.2.1. Getting amount of available audio output drivers . . 15 + 6.2.2. Getting all available audio output drivers . . . . . 15 + 6.2.3. Getting information about a specific audio output + driver . . . . . . . . . . . . . . . . . . . . . . . 15 + 6.2.4. Getting information about specific audio output + driver parameter . . . . . . . . . . . . . . . . . . 16 + 6.2.5. Creating an audio output device . . . . . . . . . . . 20 + 6.2.6. Destroying an audio output device . . . . . . . . . . 21 + 6.2.7. Getting all created audio output device count . . . . 22 + 6.2.8. Getting all created audio output device list . . . . 22 + 6.2.9. Getting current settings of an audio output device . 22 + 6.2.10. Changing settings of audio output devices . . . . . . 24 + 6.2.11. Getting information about an audio channel . . . . . 25 + 6.2.12. Getting information about specific audio channel + parameter . . . . . . . . . . . . . . . . . . . . . . 26 + 6.2.13. Changing settings of audio output channels . . . . . 28 + 6.3. Configuring MIDI input drivers . . . . . . . . . . . . . 29 + 6.3.1. Getting amount of available MIDI input drivers . . . 30 + 6.3.2. Getting all available MIDI input drivers . . . . . . 30 + 6.3.3. Getting information about a specific MIDI input + driver . . . . . . . . . . . . . . . . . . . . . . . 31 + 6.3.4. Getting information about specific MIDI input + driver parameter . . . . . . . . . . . . . . . . . . 32 + 6.3.5. Creating a MIDI input device . . . . . . . . . . . . 34 + 6.3.6. Destroying a MIDI input device . . . . . . . . . . . 35 + 6.3.7. Getting all created MIDI input device count . . . . . 36 + + + +Schoenebeck Expires July 2, 2007 [Page 2] + +Internet-Draft LinuxSampler Control Protocol December 2006 + + + 6.3.8. Getting all created MIDI input device list . . . . . 36 + 6.3.9. Getting current settings of a MIDI input device . . . 37 + 6.3.10. Changing settings of MIDI input devices . . . . . . . 38 + 6.3.11. Getting information about a MIDI port . . . . . . . . 38 + 6.3.12. Getting information about specific MIDI port + parameter . . . . . . . . . . . . . . . . . . . . . . 39 + 6.3.13. Changing settings of MIDI input ports . . . . . . . . 41 + 6.4. Configuring sampler channels . . . . . . . . . . . . . . 42 + 6.4.1. Loading an instrument . . . . . . . . . . . . . . . . 42 + 6.4.2. Loading a sampler engine . . . . . . . . . . . . . . 43 + 6.4.3. Getting all created sampler channel count . . . . . . 44 + 6.4.4. Getting all created sampler channel list . . . . . . 44 + 6.4.5. Adding a new sampler channel . . . . . . . . . . . . 44 + 6.4.6. Removing a sampler channel . . . . . . . . . . . . . 45 + 6.4.7. Getting amount of available engines . . . . . . . . . 46 + 6.4.8. Getting all available engines . . . . . . . . . . . . 46 + 6.4.9. Getting information about an engine . . . . . . . . . 47 + 6.4.10. Getting sampler channel information . . . . . . . . . 48 + 6.4.11. Current number of active voices . . . . . . . . . . . 51 + 6.4.12. Current number of active disk streams . . . . . . . . 51 + 6.4.13. Current fill state of disk stream buffers . . . . . . 52 + 6.4.14. Setting audio output device . . . . . . . . . . . . . 53 + 6.4.15. Setting audio output type . . . . . . . . . . . . . . 53 + 6.4.16. Setting audio output channel . . . . . . . . . . . . 54 + 6.4.17. Setting MIDI input device . . . . . . . . . . . . . . 55 + 6.4.18. Setting MIDI input type . . . . . . . . . . . . . . . 56 + 6.4.19. Setting MIDI input port . . . . . . . . . . . . . . . 56 + 6.4.20. Setting MIDI input channel . . . . . . . . . . . . . 57 + 6.4.21. Setting channel volume . . . . . . . . . . . . . . . 58 + 6.4.22. Muting a sampler channel . . . . . . . . . . . . . . 58 + 6.4.23. Soloing a sampler channel . . . . . . . . . . . . . . 59 + 6.4.24. Assigning a MIDI instrument map to a sampler + channel . . . . . . . . . . . . . . . . . . . . . . . 60 + 6.4.25. Adding an effect send to a sampler channel . . . . . 61 + 6.4.26. Removing an effect send from a sampler channel . . . 62 + 6.4.27. Getting amount of effect sends on a sampler channel . 63 + 6.4.28. Listing all effect sends on a sampler channel . . . . 63 + 6.4.29. Getting effect send information . . . . . . . . . . . 64 + 6.4.30. Altering effect send's audio routing . . . . . . . . 65 + 6.4.31. Resetting a sampler channel . . . . . . . . . . . . . 66 + 6.5. Controlling connection . . . . . . . . . . . . . . . . . 66 + 6.5.1. Register front-end for receiving event messages . . . 66 + 6.5.2. Unregister front-end for not receiving event + messages . . . . . . . . . . . . . . . . . . . . . . 67 + 6.5.3. Enable or disable echo of commands . . . . . . . . . 68 + 6.5.4. Close client connection . . . . . . . . . . . . . . . 68 + 6.6. Global commands . . . . . . . . . . . . . . . . . . . . . 69 + 6.6.1. Current number of active voices . . . . . . . . . . . 69 + + + +Schoenebeck Expires July 2, 2007 [Page 3] + +Internet-Draft LinuxSampler Control Protocol December 2006 + + + 6.6.2. Maximum amount of active voices . . . . . . . . . . . 69 + 6.6.3. Reset sampler . . . . . . . . . . . . . . . . . . . . 69 + 6.6.4. General sampler informations . . . . . . . . . . . . 70 + 6.6.5. Getting global volume attenuation . . . . . . . . . . 70 + 6.6.6. Setting global volume attenuation . . . . . . . . . . 71 + 6.7. MIDI Instrument Mapping . . . . . . . . . . . . . . . . . 71 + 6.7.1. Create a new MIDI instrument map . . . . . . . . . . 72 + 6.7.2. Delete one particular or all MIDI instrument maps . . 73 + 6.7.3. Get amount of existing MIDI instrument maps . . . . . 73 + 6.7.4. Getting all created MIDI instrument maps . . . . . . 74 + 6.7.5. Getting MIDI instrument map information . . . . . . . 74 + 6.7.6. Renaming a MIDI instrument map . . . . . . . . . . . 75 + 6.7.7. Create or replace a MIDI instrument map entry . . . . 75 + 6.7.8. Getting ammount of MIDI instrument map entries . . . 78 + 6.7.9. Getting indeces of all entries of a MIDI + instrument map . . . . . . . . . . . . . . . . . . . 79 + 6.7.10. Remove an entry from the MIDI instrument map . . . . 79 + 6.7.11. Get current settings of MIDI instrument map entry . . 80 + 6.7.12. Clear MIDI instrument map . . . . . . . . . . . . . . 82 + 7. Command Syntax . . . . . . . . . . . . . . . . . . . . . . . 83 + 8. Events . . . . . . . . . . . . . . . . . . . . . . . . . . . 94 + 8.1. Number of audio output devices changed . . . . . . . . . 94 + 8.2. Audio output device's settings changed . . . . . . . . . 94 + 8.3. Number of MIDI input devices changed . . . . . . . . . . 94 + 8.4. MIDI input device's settings changed . . . . . . . . . . 95 + 8.5. Number of sampler channels changed . . . . . . . . . . . 95 + 8.6. Number of active voices changed . . . . . . . . . . . . . 95 + 8.7. Number of active disk streams changed . . . . . . . . . . 96 + 8.8. Disk stream buffer fill state changed . . . . . . . . . . 96 + 8.9. Channel information changed . . . . . . . . . . . . . . . 96 + 8.10. Total number of active voices changed . . . . . . . . . . 97 + 8.11. Number of MIDI instrument maps changed . . . . . . . . . 97 + 8.12. MIDI instrument map information changed . . . . . . . . . 97 + 8.13. Number of MIDI instruments changed . . . . . . . . . . . 98 + 8.14. MIDI instrument information changed . . . . . . . . . . . 98 + 8.15. Miscellaneous and debugging events . . . . . . . . . . . 99 + 9. Security Considerations . . . . . . . . . . . . . . . . . . . 100 + 10. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 101 + 11. References . . . . . . . . . . . . . . . . . . . . . . . . . 102 + Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 103 + Intellectual Property and Copyright Statements . . . . . . . . . 104 -Schoenebeck Expires January 22, 2006 [Page 3] -Internet-Draft LinuxSampler Control Protocol July 2005 + + + +Schoenebeck Expires July 2, 2007 [Page 4] + +Internet-Draft LinuxSampler Control Protocol December 2006 1. Requirements notation @@ -220,9 +276,9 @@ -Schoenebeck Expires January 22, 2006 [Page 4] - -Internet-Draft LinuxSampler Control Protocol July 2005 +Schoenebeck Expires July 2, 2007 [Page 5] + +Internet-Draft LinuxSampler Control Protocol December 2006 2. Versioning of this specification @@ -251,7 +307,7 @@ sampler's LSCP minor version. Compatibility can only be claimed if both rules are true. The - frontend can use the "GET SERVER INFO" (Section 6.6.2) command to get + frontend can use the "GET SERVER INFO" (Section 6.6.4) command to get the version of the LSCP specification the sampler complies with. @@ -276,9 +332,9 @@ -Schoenebeck Expires January 22, 2006 [Page 5] - -Internet-Draft LinuxSampler Control Protocol July 2005 +Schoenebeck Expires July 2, 2007 [Page 6] + +Internet-Draft LinuxSampler Control Protocol December 2006 3. Introduction @@ -332,9 +388,9 @@ -Schoenebeck Expires January 22, 2006 [Page 6] - -Internet-Draft LinuxSampler Control Protocol July 2005 +Schoenebeck Expires July 2, 2007 [Page 7] + +Internet-Draft LinuxSampler Control Protocol December 2006 4. Focus of this protocol @@ -388,9 +444,9 @@ -Schoenebeck Expires January 22, 2006 [Page 7] - -Internet-Draft LinuxSampler Control Protocol July 2005 +Schoenebeck Expires July 2, 2007 [Page 8] + +Internet-Draft LinuxSampler Control Protocol December 2006 5. Communication Overview @@ -405,7 +461,7 @@ more effort to be implemented in the front-end application. The two communication methods will be described next. -5.1 Request/response communication method +5.1. Request/response communication method This simple communication method is based on TCP [RFC793]. The front-end application establishes a TCP connection to the @@ -444,12 +500,12 @@ -Schoenebeck Expires January 22, 2006 [Page 8] - -Internet-Draft LinuxSampler Control Protocol July 2005 +Schoenebeck Expires July 2, 2007 [Page 9] + +Internet-Draft LinuxSampler Control Protocol December 2006 -5.1.1 Result format +5.1.1. Result format Result set could be one of the following types: @@ -500,9 +556,9 @@ -Schoenebeck Expires January 22, 2006 [Page 9] - -Internet-Draft LinuxSampler Control Protocol July 2005 +Schoenebeck Expires July 2, 2007 [Page 10] + +Internet-Draft LinuxSampler Control Protocol December 2006 set has the following format: @@ -556,9 +612,9 @@ -Schoenebeck Expires January 22, 2006 [Page 10] - -Internet-Draft LinuxSampler Control Protocol July 2005 +Schoenebeck Expires July 2, 2007 [Page 11] + +Internet-Draft LinuxSampler Control Protocol December 2006 Each line of the result set MUST end with . @@ -573,8 +629,7 @@ S: "WRN[0]:32:Sample rate not supported, using 44100 instead." - -5.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 communication method. The @@ -609,15 +664,15 @@ 3. When response is being sent to the client, event MUST be inserted in the stream before or after the response, but NOT in the + middle. Same is true about the response. It should never be -Schoenebeck Expires January 22, 2006 [Page 11] - -Internet-Draft LinuxSampler Control Protocol July 2005 +Schoenebeck Expires July 2, 2007 [Page 12] + +Internet-Draft LinuxSampler Control Protocol December 2006 - middle. Same is true about the response. It should never be inserted in the middle of the event message as well as any other response. @@ -668,9 +723,10 @@ -Schoenebeck Expires January 22, 2006 [Page 12] -Internet-Draft LinuxSampler Control Protocol July 2005 +Schoenebeck Expires July 2, 2007 [Page 13] + +Internet-Draft LinuxSampler Control Protocol December 2006 6. Description for control commands @@ -682,14 +738,14 @@ LinuxSampler signals the end of the response by a "." (single dot) line. -6.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 "#" character are ignored, thus it's possible for example to group commands and to place comments in a LSCP script file. -6.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 output the sound of @@ -718,17 +774,20 @@ retrieve what parameters drivers are offering, how to retrieve their possible values, etc. -6.2.1 Getting amount of available audio output drivers - Use the following command to get the number of audio output drivers -Schoenebeck Expires January 22, 2006 [Page 13] -Internet-Draft LinuxSampler Control Protocol July 2005 +Schoenebeck Expires July 2, 2007 [Page 14] + +Internet-Draft LinuxSampler Control Protocol December 2006 + + +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 LinuxSampler instance: GET AVAILABLE_AUDIO_OUTPUT_DRIVERS @@ -744,8 +803,7 @@ S: "2" - -6.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 instance: @@ -763,8 +821,7 @@ S: "ALSA,JACK" - -6.2.3 Getting information about a specific audio output driver +6.2.3. Getting information about a specific audio output driver Use the following command to get detailed information about a specific audio output driver: @@ -779,10 +836,9 @@ - -Schoenebeck Expires January 22, 2006 [Page 14] - -Internet-Draft LinuxSampler Control Protocol July 2005 +Schoenebeck Expires July 2, 2007 [Page 15] + +Internet-Draft LinuxSampler Control Protocol December 2006 LinuxSampler will answer by sending a separated list. Each @@ -823,8 +879,7 @@ "." - -6.2.4 Getting information about specific audio output driver parameter +6.2.4. Getting information about specific audio output driver parameter Use the following command to get detailed information about a specific audio output driver parameter: @@ -833,15 +888,15 @@ Where