Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 03 Apr 2013 08:51:21 -0700
From:      Carl Johnson <carlj@peak.org>
To:        freebsd-questions@freebsd.org
Subject:   Re: Recipie for CPU souffle'
Message-ID:  <871uarwr2e.fsf@oak.localnet>
In-Reply-To: <20130402231522.71cb7352.freebsd@edvax.de> (Polytropon's message of "Tue, 2 Apr 2013 23:15:22 %2B0200")
References:  <515AAE16.9030707@qeng-ho.org> <15043.1364932520@server1.tristatelogic.com> <20130402231522.71cb7352.freebsd@edvax.de>

next in thread | previous in thread | raw e-mail | index | archive | help
Polytropon <freebsd@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.

-- 
Carl Johnson		carlj@peak.org



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?871uarwr2e.fsf>