Is it possible to insert expressions onto ramp knot parameters automatically on HDA creation?

   1148   2   1
User Avatar
Member
146 posts
Joined: 9月 2011
Offline
I often use ramps to control things like point sizes, so I can weight the distribution: lots of small ones, fewer large ones etc. The ramps usually end up with three knots: one at each end and then the one that I actually want to play with in the middle.

I discovered you can tie an individual ramp knot to parameters, too, like this:



Now I can control the curve of the ramp with a couple of sliders instead. Dandy. You could probably do the same thing without the ramp (using the spline() function perhaps) but the ramp gives nice visual feedback of how the distribution will look. You can disable the ramp now and control the middle knot with the sliders instead:



I can't do this trick in an HDA though. I can have a ramp hidden somewhere inside the HDA, and control it with the sliders, but if I want the ramp to be visible in the HDA's UI, it seems I can only have its default knot positions be literal values, rather than channel references.

So is there a way I can programmatically put the expression
ch("parm_bias")
onto a ramp parameter's second knot's Value parameter (etc), when the HDA is instanciated?

Attachments:
Screen Shot 2018-10-24 at 09.36.54.png (22.3 KB)
Screen Shot 2018-10-24 at 09.24.23.png (27.7 KB)

User Avatar
Member
8839 posts
Joined: 7月 2007
Offline
you can use OnCreated() section of your HDA to create the expression links

Attachments:
tmp.hda (3.9 KB)

Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
146 posts
Joined: 9月 2011
Offline
Thanks tamte - that's thrown a light on it for me. (And I see you used the same method of permanently disabling a control as I did - makes me feel a bit less naughty for doing it that way now)

  • Quick Links