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
45 45
46fade_first_opts=46fade_first_opts=
47if [ "$fade_first" == "yes" ]; then47if [ "$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"
49fi49fi
50 50
51fade_second_opts=51fade_second_opts=
52if [ "$fade_second" == "yes" ]; then52if [ "$fade_second" == "yes" ]; then
53 fade_second_opts="fade h 0:0:$fade_length"53 fade_second_opts="fade t 0:0:$fade_length"
54fi54fi
55 55
56echo "crossfade and concatenate files"56echo "crossfade and concatenate files"
57echo57echo
58echo "Finding length of $first_file..."58echo "Finding length of $first_file..."
59first_length=`$SOX "$first_file" 2>&1 -e stat | grep Length | cut -d : -f 2 | cut -d . -f 1 | cut -f 1`59first_length=`$SOX "$first_file" 2>&1 -e stat | grep Length | cut -d : -f 2 | cut -f 1`
60echo "Length is $first_length"60echo "Length is $first_length seconds"
61 61
62trim_length=`expr $first_length - $fade_length`62trim_length=`echo "$first_length - $fade_length" | bc`
63 63
64# Get crossfade section from first file and optionally do the fade out64# Get crossfade section from first file and optionally do the fade out
65echo "Obtaining $fade_length seconds of fade out portion from $first_file..."65echo "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
80echo -e "Removing temporary files...\n" 80echo -e "Removing temporary files...\n"
81rm fadeout.wav fadein.wav crossfade.wav song1.wav song2.wav81rm fadeout.wav fadein.wav crossfade.wav song1.wav song2.wav
82mins=`expr $trim_length / 60`82mins=`echo "$trim_length / 60" | bc`
83secs=`expr $trim_length % 60`83secs=`echo "$trim_length % 60" | bc`
84echo "The crossfade in mix.wav occurs at around $mins mins $secs secs"84echo "The crossfade in mix.wav occurs at around $mins mins $secs secs"
85 85

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