midify-numark-dj2go
midify compatible map for the Numark DJ 2 Go.
Install via npm:
npm install midify-numark-dj2go
What it does
midify is a package that combines node's event emitter with the browser's web midi api, to make working with midi messages more palatable. This module provides handlers for the Numark DJ 2 Go, intended to be used with midify, but also provides a reference for the various controls on the device so that it can be used with other modules too!
Example
Bundle this code with browserify. Note that Web MIDI is currently available behind a flag in Chrome, and remains unsupported in other browsers. To enable it in Chrome, go to chrome://flags and ensure that the Web MIDI option is on. As of this writing, MIDI support in Chrome is not quite plug and play capable, so you'll need to shut down Chrome and plug your device in before testing any code.
var Midify = ;var dj2go = ; navigator;
Mapping
Substitute deckX
for deckA
or deckB
depending on which side of the controller the control is.
Input (midify.on(event, callback)) | Output (midify.send(event)) | ||
---|---|---|---|
1 | browse.change | ||
2 | enter.on / enter.off | ||
3 | back.on / back.off | ||
4 | deckX.load.on / deckX.load.off | ||
5 | deckX.sync.on / deckX.sync.off | deckX.sync.on / deckX.sync.off | |
6 | deckX.play.on / deckX.play.off | deckX.play.on / deckX.play.off | |
7 | deckX.cue.on / deckX.cue.off | deckX.cue.on / deckX.cue.off | |
8 | deckX.wheel.change | ||
9 | deckX.pitchUp.on / deckX.pitchUp.off | deckX.pitchDown.on / deckX.pitchDown.off | |
10 | deckX.pitch.change | ||
11 | deckX.pfl.on / deckX.pfl.off | deckX.pfl.on / deckX.pfl.off | |
12 | deckX.volume.change | ||
13 | crossfader.change | ||
14 | masterGain.change | ||
15 | headphoneGain.change |
License
MIT © Ben Briggs