[Feature Request] Control touched global callback

It would be very useful to have a global callback which is fired whenever a control is touched via knob or screen. This callback would provide the control id as a parameter.

The use case that I have is creating a map between an external controller and the controls in the E1.

a global callback via the knob exists (they are called ā€˜potsā€™ in the documentation)

itā€™s called ā€˜onTouchā€™ or something. You need to subscribe to the service first in lua. Itā€™s in the documentation.

Not sure there is a callback for ā€˜onScreenā€™. if you find it, let it know ok?

Iā€™m currently using the onPotTouched callback, but the interaction for my use case isnā€™t the best. Better would be onControlTouched, which is a reasonable contract ā€œif this control is interacted with let me knowā€

Well, Iā€™m also in favor of an onControlTouched, for instance to show help texts.

Indeed, thatā€™s a nice use case. Out of curiosity, is there already a way to write some overlay text which might span multiple controls?

If you define a group label across the top of 2 or 3 controls, I think you can get 40 characters in there. For debugging, sometimes Iā€™ll throw up 2 labels and have 80 characters for messages.

(I have a preset that does that - donā€™t know if itā€™s public).

1 Like

Yeah that seems usefull.

What is your use case?

I did something like this:

-- Use pot touched to save initial value and then use pot released touched=false 
-- As the last value.  Then calculate how many arrows up or down and send them ??
function events.onPotTouch(potId, controlId, touched)
  --print ("controlId: " .. controlId)
  local myCtl = controls.get(controlId)
  local myVal = myCtl:getValue("value")
  local myMsg = myVal:getMessage()
  currentParameterNumber = myMsg:getParameterNumber() 

   lastTouchValue = myMsg:getValue()

end

I have a ā€œLearnā€ control which when trigger will listen for incoming midi from external devices and then map these to E1 controls. The way I select which controls are being mapped is with events.onPotTouch but this is sub-optimal, due to having to first having to select the right section of the screen and then tapping the pot instead of just tapping the control directly on the touch screen.

Ah I see. I like the idea it is cool,

ā€œmidi learnā€ in a template would be cool and useful in Ableton.
And of course in synths that have assignable controls.

Could you share the code or do you have it in a template available?

Iā€™m using pot touch in the Ub-Xa preset. When you touch a pot it shows briefly the key combination of the control, so you donā€™t have to memorize how on the physical synth the menu diving or shift / hold combinations take place.
In other words it turns the E1 in an interactive manual for the synth

1 Like