This is still far from solved I think!

Actually an enum containing all parameters combined with an array of float* pointers should be the fastest (and safest) way. No comparison of strings, array of pointers can be initialized in the AudioProcessor constructor, etc.
What do you think?

btw I’m using json to manage my parameters, anyone aware of a way to create an enum from a json? I guess it’s not possible?

1 Like

It wouldn’t be too hard to write a code generator from your JSON schema.

@Holy_City Can you give me a starting point? Do I need to convert strings to enum? I’ve googled a bit and this seems to be pretty hairy to do that in c++.
Thank you!
p.s. maybe someone has already worked this out?

What I mean is write a program to parse the JSON and generate the C++ code. JUCE has a json parser already, so you just need to traverse the var tree from your JSON to generate the code.

@Holy_City Alright, I think I get you: whenever I change something in my json I run a code generator which creates a file like myParameterEnum.h which I can include in my plugin code. Is that what you mean?
Thanks again :slight_smile:


1 Like