Overview
The[daw_storage] object allows storage of arrays, lists, and symbols as extra data within the DAW session. This enables your patches to save and restore state alongside the DAW project, perfect for storing preset data, configuration, lookup tables, or any other data that should persist with the session.
When the DAW project is saved, data sent to [daw_storage] is serialized and stored. When the project is loaded, the stored data is automatically sent out the outlet.
Arguments
Unique identifier for the stored data. Each
[daw_storage] object needs a unique ID to distinguish its data from other storage objects in the patch.The ID must:- Start with an alphabetical character
- Be a valid XML element name
- Be unique within the patch
Inlets
Extra data to be stored with the DAW session. Accepts:
- Lists: Sequences of floats and symbols
- Symbols: Text data
- Numbers: Float values
- Arrays: Data arrays (will be converted to lists)
Outlets
Outputs the last stored data when the patch is loaded. This happens automatically when the DAW project is opened, allowing your patch to restore its saved state.
Usage Examples
Basic List Storage
Array Storage and Retrieval
Preset System
Multiple Storage Objects
Text/Symbol Storage
Advanced Example: Complete State Management
Important Notes
When Data is SavedData is automatically saved when:
- The DAW project is saved
- A plugin preset is saved
- The plugin state is serialized
When Data is RestoredData is automatically sent out the outlet when:
- The DAW project is loaded
- A plugin preset is loaded
- The plugin state is restored
Implementation Details
Internally,[daw_storage] uses XML serialization:
PluginProcessor.cpp:2143 (fillDataBuffer) and PluginProcessor.cpp:2181 (parseDataBuffer) for implementation details.
See Also
[param]- DAW automation parameters[table]- Arrays for storing data[text]- Text storage and manipulation
