Skip to content

Instantly share code, notes, and snippets.

@atchoo78
Last active June 9, 2022 06:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save atchoo78/c0eeaf11867c7e901a59ac4128ee698e to your computer and use it in GitHub Desktop.
Save atchoo78/c0eeaf11867c7e901a59ac4128ee698e to your computer and use it in GitHub Desktop.
System Exclusive file creator
#!/bin/bash
while [ "$1" ]; do
printf "%X " $1
shift;
done
#!/bin/bash
while [ "$1" ]; do
for ((i=0; i<${#1}; i+=2))
do
printf "\x${1:i:2}";
done;
shift;
done
@atchoo78
Copy link
Author

atchoo78 commented Jun 9, 2022

writehex

Create system exclusive files (SYX) for MIDI devices.

Usage:

./writehex [sysex message] > filename.syx

Example

writehex F0 7E 00 07 02 01 00 02 07 15 18 29 F7 > mmc.syx

Use Sysex Librarian or whatever you prefer to import and transmit the generated files


dec2hex

Convert Sysex from decimal to hexadecimal number format

Usage:

./dec2hex [sysex message]

Example

./dec2hex  240 0 32 107 127 66 2 0 64 81 01 247

# Output:  F0 00 20 6B 7F 42 02 00 40 51 01 F7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment