--- 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/11/26 16:39:49 945 @@ -3,12 +3,12 @@ LinuxSampler Developers C. Schoenebeck Internet-Draft Interessengemeinschaft Software -Expires: January 22, 2006 Engineering e. V. - July 21, 2005 +Expires: May 30, 2007 Engineering e. V. + November 26, 2006 LinuxSampler Control Protocol - LSCP 1.1 + LSCP 1.2 Status of this Memo @@ -31,11 +31,11 @@ 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 May 30, 2007. Copyright Notice - Copyright (C) The Internet Society (2005). All Rights Reserved. + Copyright (C) The Internet Society (2006). All Rights Reserved. Abstract @@ -52,121 +52,177 @@ -Schoenebeck Expires January 22, 2006 [Page 1] - -Internet-Draft LinuxSampler Control Protocol July 2005 +Schoenebeck Expires May 30, 2007 [Page 1] + +Internet-Draft LinuxSampler Control Protocol November 2006 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 . . . 14 + 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 . . . . . . 24 + 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 . . . . . . . . . . . . . . . . . . . . . . . . 30 + 6.3.4. Getting information about specific MIDI input + driver parameter . . . . . . . . . . . . . . . . . . . 31 + 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 + 6.3.8. Getting all created MIDI input device list . . . . . . 36 + 6.3.9. Getting current settings of a MIDI input device . . . 36 + 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 + + + +Schoenebeck Expires May 30, 2007 [Page 2] + +Internet-Draft LinuxSampler Control Protocol November 2006 + + + 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 . . . . . . 51 + 6.4.14. Setting audio output device . . . . . . . . . . . . . 52 + 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 . . . . . . . . . . . . . . . 55 + 6.4.19. Setting MIDI input port . . . . . . . . . . . . . . . 56 + 6.4.20. Setting MIDI input channel . . . . . . . . . . . . . . 57 + 6.4.21. Setting channel volume . . . . . . . . . . . . . . . . 57 + 6.4.22. Muting a sampler channel . . . . . . . . . . . . . . . 58 + 6.4.23. Soloing a sampler channel . . . . . . . . . . . . . . 59 + 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 . . . . . . . . . . 62 + 6.5.4. Close client connection . . . . . . . . . . . . . . . 62 + 6.6. Global commands . . . . . . . . . . . . . . . . . . . . . 62 + 6.6.1. Current number of active voices . . . . . . . . . . . 62 + 6.6.2. Maximum amount of active voices . . . . . . . . . . . 63 + 6.6.3. Reset sampler . . . . . . . . . . . . . . . . . . . . 63 + 6.6.4. General sampler informations . . . . . . . . . . . . . 63 + 6.7. MIDI Instrument Mapping . . . . . . . . . . . . . . . . . 64 + 6.7.1. Create or replace a MIDI instrument map entry . . . . 64 + 6.7.2. Getting ammount of MIDI instrument map entries . . . . 67 + 6.7.3. Getting indeces of all MIDI instrument map entries . . 67 + 6.7.4. Remove an entry from the MIDI instrument map . . . . . 68 + 6.7.5. Get current settings of MIDI instrument map entry . . 69 + 6.7.6. Clear MIDI instrument map . . . . . . . . . . . . . . 70 + 7. Command Syntax . . . . . . . . . . . . . . . . . . . . . . . . 72 + 8. Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81 + 8.1. Number of sampler channels changed . . . . . . . . . . . . 81 + 8.2. Number of active voices changed . . . . . . . . . . . . . 81 + 8.3. Number of active disk streams changed . . . . . . . . . . 81 + 8.4. Disk stream buffer fill state changed . . . . . . . . . . 82 + 8.5. Channel information changed . . . . . . . . . . . . . . . 82 + + + +Schoenebeck Expires May 30, 2007 [Page 3] + +Internet-Draft LinuxSampler Control Protocol November 2006 + + + 8.6. Total number of active voices changed . . . . . . . . . . 82 + 8.7. Miscellaneous and debugging events . . . . . . . . . . . . 83 + 9. Security Considerations . . . . . . . . . . . . . . . . . . . 84 + 10. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 85 + 11. References . . . . . . . . . . . . . . . . . . . . . . . . . . 85 + Author's Address . . . . . . . . . . . . . . . . . . . . . . . . . 86 + Intellectual Property and Copyright Statements . . . . . . . . . . 87 + + + + + + + + + + + + + + + + + + + + -Schoenebeck Expires January 22, 2006 [Page 3] -Internet-Draft LinuxSampler Control Protocol July 2005 + + + + + + + + + + + + + + + + + +Schoenebeck Expires May 30, 2007 [Page 4] + +Internet-Draft LinuxSampler Control Protocol November 2006 1. Requirements notation @@ -220,9 +276,9 @@ -Schoenebeck Expires January 22, 2006 [Page 4] - -Internet-Draft LinuxSampler Control Protocol July 2005 +Schoenebeck Expires May 30, 2007 [Page 5] + +Internet-Draft LinuxSampler Control Protocol November 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 May 30, 2007 [Page 6] + +Internet-Draft LinuxSampler Control Protocol November 2006 3. Introduction @@ -332,9 +388,9 @@ -Schoenebeck Expires January 22, 2006 [Page 6] - -Internet-Draft LinuxSampler Control Protocol July 2005 +Schoenebeck Expires May 30, 2007 [Page 7] + +Internet-Draft LinuxSampler Control Protocol November 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 May 30, 2007 [Page 8] + +Internet-Draft LinuxSampler Control Protocol November 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] +Schoenebeck Expires May 30, 2007 [Page 9] + +Internet-Draft LinuxSampler Control Protocol November 2006 -Internet-Draft LinuxSampler Control Protocol July 2005 - -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 May 30, 2007 [Page 10] + +Internet-Draft LinuxSampler Control Protocol November 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 May 30, 2007 [Page 11] + +Internet-Draft LinuxSampler Control Protocol November 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 May 30, 2007 [Page 12] + +Internet-Draft LinuxSampler Control Protocol November 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 May 30, 2007 [Page 13] + +Internet-Draft LinuxSampler Control Protocol November 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,15 +774,15 @@ retrieve what parameters drivers are offering, how to retrieve their possible values, etc. -6.2.1 Getting amount of available audio output drivers +6.2.1. Getting amount of available audio output drivers Use the following command to get the number of audio output drivers -Schoenebeck Expires January 22, 2006 [Page 13] - -Internet-Draft LinuxSampler Control Protocol July 2005 +Schoenebeck Expires May 30, 2007 [Page 14] + +Internet-Draft LinuxSampler Control Protocol November 2006 currently available for the LinuxSampler instance: @@ -744,8 +800,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 +818,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: @@ -780,9 +834,11 @@ -Schoenebeck Expires January 22, 2006 [Page 14] -Internet-Draft LinuxSampler Control Protocol July 2005 + +Schoenebeck Expires May 30, 2007 [Page 15] + +Internet-Draft LinuxSampler Control Protocol November 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