Recipie for CPU souffle'

Polytropon freebsd at edvax.de
Wed Apr 3 17:37:04 UTC 2013


On Wed, 03 Apr 2013 08:51:21 -0700, Carl Johnson wrote:
> Polytropon <freebsd at edvax.de> writes:
> 
> > On Tue, 02 Apr 2013 12:55:20 -0700, Ronald F. Guilmette wrote:
> >
> > No, that does not work. Read the manpage to recognize clearly
> > _what_ kind of input the /dev/speaker device accepts. It does
> > not understand WAV files.
> >
> > However, try this example (cw.sh):
> >
> > #!/bin/sh
> >
> > read -p "CW ===> " TEXT
> > echo ${TEXT} | morse | awk '{
> > 	if(length($0) == 0)
> > 		printf("P4\n");
> > 	else {
> > 		gsub(" dit", "P32L32E", $0);
> > 		gsub(" di",  "P32L32E", $0);
> > 		gsub(" dah", "P32L8E",  $0);
> > 		printf("%sP16\n", $0);
> > 	}
> > }' | dd bs=256 of=/dev/speaker > /dev/null 2>&1
> >
> > This script doesn't require any non-OS components. You can use
> > it as a basis to build a program that will send you system messages
> > in an audible way in morse code... :-)
> 
> Have you looked at the morse man page lately, specifically the -p
> option? :-)  Just try 'morse -p sos' to test it.

That's actually quite cool, didn't know about that - but the
script shown is already old, so _maybe_ I have written it
when -p hasn't been introduced yet. And note -p does have
a better "space and pausing melody".

A nice means to transmit system messages! :-)




-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...


More information about the freebsd-questions mailing list