Browse Source

crea meno file di output

che ti si riempie il disco
boyska 2 years ago
parent
commit
f1e9f057c2
1 changed files with 10 additions and 3 deletions
  1. 10 3
      barker/create-audios.sh

+ 10 - 3
barker/create-audios.sh

@@ -2,7 +2,7 @@
 
 set -eu
 
-lengths='2 3 4 5 7 11 13'
+lengths='13'
 for length in $lengths
 do
     basedir="audio/barker-$(printf %02d $length)"
@@ -10,7 +10,8 @@ do
     base="$basedir/barker"
     dest="$base.wav"
     python3 make-barker-audios.py --pipupa --barker-seq $length "$dest"
-    for shiftMS in 100 1000 2000
+    exit 0
+    for shiftMS in 100 2000
     do
         shiftS="$(echo "scale=2; $shiftMS / 1000" | bc)"
         shifted="$base-shift${shiftMS}.wav"
@@ -22,12 +23,18 @@ do
             sox "$shifted" "$attenuated" vol "0$attRatio"
             for noisekind in whitenoise pinknoise brownnoise
             do
-                for noiselevel in $(seq 1 9)
+                for noiselevel in $(seq 1 3 9)
                 do
                     noised="${attenuated%.wav}-${noisekind}${noiselevel}.wav"
                     sox -m "$attenuated" \
                         <(sox "$attenuated" -p synth "$noisekind" vol "0.${noiselevel}") \
                         "$noised"
+                    for degain in $(seq 2 2 9)
+                    do
+                        degained="${noised%.wav}-gain-${degain}.wav"
+                        attRatio="$(echo "scale=2; 1 / $degain" | bc)"
+                        sox "$noised" "$degained" vol "0$attRatio"
+                    done
                 done
             done
         done