History

Bugfixes to trim effect. Allows crossfade script to work without pops.

cbagwell committed 22 years ago

Commit c4a08031 parent d3a8f865 files · +100 −91Browse files

Showing the changes to scripts (1 of 5 files). Show all

Unified · Split

scripts/crossfade_cat.sh+7−7
@@ -45,21 +45,21 @@ fi · 44 unmodified lines
4545
4646 fade_first_opts=
4747 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"
4949 fi
5050
5151 fade_second_opts=
5252 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"
5454 fi
5555
5656 echo "crossfade and concatenate files"
5757 echo
5858 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"
6161
62−trim_length=`expr $first_length - $fade_length`
62+trim_length=`echo "$first_length - $fade_length" | bc`
6363
6464 # Get crossfade section from first file and optionally do the fade out
6565 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
7979
8080 echo -e "Removing temporary files...\n"
8181 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`
8484 echo "The crossfade in mix.wav occurs at around $mins mins $secs secs"
8585

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t