Skip to content

Instantly share code, notes, and snippets.

@willbchang
Created Sep 23, 2019
Embed
What would you like to do?
#!/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