Save and recall array of objects
-
@toxonic you also need to enable "saveInPreset" for the component that you're recalling the values from
-
@ulrik Yes, this is what i stated in my first post. I want to recall the saved order from the MainPanel on init, but that doesn't work, as you can see. And this is, where my question leads to: how can i make it work?
I know, i have to set the panel to SaveInPreset, but as long i have no solution for that, i don't need to. -
@toxonic save the state in the MainPanel
you can save the state as an array, for instance if it's the order of the FXpanels you want to savestate = [0, 3, 2, 1,5,4]; MainPanel.setValue(state); MainPanel.set("saveInPreset", true);
and use the MainPanels CB to recall the values
-
@ulrik Ahhh, just in this moment it came to my Mund, that i maybe can save the array as in One piece....
Thanks mate! -
@ulrik
Mhh, i still have problems with recalling the array.HiseSnippet 3079.3oc6aszbabbDdWQsJFvwN1tTbRU4xXTobsHjBh3AoSDkDeCZFK9nHnjnKEUrVfc.vFtXmM6NKIncwpbUIGxk7eH+BxobO9VNkpxg7CH4pO4+AJcO6afkz.qjcrcnrkM2Y5tmd59qeryNbeGVGpqKyQRtvgmaSkj+gJsN2h2e89ZFVRaugj7sUZdzwGv73FV8NdeMKp4wUkV6baMWWptjr7LagTJW3lRh+7kKullolUGZ7PRROgYzg9HiAF73Q2ekOxvzrolN8PiAIntwJa2gYsNyj4AZ0LJyKYq04Dsdzc0Pxtghj7s1T2fybZw03TWI4atFS+7V8YmY4S+SLbMZaRwGpJ0BDj+vMYl5nFiiJsdeCS88C28tRRxJ6GaKlw2VbakcLzMhFO1l7VhIHwbjzdHeizp2LoTupIUu4SndYnRxIToa5qRusRqNNF173YP840U11hSc5pAl8jphOsR23m8STVmATXwqLP6DZSG3gHNTWb94mi.+mxKUT36qnS6RcVWyzrMX4cU4NdTXt6dWxA3DTv4dOxGp4n2gAFTxNZtfjHMOhziZQcL5TD7etbxoZNwT4STyiBHg7.xy7WqdT9lc6R6vUKMFwUKUdthEB9yWM40lNxqOcj2X5Hegoi7EKU94oMwtYaiaYxBjh6UYmSYfQdZdzDafuTxqMcjWe5HuwzQ9BSG49F3hiZh2ABoIhrZDMKcz.KdHos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QN3Ygbvyh4fmOHG77KuRdvhKq5wYC7C4h+BslXpvWO4CJxJoiTR96ekXsDW6kPv.DU3jpV5lV5opG6YZNFM3fiPWqSnmMZRYGXKgi8o29ur0+4S9CKGcOZReLVaCE.b3AGkxN6uo3KFKKuYhCX4+Bff9JzA�
In Line 114 i store the array to the MainPanel's value property, which seems to work fine (see the console output from line 115).
In Line 32 I try to recall the array within the MainPanel control callback (did I get that right?). But it seems to have the value 0. Why is this? -
@toxonic look at this, here I collect the "HardcodedMasterFXs" id's and store them in an array that is stored in the MainPanel
In the MainPanel CB iterate over the value to get all 6 Effect Id and load themHiseSnippet 3110.3oc6akzbabbEdfnFEC3kXmRwkO1FUJWCBofHVHchnj4NjYr3RQPs3nnh0.LM.lvASOYldHAsKVkqJ4Ptj+C4WPNk6w2xoTUNje.IWyI8OP485YqGfgz.ikchcDKKY0c+du9qea8a5t4AtrtTOOlqRghGctCUovan19ba9fMGnaZqryVJEJo15Ij1VLtmxFm6n64QMTJTXt6iiWn30UD+77U2P2R2tKMoKEkGwL6Ref4PSdRuGr1mXZY0R2fdj4PIpat1NcY1axrX9.VlScQEG8tmn2mtmNR10TUJbisML4L21bcN0Sov02fYbd6AryrCn+QldlcrnXiZJsAAEzcKlkAhXrWkMGXZYbPzZ1SQof5AIZf4Bz.2TcWSCy39SzDusX.RBGx5iBWKM7lKE7pICuEkfWFPpfDjtd.jdG01ccMc3Iif340U2wlSc6oCpcYnDPqx0TeO0MY.E17pC0Og1xEZDyg1xKt3BD3uprRIgEupAsG0cScKqNfl2Si65Sgwt8sIGhCPAi6cHertqQWFnPI6p6ARh.9F8o1TWytk.6mGmbptaBUAD05IgjPtG4oAyUeJe6d8nc4Zkmf3ZkqrPohg+7USd8Yi7FyF4MmMxWZ1He4xUdVZUrW15XL9KPJdWkdNkBF4o0SlZE7kRd8Yi7FyF4MmMxWZ1HOPAOtFdWHhlbftM0hnaaf5WQCYUKRR.E2iDEDASzlrgNLangV4XJJCQIHKsdRfTPiP1r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x59b1vfPtjauzBSE95xMTKnlNRQ92BKwbIdRHQNCPTgap8R211H09w9VVSPC14Xz09D5YimT1EVRXee9M+S2+e8Y+tUieiIoOTpcfM.b4gGkxtGrs3VPKTXaoCX4+7kmbrA
-
@ulrik Thank you for your support! :-) Although, this is not really what i wanted to achieve.
I tried to tinker around with your example and it seems, that my problem is the handling with objectnames and references. When I store the content of FXPanels to the MainPanels value, then they will be stored asObject ....
but when i recall them on startup, i need the component names like"FXPanel1: 0.0"
, otherwise I get an error message:FX Slots:! You must specify the unique component name, not the object itself
Is there a way to convert these terms?
-
@toxonic but isn't that what I just did, I stored the effect ids, and then you can load them using their ids?
Or you don't load the effects using the ids?
Or maybe I just don't understand what you're after :) -
@toxonic are you saying you want to store the actual object? I'm not sure you can do that, however you can load them using the saved ID from a each of them
-
@ulrik Actually, the core of all is the FXPanels Array. Whenever i drag one of the 6 FXPanels to another position, the order in the FXPanels array changes accordingly (so it's not about loading effects to the Hardcoded master FX slots, or changing their positions). So if I move FXPanel1 from slot1 to the second slot, the array index of it will change from [0] to [1]. I want to store this in the MainPanel so i have the same order of FXPanels on startup, like it was, when i quit the project the last time. Since the FXPanels Array contains Component references, this seems to be more difficult, than i thought.
I'll tinker around a bit and hope to find a solution. Anyway, thank you for your help. If you have further ideas, i'd appreciate any help! :-)