woah. threading issues? it’s kinda overwhelming my mind. I have to learn those problems carefully… And as I guessed, appending to arrays is an expensive operation. I’ll go with swapping the matrix.
Thank you for guiding me. ![]()
After a bit of thinking, I decided to make a custom class to hold internal data like the matrix, and pass it to the pluginEditor’s initializer to share them, because APVTS doesn’t support arrays.
Is that a good approach? because I’m not sure how to use sliders without using APVTS’s attachment…
Might have to make another topic about interfacing.
(But I’ll still use it to save the matrix in the plugin’s state. I found a post about saving a matrix in a valuetree, which is exactly what I want. I think I can merge the APVTS’s copy and my custom ValueTree right before saving, and separate them after loading, right? Is there any better method?
Topic refered: Multidimensional array of vars? )
