Allow custom sound player, default mpv

This commit is contained in:
mollusk 2020-06-09 02:09:52 -04:00
parent 77071ac3b8
commit 20c0d4cb84
2 changed files with 5 additions and 3 deletions

6
bdk.sh
View File

@ -118,13 +118,13 @@ while true;do
# -s: do not echo input character. -n 1: read only 1 character (separate with space) # -s: do not echo input character. -n 1: read only 1 character (separate with space)
if [[ $key = "${KP}" ]]; then if [[ $key = "${KP}" ]]; then
aplay ${KICK} >/dev/null 2>/dev/null & ${PLAYER} ${KICK} >/dev/null 2>/dev/null &
printf "${LCYAN}[${KP}] Kick${NC}\n" printf "${LCYAN}[${KP}] Kick${NC}\n"
elif [[ $key == ${SD} ]];then elif [[ $key == ${SD} ]];then
aplay ${SNARE} >/dev/null 2>/dev/null & ${PLAYER} ${SNARE} >/dev/null 2>/dev/null &
printf "${YELLOW}[${SD}] Snare Drum${NC}\n" printf "${YELLOW}[${SD}] Snare Drum${NC}\n"
elif [[ $key == "${HHC}" ]];then elif [[ $key == "${HHC}" ]];then
aplay ${HIHAT} >/dev/null 2>/dev/null & ${PLAYER} ${HIHAT} >/dev/null 2>/dev/null &
printf "${LGREEN}[${HHC}] Hi-Hat Closed${NC}\n" printf "${LGREEN}[${HHC}] Hi-Hat Closed${NC}\n"
elif [[ $key == "h" ]];then elif [[ $key == "h" ]];then
key key

View File

@ -1,5 +1,7 @@
#!/bin/bash #!/bin/bash
PLAYER='mpv'
# SOUNDS # SOUNDS
KICK='sounds/kick.wav' KICK='sounds/kick.wav'
SNARE='sounds/snare.wav' SNARE='sounds/snare.wav'