Recent

Author Topic: Windows.Beep Using Textmode IDE  (Read 3607 times)

Elap

  • Jr. Member
  • **
  • Posts: 52
Windows.Beep Using Textmode IDE
« on: August 22, 2016, 11:26:23 am »
The program below makes the required sounds, but between each sound there is a noticeable pause.

Why is this?  Is it possible to get a continuous sound?

Code: Pascal  [Select]
  1. PROGRAM SOUNDTEST;
  2.  
  3. USES
  4.     WINDOWS;
  5.  
  6. VAR
  7.     I: INTEGER;
  8.  
  9. BEGIN
  10.     FOR I:=30 TO 500 DO
  11.         BEEP(10*I,1000);
  12. END.

Many thanks for your help.

Thaddy

  • Hero Member
  • *****
  • Posts: 7213
Re: Windows.Beep Using Textmode IDE
« Reply #1 on: August 22, 2016, 11:58:18 am »
Because you gave it a duration. A windows.beep is supposed to be distinguisable from a continuous sound.
So it has a slight pause.
What you you seem to want ios a sine sweep. That's rather more complex.

http://www.satsignal.eu/software/audio.html#SweepGen

That's proper code.... Although it may seem old.

inline variables like in D10.3 are a bit like Brexit: if you are given the wrong information it sounds like a good idea. Every kid loves candy, but it makes you fat and your teeth will disappear.

Elap

  • Jr. Member
  • **
  • Posts: 52
Re: Windows.Beep Using Textmode IDE
« Reply #2 on: August 22, 2016, 12:49:03 pm »
Oh.

Thank you.