New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

korg-nano-kontrol2

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

korg-nano-kontrol2

Node.js/Browser library for KORG nanoKONTROL and nanoKONTROL2

latest
Source
npmnpm
Version
0.3.0
Version published
Maintainers
1
Created
Source

korg-nano-kontrol2

A Node.js/Browser library for KORG nanoKONTROL2, written in Typescript. Supports both CommonJS and ES Modules.

Forked from korg-nano-kontrol v0.2.9 and updated.

Features

  • Supports KORG nanoKONTROL2
    • The KORG nanoKONTROL's operation is untested
  • TypeScript definitions included
  • Works in both Node.js and Browsers
  • Dual module support: CommonJS (require) and ESM (import)

Install

% npm install korg-nano-kontrol2

Samples

Usage

Connect

find nanoKONTROL2

import { korgNanoKontrol2 } from 'korg-nano-kontrol2';
import type { KorgDevice } from 'korg-nano-kontrol2';

korgNanoKontrol2.connect()
.then(function(device: KorgDevice){
  console.log(`connected! + ${device.deviceName}`);
  // do something
})
.catch(function (err: unknown) {
  console.error(err);
});

Register Events

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

device.on('knob:1', function(value: number){
  console.log(`knob:1 >>> ${value}`);
});

device.on('button:play', function(value: boolean){
  console.log(`button:play >>> ${value}`);
});

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

device.on('knob:*', function (this: KorgDevice, value: number) {
  console.log(`${String(this.event)} => ${value}`);
});

device.on('button:**', function (this: KorgDevice, value: boolean) {
  console.log(`${String(this.event)} => ${value}`);
});

Close

device.close();

Debug

enable debug npm

for Node.js

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

for Browser

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

Build

% npm run build
% npm run buildSample

% npm run watch

Test

% npm install

% npm test

Keywords

midi

FAQs

Package last updated on 14 May 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts