Created
September 23, 2019 02:31
-
-
Save willbchang/19876c0ef54cabde2a1959e7aec1dd67 to your computer and use it in GitHub Desktop.
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
#!/bin/zsh | |
# AegeanSymphonicOrchestra-v2_2.sf2 | |
# GeneralUser-v1.471.sf2 | |
# SGM-V2.01.sf2 | |
SOUNDFONT='/Users/Will/.config/.soundfont/SGM-V2.01.sf2' | |
if [ -e "$SOUNDFONT" ] | |
then | |
for i in "$@" | |
do | |
if [ -e "$i" ] | |
then | |
(fluidsynth -i "$SOUNDFONT" "$i" 2>&1) >/dev/null | |
else | |
echo "[playmidi]: cannot find file at $i" | |
return 1 | |
fi | |
done | |
else | |
echo "[playmidi]: SOUNDFONT file not found at $SOUNDFONT" | |
return 1 | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment