#! /bin/sh -f # # stft and split the data into subbands stft -N ${1} |\ splitr -R -F stft_fileout # # mute each subband appropriately # # subband 1 smute -N stft_1 \ -win 3000 -taper 30 -signed -xmin -10000 -xmax 10000 \ -tmin 0 -tmax 3000 -t0 0 -v 10000 -threshold 0.00004 |\ smute -win 3000 -taper 30 -signed -xmin -20000 -xmax 20000 \ -tmin 0 -tmax 3000 -t0 0 -v 500 -threshold 0.000004 -O stft_1_smute & # subband 2 smute -N stft_2 \ -win 3000 -taper 30 -signed -xmin -10000 -xmax 10000 \ -tmin 0 -tmax 3000 -t0 0 -v 10000 -threshold 0.0004 |\ smute -win 3000 -taper 30 -signed -xmin -20000 -xmax 20000 \ -tmin 0 -tmax 3000 -t0 0 -v 800 -threshold 0.00001 -O stft_2_smute # subband 3 smute -N stft_3 \ -win 3000 -taper 30 -signed -xmin -10000 -xmax 10000 \ -tmin 0 -tmax 3000 -t0 0 -v 10000 -threshold 0.0004 |\ smute -win 3000 -taper 30 -signed -xmin -700 -xmax 700 \ -tmin 0 -tmax 3000 -t0 0 -v 370 -threshold 0.00001 -O stft_3_smute & # subband 4 smute -N stft_4 \ -win 3000 -taper 30 -signed -xmin -10000 -xmax 10000 \ -tmin 0 -tmax 3000 -t0 0 -v 10000 -threshold 0.0004 |\ smute -win 3000 -taper 0 -signed -xmin -600 -xmax 600 \ -tmin 0 -tmax 3000 -t0 0 -v 380 -threshold 0.00009 -O stft_4_smute # subband 5 smute -N stft_5 \ -win 3000 -taper 30 -signed -xmin -10000 -xmax 10000 \ -tmin 0 -tmax 3000 -t0 0 -v 10000 -threshold 0.0004 |\ smute -win 3000 -taper 20 -signed -xmin -400 -xmax 400 \ -tmin 0 -tmax 3000 -t0 0 -v 380 -threshold 0.0001 -O stft_5_smute & # subband 6 smute -N stft_6 \ -win 3000 -taper 30 -signed -xmin -20000 -xmax 20000 \ -tmin 0 -tmax 3000 -t0 0 -v 10000 -threshold 0.0001 -O stft_6_smute # subband 7 smute -N stft_7 \ -win 3000 -taper 30 -signed -xmin -20000 -xmax 20000 \ -tmin 0 -tmax 3000 -t0 0 -v 10000 -threshold 0.00004 -O stft_7_smute wait # gather up all the filtered [and unfiltered] subbands and perform the # inverse transform then anti-alias filter, resample to 4ms, gather -b -F stft_fileback_reproduce |\ stft -R |\ filt -fl 6 -fh 85 -nor 6 -M -d 2 |\ counter -ssam -O ${1}_denoise_4ms exit