In the world of GNU/Linux audio, session management refers to being easily able to recall a group of standalone programs and their connections. There are several session management solutions available but they seem complicated.
For me, the simple, understandable solution is to use a project-specific shell script to launch the desired programs and to restore their connections. Here’s an example:
#!/bin/sh # harmonySEQ harmonySEQ /archive/ArchStudio/Projects/hstest2/hstest2.hseq & sleep 1 # Obxd -- Channel 1 jalv.gtk --load /archive/ArchStudio/Projects/hstest2/Obxd00 https://obxd.wordpress.com & jalv.gtk --load /archive/ArchStudio/Projects/hstest2/ChannelFilter01 http://gareus.org/oss/lv2/midifilter#channelfilter & sleep 1 # TAL NoiseMaker -- Channel 2 jalv.gtk --load /archive/ArchStudio/Projects/hstest2/TAL-NM00 http://kunz.corrupt.ch/products/tal-noisemaker & jalv.gtk --load /archive/ArchStudio/Projects/hstest2/ChannelFilter02 http://gareus.org/oss/lv2/midifilter#channelfilter & sleep 1 # Make the connections aj-snapshot --remove --restore /archive/ArchStudio/Projects/hstest2/hstest2.snapshot
The script first launches harmonySEQ, specifying a previously-created file to open.
Next, the script launches two instances of jalv.gtk. The first instance opens the synth Obxd with a previously-saved state. The second instance opens a MIDI channel filter with a previously-saved state that only lets MIDI channel 1 pass (the channel filter is from package lv2-midifilter). This is necessary because harmonySEQ only has one MIDI output, so each sequence has to be on its own MIDI channel. Without the channel filter, every connected instrument would play the sequence on channel 1.
Next, the script launches jalv.gtk opening TAL NoiseMaker and another MIDI channel filter for channel 2 only, both with previously-saved states.
Finally, the script runs the command line program aj-snapshot to remove all existing JACK connections and to restore the previously-saved connections from the specified snapshot file.
Note that several of the script lines are long and are wrapped in a way that makes them appear to be two lines. I’ve added a blank line after each actual line.
Also note that the script lines to launch GUI programs end with an ampersand (&) so that the programs stay running. The script line to run aj-snapshot is not followed by an ampersand because the command just runs and exits.
The sleep statements appear to be important, although a shorter sleep interval (such as 0.5) might be OK.