Lines Matching +full:auto +full:- +full:detect
15 # first file. Can be yes/no/auto.
17 # second file. Can be yes/no/auto
19 # Example: $0 10 infile1.wav infile2.wav auto auto
28 # to occur. They can also specify "auto" which is the default.
42 …pecify \"no\" for that option. \"yes\" will force a fade and \"auto\" will try to detect if a fad…
44 echo "Example: $0 10 infile1.wav infile2.wav auto auto"
52 fade_first="auto"
57 fade_second="auto"
75 first_length=`$SOX --info -D "$first_file"`
78 trim_length=`echo "$first_length - $fade_length" | bc`
83 $SOX "$first_file" -e signed-integer -b 16 fadeout1.wav trim $trim_length $fade_first_opts
85 # When user specifies "auto" try to guess if a fadeout is needed.
90 if [ "$fade_first" == "auto" ]; then
91 RMS=`$SOX fadeout1.wav 2>&1 -n stat | grep RMS | grep amplitude | cut -d : -f 2 | cut -f 1`
94 echo "Auto mode decided not to fadeout with RMS of $RMS"
97 echo "Auto mode will fadeout"
105 $SOX "$second_file" -e signed-integer -b 16 fadein1.wav trim 0 $fade_length
107 # For auto, do similar thing as for fadeout.
108 if [ "$fade_second" == "auto" ]; then
109 RMS=`$SOX fadein1.wav 2>&1 -n stat | grep RMS | grep amplitude | cut -d : -f 2 | cut -f 1`
112 echo "Auto mode decided not to fadein with RMS of $RMS"
115 echo "Auto mode will fadein"
123 $SOX -m -v 1.0 fadeout2.wav -v 1.0 fadein2.wav crossfade.wav
131 $SOX "$first_file" -e signed-integer -b 16 song1.wav trim 0 $trim_length
132 $SOX "$second_file" -e signed-integer -b 16 song2.wav trim $fade_length
138 echo -e "Removing temporary files...\n"