interface for the novation launchpad mini, for node and the browser
npm install lunchpadLunchpad is a interface for the Novation Launchpad Mini.
![]()
Lunchpad runs in the browser and on node.js.
`````
npm install lunchpad
If you are running this module on node.js, you'll need the additional midi dependency:
````
npm install midi
``javascript
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))
```