Created
August 2, 2023 14:21
-
-
Save SpotlightKid/2f56d78bf40a791d58ac57e09a44c5fe to your computer and use it in GitHub Desktop.
Send bytes given on the command line as hexadecimal digit pairs to selected MIDI output
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import sys | |
from rtmidi.midiutil import open_midioutput | |
if sys.argv[1:]: | |
midiout, _ = open_midioutput() | |
midiout.send_message(bytearray.fromhex(" ".join(sys.argv[1:]))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment