Home  ||  Blog  ||  Projects  ||  Google Hacks  ||  Artificial Life  ||  Search  ||  About

The canned laughter box

Canned laughter box is a small executable consisting of one button that when clicks, plays a laughter sound. The idea is that you can install this program and anytime somebody tells a joke, press the button. In comedies they use canned laughter to make jokes seem funnier. Why not in real life.

Apart from the practical (or not so practical) side of the program, the source illustrates two programming techniques, embedding sounds in an exe and the use of hot keys.

Sounds are embedded by creating a simple .rc script and compiling that using the Borland Resource Compiler, i.e. if sounds.rc contains:

SOUND1 SOUND "Laugh.wav"

Then type brc32.exe from the command line. Include the resulting res file with {$R Sounds.RES}. The sound is played with:

    h1:=FindResource(HInstance, 'SOUND1', 'SOUND');
    h2:=LoadResource(HInstance,h1);
    p:=LockResource(h2);
    sndPlaySound(p, SND_ASYNC or SND_MEMORY);

Hot keys are done by RegisterHotkey and then responding to the WMHotKey message. RegisterHotkey is passed an Atom value, created with GlobalAddAtom. If you press Ctrl-F11, the sound is player.

I compressed the exe using upx, a utility that compresses .exes.

downloadable files

Laughter.exeThe compressed executable. Ready to play.
source.zipThe sourcode for the project including wav file


laughter box
by anila
plz show me jokes every style

comment_2
by
bbalabalbfalbf

hi
by tom
good idea...need different laughs though. its fun.

funny
by Daniel
it would be great if it was possible to minimize the app to the system tray, this way it would like be running in the background and you could surprise ppl with a quick ctrl-f11 :)

Great, but...
by Dingbats
...it would be SO much better if it had different laughs, like 10 or so.

more laughs
by josh
give more laughs, like they all said. then it will be great.

comment_7
by

comment_8
by

comment_9
by Scott Kennedy
Great Program!!!
I would LOVE to see this with different laughs.

canned laughter
by Donald Strand
Where can I buy a "canned laughter box?" (The one that has one button on the top that you push to start the laughter)

ha ha ha
by g-dawg
i like the idea just get it in a physical box you can carry around

canned laughter
by Jim Weber
I can't stand canned laughter and don't know anybody who does. I looked forward to Julie Dryfus Show but turned it off almost immedistly when it seemed every word brought on canned laughter
hAS ANYBODY TAKEN A POLE TO SEE HOW MANY LIKE IT!

Laff or Laugh Box
by John
About 27 years ago, I had a teacher who had a laughing box. He would hit a button and it would laugh and laugh. Any idea where I can buy one? Thanks, John

evil box
by mel
My girlfriend across the street had a laughing box - things fell on top of it during the 1971 LA earthquake and the dang thing was laughing and laughing until they dug it out from under the debris and made it stop. I'll never forget that.

Practical uses
by Dan Scorpio
Oh yes!
ideal for interspersing 'comments' into political speeches, 'news' and the ramblings of the pompous and self opinionated

to use as a 'laughter box'; merely donload a few takes onto a handheld recorder

regards
DanS

Laugh box
by K
Anyone ever find out where to get a laugh box? I can't find one anywhere.

Laff Box Source
by John
Northridge Electronics is the inventor's company now run by his son.

Here's an article with a picture of a Laff Box:
http://www.unr.edu/nevadasilverandblue/archive/2007/spring/NSB07CannedLaughter.pdf

laugh box located
by lee mason
Your search is over http://www.prankplace.com/laughbag.htm

laugh box
by Heather
I am looking for a laugh box to purchase.
If you know where I can purchase one online or where I can order a laugh box please let me know ASAP.

Thank You!

Heather


Post a comment
(c) Douwe Osinga 2001-2005, douwe.webfeedback@gmail.com Vertaling Nederlands Duits?