1AJ-SNAPSHOT(1)                   User Manuals                   AJ-SNAPSHOT(1)
2
3
4

NAME

6       aj-snapshot
7

SYNOPSIS

9       aj-snapshot  [ -adfjqrx ] [ -p polling_interval ] [ -i client_name ]...
10       [ FILE ]
11

DESCRIPTION

13       Aj-snapshot is a small program that can be used to  make  snapshots  of
14       the connections made between JACK and/or ALSA clients. Because JACK can
15       provide both audio and MIDI support to programs, aj-snapshot can  store
16       both  types of connections for JACK. ALSA, on the other hand, only pro‐
17       vides routing facilities for MIDI  clients.  If  you  call  aj-snapshot
18       without  any  options, aj-snapshot will store all current ALSA and JACK
19       connections to FILE. The file will be an XML file, and you  can  use  a
20       text-editor if you want to edit it manually.
21

OPTIONS

23       -a or --alsa
24
25              Only  store or restore ALSA midi connections. Also works in dae‐
26              mon mode.
27
28       -d or --daemon
29
30              Run aj-snapshot in daemon mode. Aj-snapshot will  first  try  to
31              restore  the connections from the specified snapshot file. After
32              this, it will wait for new ports to be registered with  ALSA  or
33              JACK.  Every  second  by  default, aj-snapshot will check if new
34              ports were registered in ALSA or JACK. When this is the case, it
35              will  try to restore the connections from your snapshot file. If
36              you start aj-snapshot in daemon mode, you don't need to  specify
37              the -r,--restore flag as it is implied anyway.
38
39              If you send the HUP signal to the daemon, the daemon will reload
40              the snapshot file. This gives you the possibility to  trigger  a
41              connections  restore.  For an example on how to do this, see the
42              EXAMPLES section below. When you combine the  daemon  mode  with
43              the  -x,--remove  option,  sending  the HUP signal to the daemon
44              will clear all connections before restoring.
45
46              When the JACK server is stopped (or crashes)  while  aj-snapshot
47              runs  in daemon mode, aj-snapshot will try to keep running. When
48              the JACK server is started again later, aj-snapshot  will  reat‐
49              tach automatically and restore your connections when needed.
50
51       -f or --force
52
53              When  you try to save a snapshot over an existing file, aj-snap‐
54              shot will ask you if you want to overwrite that file. With  this
55              option, you can force aj-snapshot to overwrite that file.
56
57       -j or --jack
58
59              Only  store  or  restore  JACK  audio and midi connections. Also
60              works in daemon mode.
61
62       -p  interval
63
64              Whenever a program registers a port with ALSA or JACK,  aj-snap‐
65              shot will see if there are connections in the snapshot file that
66              should be restored. By default, aj-snapshot will check (poll) if
67              there  are new ports every second (1000 milliseconds). With this
68              option you can choose how often aj-snapshot should check for new
69              ports.  The  value  of interval should be specified in millisec‐
70              onds.
71
72       -q or --quiet
73
74              Don't print any  information  about  the  connections  that  are
75              stored or restored.
76
77       -r or --restore
78
79              When  you  specify  the -r flag, aj-snapshot will try to restore
80              all ALSA and JACK connections from FILE. (without  it,  aj-snap‐
81              shot  will  try  to  store connections to FILE). You can combine
82              this option with the -a or -j options, if you  want  to  restore
83              ALSA or JACK connections only.
84
85       -x or --remove
86
87              The  -x  option  can be used when restoring connections, or when
88              running in daemon  mode.  With  this  option,  aj-snapshot  will
89              remove  all  existing  connections before restoring the snapshot
90              file. When you combine it with the -a or  -j  option,  only  the
91              connections  for  the  specific subsystem (ALSA or JACK) will be
92              removed. Without the -x option, aj-snapshot will try to  restore
93              connections on top of the connections that are already active.
94
95              There is one more way in which you can use the -x option. If you
96              call aj-snapshot without the FILE argument, you can use  the  -x
97              option to remove all existing ALSA and JACK connections (without
98              doing anything else). As before you can combine it with  the  -a
99              or -j options.
100
101       -i  client_name
102
103              You  can use this option to name a client that should be ignored
104              by aj-snapshot. You should write the exact name  of  the  client
105              after  the  -i  option.  If  that name contains spaces, or other
106              characters that have special meaning to the  shell,  you  should
107              put  the  name between single (safest) or double quotes. To know
108              the exact name of a client, you could save a snapshot  and  look
109              up the name in the snapshot file. If you want to ignore multiple
110              clients, you have to repeat the -i option with different  client
111              names (the maximum is 50 clients).
112
113       -h or --help
114
115              Print a short help message
116

