npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

homebrewdj-launchpad-driver

v0.0.5

Published

A driver designed for use with homebrewDJ. For launchpad IO support

Downloads

6

Readme

homebrewdj-launchpad-driver - Launchpad Mini (MK2) Driver for Node from homebrewDJ

Node.js Package

To Play Snake, look here:

Make sure you have a Launchpad Mini MK2. If you have a MK1, MK3, Pro or S and want to help write an issue

  1. download node.js and python
  2. download this repo (via command line or via the download button above)
  3. open the downloaded repo in a command line (cmd.exe (windows), terminal (mac) or bash(linux))
    • if you are on windows, type npm i -g windows-build-tools
  4. npm install
  5. npm run example:snake

About

This Module implements a Interface between a Launchpad Mini MK2 and Javascript Events with node-midi. See the example below on how to use this module

Installation

From NPM

npm i homebrewdj-launchpad-driver

From Source

npm i https://github.com/thallosaurus/homebrewdj-launchpad-driver.git

Requirements

Be sure that you have this installed beforehand the installationprocess will fail

  • OSX

    • Some version of Xcode (or Command Line Tools)
    • Python (for node-gyp)
  • Windows

    • Microsoft Visual C++ (the Express edition works fine)
    • Python (for node-gyp)
  • Linux

    • A C++ compiler
    • You must have installed and configured ALSA. Without it this module will NOT build.
    • Install the libasound2-dev package.
    • Python (for node-gyp)

If you use Windows, you can also use npm install --global windows-build-tools

Examples

const { hDJMidiRecv, hDJRecvEvent, hDJMidiOutputBuffer, getRandomColor, ButtonId } = require("homebrewdj-launchpad-driver");

let h = new hDJMidiRecv();

//Get all connected MIDI Devices
console.log("available devices:");
console.log(h.enumeratePorts());

//For example, we use input 0 and output 0
h.connect(0, 0);

h.on(hDJRecvEvent.MatrixEvent, (data) => {
    console.log("Someone pressed the matrix at", data.pos);
});

h.on(hDJRecvEvent.ButtonPress, (data) => {
    console.log("Someone pressed the button", data.button);
    console.log(ButtonId[data.button]);
});

//Fill a new Array with some random colors
let data = new Uint8Array(hDJMidiOutputBuffer.width * hDJMidiOutputBuffer.height).map(e => {
    return getRandomColor();
});

for (let y = 0; y < hDJMidiOutputBuffer.height; y++) {
    for (let x = 0; x < hDJMidiOutputBuffer.width; x++) {
        let i = x * hDJMidiOutputBuffer.height + y;

        //write buffer onto transfer buffer
        h.boundBuffer.setXY(data[i], {
            x: x,
            y: y
        });
    }
}

setTimeout(() => {
    h.boundBuffer.flush();
}, 5000);

See /examples for more example code

run npm run example:checkerboard or npm run example:snake for a demonstration