News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

William Tell (sp?)

Started by thomas_remkus, March 25, 2006, 01:52:18 PM

Previous topic - Next topic

thomas_remkus

I have an application that takes a long time to process. Waiting on other remote systems to do their work. When my application returns I have a bell that goes off several times indicating complete. How can I make different tones of various lengths so I can make something like William Tell (sp?). That's much better than a bell which does get ignored. I want to use the simpliest method possible and hope it's already inside all Windows95 and above. Any help is appreciated.

Mark Jones

Hey Thomas, welcome back! It took a little searching but I found something that should help ya:

http://www.masmforum.com/simple/index.php?topic=1789.0
"To deny our impulses... foolish; to revel in them, chaos." MCJ 2003.08

ChrisLeslie


.386
.model flat,stdcall
option casemap:none
include \masm32\include\kernel32.inc
includelib \masm32\lib\kernel32.lib     
.code
    start:
    invoke Beep, 750,75
     invoke Beep, 10000,75
    invoke Beep, 750,75
     invoke Beep, 10000,75
    invoke Beep, 750,300
    invoke Beep, 750,75
     invoke Beep, 10000,75
    invoke Beep, 750,75
     invoke Beep, 10000,75
    invoke Beep, 750,300
    invoke Beep, 750,75
     invoke Beep, 10000,75
    invoke Beep, 750,75
     invoke Beep, 10000,75

    invoke Beep, 1000,300
    invoke Beep, 1110,300
    invoke Beep, 1250,300
    ret     
end start

Tedd

Beep only has one tone (and duration) on Win95/98 ::)

I'd go for playing a wav/midi file -- of course this requires a sound card, but who doesn't have a sound card??

{See "PlaySound" in winmm http://msdn.microsoft.com/library/default.asp?url=/library/en-us/multimed/htm/_win32_playsound.asp}
No snowflake in an avalanche feels responsible.

ChrisLeslie

QuoteBeep only has one tone (and duration) on Win95/98
Darn  :boohoo:. I though it sounded pretty OK with my XP! - Chris  :8)

thomas_remkus

Thanks everyone!! Shoot, I've been gone for so long I didn't think anyone would remember me. Nice, I can't tell you how good that feels.

I moved from partX of Houston to partY to a much nicer place.

Frankly, work has just been getting in the way of my MASM. I love this community and know that when I want to ask questions to the smartest programmers on the web ... this is where I come. There's no second IMO.