Assists music production by grouping standalone programs into sessions. Community version of "Non Session Manager".
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1437 lines
67KB

  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  7. <meta name="generator" content="Asciidoctor 2.0.17">
  8. <meta name="author" content="Jonathan Moore Liles, Nils Hilbricht">
  9. <title>New Session Manager - API</title>
  10. <style>
  11. /*! Asciidoctor default stylesheet | MIT License | https://asciidoctor.org */
  12. /* Uncomment the following line when using as a custom stylesheet */
  13. /* @import "https://fonts.googleapis.com/css?family=Open+Sans:300,300italic,400,400italic,600,600italic%7CNoto+Serif:400,400italic,700,700italic%7CDroid+Sans+Mono:400,700"; */
  14. html{font-family:sans-serif;-webkit-text-size-adjust:100%}
  15. a{background:none}
  16. a:focus{outline:thin dotted}
  17. a:active,a:hover{outline:0}
  18. h1{font-size:2em;margin:.67em 0}
  19. b,strong{font-weight:bold}
  20. abbr{font-size:.9em}
  21. abbr[title]{cursor:help;border-bottom:1px dotted #dddddf;text-decoration:none}
  22. dfn{font-style:italic}
  23. hr{height:0}
  24. mark{background:#ff0;color:#000}
  25. code,kbd,pre,samp{font-family:monospace;font-size:1em}
  26. pre{white-space:pre-wrap}
  27. q{quotes:"\201C" "\201D" "\2018" "\2019"}
  28. small{font-size:80%}
  29. sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}
  30. sup{top:-.5em}
  31. sub{bottom:-.25em}
  32. img{border:0}
  33. svg:not(:root){overflow:hidden}
  34. figure{margin:0}
  35. audio,video{display:inline-block}
  36. audio:not([controls]){display:none;height:0}
  37. fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}
  38. legend{border:0;padding:0}
  39. button,input,select,textarea{font-family:inherit;font-size:100%;margin:0}
  40. button,input{line-height:normal}
  41. button,select{text-transform:none}
  42. button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}
  43. button[disabled],html input[disabled]{cursor:default}
  44. input[type=checkbox],input[type=radio]{padding:0}
  45. button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}
  46. textarea{overflow:auto;vertical-align:top}
  47. table{border-collapse:collapse;border-spacing:0}
  48. *,::before,::after{box-sizing:border-box}
  49. html,body{font-size:100%}
  50. body{background:#fff;color:rgba(0,0,0,.8);padding:0;margin:0;font-family:"Noto Serif","DejaVu Serif",serif;line-height:1;position:relative;cursor:auto;-moz-tab-size:4;-o-tab-size:4;tab-size:4;word-wrap:anywhere;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}
  51. a:hover{cursor:pointer}
  52. img,object,embed{max-width:100%;height:auto}
  53. object,embed{height:100%}
  54. img{-ms-interpolation-mode:bicubic}
  55. .left{float:left!important}
  56. .right{float:right!important}
  57. .text-left{text-align:left!important}
  58. .text-right{text-align:right!important}
  59. .text-center{text-align:center!important}
  60. .text-justify{text-align:justify!important}
  61. .hide{display:none}
  62. img,object,svg{display:inline-block;vertical-align:middle}
  63. textarea{height:auto;min-height:50px}
  64. select{width:100%}
  65. .subheader,.admonitionblock td.content>.title,.audioblock>.title,.exampleblock>.title,.imageblock>.title,.listingblock>.title,.literalblock>.title,.stemblock>.title,.openblock>.title,.paragraph>.title,.quoteblock>.title,table.tableblock>.title,.verseblock>.title,.videoblock>.title,.dlist>.title,.olist>.title,.ulist>.title,.qlist>.title,.hdlist>.title{line-height:1.45;color:#7a2518;font-weight:400;margin-top:0;margin-bottom:.25em}
  66. div,dl,dt,dd,ul,ol,li,h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6,pre,form,p,blockquote,th,td{margin:0;padding:0}
  67. a{color:#2156a5;text-decoration:underline;line-height:inherit}
  68. a:hover,a:focus{color:#1d4b8f}
  69. a img{border:0}
  70. p{line-height:1.6;margin-bottom:1.25em;text-rendering:optimizeLegibility}
  71. p aside{font-size:.875em;line-height:1.35;font-style:italic}
  72. h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6{font-family:"Open Sans","DejaVu Sans",sans-serif;font-weight:300;font-style:normal;color:#ba3925;text-rendering:optimizeLegibility;margin-top:1em;margin-bottom:.5em;line-height:1.0125em}
  73. h1 small,h2 small,h3 small,#toctitle small,.sidebarblock>.content>.title small,h4 small,h5 small,h6 small{font-size:60%;color:#e99b8f;line-height:0}
  74. h1{font-size:2.125em}
  75. h2{font-size:1.6875em}
  76. h3,#toctitle,.sidebarblock>.content>.title{font-size:1.375em}
  77. h4,h5{font-size:1.125em}
  78. h6{font-size:1em}
  79. hr{border:solid #dddddf;border-width:1px 0 0;clear:both;margin:1.25em 0 1.1875em}
  80. em,i{font-style:italic;line-height:inherit}
  81. strong,b{font-weight:bold;line-height:inherit}
  82. small{font-size:60%;line-height:inherit}
  83. code{font-family:"Droid Sans Mono","DejaVu Sans Mono",monospace;font-weight:400;color:rgba(0,0,0,.9)}
  84. ul,ol,dl{line-height:1.6;margin-bottom:1.25em;list-style-position:outside;font-family:inherit}
  85. ul,ol{margin-left:1.5em}
  86. ul li ul,ul li ol{margin-left:1.25em;margin-bottom:0}
  87. ul.square li ul,ul.circle li ul,ul.disc li ul{list-style:inherit}
  88. ul.square{list-style-type:square}
  89. ul.circle{list-style-type:circle}
  90. ul.disc{list-style-type:disc}
  91. ol li ul,ol li ol{margin-left:1.25em;margin-bottom:0}
  92. dl dt{margin-bottom:.3125em;font-weight:bold}
  93. dl dd{margin-bottom:1.25em}
  94. blockquote{margin:0 0 1.25em;padding:.5625em 1.25em 0 1.1875em;border-left:1px solid #ddd}
  95. blockquote,blockquote p{line-height:1.6;color:rgba(0,0,0,.85)}
  96. @media screen and (min-width:768px){h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6{line-height:1.2}
  97. h1{font-size:2.75em}
  98. h2{font-size:2.3125em}
  99. h3,#toctitle,.sidebarblock>.content>.title{font-size:1.6875em}
  100. h4{font-size:1.4375em}}
  101. table{background:#fff;margin-bottom:1.25em;border:1px solid #dedede;word-wrap:normal}
  102. table thead,table tfoot{background:#f7f8f7}
  103. table thead tr th,table thead tr td,table tfoot tr th,table tfoot tr td{padding:.5em .625em .625em;font-size:inherit;color:rgba(0,0,0,.8);text-align:left}
  104. table tr th,table tr td{padding:.5625em .625em;font-size:inherit;color:rgba(0,0,0,.8)}
  105. table tr.even,table tr.alt{background:#f8f8f7}
  106. table thead tr th,table tfoot tr th,table tbody tr td,table tr td,table tfoot tr td{line-height:1.6}
  107. h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6{line-height:1.2;word-spacing:-.05em}
  108. h1 strong,h2 strong,h3 strong,#toctitle strong,.sidebarblock>.content>.title strong,h4 strong,h5 strong,h6 strong{font-weight:400}
  109. .center{margin-left:auto;margin-right:auto}
  110. .stretch{width:100%}
  111. .clearfix::before,.clearfix::after,.float-group::before,.float-group::after{content:" ";display:table}
  112. .clearfix::after,.float-group::after{clear:both}
  113. :not(pre).nobreak{word-wrap:normal}
  114. :not(pre).nowrap{white-space:nowrap}
  115. :not(pre).pre-wrap{white-space:pre-wrap}
  116. :not(pre):not([class^=L])>code{font-size:.9375em;font-style:normal!important;letter-spacing:0;padding:.1em .5ex;word-spacing:-.15em;background:#f7f7f8;border-radius:4px;line-height:1.45;text-rendering:optimizeSpeed}
  117. pre{color:rgba(0,0,0,.9);font-family:"Droid Sans Mono","DejaVu Sans Mono",monospace;line-height:1.45;text-rendering:optimizeSpeed}
  118. pre code,pre pre{color:inherit;font-size:inherit;line-height:inherit}
  119. pre>code{display:block}
  120. pre.nowrap,pre.nowrap pre{white-space:pre;word-wrap:normal}
  121. em em{font-style:normal}
  122. strong strong{font-weight:400}
  123. .keyseq{color:rgba(51,51,51,.8)}
  124. kbd{font-family:"Droid Sans Mono","DejaVu Sans Mono",monospace;display:inline-block;color:rgba(0,0,0,.8);font-size:.65em;line-height:1.45;background:#f7f7f7;border:1px solid #ccc;border-radius:3px;box-shadow:0 1px 0 rgba(0,0,0,.2),inset 0 0 0 .1em #fff;margin:0 .15em;padding:.2em .5em;vertical-align:middle;position:relative;top:-.1em;white-space:nowrap}
  125. .keyseq kbd:first-child{margin-left:0}
  126. .keyseq kbd:last-child{margin-right:0}
  127. .menuseq,.menuref{color:#000}
  128. .menuseq b:not(.caret),.menuref{font-weight:inherit}
  129. .menuseq{word-spacing:-.02em}
  130. .menuseq b.caret{font-size:1.25em;line-height:.8}
  131. .menuseq i.caret{font-weight:bold;text-align:center;width:.45em}
  132. b.button::before,b.button::after{position:relative;top:-1px;font-weight:400}
  133. b.button::before{content:"[";padding:0 3px 0 2px}
  134. b.button::after{content:"]";padding:0 2px 0 3px}
  135. p a>code:hover{color:rgba(0,0,0,.9)}
  136. #header,#content,#footnotes,#footer{width:100%;margin:0 auto;max-width:62.5em;*zoom:1;position:relative;padding-left:.9375em;padding-right:.9375em}
  137. #header::before,#header::after,#content::before,#content::after,#footnotes::before,#footnotes::after,#footer::before,#footer::after{content:" ";display:table}
  138. #header::after,#content::after,#footnotes::after,#footer::after{clear:both}
  139. #content{margin-top:1.25em}
  140. #content::before{content:none}
  141. #header>h1:first-child{color:rgba(0,0,0,.85);margin-top:2.25rem;margin-bottom:0}
  142. #header>h1:first-child+#toc{margin-top:8px;border-top:1px solid #dddddf}
  143. #header>h1:only-child,body.toc2 #header>h1:nth-last-child(2){border-bottom:1px solid #dddddf;padding-bottom:8px}
  144. #header .details{border-bottom:1px solid #dddddf;line-height:1.45;padding-top:.25em;padding-bottom:.25em;padding-left:.25em;color:rgba(0,0,0,.6);display:flex;flex-flow:row wrap}
  145. #header .details span:first-child{margin-left:-.125em}
  146. #header .details span.email a{color:rgba(0,0,0,.85)}
  147. #header .details br{display:none}
  148. #header .details br+span::before{content:"\00a0\2013\00a0"}
  149. #header .details br+span.author::before{content:"\00a0\22c5\00a0";color:rgba(0,0,0,.85)}
  150. #header .details br+span#revremark::before{content:"\00a0|\00a0"}
  151. #header #revnumber{text-transform:capitalize}
  152. #header #revnumber::after{content:"\00a0"}
  153. #content>h1:first-child:not([class]){color:rgba(0,0,0,.85);border-bottom:1px solid #dddddf;padding-bottom:8px;margin-top:0;padding-top:1rem;margin-bottom:1.25rem}
  154. #toc{border-bottom:1px solid #e7e7e9;padding-bottom:.5em}
  155. #toc>ul{margin-left:.125em}
  156. #toc ul.sectlevel0>li>a{font-style:italic}
  157. #toc ul.sectlevel0 ul.sectlevel1{margin:.5em 0}
  158. #toc ul{font-family:"Open Sans","DejaVu Sans",sans-serif;list-style-type:none}
  159. #toc li{line-height:1.3334;margin-top:.3334em}
  160. #toc a{text-decoration:none}
  161. #toc a:active{text-decoration:underline}
  162. #toctitle{color:#7a2518;font-size:1.2em}
  163. @media screen and (min-width:768px){#toctitle{font-size:1.375em}
  164. body.toc2{padding-left:15em;padding-right:0}
  165. #toc.toc2{margin-top:0!important;background:#f8f8f7;position:fixed;width:15em;left:0;top:0;border-right:1px solid #e7e7e9;border-top-width:0!important;border-bottom-width:0!important;z-index:1000;padding:1.25em 1em;height:100%;overflow:auto}
  166. #toc.toc2 #toctitle{margin-top:0;margin-bottom:.8rem;font-size:1.2em}
  167. #toc.toc2>ul{font-size:.9em;margin-bottom:0}
  168. #toc.toc2 ul ul{margin-left:0;padding-left:1em}
  169. #toc.toc2 ul.sectlevel0 ul.sectlevel1{padding-left:0;margin-top:.5em;margin-bottom:.5em}
  170. body.toc2.toc-right{padding-left:0;padding-right:15em}
  171. body.toc2.toc-right #toc.toc2{border-right-width:0;border-left:1px solid #e7e7e9;left:auto;right:0}}
  172. @media screen and (min-width:1280px){body.toc2{padding-left:20em;padding-right:0}
  173. #toc.toc2{width:20em}
  174. #toc.toc2 #toctitle{font-size:1.375em}
  175. #toc.toc2>ul{font-size:.95em}
  176. #toc.toc2 ul ul{padding-left:1.25em}
  177. body.toc2.toc-right{padding-left:0;padding-right:20em}}
  178. #content #toc{border:1px solid #e0e0dc;margin-bottom:1.25em;padding:1.25em;background:#f8f8f7;border-radius:4px}
  179. #content #toc>:first-child{margin-top:0}
  180. #content #toc>:last-child{margin-bottom:0}
  181. #footer{max-width:none;background:rgba(0,0,0,.8);padding:1.25em}
  182. #footer-text{color:hsla(0,0%,100%,.8);line-height:1.44}
  183. #content{margin-bottom:.625em}
  184. .sect1{padding-bottom:.625em}
  185. @media screen and (min-width:768px){#content{margin-bottom:1.25em}
  186. .sect1{padding-bottom:1.25em}}
  187. .sect1:last-child{padding-bottom:0}
  188. .sect1+.sect1{border-top:1px solid #e7e7e9}
  189. #content h1>a.anchor,h2>a.anchor,h3>a.anchor,#toctitle>a.anchor,.sidebarblock>.content>.title>a.anchor,h4>a.anchor,h5>a.anchor,h6>a.anchor{position:absolute;z-index:1001;width:1.5ex;margin-left:-1.5ex;display:block;text-decoration:none!important;visibility:hidden;text-align:center;font-weight:400}
  190. #content h1>a.anchor::before,h2>a.anchor::before,h3>a.anchor::before,#toctitle>a.anchor::before,.sidebarblock>.content>.title>a.anchor::before,h4>a.anchor::before,h5>a.anchor::before,h6>a.anchor::before{content:"\00A7";font-size:.85em;display:block;padding-top:.1em}
  191. #content h1:hover>a.anchor,#content h1>a.anchor:hover,h2:hover>a.anchor,h2>a.anchor:hover,h3:hover>a.anchor,#toctitle:hover>a.anchor,.sidebarblock>.content>.title:hover>a.anchor,h3>a.anchor:hover,#toctitle>a.anchor:hover,.sidebarblock>.content>.title>a.anchor:hover,h4:hover>a.anchor,h4>a.anchor:hover,h5:hover>a.anchor,h5>a.anchor:hover,h6:hover>a.anchor,h6>a.anchor:hover{visibility:visible}
  192. #content h1>a.link,h2>a.link,h3>a.link,#toctitle>a.link,.sidebarblock>.content>.title>a.link,h4>a.link,h5>a.link,h6>a.link{color:#ba3925;text-decoration:none}
  193. #content h1>a.link:hover,h2>a.link:hover,h3>a.link:hover,#toctitle>a.link:hover,.sidebarblock>.content>.title>a.link:hover,h4>a.link:hover,h5>a.link:hover,h6>a.link:hover{color:#a53221}
  194. details,.audioblock,.imageblock,.literalblock,.listingblock,.stemblock,.videoblock{margin-bottom:1.25em}
  195. details{margin-left:1.25rem}
  196. details>summary{cursor:pointer;display:block;position:relative;line-height:1.6;margin-bottom:.625rem;outline:none;-webkit-tap-highlight-color:transparent}
  197. details>summary::-webkit-details-marker{display:none}
  198. details>summary::before{content:"";border:solid transparent;border-left:solid;border-width:.3em 0 .3em .5em;position:absolute;top:.5em;left:-1.25rem;transform:translateX(15%)}
  199. details[open]>summary::before{border:solid transparent;border-top:solid;border-width:.5em .3em 0;transform:translateY(15%)}
  200. details>summary::after{content:"";width:1.25rem;height:1em;position:absolute;top:.3em;left:-1.25rem}
  201. .admonitionblock td.content>.title,.audioblock>.title,.exampleblock>.title,.imageblock>.title,.listingblock>.title,.literalblock>.title,.stemblock>.title,.openblock>.title,.paragraph>.title,.quoteblock>.title,table.tableblock>.title,.verseblock>.title,.videoblock>.title,.dlist>.title,.olist>.title,.ulist>.title,.qlist>.title,.hdlist>.title{text-rendering:optimizeLegibility;text-align:left;font-family:"Noto Serif","DejaVu Serif",serif;font-size:1rem;font-style:italic}
  202. table.tableblock.fit-content>caption.title{white-space:nowrap;width:0}
  203. .paragraph.lead>p,#preamble>.sectionbody>[class=paragraph]:first-of-type p{font-size:1.21875em;line-height:1.6;color:rgba(0,0,0,.85)}
  204. .admonitionblock>table{border-collapse:separate;border:0;background:none;width:100%}
  205. .admonitionblock>table td.icon{text-align:center;width:80px}
  206. .admonitionblock>table td.icon img{max-width:none}
  207. .admonitionblock>table td.icon .title{font-weight:bold;font-family:"Open Sans","DejaVu Sans",sans-serif;text-transform:uppercase}
  208. .admonitionblock>table td.content{padding-left:1.125em;padding-right:1.25em;border-left:1px solid #dddddf;color:rgba(0,0,0,.6);word-wrap:anywhere}
  209. .admonitionblock>table td.content>:last-child>:last-child{margin-bottom:0}
  210. .exampleblock>.content{border:1px solid #e6e6e6;margin-bottom:1.25em;padding:1.25em;background:#fff;border-radius:4px}
  211. .exampleblock>.content>:first-child{margin-top:0}
  212. .exampleblock>.content>:last-child{margin-bottom:0}
  213. .sidebarblock{border:1px solid #dbdbd6;margin-bottom:1.25em;padding:1.25em;background:#f3f3f2;border-radius:4px}
  214. .sidebarblock>:first-child{margin-top:0}
  215. .sidebarblock>:last-child{margin-bottom:0}
  216. .sidebarblock>.content>.title{color:#7a2518;margin-top:0;text-align:center}
  217. .exampleblock>.content>:last-child>:last-child,.exampleblock>.content .olist>ol>li:last-child>:last-child,.exampleblock>.content .ulist>ul>li:last-child>:last-child,.exampleblock>.content .qlist>ol>li:last-child>:last-child,.sidebarblock>.content>:last-child>:last-child,.sidebarblock>.content .olist>ol>li:last-child>:last-child,.sidebarblock>.content .ulist>ul>li:last-child>:last-child,.sidebarblock>.content .qlist>ol>li:last-child>:last-child{margin-bottom:0}
  218. .literalblock pre,.listingblock>.content>pre{border-radius:4px;overflow-x:auto;padding:1em;font-size:.8125em}
  219. @media screen and (min-width:768px){.literalblock pre,.listingblock>.content>pre{font-size:.90625em}}
  220. @media screen and (min-width:1280px){.literalblock pre,.listingblock>.content>pre{font-size:1em}}
  221. .literalblock pre,.listingblock>.content>pre:not(.highlight),.listingblock>.content>pre[class=highlight],.listingblock>.content>pre[class^="highlight "]{background:#f7f7f8}
  222. .literalblock.output pre{color:#f7f7f8;background:rgba(0,0,0,.9)}
  223. .listingblock>.content{position:relative}
  224. .listingblock code[data-lang]::before{display:none;content:attr(data-lang);position:absolute;font-size:.75em;top:.425rem;right:.5rem;line-height:1;text-transform:uppercase;color:inherit;opacity:.5}
  225. .listingblock:hover code[data-lang]::before{display:block}
  226. .listingblock.terminal pre .command::before{content:attr(data-prompt);padding-right:.5em;color:inherit;opacity:.5}
  227. .listingblock.terminal pre .command:not([data-prompt])::before{content:"$"}
  228. .listingblock pre.highlightjs{padding:0}
  229. .listingblock pre.highlightjs>code{padding:1em;border-radius:4px}
  230. .listingblock pre.prettyprint{border-width:0}
  231. .prettyprint{background:#f7f7f8}
  232. pre.prettyprint .linenums{line-height:1.45;margin-left:2em}
  233. pre.prettyprint li{background:none;list-style-type:inherit;padding-left:0}
  234. pre.prettyprint li code[data-lang]::before{opacity:1}
  235. pre.prettyprint li:not(:first-child) code[data-lang]::before{display:none}
  236. table.linenotable{border-collapse:separate;border:0;margin-bottom:0;background:none}
  237. table.linenotable td[class]{color:inherit;vertical-align:top;padding:0;line-height:inherit;white-space:normal}
  238. table.linenotable td.code{padding-left:.75em}
  239. table.linenotable td.linenos,pre.pygments .linenos{border-right:1px solid;opacity:.35;padding-right:.5em;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}
  240. pre.pygments span.linenos{display:inline-block;margin-right:.75em}
  241. .quoteblock{margin:0 1em 1.25em 1.5em;display:table}
  242. .quoteblock:not(.excerpt)>.title{margin-left:-1.5em;margin-bottom:.75em}
  243. .quoteblock blockquote,.quoteblock p{color:rgba(0,0,0,.85);font-size:1.15rem;line-height:1.75;word-spacing:.1em;letter-spacing:0;font-style:italic;text-align:justify}
  244. .quoteblock blockquote{margin:0;padding:0;border:0}
  245. .quoteblock blockquote::before{content:"\201c";float:left;font-size:2.75em;font-weight:bold;line-height:.6em;margin-left:-.6em;color:#7a2518;text-shadow:0 1px 2px rgba(0,0,0,.1)}
  246. .quoteblock blockquote>.paragraph:last-child p{margin-bottom:0}
  247. .quoteblock .attribution{margin-top:.75em;margin-right:.5ex;text-align:right}
  248. .verseblock{margin:0 1em 1.25em}
  249. .verseblock pre{font-family:"Open Sans","DejaVu Sans",sans-serif;font-size:1.15rem;color:rgba(0,0,0,.85);font-weight:300;text-rendering:optimizeLegibility}
  250. .verseblock pre strong{font-weight:400}
  251. .verseblock .attribution{margin-top:1.25rem;margin-left:.5ex}
  252. .quoteblock .attribution,.verseblock .attribution{font-size:.9375em;line-height:1.45;font-style:italic}
  253. .quoteblock .attribution br,.verseblock .attribution br{display:none}
  254. .quoteblock .attribution cite,.verseblock .attribution cite{display:block;letter-spacing:-.025em;color:rgba(0,0,0,.6)}
  255. .quoteblock.abstract blockquote::before,.quoteblock.excerpt blockquote::before,.quoteblock .quoteblock blockquote::before{display:none}
  256. .quoteblock.abstract blockquote,.quoteblock.abstract p,.quoteblock.excerpt blockquote,.quoteblock.excerpt p,.quoteblock .quoteblock blockquote,.quoteblock .quoteblock p{line-height:1.6;word-spacing:0}
  257. .quoteblock.abstract{margin:0 1em 1.25em;display:block}
  258. .quoteblock.abstract>.title{margin:0 0 .375em;font-size:1.15em;text-align:center}
  259. .quoteblock.excerpt>blockquote,.quoteblock .quoteblock{padding:0 0 .25em 1em;border-left:.25em solid #dddddf}
  260. .quoteblock.excerpt,.quoteblock .quoteblock{margin-left:0}
  261. .quoteblock.excerpt blockquote,.quoteblock.excerpt p,.quoteblock .quoteblock blockquote,.quoteblock .quoteblock p{color:inherit;font-size:1.0625rem}
  262. .quoteblock.excerpt .attribution,.quoteblock .quoteblock .attribution{color:inherit;font-size:.85rem;text-align:left;margin-right:0}
  263. p.tableblock:last-child{margin-bottom:0}
  264. td.tableblock>.content{margin-bottom:1.25em;word-wrap:anywhere}
  265. td.tableblock>.content>:last-child{margin-bottom:-1.25em}
  266. table.tableblock,th.tableblock,td.tableblock{border:0 solid #dedede}
  267. table.grid-all>*>tr>*{border-width:1px}
  268. table.grid-cols>*>tr>*{border-width:0 1px}
  269. table.grid-rows>*>tr>*{border-width:1px 0}
  270. table.frame-all{border-width:1px}
  271. table.frame-ends{border-width:1px 0}
  272. table.frame-sides{border-width:0 1px}
  273. table.frame-none>colgroup+*>:first-child>*,table.frame-sides>colgroup+*>:first-child>*{border-top-width:0}
  274. table.frame-none>:last-child>:last-child>*,table.frame-sides>:last-child>:last-child>*{border-bottom-width:0}
  275. table.frame-none>*>tr>:first-child,table.frame-ends>*>tr>:first-child{border-left-width:0}
  276. table.frame-none>*>tr>:last-child,table.frame-ends>*>tr>:last-child{border-right-width:0}
  277. table.stripes-all>*>tr,table.stripes-odd>*>tr:nth-of-type(odd),table.stripes-even>*>tr:nth-of-type(even),table.stripes-hover>*>tr:hover{background:#f8f8f7}
  278. th.halign-left,td.halign-left{text-align:left}
  279. th.halign-right,td.halign-right{text-align:right}
  280. th.halign-center,td.halign-center{text-align:center}
  281. th.valign-top,td.valign-top{vertical-align:top}
  282. th.valign-bottom,td.valign-bottom{vertical-align:bottom}
  283. th.valign-middle,td.valign-middle{vertical-align:middle}
  284. table thead th,table tfoot th{font-weight:bold}
  285. tbody tr th{background:#f7f8f7}
  286. tbody tr th,tbody tr th p,tfoot tr th,tfoot tr th p{color:rgba(0,0,0,.8);font-weight:bold}
  287. p.tableblock>code:only-child{background:none;padding:0}
  288. p.tableblock{font-size:1em}
  289. ol{margin-left:1.75em}
  290. ul li ol{margin-left:1.5em}
  291. dl dd{margin-left:1.125em}
  292. dl dd:last-child,dl dd:last-child>:last-child{margin-bottom:0}
  293. li p,ul dd,ol dd,.olist .olist,.ulist .ulist,.ulist .olist,.olist .ulist{margin-bottom:.625em}
  294. ul.checklist,ul.none,ol.none,ul.no-bullet,ol.no-bullet,ol.unnumbered,ul.unstyled,ol.unstyled{list-style-type:none}
  295. ul.no-bullet,ol.no-bullet,ol.unnumbered{margin-left:.625em}
  296. ul.unstyled,ol.unstyled{margin-left:0}
  297. li>p:empty:only-child::before{content:"";display:inline-block}
  298. ul.checklist>li>p:first-child{margin-left:-1em}
  299. ul.checklist>li>p:first-child>.fa-square-o:first-child,ul.checklist>li>p:first-child>.fa-check-square-o:first-child{width:1.25em;font-size:.8em;position:relative;bottom:.125em}
  300. ul.checklist>li>p:first-child>input[type=checkbox]:first-child{margin-right:.25em}
  301. ul.inline{display:flex;flex-flow:row wrap;list-style:none;margin:0 0 .625em -1.25em}
  302. ul.inline>li{margin-left:1.25em}
  303. .unstyled dl dt{font-weight:400;font-style:normal}
  304. ol.arabic{list-style-type:decimal}
  305. ol.decimal{list-style-type:decimal-leading-zero}
  306. ol.loweralpha{list-style-type:lower-alpha}
  307. ol.upperalpha{list-style-type:upper-alpha}
  308. ol.lowerroman{list-style-type:lower-roman}
  309. ol.upperroman{list-style-type:upper-roman}
  310. ol.lowergreek{list-style-type:lower-greek}
  311. .hdlist>table,.colist>table{border:0;background:none}
  312. .hdlist>table>tbody>tr,.colist>table>tbody>tr{background:none}
  313. td.hdlist1,td.hdlist2{vertical-align:top;padding:0 .625em}
  314. td.hdlist1{font-weight:bold;padding-bottom:1.25em}
  315. td.hdlist2{word-wrap:anywhere}
  316. .literalblock+.colist,.listingblock+.colist{margin-top:-.5em}
  317. .colist td:not([class]):first-child{padding:.4em .75em 0;line-height:1;vertical-align:top}
  318. .colist td:not([class]):first-child img{max-width:none}
  319. .colist td:not([class]):last-child{padding:.25em 0}
  320. .thumb,.th{line-height:0;display:inline-block;border:4px solid #fff;box-shadow:0 0 0 1px #ddd}
  321. .imageblock.left{margin:.25em .625em 1.25em 0}
  322. .imageblock.right{margin:.25em 0 1.25em .625em}
  323. .imageblock>.title{margin-bottom:0}
  324. .imageblock.thumb,.imageblock.th{border-width:6px}
  325. .imageblock.thumb>.title,.imageblock.th>.title{padding:0 .125em}
  326. .image.left,.image.right{margin-top:.25em;margin-bottom:.25em;display:inline-block;line-height:0}
  327. .image.left{margin-right:.625em}
  328. .image.right{margin-left:.625em}
  329. a.image{text-decoration:none;display:inline-block}
  330. a.image object{pointer-events:none}
  331. sup.footnote,sup.footnoteref{font-size:.875em;position:static;vertical-align:super}
  332. sup.footnote a,sup.footnoteref a{text-decoration:none}
  333. sup.footnote a:active,sup.footnoteref a:active{text-decoration:underline}
  334. #footnotes{padding-top:.75em;padding-bottom:.75em;margin-bottom:.625em}
  335. #footnotes hr{width:20%;min-width:6.25em;margin:-.25em 0 .75em;border-width:1px 0 0}
  336. #footnotes .footnote{padding:0 .375em 0 .225em;line-height:1.3334;font-size:.875em;margin-left:1.2em;margin-bottom:.2em}
  337. #footnotes .footnote a:first-of-type{font-weight:bold;text-decoration:none;margin-left:-1.05em}
  338. #footnotes .footnote:last-of-type{margin-bottom:0}
  339. #content #footnotes{margin-top:-.625em;margin-bottom:0;padding:.75em 0}
  340. div.unbreakable{page-break-inside:avoid}
  341. .big{font-size:larger}
  342. .small{font-size:smaller}
  343. .underline{text-decoration:underline}
  344. .overline{text-decoration:overline}
  345. .line-through{text-decoration:line-through}
  346. .aqua{color:#00bfbf}
  347. .aqua-background{background:#00fafa}
  348. .black{color:#000}
  349. .black-background{background:#000}
  350. .blue{color:#0000bf}
  351. .blue-background{background:#0000fa}
  352. .fuchsia{color:#bf00bf}
  353. .fuchsia-background{background:#fa00fa}
  354. .gray{color:#606060}
  355. .gray-background{background:#7d7d7d}
  356. .green{color:#006000}
  357. .green-background{background:#007d00}
  358. .lime{color:#00bf00}
  359. .lime-background{background:#00fa00}
  360. .maroon{color:#600000}
  361. .maroon-background{background:#7d0000}
  362. .navy{color:#000060}
  363. .navy-background{background:#00007d}
  364. .olive{color:#606000}
  365. .olive-background{background:#7d7d00}
  366. .purple{color:#600060}
  367. .purple-background{background:#7d007d}
  368. .red{color:#bf0000}
  369. .red-background{background:#fa0000}
  370. .silver{color:#909090}
  371. .silver-background{background:#bcbcbc}
  372. .teal{color:#006060}
  373. .teal-background{background:#007d7d}
  374. .white{color:#bfbfbf}
  375. .white-background{background:#fafafa}
  376. .yellow{color:#bfbf00}
  377. .yellow-background{background:#fafa00}
  378. span.icon>.fa{cursor:default}
  379. a span.icon>.fa{cursor:inherit}
  380. .admonitionblock td.icon [class^="fa icon-"]{font-size:2.5em;text-shadow:1px 1px 2px rgba(0,0,0,.5);cursor:default}
  381. .admonitionblock td.icon .icon-note::before{content:"\f05a";color:#19407c}
  382. .admonitionblock td.icon .icon-tip::before{content:"\f0eb";text-shadow:1px 1px 2px rgba(155,155,0,.8);color:#111}
  383. .admonitionblock td.icon .icon-warning::before{content:"\f071";color:#bf6900}
  384. .admonitionblock td.icon .icon-caution::before{content:"\f06d";color:#bf3400}
  385. .admonitionblock td.icon .icon-important::before{content:"\f06a";color:#bf0000}
  386. .conum[data-value]{display:inline-block;color:#fff!important;background:rgba(0,0,0,.8);border-radius:50%;text-align:center;font-size:.75em;width:1.67em;height:1.67em;line-height:1.67em;font-family:"Open Sans","DejaVu Sans",sans-serif;font-style:normal;font-weight:bold}
  387. .conum[data-value] *{color:#fff!important}
  388. .conum[data-value]+b{display:none}
  389. .conum[data-value]::after{content:attr(data-value)}
  390. pre .conum[data-value]{position:relative;top:-.125em}
  391. b.conum *{color:inherit!important}
  392. .conum:not([data-value]):empty{display:none}
  393. dt,th.tableblock,td.content,div.footnote{text-rendering:optimizeLegibility}
  394. h1,h2,p,td.content,span.alt,summary{letter-spacing:-.01em}
  395. p strong,td.content strong,div.footnote strong{letter-spacing:-.005em}
  396. p,blockquote,dt,td.content,span.alt,summary{font-size:1.0625rem}
  397. p{margin-bottom:1.25rem}
  398. .sidebarblock p,.sidebarblock dt,.sidebarblock td.content,p.tableblock{font-size:1em}
  399. .exampleblock>.content{background:#fffef7;border-color:#e0e0dc;box-shadow:0 1px 4px #e0e0dc}
  400. .print-only{display:none!important}
  401. @page{margin:1.25cm .75cm}
  402. @media print{*{box-shadow:none!important;text-shadow:none!important}
  403. html{font-size:80%}
  404. a{color:inherit!important;text-decoration:underline!important}
  405. a.bare,a[href^="#"],a[href^="mailto:"]{text-decoration:none!important}
  406. a[href^="http:"]:not(.bare)::after,a[href^="https:"]:not(.bare)::after{content:"(" attr(href) ")";display:inline-block;font-size:.875em;padding-left:.25em}
  407. abbr[title]{border-bottom:1px dotted}
  408. abbr[title]::after{content:" (" attr(title) ")"}
  409. pre,blockquote,tr,img,object,svg{page-break-inside:avoid}
  410. thead{display:table-header-group}
  411. svg{max-width:100%}
  412. p,blockquote,dt,td.content{font-size:1em;orphans:3;widows:3}
  413. h2,h3,#toctitle,.sidebarblock>.content>.title{page-break-after:avoid}
  414. #header,#content,#footnotes,#footer{max-width:none}
  415. #toc,.sidebarblock,.exampleblock>.content{background:none!important}
  416. #toc{border-bottom:1px solid #dddddf!important;padding-bottom:0!important}
  417. body.book #header{text-align:center}
  418. body.book #header>h1:first-child{border:0!important;margin:2.5em 0 1em}
  419. body.book #header .details{border:0!important;display:block;padding:0!important}
  420. body.book #header .details span:first-child{margin-left:0!important}
  421. body.book #header .details br{display:block}
  422. body.book #header .details br+span::before{content:none!important}
  423. body.book #toc{border:0!important;text-align:left!important;padding:0!important;margin:0!important}
  424. body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-break-before:always}
  425. .listingblock code[data-lang]::before{display:block}
  426. #footer{padding:0 .9375em}
  427. .hide-on-print{display:none!important}
  428. .print-only{display:block!important}
  429. .hide-for-print{display:none!important}
  430. .show-for-print{display:inherit!important}}
  431. @media amzn-kf8,print{#header>h1:first-child{margin-top:1.25rem}
  432. .sect1{padding:0!important}
  433. .sect1+.sect1{border:0}
  434. #footer{background:none}
  435. #footer-text{color:rgba(0,0,0,.6);font-size:.9em}}
  436. @media amzn-kf8{#header,#content,#footnotes,#footer{padding:0}}
  437. </style>
  438. </head>
  439. <body class="article">
  440. <div id="header">
  441. <h1>New Session Manager - API</h1>
  442. <div class="details">
  443. <span id="author" class="author">Jonathan Moore Liles, Nils Hilbricht</span><br>
  444. <span id="revnumber">version API 1.1.2</span>
  445. <br><span id="revremark">License CC-By-SA v2.5</span>
  446. </div>
  447. <div id="toc" class="toc">
  448. <div id="toctitle">Table of Contents</div>
  449. <ul class="sectlevel1">
  450. <li><a href="#_client_behavior_under_session_management">1. Client Behavior Under Session Management</a>
  451. <ul class="sectlevel2">
  452. <li><a href="#_file_menu">1.1. File Menu</a>
  453. <ul class="sectlevel3">
  454. <li><a href="#_new">1.1.1. New</a></li>
  455. <li><a href="#_open">1.1.2. Open</a></li>
  456. <li><a href="#_save">1.1.3. Save</a></li>
  457. <li><a href="#_save_as">1.1.4. Save As</a></li>
  458. <li><a href="#_close_as_distinguished_from_quit_or_exit">1.1.5. Close (as distinguished from Quit or Exit)</a></li>
  459. <li><a href="#_quit_or_exit">1.1.6. Quit or Exit</a></li>
  460. </ul>
  461. </li>
  462. <li><a href="#_data_storage">1.2. Data Storage</a>
  463. <ul class="sectlevel3">
  464. <li><a href="#_internal_files">1.2.1. Internal Files</a></li>
  465. <li><a href="#_external_files">1.2.2. External Files</a></li>
  466. <li><a href="#_session_root_and_session_directories">1.2.3. Session Root and Session Directories</a>
  467. <ul class="sectlevel4">
  468. <li><a href="#_subdirectories_hierarchical_structure">1.2.3.1. Subdirectories / Hierarchical Structure</a></li>
  469. <li><a href="#_lockfiles">1.2.3.2. Lockfiles</a></li>
  470. </ul>
  471. </li>
  472. </ul>
  473. </li>
  474. </ul>
  475. </li>
  476. </ul>
  477. </div>
  478. </div>
  479. <div id="content">
  480. <div id="preamble">
  481. <div class="sectionbody">
  482. <div class="admonitionblock important">
  483. <table>
  484. <tr>
  485. <td class="icon">
  486. <div class="title">Important</div>
  487. </td>
  488. <td class="content">
  489. "New Session Manager" is a community version of the
  490. <a href="http://non.tuxfamily.org/nsm/API.html">"Non Session Manager" by Jonathan Moore Liles</a>, who also
  491. wrote the majority of this API document, especially the API itself. <strong>The API is the same</strong>. Any
  492. technical changes or differences in behaviour are described in <a href="#API Versions and Behaviour Changes">[API Versions and Behaviour Changes]</a>.
  493. All other changes to this document can be reviewed by accessing the git log. This document is
  494. licensed under CC-By-Sa v2.5. See <a href="https://github.com/jackaudio/new-session-manager/tree/master/docs/src/api">LICENSE</a>
  495. </td>
  496. </tr>
  497. </table>
  498. </div>
  499. <div class="admonitionblock important">
  500. <table>
  501. <tr>
  502. <td class="icon">
  503. <div class="title">Important</div>
  504. </td>
  505. <td class="content">
  506. The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD
  507. NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as
  508. described in <a href="https://tools.ietf.org/html/rfc2119">RFC 2119</a>.
  509. </td>
  510. </tr>
  511. </table>
  512. </div>
  513. <div class="paragraph">
  514. <p>The "New Session Manager"-API is used by many music and audio programs in Linux distributions
  515. to allow any number of independent programs to be managed together as part of a logical session
  516. (i.e. a song). Thus, operations such as loading and saving are synchronized.</p>
  517. </div>
  518. <div class="paragraph">
  519. <p>The API comprises a simple Open Sound Control (OSC) based protocol, along with some behavioral
  520. guidelines, which can easily be implemented by various applications.</p>
  521. </div>
  522. <div class="paragraph">
  523. <p>This project contains a program called <code>nsmd</code> which is an implementation of the server side of
  524. the NSM API. <code>nsmd</code> can be controlled by direct OSC messages, or (more commonly) a GUI:
  525. Included in this package is the <code>nsm-legacy-gui</code>, which gets symlinked to "non-session-manager`.
  526. Another GUI is "Agordejo". Other applications exist that (partially) support the NSM API and are able
  527. to load clients, but they do not use the New-Session-Manager (or Non-Session-Manager) implementation
  528. and are therefore out of scope for this document.</p>
  529. </div>
  530. <div class="paragraph">
  531. <p>However, the same server-side API can also be implemented by other programs (such as Carla),
  532. although consistency and robustness will likely suffer if non-NSM compliant clients are allowed to
  533. participate in a session.</p>
  534. </div>
  535. <div class="paragraph">
  536. <p>There is no direct dependency for client implementations, as long as they
  537. can send and receive OSC.
  538. Some clients use <code>liblo</code> (the OSC library), which becomes a dependency if you choose to implement
  539. NSM-support with the provided header file <code>nsm.h</code> (<code>extras/nsm.h/nsm.h</code> in the git repository).
  540. Some clients use the provided single-file python library <code>pynsm</code> (<code>extras/pynsm/nsmclient.py</code> in the git repository)
  541. which has no dependencies outside the Python3 standard library.</p>
  542. </div>
  543. <div class="paragraph">
  544. <p>The aim of this project is to thoroughly define the behavior required of clients. Often the
  545. difficulty with other session-management approaches has been not in implementing code-support for
  546. them, but in not defining rules and behaviour clearly enough.</p>
  547. </div>
  548. <div class="paragraph">
  549. <p>As written above unambiguous rules are created by using RFC 2119 in this document. For the good of
  550. the user, these rules are meant to be followed and are non-negotiable. If an application does not
  551. conform to this specification it should be considered broken. Consistency across applications under
  552. session management is very important for a good user experience.</p>
  553. </div>
  554. </div>
  555. </div>
  556. <div class="sect1">
  557. <h2 id="_client_behavior_under_session_management">1. Client Behavior Under Session Management</h2>
  558. <div class="sectionbody">
  559. <div class="paragraph">
  560. <p>Most graphical applications make available to the user a common set of file operations, typically
  561. presented under a File or Project menu.</p>
  562. </div>
  563. <div class="paragraph">
  564. <p>These are: New, Open, Save, Save As, Close and Quit or Exit.</p>
  565. </div>
  566. <div class="paragraph">
  567. <p>The following sub-sections describe how these options should behave when the application is part of
  568. an NSM session. These rules only apply when session management is active, that is, after the
  569. <code>announce</code> handshake described in the <a href="#NSM OSC Protocol">[NSM OSC Protocol]</a> section. In order to provide a
  570. consistent and predictable user experience, it is critically important for applications to adhere
  571. to these guidelines.</p>
  572. </div>
  573. <div class="sect2">
  574. <h3 id="_file_menu">1.1. File Menu</h3>
  575. <div class="sect3">
  576. <h4 id="_new">1.1.1. New</h4>
  577. <div class="paragraph">
  578. <p>This option MAY empty/reset the current file or project (possibly after user confirmation).
  579. It MUST NOT allow the user to create a new project/file in another location.</p>
  580. </div>
  581. </div>
  582. <div class="sect3">
  583. <h4 id="_open">1.1.2. Open</h4>
  584. <div class="paragraph">
  585. <p>This option MUST be disabled.</p>
  586. </div>
  587. <div class="paragraph">
  588. <p>The application MAY elect to implement an option called "Import into Session", which creates a
  589. copy of a file/project which is then saved at the session path provided by NSM.</p>
  590. </div>
  591. </div>
  592. <div class="sect3">
  593. <h4 id="_save">1.1.3. Save</h4>
  594. <div class="paragraph">
  595. <p>This option should behave as normal, saving the current file/project as established by the NSM
  596. <code>open</code> message.</p>
  597. </div>
  598. <div class="paragraph">
  599. <p>This option MUST NOT present the user with a choice of where to save the file.</p>
  600. </div>
  601. </div>
  602. <div class="sect3">
  603. <h4 id="_save_as">1.1.4. Save As</h4>
  604. <div class="paragraph">
  605. <p>This option MUST be disabled.</p>
  606. </div>
  607. <div class="paragraph">
  608. <p>The application MAY elect to implement an option called 'Export from Session', which
  609. creates a copy of the current file/project which is then saved in a user-specified location outside
  610. of the session path provided by NSM.</p>
  611. </div>
  612. </div>
  613. <div class="sect3">
  614. <h4 id="_close_as_distinguished_from_quit_or_exit">1.1.5. Close (as distinguished from Quit or Exit)</h4>
  615. <div class="paragraph">
  616. <p>This option MUST be disabled unless its meaning is to disconnect the application from session
  617. management.</p>
  618. </div>
  619. </div>
  620. <div class="sect3">
  621. <h4 id="_quit_or_exit">1.1.6. Quit or Exit</h4>
  622. <div class="paragraph">
  623. <p>This option MAY behave as normal (possibly asking the user to confirm exiting), or MAY do nothing
  624. to only allow quit from the session-manager control.
  625. When the client supports :optional-gui: this option SHOULD be replaced with hiding the client&#8217;s GUI
  626. so a quit by window manager hides.</p>
  627. </div>
  628. </div>
  629. </div>
  630. <div class="sect2">
  631. <h3 id="_data_storage">1.2. Data Storage</h3>
  632. <div class="sect3">
  633. <h4 id="_internal_files">1.2.1. Internal Files</h4>
  634. <div class="paragraph">
  635. <p>All project specific data created by a client MUST be stored in the per-client storage area
  636. provided by NSM. This includes all recorded audio and MIDI files, snapshots, etc. Only global
  637. configuration items, exports, and renders of the project may be stored elsewhere (wherever the user
  638. specifies).</p>
  639. </div>
  640. </div>
  641. <div class="sect3">
  642. <h4 id="_external_files">1.2.2. External Files</h4>
  643. <div class="paragraph">
  644. <p>Files required by the project but external to it (typically read-only data such as audio samples)
  645. SHOULD be referenced by creating a symbolic link within the assigned session area, and then
  646. referring to the symlink. This allows sessions to be archived and transported simply (e.g. with
  647. "tar -h") by tools that have no knowledge of the project formats of the various clients in the
  648. session. The symlinks thus created should, at the very least, be named after the files they refer
  649. to. Some unique component may be required to prevent collisions.</p>
  650. </div>
  651. </div>
  652. <div class="sect3">
  653. <h4 id="_session_root_and_session_directories">1.2.3. Session Root and Session Directories</h4>
  654. <div class="paragraph">
  655. <p>Client programs MUST NOT handle the following themselves. This section is background-information.</p>
  656. </div>
  657. <div class="paragraph">
  658. <p>NSM follows the <a href="https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html">XDG Base Directory Specifications</a></p>
  659. </div>
  660. <div class="paragraph">
  661. <p>All existing and new sessions are directories below the session-root, which defaults to
  662. <code>$XDG_DATA_HOME/nsm/</code>, which usually results in <code>$HOME/.local/share/nsm/</code>.</p>
  663. </div>
  664. <div class="paragraph">
  665. <p>Each session directory contains a file <code>session.nsm</code> with one client per line <code>name:executable:UID\n</code>
  666. For example:</p>
  667. </div>
  668. <div class="listingblock">
  669. <div class="content">
  670. <pre class="highlight"><code>JACKPatch:jackpatch:nBEIQ
  671. jack_mixer:jack_mixer:nTXHV
  672. Carla-Rack:carla-rack:nFAOD</code></pre>
  673. </div>
  674. </div>
  675. <div class="paragraph">
  676. <p><code>nsmd</code> loads and saves this file, client names are their self-reported names.
  677. The file format is final and frozen. Additions or changes SHALL NOT be made.</p>
  678. </div>
  679. <div class="sect4">
  680. <h5 id="_subdirectories_hierarchical_structure">1.2.3.1. Subdirectories / Hierarchical Structure</h5>
  681. <div class="paragraph">
  682. <p>Subdirectories MAY be made to organize sessions into meaningful structures, such as album/track or
  683. composer/genre/piece. For example: <code>Johann Sebastian Bach/Kantaten/Wie schön leuchtet der Morgenstern</code>.
  684. Which results in the same directory structure on disk. Session names can contain any characters that
  685. are supported by the underlying file system, usually UTF-8.</p>
  686. </div>
  687. <div class="paragraph">
  688. <p>Subdirectories are created by either <code>nsmd</code> itself or by the users themselves, through their file
  689. manager or a GUI (while the session is not open).</p>
  690. </div>
  691. <div class="paragraph">
  692. <p>The project_name from <code>/nsm/server/new s:project_name</code> accepts the format <code>a/b/c/d</code>.</p>
  693. </div>
  694. <div class="paragraph">
  695. <p>Any session itself MUST be a "leaf" in this directory tree. A session MUST NOT contain further
  696. session subdirectories: any directory that contains a file <code>session.nsm</code> is the final
  697. element in the hierarchy.</p>
  698. </div>
  699. </div>
  700. <div class="sect4">
  701. <h5 id="_lockfiles">1.2.3.2. Lockfiles</h5>
  702. <div class="paragraph">
  703. <p>Because multiple <code>nsmd</code> can run at the same time we need to prevent accidental write-access to the
  704. same session by different nsm-daemons, and subsequently GUIs.</p>
  705. </div>
  706. <div class="paragraph">
  707. <p>Therefore each currently open session creates a lockfile under <code>$XDG_RUNTIME_DIR/nsm/</code> (usually
  708. <code>/run/user/XXXX/nsm/</code>) that tells <code>nsmd</code> to not open such a locked session. This directory gets
  709. cleaned by the operating system, preventing sessions to stay locked after e.g. a power failure.</p>
  710. </div>
  711. <div class="paragraph">
  712. <p>The lockfile is named after the simple session name combined with a numeric ID for the session
  713. root. It is possible that two <code>nsmd</code> opened two different session roots, both with the same simple
  714. session name, e.g. "my song". Lockfiles are able to distinguish between those and will not prevent
  715. access in this scenario. The numeric ID is a djb2 hash modulo (%) 65521 of the session root directory
  716. (see <code>src/file.cpp</code> function <code>simple_hash()</code>).</p>
  717. </div>
  718. <div class="paragraph">
  719. <p>The lockfile contains, on separate lines:</p>
  720. </div>
  721. <div class="ulist">
  722. <ul>
  723. <li>
  724. <p>The absolute path to the session, including the root-dir, which could be overriden by <code>nsmd --session-root</code>, allowing two sessions of the same basic name in different roots.</p>
  725. </li>
  726. <li>
  727. <p>the OSC URL of the server that runs this session, the same as <code>$NSM_URL</code>.</p>
  728. </li>
  729. </ul>
  730. </div>
  731. <div class="paragraph">
  732. <p>Example:</p>
  733. </div>
  734. <div class="listingblock">
  735. <div class="content">
  736. <pre class="highlight"><code>/home/johann/.local/share/nsm/cantatas/easter1751
  737. osc.udp://myuser.localdomain:11287/
  738. == NSM OSC Protocol
  739. All message parameters are REQUIRED. All messages MUST be sent from the same socket as the `announce`
  740. message, using the `lo_send_from` method of liblo or its equivalent, as the server uses the return
  741. addresses to distinguish between clients.
  742. Clients MUST create thier OSC servers using the same protocol (UDP,TCP) as found in `NSM_URL`.
  743. `nsmd` itself is using UDP only.
  744. === Establishing a Connection
  745. ==== Announce
  746. At launch, the client MUST check the environment for the value of `NSM_URL`. If present, the client
  747. MUST send the following message to the provided address as soon as it is ready to respond to the
  748. `/nsm/client/open` event:
  749. [source%nowrap,OSC]
  750. ----
  751. /nsm/server/announce s:application_name s:capabilities s:executable_name i:api_version_major i:api_version_minor i:pid
  752. ----
  753. If `NSM_URL` is undefined, invalid, or unreachable, then the client should proceed assuming that
  754. session management is unavailable.
  755. `api_version_major` and `api_version_minor` must be the two parts of the version number of the NSM API
  756. as defined by this document.
  757. Note that if the application intends to register JACK clients, `application_name` MUST be the same as
  758. the name that would normally be passed to `jack_client_open`. For example, Non-Mixer sends
  759. "Non-Mixer" as its `application_name`. Applications MUST NOT register their JACK clients until
  760. receiving an `open` message; the `open` message will provide a unique client name prefix suitable for
  761. passing to JACK. This is probably the most complex requirement of the NSM API, but it isn't
  762. difficult to implement, especially if the application simply wishes to delay its initialization
  763. process briefly while awaiting the `announce` reply and subsequent `open` message.
  764. `capabilities` MUST be a string containing a colon separated list of the special capabilities the
  765. client possesses. e.g. `:dirty:switch:progress:`
  766. `executable_name` MUST be the executable name that the program was launched with. For C programs,
  767. this is simply the value of `argv[0]`. Note that hardcoding the name of the program here is not the
  768. same as using, as the user may have launched the program from a script with a different name using
  769. exec, or have created a symlink to the program. Getting the correct value in scripting languages
  770. like Python can be more challenging.
  771. .Available Client Capabilities
  772. [options="header", stripes=even]
  773. |===
  774. |Name | Description
  775. |switch | client is capable of responding to multiple `open` messages without restarting
  776. |dirty | client knows when it has unsaved changes
  777. |progress | client can send progress updates during time-consuming operations
  778. |message | client can send textual status updates
  779. |optional-gui | client has an optional GUI
  780. |===
  781. ==== Response
  782. The server will respond to the client's announce message with the following message:
  783. [source%nowrap,OSC]
  784. ----
  785. /reply "/nsm/server/announce" s:message s:name_of_session_manager s:capabilities
  786. ----
  787. `message` is a welcome message.
  788. The value of `name_of_session_manager` will depend on the implementation of the NSM server. It
  789. might say "New Session Manager", or it might say "Non Session Manager" etc. This is for display to
  790. the user.
  791. `capabilities` will be a string containing a colon separated list of special server capabilities.
  792. Presently, the server `capabilities` are:
  793. .Available Server Capabilities
  794. [options="header", stripes=even]
  795. |===
  796. |Name | Description
  797. |server-control | client-to-server control
  798. |broadcast | server responds to /nsm/server/broadcast message
  799. |optional-gui | server responds to optional-gui messages. This capability is always present and MUST be supported by any server implementation.
  800. |===
  801. A client should not consider itself to be under session management until it receives this response.
  802. For example, the Non applications activate their "SM" blinkers at this time.
  803. If there is an error, a reply of the following form will be sent to the client:
  804. [source%nowrap,OSC]
  805. ----
  806. /error "/nsm/server/announce" i:error_code s:error_message
  807. ----
  808. The following table defines possible values of `error_code`:
  809. .Response codes
  810. [options="header", stripes=even]
  811. |===
  812. |Code | Meaning
  813. |ERR_GENERAL | General Error
  814. |ERR_INCOMPATIBLE_API | Incompatible API version
  815. |ERR_BLACKLISTED | Client has been blacklisted.
  816. |===
  817. === Server to Client Control Messages
  818. Compliant clients MUST accept the client control messages described in this section. All client
  819. control messages REQUIRE a response. Responses MUST be delivered back to the sender (`nsmd`) from the
  820. same socket used by the client in its `announce` message (by using `lo_send_from`) AFTER the action has
  821. been completed or if an error is encountered. The required response is described in the subsection
  822. for each message.
  823. If there is an error and the action cannot be completed, then `error_code` MUST be set to a valid
  824. error code (see &lt;&lt;Error Code Definitions&gt;&gt;) and `message` to a string describing the problem
  825. (suitable for display to the user).
  826. The reply can take one of the following two forms, where path MUST be the `path` of the message being
  827. replied to (e.g. "nsm/client/save":
  828. [source%nowrap,OSC]
  829. ----
  830. /reply s:path s:message
  831. ----
  832. [source%nowrap,OSC]
  833. ----
  834. /error s:path i:error_code s:message
  835. ----
  836. ==== Quit
  837. There is no message for this. Clients will receive the Unix SIGTERM signal and MUST close cleanly
  838. IMMEDIATELY, without displaying any kind of dialog to the user and regardless of whether or not
  839. unsaved changes would be lost. When a session is closed the application will receive this signal
  840. soon after having responded to a `save` message.
  841. [#server-to-client-control-messages-open]
  842. ==== Open
  843. [source%nowrap,OSC]
  844. ----
  845. /nsm/client/open s:path_to_instance_specific_project s:display_name s:client_id
  846. ----
  847. `path_to_instance_specific_project` is a path name in the form client_name.ID, assigned to the
  848. client for storing its project data. The client MUST choose one of the four strategies below to
  849. save, so that every file in the session can be traced back to a client and, vice versa, a client
  850. name.ID can be used to look up all its files. (For example to clean up the session dir)
  851. * The client has no state and does not save at all
  852. ** and it MUST NOT misuse e.g. ~/.config to save session specific information e.g. synth-instrument settings
  853. * The client may use the path client_name.ID directly, resulting in a file client_name.ID in the session directory
  854. * The client may append its native file extension (e.g. `.json`) to the path client_name.ID
  855. * The client may use the path as directory, creating arbitrary files below, for example recorded .wav.
  856. ** and it MUST NOT use the client ID below this point. This way the data stays transferable by hand to another client instance (in another session).
  857. ** best case practice is to always use the same file names, for example `client_name.ID/savefile.json`
  858. If a project exists at the path, the client MUST immediately open it.
  859. If a project does not exist at the path, then the client MUST immediately create and open a new one
  860. at the specified path or, for clients which hold all their state in memory, store the path for
  861. later use when responding to the `save` message.
  862. No file or directory will be created at the specified path by the server. It is up to the client to
  863. create what it needs.
  864. For clients which HAVE NOT specified the `:switch:` capability, the `open` message will only be
  865. delivered once, immediately following the `announce` response.
  866. For clients which HAVE specified the `:switch:` capability, the client MUST immediately switch to the
  867. specified project or create a new one if it doesn't exist.
  868. Clients which are incapable of switching projects or are prone to crashing upon switching MUST NOT
  869. include `:switch:` in their capability string.
  870. If the user the is allowed to run two or more instances of the application simultaneously
  871. then such an application MUST PRE-PEND the provided `client_id` string, followed by "/", to any
  872. names it registers with common subsystems (e.g. JACK client names). This ensures that multiple
  873. instances of the same application can be restored in any order without scrambling the JACK
  874. connections or causing other conflicts.
  875. The provided `client_id` will be a concatenation of the value of `application_name` sent by the
  876. client in its `announce` message and a unique identifier.
  877. Therefore, applications which create single JACK clients can use the value of `client_id` directly
  878. as their JACK client name.
  879. Applications which register multiple JACK clients (e.g. Carla or Non-Mixer) MUST PRE-PEND
  880. `client_id` value, followed by "/", to the client names they register with JACK and the application
  881. determined part MUST be unique for that (JACK) client.
  882. For example, Carla is a plugin-host that loads each plugin as JACK client.
  883. Suitable JACK client names are: `carla-jack-multi.nBAF/ZynAddSubFx` or `carla-jack-multi.nBAF/Helm`
  884. Please note that ZynAddSubFx and Helm are *not ports* but clients. Each of them can have any number
  885. of audio and midi ports below them.
  886. Note that this means that the application MUST NOT register with JACK (or any
  887. other subsystem requiring unique names) until it receives an `open` message from NSM. Likewise,
  888. applications with the `:switch:` capability should close their JACK clients and re-create them with
  889. using the new `client_id` (renaming JACK-clients is not possible, only ports).
  890. A response is REQUIRED as soon as the open operation has been completed. Ongoing progress MAY be
  891. indicated by sending messages to `/nsm/client/progress`.
  892. ===== Response
  893. The client MUST respond to the 'open' message with:
  894. [source%nowrap,OSC]
  895. ----
  896. /reply "/nsm/client/open" s:message
  897. ----
  898. Or
  899. [source%nowrap,OSC]
  900. ----
  901. /error "/nsm/client/open" i:error_code s:message
  902. ----
  903. .Response codes
  904. [options="header", stripes=even]
  905. |===
  906. |Code | Meaning
  907. |ERR | General Error
  908. |ERR_BAD_PROJECT | An existing project file was found to be corrupt
  909. |ERR_CREATE_FAILED | A new project could not be created
  910. |ERR_UNSAVED_CHANGES | Unsaved changes would be lost
  911. |ERR_NOT_NOW | Operation cannot be completed at this time
  912. |===
  913. ==== Save
  914. [source%nowrap,OSC]
  915. ----
  916. /nsm/client/save
  917. ----
  918. This message will only be delivered after a previous `open` message, and may be sent any number of
  919. times within the course of a session (including zero, if the user aborts the session).
  920. ===== Response
  921. [source%nowrap,OSC]
  922. ----
  923. /reply "/nsm/client/save" s:message
  924. ----
  925. Or
  926. [source%nowrap,OSC]
  927. ----
  928. /error "/nsm/client/save" i:error_code s:message
  929. ----
  930. .Response codes
  931. [options="header", stripes=even]
  932. |===
  933. |Code | Meaning
  934. |ERR | General Error
  935. |ERR_SAVE_FAILED | Project could not be saved
  936. |ERR_NOT_NOW | Operation cannot be completed at this time
  937. |===
  938. === Server to Client Informational Messages
  939. ==== Session is Loaded
  940. Accepting this message is optional. The intent is to signal to clients which may have some
  941. interdependence (say, peer to peer OSC connections) that the session is fully loaded and all their
  942. peers are available. Most clients will not need to act on this message. This message has no meaning
  943. when a session is being built or run; only when it is initially loaded. Clients who intend to act
  944. on this message MUST NOT do so by delaying initialization waiting for it.
  945. [source%nowrap,OSC]
  946. ----
  947. /nsm/client/session_is_loaded
  948. ----
  949. This message does not require a response.
  950. ==== Show Optional Gui
  951. If the client has specified the `optional-gui` capability, then it may receive this message from the
  952. server when the user wishes to change the visibility state of the GUI. It doesn't matter if the
  953. optional GUI is integrated with the program or if it is a separate program \(as is the case with
  954. SooperLooper\). When the GUI is hidden, there should be no window mapped and if the GUI is a
  955. separate program, it should be killed.
  956. [source%nowrap,OSC]
  957. ----
  958. /nsm/client/show_optional_gui
  959. ----
  960. [source%nowrap,OSC]
  961. ----
  962. /nsm/client/hide_optional_gui
  963. ----
  964. This message does not require a response.
  965. === Client to Server Informational Messages
  966. ==== Optional GUI
  967. If the client has specified the `optional-gui` capability, then it MUST send this message whenever
  968. the state of visibility of the optional GUI has changed. It also MUST send this message after its
  969. announce message to indicate the initial visibility state of the optional GUI.
  970. The client SHOULD always start hidden, if not saved as visible. That implies the first load, after
  971. adding to the session, SHOULD always be hidden.
  972. It is the responsibility of the client to remember the visibility state of its GUI across session
  973. loads.
  974. [source%nowrap,OSC]
  975. ----
  976. /nsm/client/gui_is_hidden
  977. ----
  978. [source%nowrap,OSC]
  979. ----
  980. /nsm/client/gui_is_shown
  981. ----
  982. No response will be delivered.
  983. ==== Progress
  984. [source%nowrap,OSC]
  985. ----
  986. /nsm/client/progress f:progress
  987. ----
  988. For potentially time-consuming operations, such as `save` and `open`, progress updates may be
  989. indicated throughout the duration by sending a floating point value between 0.0 and 1.0, 1.0
  990. indicating completion, to the NSM server.
  991. The server will not send a response to these messages, but will relay the information to the user.
  992. Note that even when using the `progress` feature, the final response to the `save` or `open`
  993. message is still REQUIRED.
  994. Clients which intend to send progress messages MUST include `:progress:` in their `announce`
  995. capability string.
  996. ==== Dirtiness
  997. [source%nowrap,OSC]
  998. ----
  999. /nsm/client/is_dirty
  1000. ----
  1001. [source%nowrap,OSC]
  1002. ----
  1003. /nsm/client/is_clean
  1004. ----
  1005. Some clients may be able to inform the server when they have unsaved changes pending. Such clients
  1006. may optionally send `is_dirty` and `is_clean` messages.
  1007. Clients which have and use this capability MUST include `:dirty:` in their `announce` capability string.
  1008. ==== Status Messsages
  1009. [source%nowrap,OSC]
  1010. ----
  1011. /nsm/client/message i:priority s:message
  1012. ----
  1013. Clients may send miscellaneous status updates to the server for possible display to the user. This
  1014. may simply be chatter that is normally written to the console. `priority` MUST be a number from 0
  1015. to 3, 3 being the most important.
  1016. Clients which have and use this capability MUST include `:message:` in their `announce` capability
  1017. string.
  1018. === Error Code Definitions
  1019. .Error Code Definitions
  1020. [options="header", stripes=even]
  1021. |===
  1022. |Symbolic Name | Integer Value
  1023. |ERR_GENERAL | -1
  1024. |ERR_INCOMPATIBLE_API | -2
  1025. |ERR_BLACKLISTED | -3
  1026. |ERR_LAUNCH_FAILED | -4
  1027. |ERR_NO_SUCH_FILE | -5
  1028. |ERR_NO_SESSION_OPEN | -6
  1029. |ERR_UNSAVED_CHANGES | -7
  1030. |ERR_NOT_NOW | -8
  1031. |ERR_BAD_PROJECT | -9
  1032. |ERR_CREATE_FAILED | -10
  1033. |===
  1034. === Client to Server Control
  1035. If the server publishes the `:server-control:` capability, then clients can also initiate action by
  1036. the server. For example, a client might implement a 'Save All' option which sends a
  1037. `/nsm/server/save` message to the server, rather than requiring the user to switch to the session
  1038. management interface to effect the save.
  1039. === Server Control API
  1040. The session manager not only manages clients via OSC, but it is itself controlled via OSC messages.
  1041. The server responds to the following messages.
  1042. All of the following messages will be responded to, at the sender's address, with one of the two
  1043. following messages:
  1044. [source%nowrap,OSC]
  1045. ----
  1046. /reply s:path s:message
  1047. ----
  1048. [source%nowrap,OSC]
  1049. ----
  1050. /error s:path i:error_code s:message
  1051. ----
  1052. The first parameter of the reply is the path to the message being replied to. The `/error` reply
  1053. includes an integer error code (non-zero indicates error). `message` will be a description of the
  1054. error.
  1055. The possible errors are:
  1056. .Responses
  1057. [options="header", stripes=even]
  1058. |===
  1059. |Code |Meaning
  1060. |ERR_GENERAL | General Error
  1061. |ERR_LAUNCH_FAILED | Launch failed
  1062. |ERR_NO_SUCH_FILE | No such file
  1063. |ERR_NO_SESSION | No session is open
  1064. |ERR_UNSAVED_CHANGES | Unsaved changes would be lost
  1065. |===
  1066. * `/nsm/server/add s:executable_name`
  1067. ** Adds a client to the current session.
  1068. * `/nsm/server/save`
  1069. ** Saves the current session.
  1070. * `/nsm/server/open s:project_name`
  1071. ** Saves the current session and loads a new session.
  1072. * `/nsm/server/new s:project_name`
  1073. ** Saves the current session and creates a new session.
  1074. * `/nsm/server/duplicate s:new_project`
  1075. ** Saves and closes the current session, makes a copy, and opens it.
  1076. * `/nsm/server/close`
  1077. ** Saves and closes the current session.
  1078. * `/nsm/server/abort`
  1079. ** Closes the current session WITHOUT SAVING
  1080. * `/nsm/server/quit`
  1081. ** Saves and closes the current session and terminates the server.
  1082. * `/nsm/server/list`
  1083. ** Lists available projects. One `/reply` message will be sent for each existing project.
  1084. ** Afer listing the last session one final `/reply` with `/nsm/server/list, ""` will be send. That is an empty string.
  1085. ==== Client to Client Communication
  1086. If the server includes `:broadcast:` in its capability string, then clients may send broadcast
  1087. messages to each other through the NSM server. Clients may send messages to the server at the path
  1088. `/nsm/server/broadcast`.
  1089. The format of this message is as follows:
  1090. [source%nowrap,OSC]
  1091. ----
  1092. /nsm/server/broadcast s:path [arguments...]
  1093. ----
  1094. The message will then be relayed to all clients in the session at the path `path` (with the
  1095. arguments shifted by one).
  1096. For example the message:
  1097. [source%nowrap,OSC]
  1098. ----
  1099. /nsm/server/broadcast /tempomap/update "0,120,4/4:12351234,240,4/4"
  1100. ----
  1101. Would broadcast the following message to all clients in the session (except for the sender), some
  1102. of which might respond to the message by updating their own tempo maps.
  1103. [source%nowrap,OSC]
  1104. ----
  1105. /tempomap/update "0,120,4/4:12351234,240,4/4"
  1106. ----
  1107. The Non programs use this feature to establish peer to peer OSC communication by symbolic names
  1108. (client IDs) without having to remember the OSC URLs of peers across sessions.
  1109. == API Versions and Behaviour Changes
  1110. Here we will document all technical changes or differences in behaviour together with their API and
  1111. project version numbers. The term "original" refers to Non Session Manager and "new" refers to New
  1112. Session Manager.
  1113. Version numbers follow link:https://semver.org/spec/v2.0.0.html[Semantic Versioning 2.0.0]
  1114. .Semantic Versioning Scheme</code></pre>
  1115. </div>
  1116. </div>
  1117. <div class="paragraph">
  1118. <p>Given a version number MAJOR.MINOR.PATCH, increment the:</p>
  1119. </div>
  1120. <div class="paragraph">
  1121. <p>MAJOR version when you make incompatible API changes,
  1122. MINOR version when you add functionality in a backwards compatible manner, and
  1123. PATCH version when you make backwards compatible bug fixes.</p>
  1124. </div>
  1125. <div class="listingblock">
  1126. <div class="content">
  1127. <pre class="highlight"><code>.NSM Version Numbers
  1128. [options="header", stripes=even]
  1129. |===
  1130. |Subject | Version
  1131. |Non Session Manager at moment of fork | 1.2 (June 2020)
  1132. |Non Session Manager API | 1.0 link:https://github.com/original-male/non/blob/master/session-manager/src/nsmd.C[NON nsmd.C]
  1133. |Original API Document | 1.0 link:http://non.tuxfamily.org/nsm/API.html[non.tuxfamily.org/nsm/API.html]
  1134. |New Session Manager | 1.6.0
  1135. |New Session Manager API | 1.1.2 link:https://github.com/jackaudio/new-session-manager/blob/master/src/nsmd.cpp[NEW nsmd.cpp]
  1136. |New API Document | 1.5.0 link:#[Here]
  1137. |===
  1138. === Guidelines
  1139. The most important factor in decision making is to keep client compatibility at 100%.
  1140. No client will ever receive an unrequested OSC message except those in API 1.0.0.
  1141. Messages that drastically change existing `/nsm/client/` or `/nsm/server` behaviour require an
  1142. inrecement to `API_VERSION_MAJOR`, which we want to avoid.
  1143. `nsmd` checks if the clients `API_VERSION_MAJOR` is greater than its own and refuses the client
  1144. with `ERR_INCOMPATIBLE_API`.
  1145. All changes (that concern client/server behaviour) that increment `API_VERSION_MINOR` will be
  1146. request-only or gated by new capabilities (e.g. `:optional-gui:`). `nsmd` will not send any
  1147. messages if a capability was not sent by the client in &lt;&lt;Announce,`announce`&gt;&gt;. This includes
  1148. mostly optional features about requesting extra information.
  1149. New actions for server-control, for example a hypothetical `/nsm/server/save_as`, which would be
  1150. triggered by the client and would only be *answered* by the server ("no unrequested message") will
  1151. increment `API_VERSION_MINOR`.
  1152. All changes that increment `API_VERSION_PATCH` will not have any effect on behaviour, except to
  1153. fix clear problems, where "problem" is defined by having a different effect than described in this
  1154. document, which includes technical problems such as crashes.
  1155. All messages regarding GUI-communication that start with `/nsm/gui/...` were undocumented in API
  1156. 1.0.0 and only used by `non-session-manager` / `nsm-legacy-gui`. Until properly documented in this
  1157. document this part of the API is considered unstable and may change at any time without notice.
  1158. However, when changing already existing messages and behaviour it MAY increment `API_VERSION_MINOR`
  1159. or `API_VERSION_PATCH`. In that case it will appear in the list below.
  1160. Last factor of compatibility is that any unknown message sent to `nsmd` will just print a warning
  1161. message to stdout, but will otherwise be ignored. This secures a stable server, even when a client
  1162. misbehaves and sends too-new messages outside of announced :capabilites:
  1163. === Changes in API Version 1.1.0
  1164. Rewritten API document without code changes to adapt to existing code or existing client behaviour:
  1165. * Changed versioning scheme to Semantic Versioning with three positions Major.Minor.Patch
  1166. * &lt;&lt;Quit or Exit&gt;&gt; SHOULD hide instead of exiting when :optional-gui: is supported and MAY not
  1167. act on the quit through menu otherwise.
  1168. * &lt;&lt;#server-to-client-control-messages-open,Open&gt;&gt;: Make clear that there are only certain
  1169. possibilities for save paths. We added MUST because the rule was just implied before.
  1170. * &lt;&lt;#server-to-client-control-messages-open,Open&gt;&gt;: Make clear that the delimiter for
  1171. multi-jack clients is "/".
  1172. * &lt;&lt;Optional GUI&gt;&gt; SHOULD start hidden, always after a fresh add to the session. After that saving
  1173. the visibility state may override it for next time.
  1174. * &lt;&lt;Progress&gt;&gt; MUST be announced in :capabilities: . Before there was a lower case "should",
  1175. which means nothing. Parallel-examples in the specs cleary say that supporting optional features must be announced first.
  1176. ** Same for &lt;&lt;Dirtiness&gt;&gt; and &lt;&lt;Status Messsages&gt;&gt;.
  1177. * &lt;&lt;Status Messsages&gt;&gt; have priority numbers between 0 and 3, so they MUST send that.
  1178. It was never an arbitrary value.
  1179. Code changes:
  1180. * &lt;&lt;Server Control API&gt;&gt;: `/nsm/server/list` chain of single OSC messages, one for each session,
  1181. is now finalized with sending and empty string "" as session name. Previously this was just
  1182. a symbolically irrelevant console message `"Done."`
  1183. * Replies to `/nsm/server/save` etc. will now be sent back to the sender and not falsely to the last
  1184. client who replied to `/nsm/client/save`. This alone would only require API_VERSION_PATCH
  1185. increment, but we are already incrementing minor.
  1186. * &lt;&lt;Server Control API&gt;&gt;: `/nsm/server/add` was replying with an undocumented error code on success.
  1187. Instead, as this document always specificed, it now sends `"/reply", path, "Launched."`.
  1188. Again, this would have been just API_VERSION_PATCH on its own.
  1189. Undocumented (Unstable) `/nsm/gui` protocol
  1190. * Send client status after a GUI attaches to running server. This
  1191. was not happening before, but it was the intention. It was just broken in nsmd.cpp. This alone
  1192. would only require API_VERSION_PATCH increment, but we are already incrementing minor.
  1193. * Send label "launch error!" when a program is added (or loaded) that
  1194. does not exist in $PATH. This requires no adaptation of any client, server or GUI because labels
  1195. are arbitrary already and this is not meant for automatic parsing, but as user information.
  1196. * `/nsm/gui/session/name` will now always send the same parameter format, regardless of how the session was opened:
  1197. simple-session-name, relative session path with subdirs below session-root.
  1198. * When a GUI announces itself to nsmd it will receive the absolute path to the session directory
  1199. through the message `/nsm/gui/session/root`. This is not a new addition but was already in
  1200. non-session-manager git.
  1201. === Changes in API Version 1.1.1
  1202. * Server-capability :optional-gui: is now mandatory for SERVER implementations. Reasoning:
  1203. This is an important core feature of NSM and thus will be treated as such by guaranteeing it to exist.
  1204. After looking at all currently known clients and server-implementations it turns out that all servers
  1205. support :optional-gui: and the vast majority of clients not only support it, but actually assume it
  1206. and do _not_ test for the server capability, as it was written in this document.
  1207. There are now two choices: Adjust this document to the (good) reality or consider all clients broken.
  1208. Summary: We consider this API document wrong and therefore fix it, thus increasing API version
  1209. patch-level from 1.1.0 to 1.1.1
  1210. * Add API-section "Subdirectories / Hierarchical Structure" that explains the session directory.
  1211. This behaviour was already the case for nsm-legacy-gui and nsmd 1.5.0 was patched to adhere to this
  1212. behaviour more strictly as well, removing false session entries in 3rd party clients such as Agordejo.
  1213. === Changes in API Version 1.1.2
  1214. * nsmd now follows the XDG Base Directory Specifications for it's session root and lock files. This
  1215. if of no consequence to clients but required documentation nevertheless, which was described as
  1216. "background information" in the new section.</code></pre>
  1217. </div>
  1218. </div>
  1219. </div>
  1220. </div>
  1221. </div>
  1222. </div>
  1223. </div>
  1224. </div>
  1225. <div id="footer">
  1226. <div id="footer-text">
  1227. Version API 1.1.2<br>
  1228. Last updated 2022-03-05 12:20:42 +0100
  1229. </div>
  1230. </div>
  1231. </body>
  1232. </html>