Saving wavetable to preset?


#1

Hey everyone,
I’m experimenting with the wavetables and actually trying to store them inside a valueTree so that the user can create wavetables on the go and save them inside the preset file.
Does it sound right to store them via the var (const Array< var > &value) type ? This way I can write everything to a stream and save the binary file.
Off course when loading a preset I will iterate through the var array and create a plain C array for efficiency purpose.

thanks
Silvere


#2

That’ll work, but will be quite an inefficient way to store it. Doing it as a 64-bit encoded string would probably be better.

But… somebody else asked recently if I’d add binary data to the var type a while ago… and I also came across somewhere in my own code this week where it’d be useful, so I think I may actually do that.


#3

:mrgreen:


#4

FYI, I’ve added this now - haven’t had chance to test it much, so let me know what happens.


#5

Thanks Jules I will investigate your update asap!

Silvere