Forums > MaxMSP

How to get the positions in aka.leapmotion?

November 2, 2013 | 10:14 am


I need to get the palm positions of both hands in aka.leapmotion at the same time.

But, when I put my hands above the leap motion, aka.leapmotion gives the list of only one hand position.

I think that aka.leapmotion does not give the list for each hand position at the same time.

How can I get the positions of both hands simultaneously?

November 2, 2013 | 3:59 pm

I wrote an external to do just that. Create two instances of the external and throw a 0 or 1 into the right inlet depending of if you’re using your left or right hand for that instance (0 = left). The zip file also includes a M4L device that I made where you can map your palm position to any device parameter. Here it is. Let me know what you think.

November 2, 2013 | 11:18 pm

D’Oh! Just realized that didn’t include the help file with the object. It’s fairly straight forward: just set the hand flag on the right inlet (0 or 1) and bang the left inlet to get the X, Y, and Z coordinates for the specific hand. Here’s the help patch.

– Pasted Max Patch, click to expand. –


November 3, 2013 | 7:34 am

It works well!
Thank you, John:D
This is definitely what I wanted.
The help patch is very helpful to understand your external.

I really want to know how the external works, because I’ll extend it to get other positions of besides palms later.

The key is how to classify left and right hand. In your external, 0 inlet can detect left hand and 1 inlet can detect right hand, when both hands are above the leap motion. I’d like to know the main structure for classifying both hands in your external.

Thank you, again.

November 3, 2013 | 8:21 pm

I’d love to say that I worked out a complicated algorithm to check which hand is being used, but it’s actually part of the LeapMotion API. All said, the aka.leapmotion is a better external and the author was kind enough to put his source code online; my stuff is really just an extension of that code that implements a few features that I needed from the Leap such as keeping hands independent and gesture recognition. I’m actually designing a set of externals for the Leap that I’ll post as a project whenever I get the chance to finish and debug them. I’ll post the source code with externals as well.

November 4, 2013 | 8:15 am

That is a nice job, I think.
I really hope to see your externals soon.

I just wanted to know the simple introduction of your way to track the both hands at the same time:) because I failed to do it using aka.leapmotion without working with additional external.
(Actually, I’m not familiar with making external)
Now, your external is very helpful for me though.
I really appreciate it.
And thanks for your kind post, again.

November 5, 2013 | 1:33 am


may I ask, what is the best current solution to work with the leap motion on windows?



November 5, 2013 | 6:13 am

I haven’t written my externals for windows yet and last I checked, aka.leapmotion is also OSX only. In that case, you’ll probably have to go the MIDI/OSC route (no pun intended). Doing a quick survey of the Leap Motion App Store, it looks like your best bets are going to be Geco MIDI and ManosOSC. In that case you’d just throw on one of those programs and use udp routing (possibly in combination with the CNMAT OSC externals) or normal MIDI routing to get data from the Leap.

November 6, 2013 | 1:37 am


I found the window external for leapmotion on max object database:
You can see "sekd.leapmotion" that was built on java.
I have not used it yet, so I cannot tell you about difference with OSX externals.

You can visit for downloading, here:

Or, you can download it from what I attached.

November 20, 2013 | 7:18 am

Thanks Kiske4, I’m trying it already. It does work on windows.

August 30, 2014 | 3:04 pm

Will this object work for max 6.1?

August 30, 2014 | 11:38 pm

It’s very nice
Thank you.

August 31, 2014 | 3:35 am

To the OP : I’ve installed V2 beta drivers for the Leap and it now detects both hands.

November 3, 2014 | 9:11 pm


I’m really new to coding and using Leap Motion. I am able to get numbers/positions from my Leap Motion into Max, but how can you get Max to recognize gestures? If I want Max to recognize a pinch between my forefinger and thumb as a command, how do I get Max to interpret "if my finger and thumb start at these coordinates and then end on these other coordinates" that is a pinch? Any help is appreciated. :) Thanks!

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

Forums > MaxMSP