Showing the changes to scripts (1 of 5 files). Show all
Unified · Split
| @@ -45,21 +45,21 @@ fi · 44 unmodified lines | ||
| 45 | 45 | |
| 46 | 46 | fade_first_opts= |
| 47 | 47 | if [ "$fade_first" == "yes" ]; then |
| 48 | − fade_first_opts="fade h 0 0:0:$fade_length" | |
| 48 | + fade_first_opts="fade t 0 0:0:$fade_length" | |
| 49 | 49 | fi |
| 50 | 50 | |
| 51 | 51 | fade_second_opts= |
| 52 | 52 | if [ "$fade_second" == "yes" ]; then |
| 53 | − fade_second_opts="fade h 0:0:$fade_length" | |
| 53 | + fade_second_opts="fade t 0:0:$fade_length" | |
| 54 | 54 | fi |
| 55 | 55 | |
| 56 | 56 | echo "crossfade and concatenate files" |
| 57 | 57 | echo |
| 58 | 58 | echo "Finding length of $first_file..." |
| 59 | −first_length=`$SOX "$first_file" 2>&1 -e stat | grep Length | cut -d : -f 2 | cut -d . -f 1 | cut -f 1` | |
| 60 | −echo "Length is $first_length" | |
| 59 | +first_length=`$SOX "$first_file" 2>&1 -e stat | grep Length | cut -d : -f 2 | cut -f 1` | |
| 60 | +echo "Length is $first_length seconds" | |
| 61 | 61 | |
| 62 | −trim_length=`expr $first_length - $fade_length` | |
| 62 | +trim_length=`echo "$first_length - $fade_length" | bc` | |
| 63 | 63 | |
| 64 | 64 | # Get crossfade section from first file and optionally do the fade out |
| 65 | 65 | echo "Obtaining $fade_length seconds of fade out portion from $first_file..." |
| @@ -79,7 +79,7 @@ $SOX song1.wav crossfade.wav song2.wav mix.wav · 13 unmodified lines | ||
| 79 | 79 | |
| 80 | 80 | echo -e "Removing temporary files...\n" |
| 81 | 81 | rm fadeout.wav fadein.wav crossfade.wav song1.wav song2.wav |
| 82 | −mins=`expr $trim_length / 60` | |
| 83 | −secs=`expr $trim_length % 60` | |
| 82 | +mins=`echo "$trim_length / 60" | bc` | |
| 83 | +secs=`echo "$trim_length % 60" | bc` | |
| 84 | 84 | echo "The crossfade in mix.wav occurs at around $mins mins $secs secs" |
| 85 | 85 | |