2.4.0 • Published 5 years ago
lunchpad v2.4.0
LUNCHPAD
Lunchpad is a interface for the Novation Launchpad Mini.
Lunchpad runs in the browser and on node.js.
installation
npm install lunchpad
dependencies
If you are running this module on node.js, you'll need the additional midi dependency:
npm install midi
invocation
node / browser
const launchpad = require('lunchpad')
const Color = launchpad.Color
launchpad.initialize().then(interface => {
//set the color of the coordinate 0/0 (bottom left) to the color Amber
interface.setSquare(0, 0, Color.getColor(3, 3))
//register an event handler that will trigger whenever one of the square buttons is pressed
interface.on('input', (x, y) => console.log(x, y))
}, error => console.log(error))