How do I change the expression of a specific parameter

Hello everyone,
I am trying to change the expression of a parameter. Let me explain better: I am trying to control the same parameter individually and globally, so I am building software that saves the parameters of 4 videos. So I am trying to control this parameter individually and by a master, that controls all the videos. The problem is: When I bind the parameter by the master I can’t control the parameter individually.
I tried to switch two expressions by switch DAT operator but doesn’t work well because that gives me a string (True or false) and I need the values 0 and 1. Anyway, I think that isn’t the better way to do it. Does anyone know a better approach?

Consider building a control that runs scripts to change either the parameter’s mode (Par.mode) or its bind expression (Par.bindExpr) or both.

op(‘constant1’).par.colorr.mode = ParMode.CONSTANT
op(‘constant1’).par.colorr.mode = ParMode.BIND
op(‘constant1’).par.colorr.bindExpr = “op(‘constant2’).par.colorr”

1 Like

Thank you @Ivan to reply my question.
So, let me understand better, if i change the parameter mode by script i can insert different expressions or controls in the same parameter?
I tried to create a script with your examples but doesn’t worked :confused:

If you post your network I can help you debug

I tryied again and gone right this time kkk thank you @Ivan

1 Like

Reviving an old post to ask a follow-up. Is there a way to set the ParMode to EXPRESSION while also setting which operator/channel it’s referencing? I see that the bindExpr allows you to set an operator via expression but I’m unclear the syntax (or if it’s possible) to set the mode to EXPRESSION and set the operator.

UPDATE: Figured out my own question, for reference for others.
op(‘constant1’).par.colorr.expr = “op(‘constant2’).par.colorr”

1 Like