Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/ben-eb/midify-numark-mixtrack-pro

midify compatible map for the Numark MixTrack Pro.
https://github.com/ben-eb/midify-numark-mixtrack-pro

Last synced: 7 days ago
JSON representation

midify compatible map for the Numark MixTrack Pro.

Awesome Lists containing this project

README

        

# [midify]-numark-mixtrack-pro [![NPM version](https://badge.fury.io/js/midify-numark-mixtrack-pro.svg)](http://badge.fury.io/js/midify-numark-mixtrack-pro) [![Dependency Status](https://gemnasium.com/ben-eb/midify-numark-mixtrack-pro.svg)](https://gemnasium.com/ben-eb/midify-numark-mixtrack-pro)

> [midify] compatible map for the Numark MixTrack Pro.

Install via [npm](https://npmjs.org/package/midify-numark-mixtrack-pro):

```
npm install midify-numark-mixtrack-pro
```

## 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 MixTrack Pro, 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](https://github.com/substack/node-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](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.

```js
var Midify = require('midify');
var mixtrack = require('midify-numark-mixtrack-pro');

navigator.requestMIDIAccess().then(function(midiAccess) {
var midiIn;
var midiOut;

// For brevity, we are just assuming one MIDI device is connected
for (var input of midiAccess.inputs.values()) {
midiIn = input;
}

for (var output of midiAccess.outputs.values()) {
midiOut = output;
}

var midify = new Midify({
midiIn: midiIn,
midiOut: midiOut,
controller: mixtrack
});

midify.on('*', function(event) {
console.log('triggered', event, 'event');
});

}, function() { console.error('MIDI access unavailable'); });
```

## Mapping

![mixtrack](mixtrack.png)

Note that the mic gain control at the bottom of the device does not emit any MIDI messages. 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))


2
deckX.treble.change



3
deckX.mid.change



4
deckX.bass.change



5
deckX.smallCue.on / deckX.smallCue.off
deckX.smallCue.on / deckX.smallCue.off


6
cueGain.change



7
cueMix.change



8
browse.change (when rotating the control)
browsePress.on / browsePress.off (when pressing the control in)



9
back.on / back.off



10
deckX.load.on / deckX.load.off



11
deckX.volume.change



12
masterGain.change



13
crossfader.change



14
deckX.wheel.change (when rotating the wheel)
deckX.wheelTop.on / deckX.wheelTop.off (when pressing the surface of the wheel)



15
deckX.scratch.on / deckX.scratch.off
deckX.scratch.on / deckX.scratch.off


16
deckX.play.on / deckX.play.off
deckX.play.on / deckX.play.off


17
deckX.stutter.on / deckX.stutter.off
deckX.stutter.on / deckX.stutter.off


18
deckX.cue.on / deckX.cue.off
deckX.cue.on / deckX.cue.off


19
deckX.sync.on / deckX.sync.off
deckX.sync.on / deckX.sync.off


20
deckX.pitch.change
deckX.pitch.on / deckX.pitch.off (controls the LED next to the fader)


21
deckX.pitchUp.on / deckX.pitchUp.off
deckX.pitchDown.on / deckX.pitchDown.off



22
deckX.keylock.on / deckX.keylock.off
deckX.keylock.on / deckX.keylock.off


23
deckX.kill{{type}}.on / deckX.kill{{type}}.off (where type is Treble, Mid, or Bass)
deckX.kill{{type}}.on / deckX.kill{{type}}.off (where type is Treble, Mid, or Bass)


24
deckX.delete.on* / deckX.delete.off
deckX.delete.on* / deckX.delete.off


25
deckX.effect.on / deckX.effect.off
deckX.effect.on / deckX.effect.off


26
deckX.select.on / deckX.select.off



27
deckX.control{{num}}.on / deckX.control{{num}}.off (where num is 1 or 2)



28
deckX.manual, deckX.reloop, deckX.in, deckX.out (all are .on/.off states)
deckX.manual, deckX.reloop, deckX.in, deckX.out (all are .on/.off states)

* NB: *Some* controllers may show deck A as having a 'view' button, and deck B as having a 'tick' button in this place. However, the schema defines this as a delete button, and for consistency it is better to name this the same thing.

## License

MIT © [Ben Briggs](http://beneb.info)

[midify]: https://github.com/ben-eb/midify