Calling a lua function from the Function control input

Trying to work this through on my new Elecrtra One. Can someone please help me here. Let’s say I have a lua function xyz(valueObject, value).
I assume I can attach the function to my desired Selected Control in the GUI tool using the FUNCTION line? But I’m not sure how the input parameters get sent for the Selected Control I’m configuring. Are (valueObject, value) just defaulted if I just enter xyz for the function? Or maybe I don’t use the FUNCTION line and define all the objects in the lua code and trigger it all from there? Thanks.

Hi, yes the E1 documentation calls these “Value function callbacks”. See Preset Lua extension | Electra One Documentation. The (valueObject, value) arguments are injected by the Preset Lua extension when your “xyz” function callback is called if and when the control value changes (e.g you have turned the related pot).

The valueObject parameter is one of these guys: Preset Lua extension | Electra One Documentation

1 Like

I thought it was something like that. Could not find it in the docs I was looking at. Thanks for the references!

1 Like