#!/bin/csh
#
# Examples for comb
#
# parameters are: (1) input soundfile (use whitenoise if no input)
#                 (2) output soundfile name
# Program input   (a) amplitude of input noise (if no input soundfile)
#                 (b) time of noise in seconds (if no input soundfile)
#                 (c) fundamental frequency of comb filter
#                 (d) scale factor for feedback [0..1]
#

if ($1 == "") then
   set SOUNDDIR = ../
else
   set SOUNDDIR = $1
endif

if ($2 == "") then
   set BINDIR = ../../bin
else
   set BINDIR = $2
endif


echo Creating $SOUNDDIR/comb1.wav with a resonant frequency of 440 Hz.

rm -f $SOUNDDIR/comb1.wav
$BINDIR/comb $SOUNDDIR/comb1.wav >/dev/null <<EOT
0.01
1
440
0.95
EOT


echo Creating $SOUNDDIR/comb2.wav with a resonant frequency of 100 Hz.

rm -f $SOUNDDIR/comb2.wav
$BINDIR/comb $SOUNDDIR/comb2.wav >/dev/null <<EOT
0.001
4
100
0.99
EOT




