From 20c0d4cb848fc5d08111c096c5ae431e08e1cb5b Mon Sep 17 00:00:00 2001 From: mollusk Date: Tue, 9 Jun 2020 02:09:52 -0400 Subject: [PATCH] Allow custom sound player, default mpv --- bdk.sh | 6 +++--- kits/default/config | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/bdk.sh b/bdk.sh index 12455fe..96fd611 100755 --- a/bdk.sh +++ b/bdk.sh @@ -118,13 +118,13 @@ while true;do # -s: do not echo input character. -n 1: read only 1 character (separate with space) if [[ $key = "${KP}" ]]; then - aplay ${KICK} >/dev/null 2>/dev/null & + ${PLAYER} ${KICK} >/dev/null 2>/dev/null & printf "${LCYAN}[${KP}] Kick${NC}\n" 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" 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" elif [[ $key == "h" ]];then key diff --git a/kits/default/config b/kits/default/config index 566483a..e747af8 100644 --- a/kits/default/config +++ b/kits/default/config @@ -1,5 +1,7 @@ #!/bin/bash +PLAYER='mpv' + # SOUNDS KICK='sounds/kick.wav' SNARE='sounds/snare.wav'