Controlling node parameters with interface controls
-
Could someone please enlight me, how to control a parameter of a scriptnode via the main interface?
first i have to create a dsp network like this:const var DSP = Engine.createDspNetwork("DSP");
say, i only create a multiplier node within, i can then get at a reference for the node inside my script via:
const var mul = DSP.get("mul");
but how can i access it's only parameter (Value) from the script, since there is no "setAttribute()" something like
mul.setParameter("Value", 0.5);
available. :-/
i hope that question is not too sill, since i guess, it's no bigger problem, but somehow i cannot find any tutorials regarding scriptnode. -
@toxonic First you need to add a parameter in the very first chain in the dsp graph, and connect it to the node you want to control. This way it appears as
ParameterId
in the property editor so you can connect a knob to it like for any FX module.
Since you want to control it via script, you can do it the same way than for any module parameter usingsetAttribute()
:HiseSnippet 1516.3ocyX8zaaTDEeV6roMtMEJTthV4SNRAKa5e.IDD23jTY0lTq3zP6Eplr633Qd2YV1cbSbq5sxYNCGfCbgSHtxAD4K.RH0CHARHw2.9FTduY106ZGSqwHnrRVZm27dy76My6868V2NR5xhikQDqk1aXHiXcd6NCEpdM6Q4BRqMHVWvdaZrhE4XDs9vPZbLyiXYU7Fn.qkVfne9i0Vm5SEtrLQDx9RtK6V7.tJSZ6F2j66uE0isGOHm1WoQKWonozWN.vSQ6ZjPpae5grcnnZErIVKtoGWIi5nnJVLwZg0kdC6zSdjvn+97X9A9LbPcRGXgLh2R56gHFkRZ1i660N0uiIvpzN6Tnn4T3R1ay83ijmcZ7p5IbxrH+4gUgmG7pmGd0lJ7pMM3YkCdKXf2Es63FwCUYyfX6b1sDvEUWJbEjGVFcIE9MK6lRPCgpZ.sOaqHXvHKpbsZ0V04p0psx6sbokKAWDwJmGPibLVu0cq679N5PipGxTa1sKyUUorYRGX1xncYV0rmLZP7TsIYpxlMhK74BlS2ABWEWJbjhaJjGTGAZjzuhqLHTJ.HuJrr9CXqrboGsbokFAppwL00UpH9ACTrJYh2Q5wvvyTyf85wvuT+GfSyzUtRY8NVdEbsR12lTe+CffuJiCGbYxgzcjJ1sEUVoziJsToGWxYxo51cpykrX9rnoNMlTD87Lrh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OHu.qpd6vQkWRCE++SP0lGCr5wwZWDa.Zd5ELeY8yXl7r1lOlQSUtTxfwqhhU+RvbiKe4mtVBEhVvIu4m7qqsEi4gepQdk1fAkdFquphiWZq3rUZ6kTon+K1i.paj79tlhuXX7Y0R.+Vn+2BVxdabrynuDv1tV0ZXG37665h8e8V0IjoayaOG1b44vlqLG1b04vlqMG17NygMu6y0F7ON45CTx.Su4ff1apyBsr1TPgnWc9B4OAf6PD2B
-
@ustk
oh man, you made my day! :-) this was indeed pretty simple, but i would have spend hours or maybe days, to find out, that you only can use these container parameters. thank you very much! :-)