How to make a beep [SOLVED]
How to make a beep [SOLVED]
Is there an easy way to make a beep sound in Gambas? The gb.ncurses component seems to have Screen.Beep() but I couldn't make it work. Besides I am working on a Graphical application.
Last edited by JumpyVB on Friday 21st April 2023 6:29pm, edited 1 time in total.
- cogier
- Site Admin
- Posts: 1118
- Joined: Wednesday 21st September 2016 2:22pm
- Location: Guernsey, Channel Islands
Re: How to make a beep
This is the way I do it. You need gb.sdl2.audio. You then load a music file and play it. This can be a 'beep' or a 2-hour concert. I have attached a 'beep.ogg' file for you to put in your program's main folder.
''Needs gb.sdl2.audio
Public Sub Form_Open()
Music.Load(Application.Path &/ "beep.ogg")
Music.Play
End
Re: How to make a beep
Sometimes this question about the beep comes up. Out of curiosity, I'm reporting the discussions, opened in some Gambas forums, related to that topic:
viewtopic.php?f=4&t=1110
https://www.gambas-club.de/viewtopic.php?f=3&t=5226
https://foro.gambas-es.org/viewtopic.php?f=5&t=6884
https://www.gambas-it.org/smf/index.php?topic=324.0
https://www.gambas-it.org/wiki/index.ph ... are_un_bip
viewtopic.php?f=4&t=1110
https://www.gambas-club.de/viewtopic.php?f=3&t=5226
https://foro.gambas-es.org/viewtopic.php?f=5&t=6884
https://www.gambas-it.org/smf/index.php?topic=324.0
https://www.gambas-it.org/wiki/index.ph ... are_un_bip
Europaeus sum !
Amare memorentes atque deflentes ad mortem silenter labimur.
Amare memorentes atque deflentes ad mortem silenter labimur.
Re: How to make a beep
Very interesting.vuott wrote: ↑Saturday 8th April 2023 9:13am Sometimes this question about the beep comes up. Out of curiosity, I'm reporting the discussions, opened in some Gambas forums, related to that topic:
viewtopic.php?f=4&t=1110
https://www.gambas-club.de/viewtopic.php?f=3&t=5226
https://foro.gambas-es.org/viewtopic.php?f=5&t=6884
https://www.gambas-it.org/smf/index.php?topic=324.0
https://www.gambas-it.org/wiki/index.ph ... are_un_bip
Re: How to make a beep
Thanks from me too Cogier. I have some daily jobs that run for some time, enough time for a couple of games of solitaire or so. So I made your code into a little component with a static function to play a "nice" beep when the job completes. Very simple and works like a charm.
Have you ever noticed that software is never advertised using the adjective "spreadable".