addOneTimeListener(event, listener, options = {}) {
    options.remaining = 1;
    return this.addListener(event, listener, options);
  }
Adds a one-time event listener that will trigger a function callback when the specified event
happens. The event can be **channel-bound** or **input-wide**. Channel-bound events are
dispatched by [`InputChannel`]{@link InputChannel} objects and are tied to a specific MIDI
channel while input-wide events are dispatched by the `Input` object itself and are not tied
to a specific channel.

Calling the function with an input-wide event (such as
[`"midimessage"`]{@link #event:midimessage}), will return the [`Listener`](Listener) object
that was created.

If you call the function with a channel-specific event (such as
[`"noteon"`]{@link InputChannel#event:noteon}), it will return an array of all
[`Listener`](Listener) objects that were created (one for each channel):

```javascript
const listeners = WebMidi.inputs[0].addOneTimeListener("noteon", someFunction);
```

You can also specify which channels you want to add the listener to:

```javascript
const listeners = WebMidi.inputs[0].addOneTimeListener("noteon", someFunction, {channels: [1, 2, 3]});
```

In this case, the `listeners` variable contains an array of 3 [`Listener`](Listener) objects.

The code above will add a listener for the `"noteon"` event and call `someFunction` when the
event is triggered on MIDI channels `1`, `2` or `3`.

Note that, when adding events to channels, it is the [`InputChannel`](InputChannel) instance
that actually gets a listener added and not the `Input` instance.

Note: if you want to add a listener to a single MIDI channel you should probably do so directly
on the [`InputChannel`](InputChannel) object itself.

There are 8 families of events you can listen to:

1. **MIDI System Common** Events (input-wide)

   * [`songposition`]{@link Input#event:songposition}
   * [`songselect`]{@link Input#event:songselect}
   * [`sysex`]{@link Input#event:sysex}
   * [`timecode`]{@link Input#event:timecode}
   * [`tunerequest`]{@link Input#event:tunerequest}

2. **MIDI System Real-Time** Events (input-wide)

   * [`clock`]{@link Input#event:clock}
   * [`start`]{@link Input#event:start}
   * [`continue`]{@link Input#event:continue}
   * [`stop`]{@link Input#event:stop}
   * [`activesensing`]{@link Input#event:activesensing}
   * [`reset`]{@link Input#event:reset}

3. **State Change** Events (input-wide)

   * [`opened`]{@link Input#event:opened}
   * [`closed`]{@link Input#event:closed}
   * [`disconnected`]{@link Input#event:disconnected}

4. **Catch-All** Events (input-wide)

   * [`midimessage`]{@link Input#event:midimessage}
   * [`unknownmidimessage`]{@link Input#event:unknownmidimessage}

5. **Channel Voice** Events (channel-specific)

   * [`channelaftertouch`]{@link InputChannel#event:channelaftertouch}
   * [`controlchange`]{@link InputChannel#event:controlchange}
     * [`controlchange-controller0`]{@link InputChannel#event:controlchange-controller0}
     * [`controlchange-controller1`]{@link InputChannel#event:controlchange-controller1}
     * [`controlchange-controller2`]{@link InputChannel#event:controlchange-controller2}
     * (...)
     * [`controlchange-controller127`]{@link InputChannel#event:controlchange-controller127}
   * [`keyaftertouch`]{@link InputChannel#event:keyaftertouch}
   * [`noteoff`]{@link InputChannel#event:noteoff}
   * [`noteon`]{@link InputChannel#event:noteon}
   * [`pitchbend`]{@link InputChannel#event:pitchbend}
   * [`programchange`]{@link InputChannel#event:programchange}

   Note: you can listen for a specific control change message by using an event name like this:
   `controlchange-controller23`, `controlchange-controller99`, `controlchange-controller122`,
   etc.

6. **Channel Mode** Events (channel-specific)

   * [`allnotesoff`]{@link InputChannel#event:allnotesoff}
   * [`allsoundoff`]{@link InputChannel#event:allsoundoff}
   * [`localcontrol`]{@link InputChannel#event:localcontrol}
   * [`monomode`]{@link InputChannel#event:monomode}
   * [`omnimode`]{@link InputChannel#event:omnimode}
   * [`resetallcontrollers`]{@link InputChannel#event:resetallcontrollers}

7. **NRPN** Events (channel-specific)

   * [`nrpn`]{@link InputChannel#event:nrpn}
   * [`nrpn-dataentrycoarse`]{@link InputChannel#event:nrpn-dataentrycoarse}
   * [`nrpn-dataentryfine`]{@link InputChannel#event:nrpn-dataentryfine}
   * [`nrpn-dataincrement`]{@link InputChannel#event:nrpn-dataincrement}
   * [`nrpn-datadecrement`]{@link InputChannel#event:nrpn-datadecrement}

8. **RPN** Events (channel-specific)

   * [`rpn`]{@link InputChannel#event:rpn}
   * [`rpn-dataentrycoarse`]{@link InputChannel#event:rpn-dataentrycoarse}
   * [`rpn-dataentryfine`]{@link InputChannel#event:rpn-dataentryfine}
   * [`rpn-dataincrement`]{@link InputChannel#event:rpn-dataincrement}
   * [`rpn-datadecrement`]{@link InputChannel#event:rpn-datadecrement}

@param event {string} The type of the event.

@param listener {function} A callback function to execute when the specified event is detected.
This function will receive an event parameter object. For details on this object's properties,
check out the documentation for the various events (links above).

@param {object} [options={}]

@param {array} [options.arguments] An array of arguments which will be passed separately to the
callback function. This array is stored in the [`arguments`](Listener#arguments) property of
the [`Listener`](Listener) object and can be retrieved or modified as desired.

@param {number|number[]} [options.channels]  An integer between 1 and 16 or an array of
such integers representing the MIDI channel(s) to listen on. This parameter is ignored for
input-wide events.

@param {object} [options.context=this] The value of `this` in the callback function.

@param {number} [options.duration=Infinity] The number of milliseconds before the listener
automatically expires.

@param {boolean} [options.prepend=false] Whether the listener should be added at the beginning
of the listeners array and thus be triggered before others.

@returns {Listener[]} An array of all [`Listener`](Listener) objects that were created.