Re: [fpc-pascal] simple sound implementation

2007-09-07 Thread Tomas Hajny
On 2 Sep 07, at 7:58, Marc Santhoff wrote: Hi, > I've read in the docs for the crt-unit that the procedure "sound()" does > not work on windows. > > Since I'm searching for a portable way of playing simple tones > (frequency & duration) I want to know if there is something as > replacement for

Re: [fpc-pascal] simple sound implementation

2007-09-04 Thread Mark Wood
True. And at least some of us have now upgraded to Sound Blaster! :-D Cheers, M. Daniël Mantione wrote: Op Sun, 2 Sep 2007, schreef Mark Wood: Naturally, this is not possible: The PC speaker is simply controlled by a timer, which creates a square wave (on/off). In ancient DOS times t

Re: [fpc-pascal] simple sound implementation

2007-09-03 Thread Marco van de Voort
> Op Sun, 2 Sep 2007, schreef Mark Wood: > > If you run as root, acquire I/O port access and run SCHED_FIFO (so you are > not pre-empted), it might work. > > However, as nowadays all PCs have a 16 bit audio possibility I don't see a > reason to do such ugly tricks with the PC speaker. A standa

Re: [fpc-pascal] simple sound implementation

2007-09-03 Thread Daniël Mantione
Op Sun, 2 Sep 2007, schreef Mark Wood: > > > Naturally, this is not possible: The PC speaker is simply controlled by a > > timer, which creates a square wave (on/off). In ancient DOS times there > > was a trick by doing a frequency modulation, i.e. you turn the timer on > > and off quite fast.

Re: [fpc-pascal] simple sound implementation

2007-09-03 Thread Daniël Mantione
Op Sun, 2 Sep 2007, schreef Marc Santhoff: > Am Sonntag, den 02.09.2007, 10:32 +0200 schrieb Daniël Mantione: > > > > 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

Re: [fpc-pascal] simple sound implementation

2007-09-02 Thread Marc Santhoff
Am Sonntag, den 02.09.2007, 16:56 +0200 schrieb Sebastian Günther: > Marc Santhoff schrieb: > > > > Ahem, maybe you know how to control the volume, too? > > Naturally, this is not possible: The PC speaker is simply controlled by > a timer, which creates a square wave (on/off). In ancient DOS tim

Re: [fpc-pascal] simple sound implementation

2007-09-02 Thread Luca Olivetti
En/na Marco van de Voort ha escrit: Naturally, this is not possible: The PC speaker is simply controlled by a timer, which creates a square wave (on/off). In ancient DOS times there was a trick by doing a frequency modulation, i.e. you turn the timer on and off quite fast. But on Linux etc. the

Re: [fpc-pascal] simple sound implementation

2007-09-02 Thread Marco van de Voort
> > Naturally, this is not possible: The PC speaker is simply controlled > > by a timer, which creates a square wave (on/off). In ancient DOS times > > there was a trick by doing a frequency modulation, i.e. you turn the > > timer on and off quite fast. But on Linux etc. the drivers don't > > s

Re: [fpc-pascal] simple sound implementation

2007-09-02 Thread Mark Wood
Naturally, this is not possible: The PC speaker is simply controlled by a timer, which creates a square wave (on/off). In ancient DOS times there was a trick by doing a frequency modulation, i.e. you turn the timer on and off quite fast. But on Linux etc. the drivers don't support such cheats

Re: [fpc-pascal] simple sound implementation

2007-09-02 Thread Sebastian Günther
Marc Santhoff schrieb: Ahem, maybe you know how to control the volume, too? Naturally, this is not possible: The PC speaker is simply controlled by a timer, which creates a square wave (on/off). In ancient DOS times there was a trick by doing a frequency modulation, i.e. you turn the timer

Re: [fpc-pascal] simple sound implementation

2007-09-02 Thread Marc Santhoff
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 w

Re: [fpc-pascal] simple sound implementation

2007-09-02 Thread 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

Re: [fpc-pascal] simple sound implementation

2007-09-02 Thread 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. L