#!/bin/csh # # Examples for additive: Masking # # 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 ##### # # First, create two sinewaves, one of which is masked: # echo Creating $SOUNDDIR/masking1.wav which contains two sine tones. rm -f $SOUNDDIR/masking1.wav $BINDIR/additive \ "(0 440; 1 440)" "(0 0.7; 1 0.7)" \ "g(0 660; 1 880)" "g(0 0.01; 1 0.001)" \ $SOUNDDIR/masking1.wav >/dev/null </dev/null </dev/null ##### # # Now, create a sound which is not completely masked. # echo Creating $SOUNDDIR/masking3.wav which has two tones, one partially masked. rm -f $SOUNDDIR/masking3.wav $BINDIR/additive \ "(0 440; 1 440)" "(0 0.7; 1 0.7)" \ "g(0 660; 1 880)" "g(0 0.01; 1 0.01)" \ $SOUNDDIR/masking3.wav >/dev/null </dev/null