Forums > MaxMSP

Training max to recognise the path most trodden…

Sep 15 2012 | 12:21 pm

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.

Any ideas?

  1. IMAG0097.jpg


Sep 15 2012 | 3:04 pm

I just happened to revisit zsa.descriptors yesterday. zsa.dist might be a starting point: http://www.e–

I also know Hidden Markov Models are used for training and recognizing patterns, also in Max, but I have no examples of that.

Sep 15 2012 | 8:22 pm

Yeah, just found this in relation to HMM

Most of the line i drew with my pen might be recognised as the same "pattern" though…

Sep 16 2012 | 3:27 pm

I’ve been told that I might need to look at the line/curve of best fit, would that be right?

Sep 17 2012 | 12:43 am

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…

Viewing 5 posts - 1 through 5 (of 5 total)

Forums > MaxMSP