[ecasound] fade in and fade out on the same file with the same command?

From: Lars Bjørndal <lars.bjorndal@email-addr-hidden>
Date: Sun Mar 20 2005 - 21:16:00 EET

Is that possible? I've tried to make a script so that I could do fade
in and fade out with one command, but it didn't work. Could somebody
help?

Here's my test:

#!/bin/sh
if test x${1} = x -o x${2} = x -o x$[3] = x; then
  echo "Error! Usage: fade <file> <fadeinlen> <fadeout>"
  exit 1
fi

file=${1}
fadeinlen=${2}
fadeoutlen=${3}
filelen=`ecalength -s ${file} 2>/dev/null |cut -d. -f1`
fadeoutstart=$(($filelen-$fadeoutlen))
echo "fadeoutstart=${fadeoutstart}"

mv -v ${file} tmp.${file}
ecasound -i tmp.${file} -o ${file} -ea:100 -kl:1,0,100,${fadeinlen} \
 -kl2:1,100,0,${fadeoutstart},${fadeoutlen}
rm -fv tmp.${file}

# -end

The fadeout works, but not the fadein, why?

Lars

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Ecasound-list mailing list
Ecasound-list@email-addr-hidden
https://lists.sourceforge.net/lists/listinfo/ecasound-list
Received on Mon Mar 21 00:15:05 2005

This archive was generated by hypermail 2.1.8 : Mon Mar 21 2005 - 00:15:05 EET