keyboard_input_async

Keyboard input, async.

Let’s revisit playing live with either a MIDI keyboard or our QWERTY keyboard, but this time using the asyncio framework.

Invoke with:

josephine@laptop:~/supriya$ python -m examples.keyboard_input_async --help
usage: __main__.py [-h] (--list-midi-inputs | --use-midi PORT_NUMBER |
                   --use-qwerty)

Play notes via your QWERTY or MIDI keyboards

options:
  -h, --help            show this help message and exit
  --list-midi-inputs    list available MIDI inputs
  --use-midi PORT_NUMBER
                        play via MIDI keyboard
  --use-qwerty          play via QWERTY keyboard

… to see complete options.

See the example documentation for a complete explanation.

main(args: list[str] | None = None) None

The example entry-point function.

async run(input_handler: InputHandler) None

Run the script.