Created
September 20, 2018 13:27
-
-
Save atirut-w/095bdda3456192c9c3a81d0da8cb902a to your computer and use it in GitHub Desktop.
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 bash | |
if [[ -z "$1" && -z "$2" ]]; then | |
echo "PlayMIDI version 1.0 | |
Use fluidsynth to play MIDI musics easily in one command | |
Usage: | |
playmidi soundfont.sf2 midifile.mid" | |
exit 1 | |
elif [[ $1==*".mid" && -z "$2" ]]; then | |
fluidsynth -g 0.8 -a alsa -m alsa_seq -l -i "$1" | |
elif [[ $1==*".sf2" && $2==*".mid" ]]; then | |
fluidsynth -g 0.8 -a alsa -m alsa_seq -l -i "$1" "$2" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment