> For the complete documentation index, see [llms.txt](https://tobanteaudio.gitbook.io/juce-cookbook/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://tobanteaudio.gitbook.io/juce-cookbook/coding/code_snippets.md).

# Snippets

## Plug-in recall

Variable `parameters_` is of type `juce::AudioProcessorValueTreeState`:

```cpp
void YourPluginProcessor::getStateInformation(juce::MemoryBlock& destData)
{
    juce::MemoryOutputStream stream(destData, false);
    parameters_.state.writeToStream(stream);
}

void YourPluginProcessor::setStateInformation(const void* data, int sizeInBytes)
{
    juce::ValueTree tree = juce::ValueTree::readFromData(data, static_cast<size_t>(sizeInBytes));
    jassert(tree.isValid());
    if (tree.isValid())
    {
        parameters_.state = tree;
    }
}
```
