Hi everyone, I have a unique programming challenge. For simplicity I will start this in 2 dimensions but the eventual aim is to scale this up to 3D (4 including time). Imagine you are moving your mouse across the screen, I would like to map a series of note to that movement, not just horizontally but vertically as well so that it is looking at the path of travel in those dimensions and mapping notes to that. Now this is the bit I am having trouble with, imagine you move your mouse without too much precision but following a basic (if messy) path, something like the movements I made with my pen in this jpeg:
I would like to program a patch that looks at all of the paths and identifies the strongest route over all, the path most trodden. I would like that to be the path the notes are mapped to, and I would like the patch to punish the user when s/he strays from the path by more than a certain amount by not playing back notes.
depending on the details of what you want to achieve, it might be worth reducing the trajectories as parameterized functions of time, and then getting the derivative. This might provide a more meaningful analysis than a set of mouse positional values…