Strategies for plugin data

#1

I’m trying to figure out a reasonable strategy for storing & editing some data structures. My data structure has a couple of float arrays and a few other float variables. My plugin will end up with a few dozen of these.

While I’m developing this plugin, it makes sense for me to store/load/edit these as XML files so I can use other tools to edit them, but at some point I want them to be internal to the plugin without loading them from disk.

What’s the best way to deal with this?

0 Likes

#2

I do something similar for my graphics artist… I have a Layout class which reads from comma delimited files… You should put the external files in your Resources folder – on macOS that’s inside the plug-in’s bundle… and on Windows it’s in the AppData Roaming path for the plug-in… next to the settings. (On Windows your installer will have to put the Resources in the correct location).

If you no longer wish to use the external files you can embed them in the code as Binary Data.

Rail

1 Like

#3

That’s how my QT-style layouts work:

but to be honest, I haven’t used it myself in a while, since the layouts I had recently were too simple.
The editor is kind of unfinished, but the layout works stable… it predates Grid and FlexBox in JUCE…

0 Likes

#4

And by “embedding them as Binary Data”, you mean adding the file(s) with Projucer as we would with an image file?

0 Likes

#5

Yep.

Rail

0 Likes