bitfocus / companion

Bitfocus Companion enables the reasonably priced Elgato Streamdeck and other controllers to be a professional shotbox surface for an increasing amount of different presentation switchers, video playback software and broadcast equipment.
http://bitfocus.io/companion
Other
1.46k stars 489 forks source link

Internal linear interpolation function #2930

Open DaChiefmeister opened 6 days ago

DaChiefmeister commented 6 days ago

Is this a feature relevant to companion itself, and not a module?

Is there an existing issue for this?

Describe the feature

One feature I find myself needing on many shows is a way to fade a value over time. Ideally companion would have a function for it's scripting that let's you supply the starting value, the ending value, the step, and how long the change will take place and then companion would retrigger the button or message on each step.

While this could be done in a module, I feel the functionality is something that might be useful as a generic action within companion

Usecases

An example is this, I have a Media server layer who's brightness is controlled by the osc address: /d3/layer1/brightness. The value is 1-0. I would like to basically add an action lerp. It would take start value 0, end value 1, how long it should fade 5000ms, and the step .01. When I press the button, I would want companion to run a loop of that function over the course of 5 seconds, sending a message every 50ms with the next step to the given osc address.