I have to choose which hand and fingers that I will use, what information do I need, what data I can get from Leap Motion, etc. After some time poking around its documentation, I found some useful information on how to use it for my need. Image below is what Leap Motion see from its perspective.
Hand image from Leap Motion
I make this hand form because this form is the closest one with the actual thing when you hold Angklung. From this image you can see that there are three fingers that I can use as a reference. These fingers are the most visible from leap motion point of view and after some trial that I do, I choose thumb as my reference. Why thumb? It was because pinky finger can be mistaken as other fingers and sometime index finger not really visible when I shake.
I can’t stop here, I have to choose which point/position that I will use in thumb. According below image from Leap Motion documentation there are 5 (five) position that I can use and another 3 (three) bone type that I can use too (because I can get its center position).
I want to use “btipPosition” but I think it can be unclear. I want to get the closest point to “btipPosition” and the closest point is the center point of Distal Phalanges bone. So I decided to use the center point of Distal Phalanges.
To get this point/position is not that difficult in code, the challenge now is how to get the movement velocity of this point/position. Using this velocity then I can define some shaking parameter for my project.