How to use the easymidi.Input function in easymidi

To help you get started, we’ve selected a few easymidi examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github samhiatt / node-ableton-push2 / dist / Push2.js View on Github external
constructor(portName = 'Ableton Push 2 User Port', virtual = false) {
        super();
        // console.log(`Initializing ${portName}`);
        this._input = new easymidi.Input(portName, virtual);
        this._output = new easymidi.Output(portName, virtual);
        this._input.on('message', (msg) => {
            // Emit all messages as 'message' events, plus each individual type separately.
            this.emit(msg._type, msg);
            this.emit('message', msg);
        });
    }
    /**
github samhiatt / node-ableton-push2 / scripts / monitor_all_inputs.js View on Github external
easymidi.getInputs().forEach(function(inputName){
  var input = new easymidi.Input(inputName);
  input.on('message', function (msg) {
    var vals = Object.keys(msg).map(function(key){return key+": "+msg[key];});
    console.log(inputName+": "+vals.join(', '));
  });
});

easymidi

Simple event-based MIDI messaging

MIT
Latest version published 10 months ago

Package Health Score

59 / 100
Full package analysis