How to use the webmidi.getOutputByName 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;
github SonyCSLParis / NONOTO / src / renderer / midiOut.ts View on Github external
function midiOutOnChange(ev) {
            if (this.value !== 'No Output') {
                Instruments.mute(true, useChordsInstrument);
                midiOut = WebMidi.getOutputByName(this.value);
            }
            else {
                Instruments.mute(false, useChordsInstrument);
                midiOut = dummyMidiOut;
            }
            log.info('Selected MIDI out: ' + this.value);
        };
github tensorflow / magenta / demos / ai-jam-js / static / src / keyboard / Midi.js View on Github external
this._magenta.instances().forEach((instance) => {
					this._magenta.updatePort(WebMidi.getOutputByName(instance.portName()))
				})

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