How do I share arrays of data from the Processor to the Editor?

I’m building a simple Biquad EQ plugin and I’d like to plot the filter’s magnitude / phase response as it changes. Currently the filtering works, and I’m able to calculate the filter response and put the resulting data into a frequency / magnitude / phase array.

Now I’m not sure how to actually transfer this info back into my editor so I can draw the plots. I’m pretty new to JUCE/C++ and so far I’ve just used the AudioParameters to transfer parameter info from the UI to the processor block. I noticed the PluginEditor includes “PluginProcessor.h”, but would it make sense to just declare some arrays in PluginProcessor.h and then access them from the Editor? Curious what the best practice is for this.

Take a look at @daniel’s Frequalizer, he does what you intend to do. Another option would be to use lock-free queues to send those arrays (polling when a new data array is produced with a timer).

Thanks, I’ll check it out. Seems like he’s doing exactly what I’m trying to do.