API call with undefined parameter error...
-
Hi folks, I'm getting the above error when trying to link a knob to a scriptnode control...
I think the syntax is correct, but maybe I am missing something which should be clear...Here's the snippet
HiseSnippet 1965.3oc6Y0saabiElikGmXk5tMEs.6kC7EKjQRTFI6jFfzEU1xRcEpsrfjiaKJJJnmgRhviHGLCkiUKBvd49Jz65Kv9.r2suC6066PeCZOjbFMbjkUj0V2rKvp.DO7Pd37wOd9ib5Dw8Hww7Hj0lmNIjfrdO6dSXhg0GhoLTqCQVEsOjP9dAORfNXRHNNl3irrJ74x9s1bcj52O+YGfCvLORlHD5LN0ibDcDUjIsSsufFDzD6SNkNxXz6UqkGmUmGvGCXofsKJD6cAd.oMVNr0rQVazvmBvnm.KHwHq0Of6Oo2P9qY5weFMldd.Q1nBpGLQZwM4A9RDKkhpOjF32IcMGifYoSFCTPy.ej8wTe5T4YLwGn5vISCS9vZsEAuJlvyc4gmkA7VWCuGZ2yKhFJx5QhsGX2hIHQ8wvVfIrziEs1+dM65bXDLQ4Q3KHMifFS0nzycceryybc24kaUT9um9zOuQ6Fc2+HmtMZ1nai10azaqhvFTrv4RbjidVa9UUb9yNJykxCHhF86S7Dk1V2oCz61x4yPqg3PxMojru4nC.5K4AiETNqK4RRz4yUaiQ4jLrs0qkm9zy1uaq8O3nrEvEry6R5CSy27suzPV6wi.Y6ozpOOxoDEZ59RGpymlzM77idzNaUzA9omjxgiiGVJkXA.UmOJjyfFk1FFw1NOxgtiDHRUzvo4qZW+zVmztmrIkEPYDm9iYdJryYfVtx4KhGTxKcxdLPEAiIvq9G1p3lSI+xwDw9BQD87wBRoLwRWyJo5.u72nVS2HJc2dG4Lk7VqiCBNGb8JkCKZxz.ms4BxIrR6T7GJtYw2TzY1t52et8kLcAjn41sLlPzhTrDa7nyIQoKtzABNG489ruYuOyfCdZNwXfbVKFUbRHgcS9jnDhTF7HAUvPEJey2Ow2rW.0mDgnfK3F1RZDovaV3tWTCsr5VYVcSfvxna0+Czc24n6qZcHVfkwkRHAfXBIQBp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VQtpZyVJZMMlycBudW5ANKuluPayJlmVf2spR6p4i1pOdv0h2pqBKMZq9LCKHdq0igQb83sYWa97q0Kuu5pbsMlmK9goclbCtowLRuy1bmDs93nK02X+ATb7Qj9ByyvKk0kNXXNg+EPPGXBLWWGIOGggn+1+p1wpMkr6u3jzC.HCaYHO+ml3E05R7Gm+KSr+XAevLe.Ck8TKV3XgozCinWlS0ioWk6ydnV4MoA5i6XbYEExez1BK2QaeGcTTiM6OL8RPLtTc0F9GaOmqYO2V+gQSxy8e8+7KIh7h.WBfPXd4tYmViBGGDSNhvFHs5yn2DbcssEnpfCvdWLHhOl4e5vHB12b95DQ7IA3I4MxpaLGf4zgfoSNKGDpYySSL0yDQCx9FTijqDM4ptNR8iAbdHrMKOhdlfFL+zl+ukovuGuiQXuH924ouGFYpl6qj.qalhp2z9XYamo28sLttKP+9zuyySlv8IUPn4qS0UPmcWAc1aEz4YqfNOeEz4SVAcdwB0Q9kOkQMGouqVPPmFpjJVVMXXv5UE..8qP6tHPD
Any help to solve this trivial problem is welcome!
-
@alepan ok so loading your code shows that the error is at line 21:
ScriptFX1.setAttribute(ScriptFX1.Gain1, value);
and the error is:
API call with undefined parameter 0
so the first (zero-th) parameter in your call is empty...
so that's:
ScriptFX1.Gain1
so you've defined ScriptFX1 - so that's OK, but your ScriptFX1 is a script FX and that doesn't have a parameter called Gain1
So I'm not sure what you are actually trying to do - set the gain level?
If so - you need to make a Simple Gain effect, and refer to it and its gain parameter which is called:
Gainso
const var MySimpleGain = Synth.getEffect("MySimpleGain"); inline function onknb0Control(component, value) { MySimpleGain.setAttribute(MySimpleGain.Gain, value); }; Content.getComponent("knb0").setControlCallback(onknb0Control);
-
@Lindon Hi and thanks for your answer.
I'm trying to use the knob called knb0 to control the Gain1 knob that can be found on the top row of controls in Scriptnode, which is linked to the first gain inside the chain... I don't need a standard simple gain module, but I'd like to control the signal level that goes into to tanh in scriptnode.
I hope this explanation is clear :) -
I find it strange, because in other projects I used this same syntax and they work perfectly...
-
UPDATE: I made a new project and now it seems to work... HISE mystery!