C++ node parameter skew
-
@Christoph-Hart Is that possible? I tried adding the property in the XML but the parameter isn't affected...
On about the same topic, changing a parameter range in C++ isn't reflected in the node. So you need to set it manually...
-
@ustk I don't think so, just like with a Faust node... use the minmax node if you need Skew, but keep in mind that its input needs to be 0-1 as the node itself doesn't react to changes of the Value parameter range (which is a shame).
-
@aaronventure Oh wait! It was as easy as
p.setSkewForCentre()
-
It's reflected as long as you load in a fresh node. Since the parameters get saved in the hise project any existing nodes will keep their range.
Skew can be set in a c++ node, but I tend not to.
-
@griffinboy said in C++ node parameter skew:
Skew can be set in a c++ node, but I tend not to.
Is there a particular reason you don't?
-
@ustk
It doesn't carry up the chain well. For example if I want a script controlling this knob, it won't follow the skew. It's my understanding that you'll have to write in the skew for each knob every step of the way. I prefer to simply interpret the value at the final stage and do it once with a transformation. I like to tweak my scaling throughout development so I keep it in one place. Plus I often work in percentages anyway just in case I need to do math stuff with it.If you want to know how to do the skew I can hunt the line down for you in an older script.
-
@griffinboy Oh ok I see!
I made a skew algorithm a while ago, but it appeared I didn't need it... I'm ok with either setting the skew while creating the parameter or deal with it in the network anyway -
@griffinboy you should use the unscaler node. So, your script controls the network parameter, which goes into an unscaler node, which goes wherever. It then sets its target to the raw value, ignoring range and skew of the target.