async close() {

    // We close the port. This triggers a statechange event which, in turn, will emit the 'closed'
    // event.
    if (!this._midiInput) return Promise.resolve(this);

    try {
      await this._midiInput.close();
    } catch (err) {
      return Promise.reject(err);
    }

    return Promise.resolve(this);

  }
Closes the input. When an input is closed, it cannot be used to listen to MIDI messages until
the input is opened again by calling [`Input.open()`](Input#open).

**Note**: if what you want to do is stop events from being dispatched, you should use
[`eventsSuspended`](#eventsSuspended) instead.

@returns {Promise<Input>} The promise is fulfilled with the `Input` object