-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CONTROLLER][BLENDER] Control panel / control script update (#585)
* Control panel / control script update * Update controller server README
- Loading branch information
1 parent
ef18fb4
commit aa40a17
Showing
9 changed files
with
32 additions
and
10 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,17 @@ | ||
#! /usr/bin/env bash | ||
|
||
TIME=$1 | ||
STARTTIME=$2 | ||
|
||
pgrep 'afplay' | xargs kill | ||
pgrep 'play' | xargs kill # Linux: play (from sox) / macOS: afplay | ||
cd "$(dirname "$0")" || exit | ||
|
||
while true; do | ||
# break if the current time is greater than TIME | ||
if [[ $(gdate +%s%N | cut -b1-13) -gt $TIME ]]; then | ||
if [[ $(date +%s%N | cut -b1-13) -gt $TIME ]]; then # Linux: date / macOS: gdate | ||
break | ||
fi | ||
done | ||
|
||
afplay '../../files/music/2023.mp3' & | ||
play '../../files/music/2024.mp3' trim $STARTTIME & | ||
echo "start playing" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
#! /usr/bin/env bash | ||
pgrep 'afplay' | xargs kill | ||
pgrep 'play' | xargs kill |
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
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
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
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
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
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