How to use the easymidi.getInputs 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 / scripts / monitor_all_inputs.js View on Github external
var easymidi = require('easymidi');

// Monitor all MIDI inputs with a single "message" listener
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(', '));
  });
});
github samhiatt / node-ableton-push2 / scripts / show_ports.js View on Github external
var easymidi = require('easymidi');

console.log('Input ports: \n\t'+easymidi.getInputs().join('\n\t'));
console.log('Output ports: \n\t'+easymidi.getOutputs().join('\n\t'));

process.exit(0);

easymidi

Simple event-based MIDI messaging

MIT
Latest version published 1 year ago

Package Health Score

52 / 100
Full package analysis