How to flatten an AudioProcessorParameterGroup

How do I flatten an AudioProcessorParameterGroup? It seems like this should be straightforward, but the syntax is eluding me, and Xcode is not telling me what I can legally say as it normally does. I think I want to say something like

auto fg = std::make_unique<AudioProcessorParameterGroup>("FlatGroup","FlatGroup"," | ");
fg->addChild(std::move(std::make_unique<Array<AudioProcessorParameter*>>(
    nonFlatGroup->getParameters( /* recursive */ true ))));

Incidentally, what is the best IDE for C++ that is smart about templates? I find Xcode to be confused by them most of the time. I miss my popup API options when typing. Templates should not degrade the benefits of a strongly typed language.

Hey Julius!
Start using AppCode or CLion by Jetbrains, it’s much smarter with auto complete and code analyzing…

AppCode will probably be an easier choice for you as it can open your existing XCode projects out of the box.

P.S. The smartest IDE for C++ by far is Visual Studio with Resharper C++, but that’s Windows only…

1 Like

for ( auto* param:getParameters() )//in processor

What…

is…wrong…with Xcode auto complete.
(Was going to do it slowly over ten minute intervals, but unlike Xcode, I don’t have the time)

2 Likes

Hi Eyal! Thanks for the pointers - I’ll maintain a Windows machine if that’s the fastest place to develop C++. I was hoping the answer would be something like Qt Creator. Linux should always win in the end. :+1:

I believe I have to flatten the group before giving it to the AudioProcessor. I am trying out PluginGuiMagic, which wants an AudioProcessorValueTreeState. Quoting from the source: “The favoured constructor of [AudioProcessorValueTreeState] takes … AudioProcessorParameterGroups of RangedAudioParameters and adds them to the attached AudioProcessor directly.” The whole point of flattening the group is so that PluginGuiMagic won’t see it.

The other direction I can go is making group layouts more editable (including deletable) in PluginGuiMagic. Right now they seem pretty frozen. I was trying to do something simple before taking on what I want in the end, but now I’ll take a look…

I was wondering, why you want to hide it? I assume for the time prototyping?
If you are happy to burn the GUI in the ValueTree via BinaryData, you can simply delete the sliders/controls or a whole subtree to get rid of a parameter group.
The delete button, CTRL+C and CTRL+V should work.

BTW thank you for trying PluginGuiMagic :heart:

Does anyone know what Xcode is doing when you are waiting for it to autocomplete? Is it thinking about the answer (it doesn’t seem to have got any faster when I bought a 7x faster computer). Maybe it’s sleeping? Maybe it’s lazy and it’s hoping I’ll think of the answer first…

I have too many large groups, so yes, prototyping and focusing on one group at a time. They are being ported from TabbedComponent layouts in a standalone app, each of which wants a lot of screen space. I created a subgroup for each one, and they were nicely laid out in a default grid by PluginGuiMagic, but then there was not nearly enough room for all the sliders and other controls, and I was unable to move them around and resize them, or even select them. After your hint, I see that I can select their names in the GUI tree on the left, press [delete], and save out the XML for future launches. Nice! I have my simple starting GUI now.

I have much to learn about the editing and layout paradigms in use here. I’m coming from the Projucer manual GUI layout support (no FlexBox, etc.).

Thank you for sharing PluginGuiMagic :heart:

Blockquote
Hi Eyal! Thanks for the pointers - I’ll maintain a Windows machine if that’s the fastest place to develop C++. I was hoping the answer would be something like Qt Creator. Linux should always win in the end. :+1:

CLion actually works on Linux (and Windows) too, so that’s to me the best choice for something that’s cross platform, and JUCE has a built in exporter for it.