Mercurial > hg > decimation
changeset 20:7d4165ded830
Different quality settings
author | Chris Cannam |
---|---|
date | Fri, 18 Oct 2013 17:15:54 +0100 |
parents | c2b64a1464f4 |
children | 12a0c2e493c4 |
files | run-tests.sh |
diffstat | 1 files changed, 20 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/run-tests.sh Fri Oct 18 15:57:28 2013 +0100 +++ b/run-tests.sh Fri Oct 18 17:15:54 2013 +0100 @@ -20,14 +20,30 @@ factor="$1" infile="$2" outfile="$3" +echo "factor is $factor" + echo "running... sndfile-resample -to $(($original/$factor)) -c 4 $infile $outfile" sndfile-resample -to "$(($original/$factor))" -c 4 "$infile" "$outfile" } -do_resample() { +do_resample_hq() { factor="$1" infile="$2" outfile="$3" - "$mydir/garage-resampler/resample" --to "$(($original/$factor))" "$infile" "$outfile" + "$mydir/garage-resampler/resample" --snr 100 --bandwidth 0.02 --to "$(($original/$factor))" "$infile" "$outfile" +} + +do_resample_mq() { + factor="$1" + infile="$2" + outfile="$3" + "$mydir/garage-resampler/resample" --snr 70 --bandwidth 0.03 --to "$(($original/$factor))" "$infile" "$outfile" +} + +do_resample_lq() { + factor="$1" + infile="$2" + outfile="$3" + "$mydir/garage-resampler/resample" --snr 50 --bandwidth 0.05 --to "$(($original/$factor))" "$infile" "$outfile" } do_decimate() { @@ -40,8 +56,8 @@ mkdir -p "$mydir"/out for f in $factors; do - for impl in linear decimate resample src; do - do_$impl "$f" "$mydir/infinitewave-testsignals/Swept_float.wav" "$mydir"/out/"$impl"_"$factor".wav + for impl in linear decimate resample_hq resample_mq resample_lq src; do + do_$impl "$f" "$mydir/infinitewave-testsignals/Swept_float.wav" "$mydir"/out/"$f"_"$impl".wav done done