Giter Site home page Giter Site logo

emchei / leapmotion-midi Goto Github PK

View Code? Open in Web Editor NEW
4.0 3.0 2.0 2 MB

This is project which involves a leap motion sensor as midi device.

License: MIT License

HTML 10.96% C# 89.04%
midi-controller leap-motion-sdk leap-motion csharp leap-motion-sensor palm midi-device data-frame

leapmotion-midi's Introduction

Leap motion-MIDI

Alt Text

This is project involves a leap motion sensor as midi device.

The leap motion sensor uses optical sensors and infrared light which operates through close proximity with high precision for tracking and recognizing hands and fingers. The API released by the Leap motion World allows developers to program and customize some functionality that can performed by the sensor. API stands for Application Program Interface, it contains predefined functions or methods (in the case of C#) that are generally saved as a library. The leap motion SDK (software development kit) provides a native interface for getting data frames from the leap motion service. The leap motion SDK also provides tracking data via web socket interface using a sever client approach. The native interface grants to the developer access data frames from the optical sensors, initiate connection between an operating system and a connected leap motion via USB. The native interface is also a dynamic library that allows a developer to create leap-enabled applications. The focus of this project is to track hand movement in the field of view (FOV) of the leap motion sensor. The track parameters of the Leap motion API were the Hand and Finger data.

The parameters computed from the hand data frame are of the following:

  1. Hand type: first and second hand that depends on the first hand recognized by the leap motion sensor per frame.
  2. Palm position: measuring the center of the user palm from the origin of the leap motion’s coordinate system.
  3. Grab strength: measuring the probability of a grab hand pose or an opened palm.
  4. Palm velocity: measuring how fast the user’s hand move per second.
  5. Palm rotation or orientation: computation of the roll, yaw and pitch angle of a palm with respect to the orientation of a palm in a 3D space. Rotation of a palm from front to back axis are computed for the roll. Side-to-side axis rotation are computed for the pitch, and rotation about the vertical axis are computed for yaw.

Grab strength

Alt Text

Visualizer of hand and finger per video frame

Alt Text

The parameters computed from the finger data frame are of the following;

  1. Type of finger: recognizing the index finger and middle finger of the user’s finger.
  2. Finger Direction (vector): computing the vector coordinates of the two fingers. The purposes of computing these two parameters from each frame captured was to recognize if the user’s fingers are spread in the FOV of the sensor. The coordinate vectors from the index finger and middle finger are used for calculating the product Euclidean magnitudes (length) and through geometry approach the dot product of the two length are calculated in order to find the arccosine of the angle between the two fingers.

The angle between the index and middle fingers

Alt Text

Musical Instrument Digital Interface(MIDI) protocol

Computed values from the hands and fingers data frame are mapped into the resolution of 1- 127. This was done because midi protocol used to communicate with the external application Ableton.

Channel Command MIDI Channel Control Number data byte 1 Value byte 2
0xB0 1-15 1-127 1-127

Table of the midi protocol used in the C# project

Alt Text

Testing Leap motion as midi device at ontdekfabriek Eindhoven

Please click on the image below to watch video, testing the system

Test Leap motion as midi device at ontdekfabriek Eindhoven

Click on this link to videos recordings during development stages

leapmotion-midi's People

Contributors

emchei avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

kingmax hyeongd

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.