Author Topic: BEEP  (Read 7584 times)

Offline Cliff3D

  • Dr. Type
  • ****
  • Posts: 268
    • View Profile
BEEP
« on: 2010-Sep-02 »
Is there a simple "Beep" or "Bleep" command? Nothing complicated like playing an orhestral-quality symphony, just a simple "Beep - I'm done!" noise that can be called from a single command?

If not - could we maybe have one?

MrTAToad

  • Guest
Re: BEEP
« Reply #1 on: 2010-Sep-03 »
Unfortunately no - and using CHR$(7) wont work...

The only way around it is to either use C and interface with the Windows sound system or load & play a beep sample...


Offline Cliff3D

  • Dr. Type
  • ****
  • Posts: 268
    • View Profile
Re: BEEP
« Reply #2 on: 2010-Sep-03 »
That would explain why I can't find it. I'm starting to think we could save everyone a lot of reading if I just PM'd you an incessant series of questions ;)

Thanks again - I think playing a .wav sound is where it's going to have to be at :) Just seems more hassle then a "Beep" type command would be. Or even something more complex (like BBC BASIC has)
« Last Edit: 2010-Sep-04 by Cliff3D »

Offline Neurox

  • Mr. Polyvector
  • ***
  • Posts: 184
    • View Profile
    • http://www.borzini.it
Re: BEEP
« Reply #3 on: 2010-Sep-03 »
Under Windows the answer is easy :
Import the DLL "kernel32.dll" for using Beep function :
public static extern bool Beep(Int32 freq, Int32 duration)

but in other platforms/ maybe our Gernot will make a new function using a similar SDL library :  :whistle:

http://www.dgames.org/beep-sound-with-sdl

Bye bye,
Neurox
Paolo Borzini | paolo@borzini.it
The WhiteFly Software | www.thewhitefly.it
Service on line for screen printers | www.4pellicole.it

Offline Cliff3D

  • Dr. Type
  • ****
  • Posts: 268
    • View Profile
Re: BEEP
« Reply #4 on: 2010-Sep-04 »
That would be nice :)

MrTAToad

  • Guest
Re: BEEP
« Reply #5 on: 2010-Sep-04 »
But would it be used enough to justify coding it ?

Offline Cliff3D

  • Dr. Type
  • ****
  • Posts: 268
    • View Profile
Re: BEEP
« Reply #6 on: 2010-Sep-04 »
I've no idea. I know I appreciate quick simple ways to get my programs to report that they are working and not somehow stalled, during the writing process (I'm not a musician, which is the other use for such a feature). I would put JPEG as a higher priority (years ago!)

Offline Neurox

  • Mr. Polyvector
  • ***
  • Posts: 184
    • View Profile
    • http://www.borzini.it
Re: BEEP
« Reply #7 on: 2010-Sep-04 »
But would it be used enough to justify coding it ?

In recent times has been requested by several programmers to create a function
like this. We talk about retrogames, but thanks to BEEP many old pc-games have had some beautiful soundtracks.

Bye bye,
Neurox
Paolo Borzini | paolo@borzini.it
The WhiteFly Software | www.thewhitefly.it
Service on line for screen printers | www.4pellicole.it

Offline S. P. Gardebiter

  • Mr. Polyvector
  • ***
  • Posts: 247
    • View Profile
    • Tile 44 Interactive
Re: BEEP
« Reply #8 on: 2010-Sep-15 »
A BEEP command would be nice.
You can indeed do nice music with just a BEEP command.
I used ConsoleBeep to make a melody with multiple instruments in VB.NET:

http://tile44.org/files/ConsoleBeep.zip

Would be cool to have something like this in GLBasic too :)
~ Cave Story rules! ~