#!/bin/csh
#
# Example for additive -- three independent oscillators with three
#	independent amplitude envelopes
#
# parameters are: (1) frequency envelope  (in Hertz)
#                 (2) amplitude envelope [0..1]
#                 (1a) frequency envelope #2 (in Hertz)
#                 (2a) amplitude envelope [0..1]
#                 etc.
#                 (3) output soundfile
# Program input   (a) time of sound in seconds 
#

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

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


echo Creating $SOUNDDIR/additive1.wav which contains three oscillators

rm -f $SOUNDDIR/additive1.wav
$BINDIR/additive \
    "(0 440; 25 440; 26 660; 50 660; 75 330; 90 660; 100 2000)" \
    "(0 0; 10000 0.2; s; 20000 0)" \
    "(0 880; 12 990; 25 880; 26 330; 50 660; 75 440; 90 880; 100 1000)" \
    "(0 0; 10000 0.2; s; 20000 0)" \
    "(0 0; 12 330; 25 880; 26 110; 50 660; 75 1000; 90 8080; 100 200)" \
    "(0 0; 10000 0.3; s; 20000 0)" \
    $SOUNDDIR/additive1.wav >/dev/null <<EOT
4
EOT



