How to debug control not linking in exported plugin?
-
When I export my project, a control in my realtime script that should be controlling a knob in the deferred script, isn't. The behavior is the same whether I use the linkedTo field or a callback. I thought maybe the reference to the other script was ending up undefined on init, so I tried getting the reference in the callback, but with the same result.
inline function oncurrentPhraseControl(component, value) { local Interface = Synth.getMidiProcessor("Interface"); Interface.setAttribute(Interface.currentPhraseKnob,value); };
I'll try building a minimal project that replicates the issue but maybe somebody ran into this before? It always works fine in HISE, it is only unlinked in exports on all three OSs.
-
@Simon Not sure why it's not working, but getting references dynamically at run time like that is bad practice. Try storing the reference in a const in on init. I think though there is probably a better way overall to structure the intercommunication between your modules.
-
@d-healey It behaved the same when it was in a constant. Is there another way besides using a global variable or linking controls together with a callback?
-
@Simon said in How to debug control not linking in exported plugin?:
Is there another way
It depends on what the goal is, but I think it's a structural issue. Without knowing more about your project it's hard to give specific advice. Can you send me your project or tell me more about what this element's purpose is?
-
It's for keyswitching. In the realtime script, on note, if a note is in the KS range, it updates a knob. That knob is linked to a knob in the deferred UI script, so it can update the key colors on screen. That's it really. The keyswitching is working, because I can hear the articulation change, it's just the linking part that doesn't work.
Two switches that are set up the same way, to mirror something from the realtime script to the UI script, work fine.
It's tricky to debug as it only happens in a compiled vst or standalone. I'll probably try Christoph's logger next: https://forum.hise.audio//post/26752
-
@Simon I understand now. This is how you do it.
Your real time script does the keyswitching (changing articulation). In your UI you have another script that also picks up the keyswitches and updates the UI. The two scripts don't need to communicate.
-
@Simon Here's a snippet that demonstrates it, the keyswitches are 24 and 25.
HiseSnippet 1662.3oc6ZstaSbDEd1jroXCkBHpfetD0eroDErcBIDQQDxMHBLwJN.UBgPi2c13Qd2YVsyrowsBo9pzmj1Gg9HzGAdCZOydwdWGiwwwDHzDEEk4Lma64Ly46acRs.tEQH3AHsh601mfztjd81LYy0ahoLz1afztrdUrPRBLhEsVaerPPrQZZS9Xk.sBSgh958ObMrKlYQ5JBgdImZQdF0iJ6Js1pOk55tE1lrG0Ki1Kt51Vb15bWdHjOSpWB4is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ZCPhYWwz8Y7.xZgRImMG3na8.i3X.42mFhEoFEG4MOPwqIkhzwg1wQTMtbYGE+2UnvWfrRzGWrRNwLQ5AtNgFhtllZT6IlBRwgMtGphoJjsS+EgrspfLst5RO5CwB48+YWVHcQXDgNNzCidSHGpqm.Ns6usGbVCocM8WHHF.wbbnqzPzBFlC20ZQr2iGo+47U9ZiuxMhC+E0eE9.RDtTBboZML7zy3wDfyhp1MHdK+83m2xNVRHE1K.yD9bAobVOWm3Q2CtEIxIsGKpzWKxIcChLjk20whxokpTrETJxn2EVMUXkrBqgY4bFrNmmpROL66HrICCMr5D3I2dGgETXT04rWKpE5JHuhZKaVNqgcEWIq3mfCrgdnUtCs8P+apga3Z96uYz+rGuvISOh2gPVBi7NqyexdvDlOFezJY.al3CA1DSoHYneVVF84cdGBe7c5vn85xPqVJfbQuNAcVXBdtlWgzbrN0y2krI6.hKfxFkiWCfUiPpRkluOVky39M4LZt6C6R.7t8Uj+yj688AB3ABjd6J45qtKwkfEYpm+vpOCnhhCf5DYDqEG+Oct91utodb5ZnFqZb1E4cx+2f7N3ae.RwW1cwanCHVULhZkFed5k6xCkT19UwvMZEEY3EqpCzGrHpWumQbUuJg1Dp4vwqKkxdtNgYGs3eguR1rbJud0lkS2bDoJU4bpRcDdk9QU5lmSU5rIUoJmAnJk3tyoJM.pRUNmpzImpzTCWe6i7GG6zi1zXOeGcJTmpktSNcpS0zcrQsZ7j0mFzr9ZIFdXq.9ashQeTCktPjDn1xh9uOofdU0ZixGEtwCfXeqkUdWcDCqLpFtvnZ3hipg2cTMboQ0vkGUCu2G2PECnGEJ4dI+k6QUqsYzm+ulVL2znqkn+CfV1fAi
-
@d-healey yup this is the way. Put the key switching stuff into functions and into an external script, then include it in both the interface and real-time processors, so you only have to maintain one version of it.