gm_beep


I know there is a gmcl_beep released already. I released mine because of requests. He has spent like a week to try to properly thread his, and this one is not only properly threaded, it has more features, and works on both the server and client by default.

This module exposes the motherboard bell or its software emulated counterpart to gmod:



Beep(frequency, duration) - Queues a beep at the specified frequency for the specified duration in milliseconds
Beep(duration) - Queues a pause for the specified duration in milliseconds
Beep.Beeping - Boolean, whether or not gmod is currently making the bell beep
Beep.Queue - Number, The amount of currently queued beeps/pauses
Beep.Frequency - Number, the frequency of the current beep, or 0 if it's not currently beeping
Beep.Duration - Number, the duration (not the time left!) of the current beep, or 0 if it's not currently beeping


Calls to Beep return immediately. Beeps are beeped sequentially, so you can schedule as many beeps/pauses as you want, and the module will beep them in order.

Example: beep when mentioned in chat (clientside script)
[lua]
require(“beep”)

hook.Add(“ChatText”, “beep_chathighlight”, function( index, nick, text, msgtype )
if text:lower():find(LocalPlayer():Nick():lower()) then
Beep(400, 200)
Beep(500, 200)
Beep(600, 200)
end
end )
[/lua]
Plays a primitive tune whenever your name is mentioned in chat, case insensitive.

Download v1.0.4 (source included)
Extract the zip file to garrysmod/garrysmod/lua/includes/modules. You can delete gm_beep.cpp if you want to.
http://errur.com/f/images/u/731.png

#luahelp mirror
filesmelt mirror

Awesome! :slight_smile:

because what we all need is our motherboard to beep while playing gmod

yeah another useless shitty module from known pedophile jA_cOp. awesome.

yeah another useless shitty post from known pedophile A MF Beryd. awesome.

don’t defend him you retard it’s completely fucking true, actually read the channel you idle in and shit up on daily basis.

Azu bitched about me pretending thread synchronisation issues don’t exist, so I synchronised it. Update in the first post.

-snip-
there are 2 now?

Serously, what the fuck is wrong with you?

Also, great release, unlike the other :wink:

Hey Deco Da Man, suck my nut:
http://luaduck.co.uk/2009/07/20/video-beepnam-demo/
I’ll release beepnam later today

-snip-

Released an update, fixes a few possible bugs and adds Beep.Frequency and Beep.Duration. I probably won’t add any more to this module unless someone requests something.

Nothing real more needs to be added now. Might I suggest gm_midi for midi synthesizers?

http://www.garrysmod.org/img/?t=dll&id=73497

You really don’t need to compete with Beepnam, it’s a completely different objective to what you’re trying to accomplish. Where as yours will probably be able to accept notes at it’s best, beepnam will accept NAM codes (the same type as used in BeepMaker).

Just use gm_bass by AzuiSleet, it’s on Google Code somewhere

Ohwell, i’ll implement a piano like thing later on :slight_smile:

Thats totally awesome :3

What about gm_clipboard, for reading and writing to the clipboard?

I think that clipboard reading isn’t a good idea because you can steal sensitive information that way.
For writing, there is http://wiki.garrysmod.com/?title=G.SetClipboardText already.