Audio Plugin stops working when you close GUI window

Is this normal? When I open it back up, everything inside resets, but of course I want it to continue working when the window is closed.

Does your audio processing somehow depend on the GUI editor being alive? Your audio processing code should never rely on that. (The only exception would be if it’s something like an audio visualizer plugin, but even then your code should take into account the GUI might not exist.)

Yes it does. The GUI keeps track of large Arrays of data. If I just restructure it to keep that data in the processor, would that keep everything working?

I should note, that when I reopen it the sliders are still where they are supposed to be, I believe because I am saving and loading the state.

Your plugin should be able to live entirely without GUI. The GUI should only be used to represent and change data. The actual data should live in your processor.

The GUI gets destroyed entirely once you close it, so as soon as you don’t have your plugin window opened everything in your PluginEditor is unavailable

//edit: so yes, managing your data in processor will fix the problem

1 Like

Took me awhile to redo everything and fix the inevitable bugs but yes, that worked! Thanks guys! I didn’t realize the GUI gets rebuilt every time but now I have a better understanding of what’s going on.