playing short tune via beep

Tim Chase blinux.list at thechases.com
Wed Jul 11 22:20:57 UTC 2007


> I'd like it to play a couple of different short tunes via the
> beep command depending on the temperature. 

How's your Morse code?  Do you have perfect pitch?  You can do 
something like

=[begin script]================================
#!/bin/sh
# saved as sos.sh
SEVERITY_PITCH=${1:-440}
DOT=100
DASH=500
DELAY=25
beep -f $SEVERITY_PITCH -l $DOT -r 3 -d $DELAY
beep -f $SEVERITY_PITCH -l $DASH -r 3 -d $DELAY
beep -f $SEVERITY_PITCH -l $DOT -r 3 -d $DELAY
=[end script]==================================

You might have to toss in some "sleep" calls for inter-letter 
timings.

The script *should* be callable with

  sos.sh 880

for a high-C and with no parameter for a concert C (440, IIUC)

The hotter your processor, the higher-pitched you could make this.

-tim







More information about the Blinux-list mailing list