プラグインのパラメーターをAの状態とBの状態で比較する機能を実装しました。
A/Bボタンを作成し、Aの状態でクリックするとパラメーターや画像がBの状態に切り替わります。
ここまでは完璧に動作します。
もちろんA/Bボタンを使用しなければ、getStateInformationとsetStateInformationなど含め問題ありません。
問題はAの状態でプラグインをもう一つコピーなどした時にBのパラメーターが再現できません。
Aの状態でBの状態にした際にAudioValueTreeStateを裏で保存→A/Bボタンをクリックで、
AudioValueTreeStateの裏と表が切り替わるようにすれば解決するのかと思います。
AudioValueTreeStateの設定をもう一つgetStateInformationとsetStateInformationに組み込む方法は分かりますでしょうか?
他にもオススメの方法があればご教授下さい。
宜しくお願いいたします。
JBTA03:
Implemented a function to compare plug-in parameters between A state and B state.
If you create an A / B button and click in the A state, parameters and images will switch to the B state.
So far it works perfectly.
Of course, if you do not use the A / B button, there is no problem including getStateInformation and setStateInformation.
The problem is that the parameter of B can not be reproduced when copying one more plug-in in the state of A.
Save the AudioValueTreeState to the back when you switch to the B state in the A state → Click the A / B button.
I think if the back and front of AudioValueTreeState is switched, it will be solved.
Do you know how to incorporate AudioValueTreeState settings into getStateInformation and setStateInformation?
Please teach if there are other recommended methods.
Thank you.
I think you need 2 trees, an A and a B parametertree, and you want to store both of them. Is that correct?
You should be able to store them in 2 sub-trees, and point to the A and B trees with a string that contains the actual parameter subtree id.
I havent done this myself yet: so somebody fill us in here!