Simple Session Management

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:

# harmonySEQ 

harmonySEQ /archive/ArchStudio/Projects/hstest2/hstest2.hseq &
sleep 1
# Obxd -- Channel 1 

jalv.gtk --load /archive/ArchStudio/Projects/hstest2/Obxd00 &

jalv.gtk --load /archive/ArchStudio/Projects/hstest2/ChannelFilter01 &
sleep 1
# TAL NoiseMaker -- Channel 2

jalv.gtk --load /archive/ArchStudio/Projects/hstest2/TAL-NM00 &

jalv.gtk --load /archive/ArchStudio/Projects/hstest2/ChannelFilter02 &
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.

Tagged with: , , , ,
Posted in Tools
One comment on “Simple Session Management
  1. […] I launched an existing project (from my Simple Session Management post). To start, the JACK audio connections looked like […]

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: