AJ-SNAPSHOT(1)
π NAME π
okay bestie, meet aj-snapshot π¦, the tool that stores and restores snapshots of JACK and/or ALSA connections β¨
π SYNOPSIS π
aj-snapshot [ -adfjqrx ] [ -p polling_interval ] [ -i client_name ]... [ FILE ]
πΈ DESCRIPTION πΈ
okay so aj-snapshot is a small but mighty program that makes snapshots of the connections between JACK and/or ALSA clients π JACK can handle both audio and MIDI for programs, so aj-snapshot can store both kinds of JACK connections. ALSA is lowkey more limited and only does routing for MIDI clients πΉ
If you run aj-snapshot with no options, it stores all current ALSA and JACK connections to FILE. The file is XML, and you can open it in a text editor if you want to tweak it by hand π it's giving very customizable energy π«Ά
π OPTIONS π
-a,--alsaβ only store or restore ALSA MIDI connections. This also works in daemon mode πΉ-d,--daemonβ runs aj-snapshot in daemon mode π§ It tries to restore connections from the snapshot file first, then waits for new ports to show up in ALSA or JACK. By default it checks every second (1000milliseconds) for newly registered ports, and if it finds some, it tries to restore connections from your snapshot file. Starting daemon mode means you don't need-r,--restorebecause it's implied anyway π If you send theHUPsignal to the daemon, it reloads the snapshot file, which is a great way to trigger a connections restore (see EXAMPLES below for how). If you combine daemon mode with-x,--remove, sendingHUPclears all connections before restoring π₯ Also, if the JACK server stops or crashes while the daemon is running, aj-snapshot keeps going. When JACK starts up again later, aj-snapshot reattaches on its own and restores your connections when needed π¦-f,--forceβ when you try to save over an existing file, aj-snapshot will ask if you want to overwrite it π This option lets you skip the question and overwrite it anyway β¨-j,--jackβ only store or restore JACK audio and MIDI connections. This also works in daemon mode π§-p interval,--poll=intervalβ whenever a program registers a port with ALSA or JACK, aj-snapshot checks whether the snapshot file has connections that should be restored. By default it polls for new ports every second (1000 milliseconds). Use this option to pick how often it checks. Theintervalvalue is in milliseconds β±οΈ-q,--quietβ shhh π€« don't print any info about the connections being stored or restored-r,--restoreβ restores all ALSA and JACK connections from FILE. Without this flag, aj-snapshot stores connections to FILE instead π You can pair it with-aor-jif you only want ALSA or only JACK connections back π-x,--removeβ used when restoring or running in daemon mode π§Ή It removes all existing connections before restoring the snapshot file. Combine it with-aor-jand only that subsystem's connections (ALSA or JACK) get wiped. Without-x, restored connections just stack on top of whatever is already active. There's also a second trick: if you call aj-snapshot without FILE,-xremoves all existing ALSA and JACK connections and that's it, nothing else happens. You can combine this with-aor-jtoo π-i client_name,--ignore=client_nameβ tells aj-snapshot to ignore one or more clients π Wildcard patterns work here (regular shell globbing). If the name has spaces or other characters the shell cares about, wrap it in single quotes (safest) or double quotes. To find a client's name, save a snapshot and look it up in the file. To ignore several clients, repeat-iwith each name (the max is 50 clients) π-h,--helpβ prints a short help message π
π§ EXAMPLES π§
Store all current ALSA and JACK connections to a file called "test.snap". If that file already exists, aj-snapshot will ask before overwriting it π
aj-snapshot test.snap
Restores all ALSA and JACK connections from "test.snap". Any other active connections stay intact β¨
aj-snapshot -r test.snap
Restores all ALSA and JACK connections from "test.snap", but removes all existing connections first π§Ή
aj-snapshot -xr test.snap
Stores all current ALSA connections to "test.snap" πΉ
aj-snapshot -a test.snap
Restores all JACK connections from "test.snap". Any ALSA connections stored in the file won't be restored π§
aj-snapshot -rj test.snap
Stores all current JACK connections to "test.snap". It's quiet about it (no info printed to standard out), and it forcibly overwrites "test.snap" if it already exists π€«
aj-snapshot -qfj test.snap
Removes all ALSA connections π
aj-snapshot -ax
Runs aj-snapshot in daemon mode as a background process (&). Whenever a new ALSA or JACK client registers a port, connections from test.snap get restored π¦
aj-snapshot -d test.snap &
Runs aj-snapshot in daemon mode for the JACK connections in "test.snap". All existing JACK connections get removed every time the connections from test.snap are restored π₯
aj-snapshot -djx test.snap &
This one's a whole routine π Here's the flow:
- Start aj-snapshot in daemon mode with the file
"test.snap". - After some connection changes, a second aj-snapshot instance (not in daemon mode) overwrites that file with the new connections state.
- Send the HANGUP signal to the daemon so it reloads the file with the new connections state (check
man killandman pidoffor more π).
1) aj-snapshot -d test.snap &
2) aj-snapshot -f test.snap
3) kill -HUP $(pidof aj-snapshot)
π«Ά AUTHOR π«Ά
Written by Lieven Moors and Jari Suominen π
π REPORTING BUGS π
If you find an aj-snapshot bug or want to suggest a feature, go here: http://sourceforge.net/projects/aj-snapshot/ π
The aj-snapshot home page is http://aj-snapshot.sourceforge.net/ πΈ
To clone the git repository, use git clone git π
π COPYRIGHT π
Copyright Β© 2009-2012 Lieven Moors and Jari Suominen. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law β
That's the whole page, bestie! π This manual is from Linux, dated NOVEMBER 2011, for AJ-SNAPSHOT(1) π Now go snapshot those connections, you literal genius π¦β¨
π¦ where this page comes from
- arch rolling: aj-snapshot 0.9.9-3 Β· GPL3
- debian bookworm: aj-snapshot 0.9.9-4 Β· GPL-3.0-or-later
- debian trixie: aj-snapshot 0.9.9-4+b1 Β· GPL-3.0-or-later
- nixos 26.05: aj-snapshot 0.9.9
- nixpkgs unstable: aj-snapshot 0.9.9
- ubuntu jammy: aj-snapshot 0.9.9-2 Β· GPL-3.0-or-later
- ubuntu noble: aj-snapshot 0.9.9-4build2 Β· GPL-3.0-or-later
- ubuntu resolute: aj-snapshot 0.9.9-4build3 Β· GPL-3.0-or-later
- π girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms