scriptnode question
-
- Add a parameter to the root container
- Connect that parameter to any knob in the scriptnode graph
- Call
DspNetwork.setForwardControlsToParameter(true)
in the onInit callback - Connect the parameters just like to a native module
Example (turn down the volume, it's an sinewave at 0dB)...
HiseSnippet 1363.3ocyX8zbaSDEekSTZhSSmzY5YFM8jyPvibHokNcXraRry3owIl3zPOvLc1HsNdGKsqX05j3V3DvLbiyvE9FvY3FeA5INwM5MXfC4a.7VIYKIakhigPwmz912S6u2+9sO4lBtEw2mKPZKbXeOBR6l5s5yjc1pClxP02FocK8FXeIQXDJZy9dXeehMRSalcTBzVXVTvuKJuI1AyrHwhPni3TKxtTWpLVZyJOl53TCaSNj5lP60qT2hy1h6v6A3YFcSjG1pK9DxdXkZ4zQZyU0lJ4hVRrj3C5rI2teqN7yXg5eD0mdrCQsnDpE7hBEi1pC0wt4.e0GgzlsYrmOSnmeG8FTa5P4wQfkC1vH1hjw.sbogzrofToKCR03N1pWvk.OsDva1P3ca8VVBpmLdGE1VTuNCRNswPXOIrB0Eo8i5awAEXxht3tjZBXwPCJbOSyUM1vzbkG1tGyRR4LCNaOtjrOqvJ4eQ9Ex+o4MFcq1sybO0wH3NNDQlaqxzhWmgEX8bOlHV03TrSOxPEA2Oc7cwIK9ZE50ITjypynx88HQqiy.p8B85A6ZhF5rIEE6iIkF3ZYnVrnwSvnnrBjpyEoNnpLHQeqnDcKGpMQfn.Fug9iY7iKgBhMQMLFe2NupLZhMdsTFC+9kxnmTearDqJ2hfC.QOhPRUAZssImB8tgEeKnuMwuqj6EfWWONSAds49aQ74wG3GUoe7hcp3MHbT2Nf0I3MXT6okftdAzvCEog6bXGAwuSGHcoBaS7Yul5r00daMDZZN240ejTBzO.c0Xsh.g.2tmCVllkPQGFsATZmpcT0yw7ox9IoKuBTGlYRcTJqJqIDt2VuIUZ0Ia7lKC7pJUulwaDQ7R5Ua2lXIiA6r50d5aFV27QEHv4q.Rp5kr3a+Ucf4wWBrXBCaeOi22nJ6DJiTzRP.ntsu2dD4YbQ2B2E19tqX7vkxuTd3wh9DYMt3LrvNpm1+PdyAUj9EjBfULP4gbmdBBTxR.0bv8K3ic8bHG.GxpFG6vs51h9bx3DtQk+apznfUGLiQb7mFd4QtJ9FSVFXTV3T9PLiYRTdUoVOf2SRYmz.KETEEvd8baASTXQ1JxaUzB4TbvgqMUqU02sHL6fE+I7KZyRp0ZQaVZvlwz2nnzYP4SzyvSpZEccHspjxsULn0vVP3peSrrip6ScAETdSDEsFVlOmxhRH.viB0cg3PJwZyndsClUJD+.4na.0HLoTzyeH0Vcb5ZqBZDVud.TmntxpgexIuTYt3pMEEf1LItM.7S33Bcx.2Y9vtAtuELJmhYAMl+IHESr8aBmRKWJWHg+AEOCWAVTmcJnUXmbCJ6nz2ThPMvmOhrkqrK+LhXjIaQnm34MlzkqzRR7TsiIY+a0kbVXLKozvxfFpX7QourWqBZxg75UFCxe4OkIjWuRFPFzMIj+luV86GFAxu7S9s6+Yturb3Xn0DjOtGgY0OF23cx8sKV4qtJ39hxiGpMyD2WTNqPs4ULTey.babf5FPzXXIcEStDtwbgFmXzjIqrAvRB78h6.yv87O+Rv2PS+iO36equ32eU4fwzXj.BZ+no1hVBfQ05DNRShttlIGoIptBrJHEHT2tU2FZnT2yuu2vK7Hxvi9+OcEUOGtmv2OvQAd.znYhgCqcMlEBaB94+wYgjsJ+KkJt961yqaVbs0dvCL2.MZtXZ9Hh+Sti1EaI3OyJZXJ.fyGHAn9YA+eBKn2Ps1X3mUoCNoIxE9V+mYYoF57cfAVy1l0lBad2ovl0mBa1XJr4dSgM2eJr48ds1n9aVdTOI2M7CR.AMqFTbooUkggoICp+Q+EMA3.FB
-
ah cool thanks, I tried to do it like this but I found it weird to have to create some kind of button for one controller another.
thank you ;) -
The button (knob) is just a visual representation. Think of it as definition of public available properties of your algorithm.
-
@Christoph-Hart I see, so if I want for example to link parameters for example, wet reverb button, freq 2 volume of an eq, + a gain .. (for example). I create a configurable button in the script node which will be connected to my reverb eq gain .. and suddenly on my graphical interface, I simply assign a single button script fx / button parameter. a bit like a macro in the end. I understand :)
-
@Christoph-Hart wait, what? i've never used
DspNetwork.setForwardControlsToParameter(true)
but it still work without -
Ah it might be the default behaviour, would make sense actually. Good one past Christoph!
-
@Christoph-Hart said in scriptnode question:
DspNetwork.setForwardControlsToParameter(true)
Hi Christoph, I tried to add that line to the OnInit but I get an error of unknown function...
I bet I'm doing something wrong but I don't know what -
This post is deleted! -
@alepan said in scriptnode question:
Hi Christoph, I tried to add that line to the OnInit but I get an error of unknown function...
I bet I'm doing something wrong but I don't know whatFor two reasons, the first being
DspNetwork
is a generic name, use your own variable
The second is a typo (Parameters with an 's')const var mySuperDsp = Engine.createDspNetwork("superDSP"); mySuperDsp.setForwardControlsToParameters(true);
But as Christoph said above and following my small experience with DSP network, you simply don't need that additional line... Parameters are directly available from the script straight away like any other module by default
@Christoph-Hart It is effectively true by default:
bool forwardControls = true;
-
@ustk Thanks a lot mate, you're always very supportive and quick in your answers, I appreciate that!