Aj-snapshot is a small program that can be used to make snapshots of the connections made between JACK and/or ALSA clients. Since JACK provides both audio and MIDI support to programs, aj-snapshot is able to store both types of connections for JACK. Run aj-snapshot in daemon mode to have your connections continually restored.