My objective is to create a xy pad in vanilla pure data (so I can use mobmuplat on my android). I would like to process the data so that when you swipe across the xy pad, pure data computes the vector between where your finger currently is and where it was recently (sort of a hazy definition but I am not sure the best way to do this yet).
The angle of the vector from the y axis would be mapped to the pitch of an oscillator and the magnitude of the vector mapped to the amplitude of the oscillator.
I hacked something together like this in processing, but it was full of glitches and pops. I just picked up puredata because I ran into mobmuplat and saw that getting an instrument controlled the way I describe above onto a phone might not be a pipedream for me.
I am trying to put together a pure data patch where readouts from an xy pad are fed into x and y tables/arrays with a clock incrementing the index of the tables at almost an audio rate. One pair of xy values are read out from the table along with another offset backwards by a set amount. My idea here is to get a really simple approximation of what the vector is that best describes the movement of a finger by just using two values, the current one and one in the past
I am posting here because I am not sure if I am approaching this the right way. Should I be using metronome or something else? Am I just going to melt pure data if I try to do this or am I just doing it horribly wrong?
Here is my currently terrible patch, forgive me if I am making some pretty fundamental errors but any help/advice would be super appreciated!
xy_mightwork_test.pd