Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 4 Apr 2013 22:04:21 +0200
From:      Polytropon <freebsd@edvax.de>
To:        Ian Smith <smithi@nimnet.asn.au>
Cc:        freebsd-questions@freebsd.org, "Ronald F. Guilmette" <rfg@tristatelogic.com>
Subject:   Re: Recipie for CPU souffle'
Message-ID:  <20130404220421.2442e9bc.freebsd@edvax.de>
In-Reply-To: <20130405032525.P56386@sola.nimnet.asn.au>
References:  <mailman.79.1365076802.74201.freebsd-questions@freebsd.org> <20130405032525.P56386@sola.nimnet.asn.au>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 5 Apr 2013 05:23:31 +1100 (EST), Ian Smith wrote:
> In freebsd-questions Digest, Vol 461, Issue 6, Message: 1
> (sorry about the threading)
> On Wed, 3 Apr 2013 15:12:17 +0200 Polytropon <freebsd@edvax.de> wrote:
>  > On Tue, 02 Apr 2013 19:10:59 -0700, Ronald F. Guilmette wrote:
>  > > It doesn't have to cover "everything".  But it _should_ completely describe
>  > > the programatic interface.
>  > 
>  > At least is leaves questions, like stating "use the syscalls
>  > in order to...", and the reader is left with the most obvious
>  > question: _which_ syscalls?
> 
> Sometimes examples are the best teachers. 

Somethimes even manpages contain EXAMPLES. :-)



>  > > But like I said, somewher along the line, a lot of man page writers
>  > > apparently got lazy... VERY lazy.
> 
> Mmm, and a few man page readers too?  It's really not rocket science ..

No, it's just reading the letters which form words and sentences,
expressing things. But that can already be considered hard work
if you're not used to that "intellectual" stuff. :-)



>  > But keep in mind they're still alive! Judging from the manpages
>  > of... *cough* can I say this? YOu know, more prominent open
>  > source operating systems for desktops... they're usually much
>  > worse _if_ there is a manpage. In most cases, there's none.
> 
> True.  And I can usually get little more sense out of info(1) than from 
> windows 'troubleshooter' :)

You can shoot trouble as much as you like. It doesn't work.
It always comes back. To eliminate the source, you need to
understand the initial problem, then kill it with fire. :-)



>  > > >> Second order question:  Why can't I just pipe a .wav file to the
>  > > >> /dev/speaker device file and have it play?  Wouldn't that make quite
>  > > >> a lot of sense?
>  > > >
>  > > >No, that does not work.
>  > > 
>  > > Apparently not.
>  > > 
>  > > Why it doesn't work (or couldn't work) is less clear.
>  > 
>  > The speaker interface to the _PC speaker_ is not a DSP. It's
>  > programming is much simpler. The "note language" that it
>  > uses on FreeBSD is much more than other interfaces offer.
>  > Better ones have stuff like pitch, duration, turn off.
> 
> Not to mention staccato, legato, dotted notes - sophisticated stuff!

Plus interpretation of UTF-8 strings that contain note language,
I assume those "characters" are in there... :-)



>  > > >	% echo "c" > /dev/speaker
>  > > 
>  > > Humm... now _that_ is both interesting and enlightening.
>  > 
>  > I actually remember having used something comparable on
>  > BASIC, when my brain wasn't fully developed yet. :-)
> 
> The note language is _from_ BASIC .. do read the source, Luke(s)!

That's why I could remember it. I think it was QBasic
(on a PC platform, no idea if other platforms also supported
it, but I assume more "sophisticated" BASICs could have
contained that functionality).



>  > 	echo "cdefgab>c" > /dev/speaker
>  > 
>  > It's still a nice interface to "generate attention sounds"
>  > in case you want to make an audible alarm or signal for
>  > some specific action, like a program which has aborted,
>  > an unverified backup or the successful completition of
>  > a task.
> 
> Indeed it is.  On an old laptop using APM I used to play little tunes as 
> the battery got down to 30, 20, 10%, noiser just before forced suspend,
> which saved me not a few times.  A nice little chirp when fully charged.

You can still find it in /etc/apmd.conf:

	echo T250L16B+BA+AG+GF+FED+DC+CC >/dev/speaker

	echo T250L8CE-GE-C >/dev/speaker

Sadly, when APM was working properly, it has been abolished. :-(





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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130404220421.2442e9bc.freebsd>