# setStateInformation - Reading back raw data to an array

**URL:** <https://forum.juce.com/t/setstateinformation-reading-back-raw-data-to-an-array/48164>\
**Category:** Audio Plugins\
**Created:** [October 7, 2021, 5:13pm UTC](https://forum.juce.com/t/setstateinformation-reading-back-raw-data-to-an-array/48164 "2021-10-07T17:13:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![DKDiveDude](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/dkdivedude/32/7020_2.png) [@DKDiveDude](https://forum.juce.com/u/DKDiveDude)\
**Post date:** [October 7, 2021, 5:13pm UTC](https://forum.juce.com/t/setstateinformation-reading-back-raw-data-to-an-array/48164/1 "2021-10-07T17:13:56Z")

</div>

In a previous post I inquired about various getStateInformation / setStateInformation specifics.

Here I specifically want to inquire about saving and retrieving an array (stream) of raw float data. As I previously discussed I store my 100% customizable wavetables in the DAW project file and preset via getStateInformation/setStateInformation. Until now I used a precision reduction and XML string method, but want to explore other options.

I noted that I can append my entire array the following way in getStateInformation;

```auto
void MutineerAudioProcessor::getStateInformation (MemoryBlock & destData)
{
	auto s = parameters.copyState ();

	std::unique_ptr<juce::XmlElement> xml (s.createXml ());

    .. Here all my "normal" non automation parameters are saved

    // Here the XML is written
    copyXmlToBinary (*xml, destData);

    // And here I write my 8 tone generator wavetables, each 2048 in size
	destData.append (synthParams.tgActiveWaveform, 8 * wtSize * sizeof (float));
}

With the above append I can see my DAW file increases when I save my project, 
and my question is how do I retrieve this data in setStateInformation.
I tried in vain to use MemoryInputStream.
```
