Application properties question

Hello

Me again

I am working on a simple midi application. it has a main window with buttons and a settings window where the midi commands that each button sends are set. I’m pretty sure I need to use application properties to pass the values around and save them but I’m not sure how to set this up. Is it similar to Plugin Parameters?

any tips on how to assign values to application properties would be greatly appreciated.

you can see the usage in StandaloneFilterWIndow. essentially once you create the properties you can do:

settings->setValue("foo", bar);
// later
settings->getValue("foo");

and if you’re passing around the same ApplicationProperties object around you can add a ChangeListener to it and respond when it changes.

you may want to reconsider this approach though if you’re trying to keep various parts of the app in sync, especially across the processor/editor divide. essentially you’re going to reinvent ValueTree / APVTS so if you can use one of those instead you’ll have an easier time (using ValueTree means you can create arbitrary data structures so it might be a good choice).

HI

I have used APVTS before in a plugin but this is an audio application and im unsure of how to apply it to this project.

ill have a look at using the Value Tree. the tutorial on this seems a bit confusing and the example code for creating an Value tree generates errors the i use it in my .h file.

got it - ApplicationProperties should be pretty straightforward then. i implemented a holder class via JUCE_IMPLEMENT_SINGLETON so i didn’t have to pass the properties object around and my usage is basically what i wrote above. lmk if there’s something more specific you want to see.