onTouch sending twice on MultiXY

I'm building an interface with several MultiXY pads with send('/uniqueTouchMsg') in the onTouch field - they seem to be firing twice on every touch. Is anyone else experiencing this behaviour? I was on v1.18 until yesterday, updated to 1.20 but am still experiencing the problem...

Also, if I have two points on a multiXY pad and I touch one or both of them, an onTouch message is sent - which is great because I can activate my script with one finger/point on a multiXY. But - and perhaps this is intentional behaviour - if I am in contact with two points and I remove one finger (ie. I'm still in contact with one point) the onTouch message is sent, with the event.type == stop. I'm using this approach to turn on/off synths - touch the multiXY to turn a synth on and immediately gain control of its parameters, stop touching the multiXY to turn the synth off. It would be great if I could activate the synth with two points but then remove one finger and not turn it off suddenly! If this isn't intended behaviour, perhaps these are related issues?

Poking around a bit and posting my findings here as I go...if I include event.handle in the sent message, it only sends the handle on the second of the messages.

event.handle tells you whether the events concerns the widget itself or one of the fingers dots individually:

if (event.handle === undefined) {
  if (event.type === 'start') {
    // multixy touched
  } else {
    // multixy released
  }
} else {
   if (event.type === 'start') {
    // dot n° event.handle touched
  } else {
    // dot n° event.handle released
  } 
}
1 Like

Ah, I understand now - that's actually a very nice feature, thanks very much! :slight_smile: