lib/connect.js
function connect() {
    return new Promise(function (resolve, reject) {
        navigator.requestMIDIAccess().then(function (access) {
            resolve(new Driver(access));
        }).catch(function () {
            reject(new Error('MIDI access denied'));
        });
    });
}
function connect() {
    return new Promise(function (resolve, reject) {
        navigator.requestMIDIAccess().then(function (access) {
            resolve(new Driver(access));
        }).catch(function () {
            reject(new Error('MIDI access denied'));
        });
    });
}
function connect ( ) { return new Promise ( function ( resolve , reject ) { navigator . requestMIDIAccess ( ) . then ( function ( access ) { resolve ( new Driver ( access ) ) ; } ) . catch ( function ( ) { reject ( new Error ( 'MIDI access denied' ) ) ; } ) ; } ) ; }
Establish a connection to the MIDI driver

@return {Promise} A connection promise
Establish a connection to the MIDI driver