Help with jit.cellblock output data. Urgent!

o.trickett's icon

Hey list, i've made a lil motion tracking program, outputting 4 track points (using cv.jit externals) to a jit.cellblock. It displays the x and y coordinates of each track point live, however I can't seem to output this data to be used for MSP. I want to use a scale to make 0-1 to aprox 200-1000, to be read as pitch for the x axis and volume for the y.
Does anyone know how to output data from this object so it can be used, for example, as an argument for cycle~?
This project is in very soon, I'm guessing i'm just being an idiot and missed something though!

Many thanks.

ps. Here's the patch, it's pretty rough atm, am neatening later.

Max Patch
Copy patch and select New From Clipboard in Max.

MIB's icon
Max Patch
Copy patch and select New From Clipboard in Max.

try something like this...

I didn't comment the code, so if there are questions let me know.

o.trickett's icon

Ah thats a much better way of doing it, thanks! However i did want to add other functions such as some audio sampling. My original idea was to group coordinates, ie all the corners, and select them to bang certain messages. So essentially having some form of switcher, such as a matrixcntrl to toggle functions. I'm guessing the scale+cycle subpatcher could be utilized to control this/do more audio functions?

cheers

MIB's icon
Max Patch
Copy patch and select New From Clipboard in Max.
o.trickett's icon

Thanks for the help. I'm a little new to max, was wondering if you could help explain the expr message? I understand it's function but am a bit confused on the coding, I want to be able to create more areas of the matrix to bang different things.

MIB's icon

did you study the helpfile for expression? Do you have any specific questions? I mean, I can do it for you, but you won't learn, so give it a try and post back what you have with specific questions/problems and I will be happy to help out further...