Pulse arbitrary "Constant CHOP" channel?

Hi there,

Let’s say there’s a Constant CHOP called ‘const’.
One can easily control channels’ values like this:

constOp = op('const)
chanName = 'someChannel'
valueName = 'value' + str(constOp[chanName].index)
getattr(constOp.par, valueName).val = 0.3

Now, let’s say I want to “pulse” this value, i.e. set it high (1) for 1-2 frames and then bring it back to low (0). How one should write python for this?
Is there an option to schedule a callback to be called few frames later where this value can be cleared out?

Thanks,

Yup, check our the pulse() method in the Par class
derivative.ca/wiki088/index. … =Par_Class
You’d replace your

getattr(constOp.par, valueName).val = 0.3

with

getattr(constOp.par, valueName).pulse(some args)

thanks, malcolm!