I want to use lemur to control a panning device in ableton live. see image below.
From what I can see I need to somehow convert the XY data sent from a lemur device to control the azimuth and radius parameters of the max 4 live plugin.
What I would do is create a monitor object showing x, y, atan(y/x), and r. Then move the ring area around and see what's being produced. Adjust the atan result as necessary based on addition checks against x and y and per that wiki page.
Forgive me but I've not done any coding before and Im a newb with Lemur. I really need some help using that code. Would you take me through the steps please?
I looked at it for about 10 minutes yesterday. I don't have much time this week or next; maybe someone else can jump in.
The RingArea may not do exactly what you want in the sense that the ring always moves back to the middle (or wherever you set the attractors). From you example, it looks like you want the ring to stay where ever you let go. The Multiball object (using only 1 ball) may be a better match.
Also - what you do want to send to Ableton? MIDI, OSC, what range of values? Is the azimuth sent as 0-127 or something else?
There's a lot of questions that maybe someone with familiarity with Abelton might be able to help with to move this along. The math to calculate azimuth is a bit tricky in that the Lemur objects use the lower left corner as (0,0) and the upper right as (1,1). The RingArea center is (0.5, 0.5) so the math might have to take into account those offsets.
Those are just some of the things that need thought.
to make the ring area behave like a static panner i have used the following in the objects behaviour box:
friction=z
speed=z
I think using midi will be fine especially as its for panning, the low resolution steps shouldn't be audible. Maybe OSC would be better in the long run but I want to keep things simple and just get something working to start with.