From owner-freebsd-questions@FreeBSD.ORG Wed Apr 3 17:37:04 2013 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 11A0BF8C for ; Wed, 3 Apr 2013 17:37:04 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mx01.qsc.de (mx01.qsc.de [213.148.129.14]) by mx1.freebsd.org (Postfix) with ESMTP id CF585239 for ; Wed, 3 Apr 2013 17:37:03 +0000 (UTC) Received: from r56.edvax.de (port-92-195-80-247.dynamic.qsc.de [92.195.80.247]) by mx01.qsc.de (Postfix) with ESMTP id AB5333CCB0; Wed, 3 Apr 2013 19:37:01 +0200 (CEST) Received: from r56.edvax.de (localhost [127.0.0.1]) by r56.edvax.de (8.14.5/8.14.5) with SMTP id r33Hb8ap001886; Wed, 3 Apr 2013 19:37:08 +0200 (CEST) (envelope-from freebsd@edvax.de) Date: Wed, 3 Apr 2013 19:37:08 +0200 From: Polytropon To: Carl Johnson Subject: Re: Recipie for CPU souffle' Message-Id: <20130403193708.6319574e.freebsd@edvax.de> In-Reply-To: <871uarwr2e.fsf@oak.localnet> References: <515AAE16.9030707@qeng-ho.org> <15043.1364932520@server1.tristatelogic.com> <20130402231522.71cb7352.freebsd@edvax.de> <871uarwr2e.fsf@oak.localnet> Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: Polytropon List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Apr 2013 17:37:04 -0000 On Wed, 03 Apr 2013 08:51:21 -0700, Carl Johnson wrote: > Polytropon 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, ...