#!/bin/tcsh

setenv gap      1
setenv volume   30	# This -claims- be be volume, but it's clearly -duration-!  Or rather some multiplier on duration, since changing duration -also- works... (Changing this from 100 to 30 changed the duty cycle!)
setenv duration 200
setenv pitch    1500

alias div2 'set \!:1=`echo "\!:2k $\!:1 2 / fq" | dc`'
alias beep 'xset b $volume $pitch $duration; echo -n "\007"; sleep $gap'

beep; beep; beep

div2 duration 0
div2 gap      1

beep; beep; beep

xset b
