Last active
February 20, 2023 19:36
-
-
Save atchoo78/0f4e6fc75379410da7327fc1f4144c51 to your computer and use it in GitHub Desktop.
writehex - Converts hexadecimal data to ASCII text or pipe it to a file (useful for creating valid System Exclusive MIDI message files). Usage: "./writehex 6964 6b66 6120 6964 6471 6420 6964 7370 6973 706f 7064" or "./writehex F0 00 20 6B 7F 42 02 00 40 52 00 F7>sysex.syx"
This file contains hidden or 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 bash | |
while [ "$1" ]; do | |
for ((i=0; i<${#1}; i+=2)) | |
do | |
printf "\x${1:i:2}"; | |
done; | |
shift; | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment