Initial prvi demo primer za delavnico command line zvoka

master
Jure Podgoršek 2017-02-04 23:35:21 +01:00
commit bf1f9270ea
4 changed files with 29 additions and 0 deletions

1
.gitignore vendored 100644
View File

@ -0,0 +1 @@
*.wav

3
pocisti.sh 100755
View File

@ -0,0 +1,3 @@
#!/bin/bash
rm sempl*.wav

11
predvajaj.sh 100755
View File

@ -0,0 +1,11 @@
#!/bin/bash
echo "predvajaj"
while [ true ]; do
fajl=$(shuf -n1 -e sempl*.wav)
aplay $fajl &
let "spanje = $RANDOM % 3"
sleep $spanje
done

14
snemaj.sh 100755
View File

@ -0,0 +1,14 @@
#!/bin/bash
echo "snemam"
num=0
while [ true ]; do
arecord sempl$num.wav &
pid=$!
let "dolzina = $RANDOM % 4 + 1"
echo "dolzina: $dolzina sekund"
sleep $dolzina
kill $pid
num=$((num+1))
done