using mido package with creative commons licence use python-rtmidi as mido backend language
install on new environment by doing python -m venv .venv and then source .venv and then pip install -r requirements.txt
mido for midi I/O documentation https://mido.readthedocs.io/ realtime note reading https://stackoverflow.com/questions/60182510/mido-how-to-get-midi-data-in-realtime-from-different-ports
https://stackoverflow.com/questions/40498625/outputting-midi-sound-from-python-mido-library-on-mac