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.

261 lines
9.9KB

  1. ! title Non Session Manager User Manual
  2. ! author Jonathan Moore Liles #(email,male@tuxfamily.org)
  3. ! date February 25, 2012
  4. ! extra #(image,logo,icon.png)
  5. -- Table Of Contents
  6. : User Manual
  7. :: The Non Session Manager Graphical Interface
  8. / Non Session Manager
  9. < nsm.png
  10. The Non Session Manager is a graphical interface to the NSM Daemon
  11. (nsmd). By default, running the command `non-session-manager` will
  12. start both the GUI and an instance of the daemon.
  13. If a different session root than the default is desired, it may be
  14. specified on the command-line as follows:
  15. > non-session-manager -- --session-root path
  16. This command will instruct the instance of nsmd that the GUI starts
  17. to use `path` as the session root.
  18. All session data is stored in per-session sub-directories of the
  19. /Session Root/.
  20. ::: Session Operations
  21. :::: Open
  22. There are two ways to open a session.
  23. The first is to click the /Open/ button and type in the exact name
  24. of an existing session. The second is to click on the desired
  25. session name in the session list panel on the left side of the
  26. interface.
  27. Either way, opening a session saves the current session and switches
  28. to the new one. Clients which are capable of switching projects
  29. without restarting are instructed to do so, resulting in very fast
  30. session open times when such clients are participating in both
  31. sessions.
  32. Clients cannot be added until a session is open, either by /Open/ or
  33. /New/.
  34. As each client launches, a status bar representing it will be added
  35. to the client list on the right half the interface. For clients
  36. which are capable of reporting their progress, a progress bar will
  37. also become active.
  38. Only clients supporting the NSM protocol can be told what to open
  39. and when to save. Clients not supporting NSM may still be added to
  40. the session, but their behavior is undefined other than that NSM can
  41. invoke and kill them.
  42. :::: Close
  43. This option saves and closes the current session. All clients
  44. participating in the session are told to quit. Note that, as
  45. mentioned in the preceding section, in NSM it is not necessary to
  46. close one session before opening another.
  47. :::: Abort
  48. This option closes the current session *without saving*.
  49. :::: Save
  50. This option saves the current session, instructing clients
  51. supporting the NSM protocol to save.
  52. :::: New
  53. This option saves the current session (if one is open) and creates a
  54. new one. The user is prompted for a session name. Session names are
  55. paths under the defined /Session Root/. A session name may include
  56. any number of hierarchical elements, which need not be pre-existing.
  57. For example, one might name a session as follows:
  58. > Albums/Magnum Opus/The Best Song Ever Produced
  59. When inspecting /Session Root/ in a file manager, the above
  60. represents exactly the path you would see.
  61. Renaming a session is not currently supported, but one may simply
  62. move directories around under /Session Root/ and NSM will detect the
  63. new layout upon the next invocation. The session name is not stored
  64. anywhere except in its path.
  65. Advanced users may choose to use symbolic links to organize their
  66. sessions. For example, one could store all their songs under
  67. 'Songs\/' and create an 'Albums/\' directory structure which uses
  68. symlinks to point at the songs stored.
  69. :::: Duplicate
  70. Templates are supported in by the Non Session Manager via
  71. duplication. Clicking on the /Duplicate/ button with a session open
  72. will prompt the user for a new session name. The daemon will then
  73. perform a recursive file copy of the session and open the copy.
  74. Obviously, this should be avoided for sessions containing audio
  75. data, as the copy would be very time consuming.
  76. To create a template in the first place, simply use /New/ to start a
  77. new session (preferably with a name beginning with "Templates\/"),
  78. add the desired clients to it, and configure them (e.g. add plugins,
  79. make JACK connections, etc.)
  80. Now, any time you want to start a session from that template, simply
  81. switch to the template session and click /Duplicate/ to create a new
  82. session based on it.
  83. :::: Add Client
  84. This option will prompt the user for the executable name of the
  85. client to be added to the session. It is not necessary to type the
  86. full path (the PATH environment variable will be searched to find
  87. the executable).
  88. When controlling an NSM session distributed across multiple
  89. machines, the user will also be required to choose which server to
  90. invoke the client on.
  91. ::: Removing a Client From a Session
  92. If a client dies unexpectedly or is closed by the user (e.g. by
  93. closing its main window), Non Session Manager will detect this and
  94. two buttons will appear on that Client's status bar. One button, the
  95. arrow, causes the client to be restarted and to reopen its project
  96. file where it left off. The /X/ button causes the client to be
  97. permanently removed from the session.
  98. :: Saving and Restoring Aspects of the Environment
  99. NSM manages clients together in a session. That's it. NSM doesn't
  100. know or care what Window Manager or audio subsystem those clients
  101. use--nor should it. Specific clients must be written to persist
  102. these environmental factors, and added to sessions when required.
  103. For saving and restoring the JACK connection graph, a simple
  104. headless client named `jackpatch` has been developed and included in
  105. the NSM distribution. Simply add `jackpatch` do your basic template
  106. session and all the sessions you base on it will have their JACK
  107. connection graphs automatically saved and restored.
  108. :: The NSM Daemon
  109. The NSM Daemon (nsmd) is launched automatically by the Non Session
  110. Manager interface whenever one is not found to be already running at
  111. the URL specified in the environment.
  112. Users who are not attempting to setup advanced modes like shared
  113. sessions between machines will not normally need to even know that
  114. `nsmd` is running.
  115. But for those advanced users, here are the command-line options for launching
  116. nsmd separately from the GUI.
  117. > nsmd [--session-root path] [--osc-port port] [--detach]
  118. The `--session-root` option allows one to override where /Session
  119. Root/ is, from the default of "$HOME\/NSM Sessions" (this option can
  120. also be passed to the GUI, which will hand it over to the daemon).
  121. `--osc-port` instructs the daemon to bind to a specific UDP port
  122. number instead of selecting an available port automatically.
  123. `--detach` instructs the daemon to close its standard input and
  124. output and go into the background. This is useful for starting the
  125. daemon remotely with `rsh`.
  126. When nsmd starts, it will print a string of the following form its
  127. standard output.
  128. > NSM_URL=osc.udp://foo.bar.net:17551/
  129. This is the OSC URL for the daemon process. If this URL is included
  130. in the environment (by either using a fixed port number or starting
  131. nsmd early in the initialization process [like in your .xinitrc]
  132. extracting the URL from its output) then any NSM capable client will
  133. join the current session when started, even if started from outside
  134. the Non Session Manager interface (for example, by your Desktop
  135. Environment's program launch menu).
  136. ::: Multiple NSMD Instances
  137. When dealing with multiple instances of nsmd, whether they be on the
  138. same host or separate hosts, it is most convenient to use fixed port
  139. numbers specified with the `--osc-port` command-line option.
  140. :::: Distributed Session Management
  141. In some situations it is necessary to have different audio programs
  142. running on different machines, connected by S\/PDIF, analog wiring,
  143. or over TCP\/IP as achieved by `netjack`. Usually the reason for
  144. doing this is that neither machine is powerful enough to do all the
  145. DSP or synthesis alone.
  146. Needless to say, these configurations have historically been
  147. extremely difficult to manage--requiring heavy scripting and\/or
  148. lots of manual setup.
  149. NSM is the first--and currently only--system capable of managing
  150. these sessions.
  151. Let us assume the following conditions for our example:
  152. + We want to distribute a session across two hosts, Host-A and Host-B, on the local area network.
  153. + Each host has a completely independent file system (i.e. not NFS).
  154. + We have appropriate access to both hosts.
  155. The first step is to decide what port numbers to use. Let's choose
  156. `6661` for Host-A and `6662` for Host-B.
  157. If either host is running a firewall, then these ports must be opened explicitly!
  158. To start the daemon on host A:
  159. > user@host-a:~$ nsmd --detach --session-root "$HOME/distributed-nsm-sessions" --osc-port 6661
  160. To start the daemon on host B (conveniently from host A, via rsh)
  161. > user@host-a:~$ rsh host-b nsmd --detach --session-root "\$HOME/distributed-nsm-sessions" --osc-port 6662
  162. Note that in the above example, there is a backslash in "$HOME",
  163. this is because otherwise the variable would be expanded on the
  164. local machine, giving the local value rather than what we intended.
  165. Now that both daemons are running, we can start the Non Session
  166. Manager interface with the following command:
  167. > user@host-a:~$ non-session-manager --nsm-url osc.udp://host-a:6661 --nsm-url osc.udp://host-b:6662
  168. The Non Session Manager interface will then connect to the daemons
  169. on both hosts. Creating a new session will create separate session
  170. files on each host. When adding a client, the interface will present
  171. the user with a choice of which host to invoke the client on. Aside
  172. from that it is just like managing any other session. Sessions can
  173. be opened, saved, switched between, etc. and the desired effect will
  174. be seen on each host.
  175. :::: Multiple Sessions On One Host
  176. Simply starting two (or more) instances of the Non Session Manager
  177. interface on the same machine (when the NSM\_URL environment
  178. variable is unset) will result in the ability to have two different
  179. sessions open at the same time on the same host. A lock file
  180. prevents the two instances from opening the same session.
  181. Imagining a useful application of this feature is left as an
  182. exercise for the reader.