EXAMPLES

118       aj-snapshot test.snap
119
120              Stores  a snapshot of all current ALSA and JACK connections to a
121              file called "test.snap". If that file already  exists,  aj-snap‐
122              shot will ask you if you want to overwrite that file.
123
124       aj-snapshot -r test.snap
125
126              Restores   all   ALSA   and   JACK  connections  from  the  file
127              "test.snap".  This  will  leave  any  other  active  connections
128              intact.
129
130       aj-snapshot -xr test.snap
131
132              Restore all ALSA and JACK connections from the file "test.snap",
133              but remove all existing connections first.
134
135       aj-snapshot -a test.snap
136
137              Store all current ALSA connections to "test.snap".
138
139       aj-snapshot -rj test.snap
140
141              Restore all JACK connections from "test.snap". This  means  that
142              ALSA  connections  that  might  be  stored  in the file won't be
143              restored.
144
145       aj-snapshot -qfj test.snap
146
147              Store all current JACK connections to "test.snap".  Don't  print
148              any  info  on  standard  out  (be quiet), and forcibly overwrite
149              "test.snap" if it already exists.
150
151       aj-snapshot -ax
152
153              Remove all ALSA connections
154
155       aj-snapshot -d test.snap &
156
157              Run aj-snapshot in daemon mode and make it a background  process
158              (&).  Whenever  a new ALSA or JACK client registers a port, con‐
159              nections from test.snap will be restored.
160
161       aj-snapshot -djx test.snap &
162
163              Run aj-snapshot in daemon  mode  for  the  JACK  connections  in
164              "test.snap".  Remove  all existing JACK connections whenever the
165              connections from test.snap are restored.
166
167       1) aj-snapshot -d test.snap &
168       2) aj-snapshot -f test.snap
169       3) kill -HUP $(pidof aj-snapshot)
170
171              1) First start up aj-snapshot  in  daemon  mode  with  the  file
172              "test.snap".
173              2)  After some connection changes, a second instance of aj-snap‐
174              shot (which is not run in daemon mode) overwrites that file with
175              the new connections state.
176              3)  Send  the  HANGUP signal to the daemon to make it reload the
177              file with the new connections state (see 'man  kill',  and  'man
178              pidof').
179

AUTHOR

181       Written by Lieven Moors and Jari Suominen
182

REPORTING BUGS

184       To report aj-snapshot bugs, or if you have feature requests:
185http://sourceforge.net/projects/aj-snapshot/
186
187       Aj-snapshot home page:
188http://aj-snapshot.sourceforge.net/
189
190       Clone the git repository:
191       git clone ⟨git://gitorious.org/aj-snapshot/aj-snapshot.git⟩
192
194       Copyright © 2009-2012 Lieven Moors and Jari Suominen.
195       License      GPLv3+:     GNU     GPL     version     3     or     later
196       <http://gnu.org/licenses/gpl.html>.
197       This is free software: you are free  to  change  and  redistribute  it.
198       There is NO WARRANTY, to the extent permitted by law.
199
200
201
202Linux                            NOVEMBER 2011                  AJ-SNAPSHOT(1)
Impressum