Possible to send polyphonic aftertouch via coordinates on button or keyboard widget

Hi again! I was just looking through the forum here and saw that there is a property locals.touchCoords on buttons now, which is incredibly cool! Was thinking that as you can send already polyphonic aftertouch via o-s-c, there is the potential to create a keyboard with 'pressure plate' type response per 'key' a la the Buchla Easel keys, where sliding your finger up and down the key (or button) could send polyphonic aftertouch for expression. I can see that finger position on the keyboard can currently send velocity data, but is it possible to have this behaviour as effectively a slider and omitt aftertouch on the keys (or via a button) somehow?

This would be next level stuff, with huge potential!

Any help greatly appreciated! :slightly_smiling_face:

You can already do that with a canvas widget actually.

1 Like

Brilliant stuff! Thanks for pointing that out Jean-Emmanuel, I don't know how, but I had completely missed the introduction of the canvas widget to o-s-c, this thing looks insane! I am off to do some exploring of this now, with the help of your example json on the canvas topic, but this looks like just the ticket! :+1:

Edit: Quick question, as I would need the canvas to send a single MIDI 'on' note when the canvas is first touched and an 'off' note when releasing the canvas, would this be achieved somehow using the 'start' and 'stop' events in the 'ontouch' script? Can get a midi note to send from there, but is retriggering with every movement on the canvas!