[fpc-pascal] simple sound implementation
Marc Santhoff
M.Santhoff at t-online.de
Sun Sep 2 11:13:24 CEST 2007
Am Sonntag, den 02.09.2007, 10:32 +0200 schrieb Daniƫl Mantione:
>
> Op Sun, 2 Sep 2007, schreef Jonas Maebe:
>
> >
> > On 02 Sep 2007, at 07:58, Marc Santhoff wrote:
> >
> > > FreeBSD has a simple speaker-device and is able to use it for simple
> > > freqency and duration sounds via ioctl as well as playing musical notes
> > > a simple acsii-notation. Maybe Linux, MacOS and others have similar
> > > possibilities?
> >
> > Mac OS X doesn't. Linux doesn't either, afaik (we teach one lab sessions at
> > the university where the goal is to write/complete a similar device driver for
> > Linux).
>
> You can set the bell frequency using write(#27'10;freq') and the duration
> using write(#27'10;duration'), where freq is in Hz and duration in
> milliseconds. Then ctrl+g to ring the bell. It is possible to play music
> this way.
Hey, I like control sequences for this task!
I understand this as controlling the noise a write(#07) makes, pretty
easy. I'll try it.
Ahem, maybe you know how to control the volume, too?
> Of course, the PC-Speaker is not really high fidelty sound.
:)
No problem here, I only need an acoustic feedback from a program reading
values from a DMM, so the person using it doesn't has to look at the
screen each time. But there have to be at least two or three different
noises.
Many thanks,
Marc
More information about the fpc-pascal
mailing list