cabbage3docs

CabbageSaveState

This opcode saves the current state of all widget values to a JSON file. The saved state can later be restored using the cabbageLoadState opcode. This is useful for creating preset systems or saving/loading configurations.

Syntax

cabbageSaveState SFilePath

Initialization

Note: The saved JSON file contains all current widget channel values and can be edited manually if needed. To save multiple presets, use Csound’s string formatting to dynamically generate unique filenames, for example: sprintf("/path/to/presets/preset_%d.json", iPresetNumber)