Granjow / launchpad-mini

Node.js library for the Novation Launchpad Mini
145 stars 25 forks source link

Example doesn't color top row (special keys) on original Launchpad #1

Closed kasbah closed 7 years ago

kasbah commented 7 years ago

Just tried the example with the original Launchpad (non mini). Seems to work fine. Might want to change the name/description. Thanks very much for this!

Granjow commented 7 years ago

Thanks @kasbah for testing! Glad to hear that. Are there additional features that I could add for the non-mini? I think it has more colours; you probably cannot use them?

kasbah commented 7 years ago

No I think you are thinking of the newer models. Same dual LED (green, orange, red) color scheme I believe. Actually... just noticed the top row of keys are not registering.

If I remember correctly these are implemented as CC messages in the original, is that not the case for the mini?

kasbah commented 7 years ago

I added a console.log to the example and it does register the presses but it doesn't color the keys.

'use strict';
const Launchpad = require( 'launchpad-mini' ),
      pad = new Launchpad();

pad.connect().then( () => {     // Auto-detect Launchpad
    pad.reset( 2 );             // Make Launchpad glow yellow
    pad.on( 'key', k => {
        console.log(k);
        pad.col( pad.red, k );  // Turn on buttons on press
    } );
} );
Granjow commented 7 years ago

Okay! I will look into this as soon as I have time. Might need your help a bit as I only have a Launchpad Mini to test :)

Granjow commented 7 years ago

@kasbah Finally. Sorry for the delay, maybe already too late. The bug was just that the key event did not return the correct object – using the .col command manually would have worked.

Btw, I saw you are working on the Braille terminal. Very cool. Would love to join if Bristol were a bit closer to Switzerland :)

I will publish a new version in a bit.