0.2.9 • Published 8 years ago

korg-nano-kontrol v0.2.9

Weekly downloads
2
License
MIT
Repository
github
Last release
8 years ago

korg-nano-kontrol

Node.js/Browser library for KORG nanoKONTROL and nanoKONTROL2.

Circle CI

Install

% npm install korg-nano-kontrol -save
  • On Node.js, This library depends on midi npm to handle MIDI messages. Please install ALSA libs after run npm install.
  • On Browser, require WebMIDI API support.

Samples

Usage

Connect

find nanoKONTROL or nanoKONTROL2

var nanoKONTROL = require('korg-nano-kontrol');

nanoKONTROL.connect()
.then(function(device){
  console.log('connected!' + device.name);
  // do something
})
.catch(function(err){
  console.error(err);
});

specify device name

nanoKONTROL.connect('nanoKONTROL2').then( function(device){ } );

Register Events

// register specific slider/knob/button events
device.on('slider:0', function(value){
  console.log("slider:0 >>> "+value);
});

device.on('knob:1', function(value){
  console.log("knob:1 >>> "+value);
});

device.on('button:play', function(value){
  console.log("button:play >>> "+value);
});


// catch all slider/knob/button events
device.on('slider:*', function(value){
  console.log(this.event+' => '+value);
});

device.on('knob:*', function(value){
  console.log(this.event+' => '+value);
});

device.on('button:**', function(value){
  console.log(this.event+' => '+value);
});

Close

device.close();

Scene

nanoKONTROL has a scene button

console.log(device.scene); // => return 1~4

device.on('button:scene', function(scene){
  console.log(scene);
});

Debug

enable debug npm

for node.js

% export DEBUG="korg-nano-kontrol:*"

for browser

localStorage.debug = "korg-nano-kontrol:*";

Build

% npm run build
% npm run buildSample

% npm run watch

Test

% npm install

% npm test
# or
% npm run watch
0.2.9

8 years ago

0.2.8

8 years ago

0.2.7

8 years ago

0.2.6

9 years ago

0.2.5

9 years ago

0.2.4

9 years ago

0.2.3

9 years ago

0.2.2

9 years ago

0.2.1

9 years ago

0.2.0

9 years ago

0.1.2

9 years ago

0.1.1

9 years ago

0.1.0

9 years ago

0.0.3

9 years ago

0.0.2

9 years ago

0.0.1

9 years ago