How to use the webmidi.getInputByName function in webmidi

To help you get started, we’ve selected a few webmidi 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 garrensmith / abletonpush / src / index.js View on Github external
setupPush () {
    const push = this;
    push.output = WebMidi.getOutputByName('Ableton Push 2 User Port');
    push.input = WebMidi.getInputByName('Ableton Push 2 User Port');
    if (!push.input || !push.output) {
      log('push not connected');
      push.emit('push:failed');
      return;
    }

    push.input.addListener('sysex', 'all', (e) => {
      log('sysex', e);
    });

    // Listen to control change message on all channels
    push.input.addListener('controlchange', 'all', (e) => {
      log('Received \'controlchange\' message.', e);
      if (e.controller) {
        const name = e.controller.name;
        const number = e.controller.number;

webmidi

WEBMIDI.js makes it easy to talk to MIDI instruments from a browser or from Node.js. It simplifies the control of external or virtual MIDI instruments with functions such as playNote(), sendPitchBend(), sendControlChange(), etc. It also allows reacting to

Apache-2.0
Latest version published 4 months ago

Package Health Score

80 / 100
Full package analysis