GithubHelp home page GithubHelp logo

node-leap-midi's Introduction

Node-Leap-MIDI

A NodeJS server converting Leap Motion input to MIDI

Screenshot

Simple demo - see the video (with sound) at https://vimeo.com/182820680

This nifty little server turns your Leap Motion controller into a MIDI instrument or controller. I've used it successfully with Ableton Live 9, but should work pretty well for a variety of MIDI-based applications.

Getting Started

You must have NodeJS set up on your computer. I'd recommend visiting https://nodejs.org/en/download/

This is a command-line tool, so you'll need to be familiar with the basics of command line usage on your system.

Download or clone this repo, and be sure to change directory into it (from your console), e.g.

cd leap-midi

Then install all the dependencies:

npm install

Now you should be ready to go!

Modes of operation

The server can operate in two fundamentally different ways (for now).

Instrument mode works for only one hand at a time. It sends MIDI note on/off messages as the height of your hand changes. The height of the hand determines the pitch which is sent. You can also rotate your hand left and right or open and close your fist to send Control Change messages - these allow you to affect various aspects of the tone of the instrument or any effects you'd like to apply.

Controller mode works for one or two hands. It doesn't send notes - only Control Change messages. At the moment, it works like this: the height of hand 1 sends a single Control Change value from 0 to 127 - this is intended to be used for reverb/delay amount. If a second hand is seen by the Leap, one Control Change value is instantly set to 127 and the height of hand 2 is mapped from 0 - 127 - the idea is to make a Frequency Shift Dry/Wet value get turned fully "on" when a second hand is spotted (and reset to 0 as soon as it leaves), while the height is mapped to the Frequency Shift center pitch value. But I'm sure it could be adapted for other uses.

Basic usage

Instrument mode

The default mode is instrument, so just type:

node .

which is exactly equivalent to:

node . --mode instrument

Controller mode

For controller mode, launch like this:

node . --mode controller

Advanced

Many default settings (e.g. number of notes to use in instrument mode, or the Channels used for Control Change messages) can be changed on startup, too. I'll document these more thoroughly soon.

node-leap-midi's People

Contributors

anselanza avatar mmmid avatar

Watchers

 avatar  avatar

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.