Noob question: xy coordinates in a message for sliders? please help

Allison Kirsch's icon

Hi, so I'm still new to Max, but I've been muddling my way through the tutorials. For my project I am building a robot that will draw based on a response to its environment. I really want to use the xy coordinates of the screen in cv.jit.track to control the xy movement of the robot. I'm trying to get the location of the tracked point (coming out of the jit.iter object) to lead into a multislider or some way of tracking the x and y coordinates numerically. The problem is that I can't seem to take the variable coordinates being displayed in the message box (coming from jit.iter) and get them to lead into anything that actually seems to read their values (like a slider). I feel like I must be missing something. I need some way of having the changing values as numbers because I'm going to use the values to control my stepper motors with maxuino. Any advice would be greatly appreciated. Thanks so much.

10-25-CV-slider.maxpat
Max Patch
LSka's icon

There are two basic errors in your patch:

1. sending a message to the right inlet of a message box only sets its content, but doesn't trigger any output, so in your patch nothing is actually going to the multislider.

2. as you can see explained in multislider's helpfile, the second outlet outputs only when sending the "fetch

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

What you you want is splitting the list coming from jit.iter into single values. jit.unpack is what you need.

Allison Kirsch's icon

Thank you so much for your response. Your edited patch totally helped. I'm so much closer to making the robot work. Have a wonderful week.