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?
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...
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)
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
That would be nice :)
But would it be used enough to justify coding it ?
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!)
Quote from: MrTAToad 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
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 :)