Skip to content

Save and Restore Plugin State

Use this when a plugin’s GUI contains edits you want to keep. Save the source file too: the source rebuilds the session, and the saved presets restore the plugins’ state.

  1. Work inside a project.
  2. Build the tracks and load their VST3 or CLAP plugins. Make your GUI edits.
  3. Evaluate:
save_project();

Check the message for the number of presets written. The presets go to plugin-state/ at the project root. Keep it with the source when backing up or sharing the project. It contains plugin presets, not a copy of the source, tracks, routing or built-in DSP.

Run the source that creates the tracks and plugins, then evaluate:

load_project();

Listen and open the plugin GUI to check the restored settings. Keep plugin identities stable. Read any warnings: mismatched plugins are skipped, and presets without a matching loaded plugin are reported.

List the snapshots, newest first:

print(list_snapshots());

When a snapshot exists, restore its index or exact name:

load_project(0);

Index 0 is the newest snapshot, 1 the next older. Restoring changes the loaded plugins without rewriting the current preset files. Run save_project() if you want the restored state to become the saved current state.

The selectors and return values are in load_project. For collecting the piece’s sounds, see Share a Project.