[bug] .changed() not working
-
Unless I'm doing something stupid, the .changed() function isn't doing its job.
This should print 0.5, right?
const var Knob1 = Content.getComponent("Knob1"); inline function onKnob1Control(component, value) { Console.print(value); }; Content.getComponent("Knob1").setControlCallback(onKnob1Control); Knob1.setValue(0.5); Knob1.changed();
HiseSnippet 863.3ocsU0saSCCE1taYPK+H.wCPDW0IMM0x+RSHf00gpFaTQ1l3NjmyIqV0wNJ1YrBh63ogK3Ufq3Ag2.dCficxnoroAqRzKpx4O6Oe724yCy0bvXz4DZycmjAD5UChlnri5MhITjAaPnWOXalwB4gktVeRFyXfXBktvKbNnMWj3+8imtNSxTbXpKBYesfCuTjJrS8N7YaIjxMYwvthzZYe+mMfqU8zRcAhmEB5PxX7wrCgcXtzZDPnK0OVX04QVlELXNqqimDMR+NUY96KLhCjfynKIBWnR2jdiDx3gmbVMDBcwgSO4KTdxucv1hXwu8OsCbCefvoUTuGPabdPp6E.RzZPZwRHcyfHdtHyNMhCOWIXfBuPRXXqtNTJykz3yzfdZLCkc0T1XXybz32Uz9gc5rRH92xq0pE1tM1viX4gaozGzM7IgmT3gfsmNMSqPi12wG8NtJDJoPAgIEJtUnUgZkOlqrbsrM+jZVAWUYArbqOzpIFznkvpY4BbwJ8uVqOhq14taqZbd8qaOlTd.xEZO614.j21k59t0scmUe.5szIeDScHD2d40pA2czV3Up1df05isB+yPIImYrpcTB4mYXGQN+7JrspH8.HudawkHdSOK8Yo+M5CurwUKQsZfRXeUFTYuoVF6nEtuOMYiT04wu1avFLKyw+p7g4kA4VgCNzMfivA3R1XyfM.yXqNyma00EgdMqO50q3pQRQLjSD3deo.+EA4XBMf9Mbul39nO9gwNwcnVxm.IUDGKggZiv0zpon7UT3IKR7duHwGt8Wdw2e+mdZZcQGBIkcbcMHSQRh3XuZQhPlZrHlFjhhHD5sB1y.gwPBqPZCMiw0AIyig3c097MrifApg4.xlbySjSOPhRA53BIyNq9fSHrJf6.TenzM3ovC1j5f7BHZz4bEM9Wg3MCFJr7QmMFabFXD4C+OvXkT60B5mj.b6T.tXvluYd0U+Ka+q0EVg5vsYHUvwD2oHMBeggC3tqTfz3HkMbyDk1cb1tNPDnh8F+D+UErqylVEr6IAQRHOW+Vd4rtSL+xdOHlT92tZhOhh1gcI94+Y3u3aKukymcoNUg2cdK7dyag2edK7AyagObdK7QyagO9uWn6o+mWX0okiMDx1C66ELoz9JFx.8rUxu.Lj8Zl.
-
@d-healey it works if you call it from another function (like a button)
-
@iamlamprey Yeah I tested that too
-
@d-healey confirmed in develop branch
b41b58f12ecca927c1fe8f12610dd993fa00db28 -
Could this possibly be affecting my automation issue?
https://forum.hise.audio/topic/8695/ismetaparameter-automation-help
-
@Dan-Korneff I don't think so because that works in HISE, but the problem here doesn't.
-
@d-healey The problem is that calling
changed()
in the onInit callback doesn't fire the callback. I took a look at the code and it explicitely cancels the execution:I don't remember exactly why I did this (passive aggressive note to past me: a comment would have been helpful...), but I'm sure there are a few edge case problems that arise from this (eg. it will fire a bit later anyways because of the user preset load).
I've added a warning message that tells you that this function will not do anything, so now you're at least not left in the dark with that problem.
-
@Christoph-Hart Thank you for your response. What if I call the callback explicitly?
-
@clevername27 said in [bug] .changed() not working:
@Christoph-Hart Thank you for your response. What if I call the callback explicitly?
I just use a one-off timer...
-
@clevername27 if you mean calling the function directly then it will work (like any other function as long as its defined before the call), itโs just the connection value change -> callback that is disabled during onInit.
-
@Christoph-Hart Thank you,