[Lazarus] How to produce a tone at Tone frequency for duration MSecs (milliseconds)

Peter E Williams foss.game.pascal.developer at iinet.net.au
Wed Sep 1 14:59:00 CEST 2010

Hi Michael and All,

Actually I don't need a resolution of single milliseconds. I really only
need tens or even hundreds of milliseconds. Typical MSecs parameter is
100ms. Also, exact Tone frequency is not required... only the approx
frequency tone. Obviously, since I want to create a range of tones then
creating custom wave files would be overkill.

The original TBeeper component for Delphi simply beeped the pc speaker
and used some assembler code, but it was only 26KB of code. It also had
the ability to play simple tone 'songs' by beeping a range of tone
frequencies at different durations. These 'songs' were simply ASCII text
data files. I still have it if you are interested.

Best Regards,
Hobart, Tasmania, Australia

On Wed, 2010-09-01 at 14:21 +0200, Michael Schnell wrote:
> You cant get a resolution of milliseconds in a user program.
> So I would create a wave file that contains the correct "bleep".
> With Delphi I once used this wave player component: 
> http://www.un4seen.com/. I don't know if it's been tested with Lazarus 
> and if something similar can be done on Linux.
> I used some free tool to create sine and similar waves in wav-files.
> -Michael

Proudly developing Quality Cross Platform Open Source Games
Since 1970 with a Commodore PET 4016 with 16 KRAM
http://pews-freeware-games.org (<--- brand new)

More information about the Lazarus mailing list