Jump to content
Sign in to follow this  
alexischeng

DllCall to change beep frq & dur

Recommended Posts

alexischeng

Change the Beep frequency Duration is

produce a simple simple piano program

;$freq is the frequency

;$dur is the duration

$freq = 2000

$dur = 1000

DLLCall("kernel32.dll","int","Beep","long",$freq,"long",$dur);

Alexis Cheng,

Beep.au3

Share this post


Link to post
Share on other sites
cybie

Can you supply an example of how this could be used? I can't seem to figure out how I would make different tones and play them... :lmao:


Writing damaged code since 1996.

Share this post


Link to post
Share on other sites
trids

$dur = 2  ;very very short note;o)
;going down ..
    for $freq = 3000 to 0 step -100
        DLLCall("kernel32.dll","int","Beep","long",$freq,"long",$dur);
    next
;going up..
    for $freq = 0 to 5000 step 100
        DLLCall("kernel32.dll","int","Beep","long",$freq,"long",$dur);
    next

HTH

o:):lmao:

.. or ..

For $nX = 1 to 300
        $nFreq = Int ( Random()*10000 )
        DLLCall("kernel32.dll","int","Beep","long",$nFreq,"long",20);
    Next
Edited by trids

Share this post


Link to post
Share on other sites
closeupman

Nice example, but $dur=2 is too short; it doesn't demonstrate the piano as was requested. It sounds like a short laser blast.

I tried $dur=100 and it sound more like going up and down the notes.

$dur = 2 ;very very short note;o)
;going down ..
    for $freq = 3000 to 0 step -100
        DLLCall("kernel32.dll","int","Beep","long",$freq,"long",$dur);
    next
;going up..
    for $freq = 0 to 5000 step 100
        DLLCall("kernel32.dll","int","Beep","long",$freq,"long",$dur);
    next

HTH

o:)  :lmao:

.. or ..

For $nX = 1 to 300
        $nFreq = Int ( Random()*10000 )
        DLLCall("kernel32.dll","int","Beep","long",$nFreq,"long",20);
    Next

<{POST_SNAPBACK}>

Share this post


Link to post
Share on other sites
datkewlguy

my friend and i worked on the first one together and i did the second one myself. The first one is the mario theme and the second is fur else. Tell me what you think... thnx.

;mario
DllCall("kernel32.dll", "int", "Beep", "long", 659.255, "long", 150)
DllCall("kernel32.dll", "int", "Beep", "long", 659.255, "long", 150)
Sleep(150)
DllCall("kernel32.dll", "int", "Beep", "long", 659.255, "long", 150)
Sleep(150)
DllCall("kernel32.dll", "int", "Beep", "long", 523.251, "long", 150)
DllCall("kernel32.dll", "int", "Beep", "long", 659.255, "long", 150)
Sleep(150)
DllCall("kernel32.dll", "int", "Beep", "long", 783.991, "long", 150)
Sleep(450)
DllCall("kernel32.dll", "int", "Beep", "long", 391.995, "long", 150)
Sleep(450)
DllCall("kernel32.dll", "int", "Beep", "long", 523.251, "long", 150)
Sleep(300)
DllCall("kernel32.dll", "int", "Beep", "long", 391.995, "long", 150)
Sleep(300)
DllCall("kernel32.dll", "int", "Beep", "long", 329.628, "long", 150)
Sleep(300)
DllCall("kernel32.dll", "int", "Beep", "long", 440, "long", 150)
Sleep(150)
DllCall("kernel32.dll", "int", "Beep", "long", 493.883, "long", 150)
Sleep(150)
DllCall("kernel32.dll", "int", "Beep", "long", 466.164, "long", 150)
DllCall("kernel32.dll", "int", "Beep", "long", 440, "long", 150)
Sleep(150)
DllCall("kernel32.dll", "int", "Beep", "long", 391.995, "long", 150)
Sleep(150)
DllCall("kernel32.dll", "int", "Beep", "long", 659.225, "long", 150)
DllCall("kernel32.dll", "int", "Beep", "long", 783.991, "long", 150)
DllCall("kernel32.dll", "int", "Beep", "long", 880, "long", 150)
Sleep(150)
DllCall("kernel32.dll", "int", "Beep", "long", 698.456, "long", 150)
DllCall("kernel32.dll", "int", "Beep", "long", 783.991, "long", 150)
Sleep(150)
DllCall("kernel32.dll", "int", "Beep", "long", 659.225, "long", 150)
Sleep(150)
DllCall("kernel32.dll", "int", "Beep", "long", 523.251, "long", 150)
Sleep(150)
DllCall("kernel32.dll", "int", "Beep", "long", 587.330, "long", 150)
DllCall("kernel32.dll", "int", "Beep", "long", 493.883, "long", 150)
Sleep(150)
DllCall("kernel32.dll", "int", "Beep", "long", 523.251, "long", 150)
Sleep(300)
DllCall("kernel32.dll", "int", "Beep", "long", 391.995, "long", 150)
Sleep(300)
DllCall("kernel32.dll", "int", "Beep", "long", 329.628, "long", 150)
Sleep(300)
DllCall("kernel32.dll", "int", "Beep", "long", 440, "long", 150)
Sleep(150)
DllCall("kernel32.dll", "int", "Beep", "long", 493.883, "long", 150)
Sleep(150)
DllCall("kernel32.dll", "int", "Beep", "long", 466.164, "long", 150)
DllCall("kernel32.dll", "int", "Beep", "long", 440, "long", 150)
Sleep(150)
DllCall("kernel32.dll", "int", "Beep", "long", 391.995, "long", 150)
Sleep(150)
DllCall("kernel32.dll", "int", "Beep", "long", 659.225, "long", 150)
DllCall("kernel32.dll", "int", "Beep", "long", 783.991, "long", 150)
DllCall("kernel32.dll", "int", "Beep", "long", 880, "long", 150)
Sleep(150)
DllCall("kernel32.dll", "int", "Beep", "long", 698.456, "long", 150)
DllCall("kernel32.dll", "int", "Beep", "long", 783.991, "long", 150)
Sleep(150)
DllCall("kernel32.dll", "int", "Beep", "long", 659.225, "long", 150)
Sleep(150)
DllCall("kernel32.dll", "int", "Beep", "long", 523.251, "long", 150)
Sleep(150)
DllCall("kernel32.dll", "int", "Beep", "long", 587.330, "long", 150)
DllCall("kernel32.dll", "int", "Beep", "long", 493.883, "long", 150)
Sleep(450)
DllCall("kernel32.dll", "int", "Beep", "long", 783.991, "long", 150)
DllCall("kernel32.dll", "int", "Beep", "long", 739.989, "long", 150)
DllCall("kernel32.dll", "int", "Beep", "long", 698.456, "long", 150)
DllCall("kernel32.dll", "int", "Beep", "long", 622.254, "long", 150)
Sleep(150)
DllCall("kernel32.dll", "int", "Beep", "long", 659.255, "long", 150)
Sleep(150)
DllCall("kernel32.dll", "int", "Beep", "long", 415.305, "long", 150)
DllCall("kernel32.dll", "int", "Beep", "long", 440, "long", 150)
DllCall("kernel32.dll", "int", "Beep", "long", 523.251, "long", 150)
Sleep(150)
DllCall("kernel32.dll", "int", "Beep", "long", 440, "long", 150)
DllCall("kernel32.dll", "int", "Beep", "long", 523.251, "long", 150)
DllCall("kernel32.dll", "int", "Beep", "long", 587.330, "long", 150)
Sleep(300)
DllCall("kernel32.dll", "int", "Beep", "long", 783.991, "long", 150)
DllCall("kernel32.dll", "int", "Beep", "long", 739.989, "long", 150)
DllCall("kernel32.dll", "int", "Beep", "long", 698.456, "long", 150)
DllCall("kernel32.dll", "int", "Beep", "long", 622.254, "long", 150)
Sleep(150)
DllCall("kernel32.dll", "int", "Beep", "long", 659.255, "long", 150)
Sleep(150)
DllCall("kernel32.dll", "int", "Beep", "long", 1046.502 , "long", 150)
Sleep(150)
DllCall("kernel32.dll", "int", "Beep", "long", 1046.502, "long", 150)
DllCall("kernel32.dll", "int", "Beep", "long", 1046.502, "long", 150)
Sleep(750)
DllCall("kernel32.dll", "int", "Beep", "long", 783.991, "long", 150)
DllCall("kernel32.dll", "int", "Beep", "long", 739.989, "long", 150)
DllCall("kernel32.dll", "int", "Beep", "long", 698.456, "long", 150)
DllCall("kernel32.dll", "int", "Beep", "long", 622.254, "long", 150)
Sleep(150)
DllCall("kernel32.dll", "int", "Beep", "long", 659.255, "long", 150)
Sleep(150)
DllCall("kernel32.dll", "int", "Beep", "long", 415.305, "long", 150)
DllCall("kernel32.dll", "int", "Beep", "long", 440, "long", 150)
DllCall("kernel32.dll", "int", "Beep", "long", 523.251, "long", 150)
Sleep(150)
DllCall("kernel32.dll", "int", "Beep", "long", 440, "long", 150)
DllCall("kernel32.dll", "int", "Beep", "long", 523.251, "long", 150)
DllCall("kernel32.dll", "int", "Beep", "long", 587.330, "long", 150)
Sleep(300)
DllCall("kernel32.dll", "int", "Beep", "long", 622.254, "long", 150)
Sleep(300)
DllCall("kernel32.dll", "int", "Beep", "long", 587.330, "long", 150)
Sleep(300)
DllCall("kernel32.dll", "int", "Beep", "long", 523.251, "long", 150)
Sleep(1350)
DllCall("kernel32.dll", "int", "Beep", "long", 783.991, "long", 150)
DllCall("kernel32.dll", "int", "Beep", "long", 739.989, "long", 150)
DllCall("kernel32.dll", "int", "Beep", "long", 698.456, "long", 150)
DllCall("kernel32.dll", "int", "Beep", "long", 622.254, "long", 150)
Sleep(150)
DllCall("kernel32.dll", "int", "Beep", "long", 659.255, "long", 150)
Sleep(150)
DllCall("kernel32.dll", "int", "Beep", "long", 415.305, "long", 150)
DllCall("kernel32.dll", "int", "Beep", "long", 440, "long", 150)
DllCall("kernel32.dll", "int", "Beep", "long", 523.251, "long", 150)
Sleep(150)
DllCall("kernel32.dll", "int", "Beep", "long", 440, "long", 150)
DllCall("kernel32.dll", "int", "Beep", "long", 523.251, "long", 150)
DllCall("kernel32.dll", "int", "Beep", "long", 587.330, "long", 150)
Sleep(300)
DllCall("kernel32.dll", "int", "Beep", "long", 783.991, "long", 150)
DllCall("kernel32.dll", "int", "Beep", "long", 739.989, "long", 150)
DllCall("kernel32.dll", "int", "Beep", "long", 698.456, "long", 150)
DllCall("kernel32.dll", "int", "Beep", "long", 622.254, "long", 150)
Sleep(150)
DllCall("kernel32.dll", "int", "Beep", "long", 659.255, "long", 150)
Sleep(150)
DllCall("kernel32.dll", "int", "Beep", "long", 1046.502, "long", 150)
Sleep(150)
DllCall("kernel32.dll", "int", "Beep", "long", 1046.502, "long", 150)
DllCall("kernel32.dll", "int", "Beep", "long", 1046.502, "long", 150)
Sleep(750)
DllCall("kernel32.dll", "int", "Beep", "long", 783.991, "long", 150)
DllCall("kernel32.dll", "int", "Beep", "long", 739.989, "long", 150)
DllCall("kernel32.dll", "int", "Beep", "long", 698.456, "long", 150)
DllCall("kernel32.dll", "int", "Beep", "long", 622.254, "long", 150)
Sleep(150)
DllCall("kernel32.dll", "int", "Beep", "long", 659.255, "long", 150)
Sleep(150)
DllCall("kernel32.dll", "int", "Beep", "long", 415.305, "long", 150)
DllCall("kernel32.dll", "int", "Beep", "long", 440, "long", 150)
DllCall("kernel32.dll", "int", "Beep", "long", 523.251, "long", 150)
Sleep(150)
DllCall("kernel32.dll", "int", "Beep", "long", 440, "long", 150)
DllCall("kernel32.dll", "int", "Beep", "long", 523.251, "long", 150)
DllCall("kernel32.dll", "int", "Beep", "long", 587.330, "long", 150)
Sleep(300)
DllCall("kernel32.dll", "int", "Beep", "long", 622.254, "long", 150)
Sleep(300)
DllCall("kernel32.dll", "int", "Beep", "long", 587.330, "long", 150)
Sleep(300)
DllCall("kernel32.dll", "int", "Beep", "long", 523.251, "long", 150)
Sleep(1050)
DllCall("kernel32.dll", "int", "Beep", "long", 523.251, "long", 150)
DllCall("kernel32.dll", "int", "Beep", "long", 523.251, "long", 150)
Sleep(150)
DllCall("kernel32.dll", "int", "Beep", "long", 523.251, "long", 150)
Sleep(150)
DllCall("kernel32.dll", "int", "Beep", "long", 523.251, "long", 150)
DllCall("kernel32.dll", "int", "Beep", "long", 587.330, "long", 150)
Sleep(150)
DllCall("kernel32.dll", "int", "Beep", "long", 659.255, "long", 150)
DllCall("kernel32.dll", "int", "Beep", "long", 523.251, "long", 150)
Sleep(150)
DllCall("kernel32.dll", "int", "Beep", "long", 440, "long", 150)
DllCall("kernel32.dll", "int", "Beep", "long", 391.995, "long", 150)
Sleep(450)
DllCall("kernel32.dll", "int", "Beep", "long", 523.251, "long", 150)
DllCall("kernel32.dll", "int", "Beep", "long", 523.251, "long", 150)
Sleep(150)
DllCall("kernel32.dll", "int", "Beep", "long", 523.251, "long", 150)
Sleep(150)
DllCall("kernel32.dll", "int", "Beep", "long", 523.251, "long", 150)
DllCall("kernel32.dll", "int", "Beep", "long", 587.330, "long", 150)
DllCall("kernel32.dll", "int", "Beep", "long", 659.255, "long", 150)
Sleep(1200)
DllCall("kernel32.dll", "int", "Beep", "long", 523.251, "long", 150)
DllCall("kernel32.dll", "int", "Beep", "long", 523.251, "long", 150)
Sleep(150)
DllCall("kernel32.dll", "int", "Beep", "long", 523.251, "long", 150)
Sleep(150)
DllCall("kernel32.dll", "int", "Beep", "long", 523.251, "long", 150)
DllCall("kernel32.dll", "int", "Beep", "long", 587.330, "long", 150)
Sleep(150)
DllCall("kernel32.dll", "int", "Beep", "long", 659.255, "long", 150)
DllCall("kernel32.dll", "int", "Beep", "long", 523.251, "long", 150)
Sleep(150)
DllCall("kernel32.dll", "int", "Beep", "long", 440, "long", 150)
DllCall("kernel32.dll", "int", "Beep", "long", 391.995, "long", 150)
Sleep(450)
DllCall("kernel32.dll", "int", "Beep", "long", 659.255, "long", 150)
DllCall("kernel32.dll", "int", "Beep", "long", 659.255, "long", 150)
Sleep(150)
DllCall("kernel32.dll", "int", "Beep", "long", 659.255, "long", 150)
Sleep(150)
DllCall("kernel32.dll", "int", "Beep", "long", 523.251, "long", 150)
DllCall("kernel32.dll", "int", "Beep", "long", 659.255, "long", 150)
Sleep(150)
DllCall("kernel32.dll", "int", "Beep", "long", 783.991, "long", 150)
Sleep(450)
DllCall("kernel32.dll", "int", "Beep", "long", 391.995, "long", 150)
Sleep(450)
DllCall("kernel32.dll", "int", "Beep", "long", 523.251, "long", 150)
Sleep(300)
DllCall("kernel32.dll", "int", "Beep", "long", 391.995, "long", 150)
Sleep(300)
DllCall("kernel32.dll", "int", "Beep", "long", 329.628, "long", 150)
Sleep(300)
DllCall("kernel32.dll", "int", "Beep", "long", 440, "long", 150)
Sleep(150)
DllCall("kernel32.dll", "int", "Beep", "long", 493.883, "long", 150)
Sleep(150)
DllCall("kernel32.dll", "int", "Beep", "long", 466.164, "long", 150)
DllCall("kernel32.dll", "int", "Beep", "long", 440, "long", 150)
Sleep(150)
DllCall("kernel32.dll", "int", "Beep", "long", 391.995, "long", 150)
Sleep(150)
DllCall("kernel32.dll", "int", "Beep", "long", 659.225, "long", 150)
DllCall("kernel32.dll", "int", "Beep", "long", 783.991, "long", 150)
DllCall("kernel32.dll", "int", "Beep", "long", 880, "long", 150)
Sleep(150)
DllCall("kernel32.dll", "int", "Beep", "long", 698.456, "long", 150)
DllCall("kernel32.dll", "int", "Beep", "long", 783.991, "long", 150)
Sleep(150)
DllCall("kernel32.dll", "int", "Beep", "long", 659.225, "long", 150)
Sleep(150)
DllCall("kernel32.dll", "int", "Beep", "long", 523.251, "long", 150)
Sleep(150)
DllCall("kernel32.dll", "int", "Beep", "long", 587.330, "long", 150)
DllCall("kernel32.dll", "int", "Beep", "long", 493.883, "long", 150)
Sleep(150)
DllCall("kernel32.dll", "int", "Beep", "long", 523.251, "long", 150)
Sleep(300)
DllCall("kernel32.dll", "int", "Beep", "long", 391.995, "long", 150)
Sleep(300)
DllCall("kernel32.dll", "int", "Beep", "long", 329.628, "long", 150)
Sleep(300)
DllCall("kernel32.dll", "int", "Beep", "long", 440, "long", 150)
Sleep(150)
DllCall("kernel32.dll", "int", "Beep", "long", 493.883, "long", 150)
Sleep(150)
DllCall("kernel32.dll", "int", "Beep", "long", 466.164, "long", 150)
DllCall("kernel32.dll", "int", "Beep", "long", 440, "long", 150)
Sleep(150)
DllCall("kernel32.dll", "int", "Beep", "long", 391.995, "long", 150)
Sleep(150)
DllCall("kernel32.dll", "int", "Beep", "long", 659.225, "long", 150)
DllCall("kernel32.dll", "int", "Beep", "long", 783.991, "long", 150)
DllCall("kernel32.dll", "int", "Beep", "long", 880, "long", 150)
Sleep(150)
DllCall("kernel32.dll", "int", "Beep", "long", 698.456, "long", 150)
DllCall("kernel32.dll", "int", "Beep", "long", 783.991, "long", 150)
Sleep(150)
DllCall("kernel32.dll", "int", "Beep", "long", 659.225, "long", 150)
Sleep(150)
DllCall("kernel32.dll", "int", "Beep", "long", 523.251, "long", 150)
Sleep(150)
DllCall("kernel32.dll", "int", "Beep", "long", 587.330, "long", 150)
DllCall("kernel32.dll", "int", "Beep", "long", 493.883, "long", 150)
Sleep(150)
DllCall("kernel32.dll", "int", "Beep", "long", 659.255, "long", 150)
DllCall("kernel32.dll", "int", "Beep", "long", 523.251, "long", 150)
Sleep(150)
DllCall("kernel32.dll", "int", "Beep", "long", 391.995, "long", 150)
Sleep(300)
DllCall("kernel32.dll", "int", "Beep", "long", 415.305, "long", 150)
sleep(150)
DllCall("kernel32.dll", "int", "Beep", "long", 440.000, "long", 150)
DllCall("kernel32.dll", "int", "Beep", "long", 698.456, "long", 150)
sleep(150)
DllCall("kernel32.dll", "int", "Beep", "long", 698.456, "long", 150)
DllCall("kernel32.dll", "int", "Beep", "long", 440.000, "long", 150)
sleep(450)
DllCall("kernel32.dll", "int", "Beep", "long", 493.883, "long", 150)
sleep(50)
DllCall("kernel32.dll", "int", "Beep", "long", 880.000, "long", 150)
sleep(50)
DllCall("kernel32.dll", "int", "Beep", "long", 880.000, "long", 150)
sleep(50)
DllCall("kernel32.dll", "int", "Beep", "long", 880.000, "long", 150)
Sleep(50)
DllCall("kernel32.dll", "int", "Beep", "long", 783.991, "long", 150)
Sleep(50)
DllCall("kernel32.dll", "int", "Beep", "long", 698.456, "long", 150)
Sleep(50)
DllCall("kernel32.dll", "int", "Beep", "long", 659.255, "long", 150)
DllCall("kernel32.dll", "int", "Beep", "long", 523.251, "long", 150)
Sleep(150)
DllCall("kernel32.dll", "int", "Beep", "long", 440, "long", 150)
DllCall("kernel32.dll", "int", "Beep", "long", 391.995, "long", 150)
Sleep(450)
DllCall("kernel32.dll", "int", "Beep", "long", 659.255, "long", 150)
DllCall("kernel32.dll", "int", "Beep", "long", 523.251, "long", 150)
Sleep(150)
DllCall("kernel32.dll", "int", "Beep", "long", 391.995, "long", 150)
Sleep(300)
DllCall("kernel32.dll", "int", "Beep", "long", 415.305, "long", 150)
sleep(150)
DllCall("kernel32.dll", "int", "Beep", "long", 440.000, "long", 150)
DllCall("kernel32.dll", "int", "Beep", "long", 698.456, "long", 150)
sleep(150)
DllCall("kernel32.dll", "int", "Beep", "long", 698.456, "long", 150)
DllCall("kernel32.dll", "int", "Beep", "long", 440.000, "long", 150)
sleep(450)
DllCall("kernel32.dll", "int", "Beep", "long", 493.883, "long", 150)
sleep(50)
DllCall("kernel32.dll", "int", "Beep", "long", 698.456, "long", 150)
sleep(50)
DllCall("kernel32.dll", "int", "Beep", "long", 698.456, "long", 150)
sleep(50)
DllCall("kernel32.dll", "int", "Beep", "long", 698.456, "long", 150)
Sleep(50)
DllCall("kernel32.dll", "int", "Beep", "long", 659.255, "long", 150)
Sleep(50)
DllCall("kernel32.dll", "int", "Beep", "long", 587.330, "long", 150)
Sleep(50)
DllCall("kernel32.dll", "int", "Beep", "long", 523.251, "long", 150)
Sleep(1050)
DllCall("kernel32.dll", "int", "Beep", "long", 659.255, "long", 150)
DllCall("kernel32.dll", "int", "Beep", "long", 523.251, "long", 150)
Sleep(150)
DllCall("kernel32.dll", "int", "Beep", "long", 391.995, "long", 150)
Sleep(300)
DllCall("kernel32.dll", "int", "Beep", "long", 415.305, "long", 150)
sleep(150)
DllCall("kernel32.dll", "int", "Beep", "long", 440.000, "long", 150)
DllCall("kernel32.dll", "int", "Beep", "long", 698.456, "long", 150)
sleep(150)
DllCall("kernel32.dll", "int", "Beep", "long", 698.456, "long", 150)
DllCall("kernel32.dll", "int", "Beep", "long", 440.000, "long", 150)
sleep(450)
DllCall("kernel32.dll", "int", "Beep", "long", 493.883, "long", 150)
sleep(50)
DllCall("kernel32.dll", "int", "Beep", "long", 880.000, "long", 150)
sleep(50)
DllCall("kernel32.dll", "int", "Beep", "long", 880.000, "long", 150)
sleep(50)
DllCall("kernel32.dll", "int", "Beep", "long", 880.000, "long", 150)
Sleep(50)
DllCall("kernel32.dll", "int", "Beep", "long", 783.991, "long", 150)
Sleep(50)
DllCall("kernel32.dll", "int", "Beep", "long", 698.456, "long", 150)
Sleep(50)
DllCall("kernel32.dll", "int", "Beep", "long", 659.255, "long", 150)
DllCall("kernel32.dll", "int", "Beep", "long", 523.251, "long", 150)
Sleep(150)
DllCall("kernel32.dll", "int", "Beep", "long", 440, "long", 150)
DllCall("kernel32.dll", "int", "Beep", "long", 391.995, "long", 150)
Sleep(450)
DllCall("kernel32.dll", "int", "Beep", "long", 659.255, "long", 150)
DllCall("kernel32.dll", "int", "Beep", "long", 523.251, "long", 150)
Sleep(150)
DllCall("kernel32.dll", "int", "Beep", "long", 391.995, "long", 150)
Sleep(300)
DllCall("kernel32.dll", "int", "Beep", "long", 415.305, "long", 150)
sleep(150)
DllCall("kernel32.dll", "int", "Beep", "long", 440.000, "long", 150)
DllCall("kernel32.dll", "int", "Beep", "long", 698.456, "long", 150)
sleep(150)
DllCall("kernel32.dll", "int", "Beep", "long", 698.456, "long", 150)
DllCall("kernel32.dll", "int", "Beep", "long", 440.000, "long", 150)
sleep(450)
DllCall("kernel32.dll", "int", "Beep", "long", 493.883, "long", 150)
sleep(50)
DllCall("kernel32.dll", "int", "Beep", "long", 698.456, "long", 150)
sleep(50)
DllCall("kernel32.dll", "int", "Beep", "long", 698.456, "long", 150)
sleep(50)
DllCall("kernel32.dll", "int", "Beep", "long", 698.456, "long", 150)
Sleep(50)
DllCall("kernel32.dll", "int", "Beep", "long", 659.255, "long", 150)
Sleep(50)
DllCall("kernel32.dll", "int", "Beep", "long", 587.330, "long", 150)
Sleep(50)
DllCall("kernel32.dll", "int", "Beep", "long", 523.251, "long", 150)
Sleep(1050)
DllCall("kernel32.dll", "int", "Beep", "long", 523.251, "long", 150)
DllCall("kernel32.dll", "int", "Beep", "long", 523.251, "long", 150)
Sleep(150)
DllCall("kernel32.dll", "int", "Beep", "long", 523.251, "long", 150)
Sleep(150)
DllCall("kernel32.dll", "int", "Beep", "long", 523.251, "long", 150)
DllCall("kernel32.dll", "int", "Beep", "long", 587.330, "long", 150)
Sleep(150)
DllCall("kernel32.dll", "int", "Beep", "long", 659.255, "long", 150)
DllCall("kernel32.dll", "int", "Beep", "long", 523.251, "long", 150)
Sleep(150)
DllCall("kernel32.dll", "int", "Beep", "long", 440, "long", 150)
DllCall("kernel32.dll", "int", "Beep", "long", 391.995, "long", 150)
Sleep(450)
DllCall("kernel32.dll", "int", "Beep", "long", 523.251, "long", 150)
DllCall("kernel32.dll", "int", "Beep", "long", 523.251, "long", 150)
Sleep(150)
DllCall("kernel32.dll", "int", "Beep", "long", 523.251, "long", 150)
Sleep(150)
DllCall("kernel32.dll", "int", "Beep", "long", 523.251, "long", 150)
DllCall("kernel32.dll", "int", "Beep", "long", 587.330, "long", 150)
DllCall("kernel32.dll", "int", "Beep", "long", 659.255, "long", 150)
Sleep(1200)
DllCall("kernel32.dll", "int", "Beep", "long", 523.251, "long", 150)
DllCall("kernel32.dll", "int", "Beep", "long", 523.251, "long", 150)
Sleep(150)
DllCall("kernel32.dll", "int", "Beep", "long", 523.251, "long", 150)
Sleep(150)
DllCall("kernel32.dll", "int", "Beep", "long", 523.251, "long", 150)
DllCall("kernel32.dll", "int", "Beep", "long", 587.330, "long", 150)
Sleep(150)
DllCall("kernel32.dll", "int", "Beep", "long", 659.255, "long", 150)
DllCall("kernel32.dll", "int", "Beep", "long", 523.251, "long", 150)
Sleep(150)
DllCall("kernel32.dll", "int", "Beep", "long", 440, "long", 150)
DllCall("kernel32.dll", "int", "Beep", "long", 391.995, "long", 150)
Sleep(450)
DllCall("kernel32.dll", "int", "Beep", "long", 659.255, "long", 150)
DllCall("kernel32.dll", "int", "Beep", "long", 659.255, "long", 150)
Sleep(150)
DllCall("kernel32.dll", "int", "Beep", "long", 659.255, "long", 150)
Sleep(150)
DllCall("kernel32.dll", "int", "Beep", "long", 523.251, "long", 150)
DllCall("kernel32.dll", "int", "Beep", "long", 659.255, "long", 150)
Sleep(150)
DllCall("kernel32.dll", "int", "Beep", "long", 783.991, "long", 150)
Sleep(450)
DllCall("kernel32.dll", "int", "Beep", "long", 391.995, "long", 150)
Sleep(450)
DllCall("kernel32.dll", "int", "Beep", "long", 659.255, "long", 150)
DllCall("kernel32.dll", "int", "Beep", "long", 523.251, "long", 150)
Sleep(150)
DllCall("kernel32.dll", "int", "Beep", "long", 391.995, "long", 150)
Sleep(300)
DllCall("kernel32.dll", "int", "Beep", "long", 415.305, "long", 150)
sleep(150)
DllCall("kernel32.dll", "int", "Beep", "long", 440.000, "long", 150)
DllCall("kernel32.dll", "int", "Beep", "long", 698.456, "long", 150)
sleep(150)
DllCall("kernel32.dll", "int", "Beep", "long", 698.456, "long", 150)
DllCall("kernel32.dll", "int", "Beep", "long", 440.000, "long", 150)
sleep(450)
DllCall("kernel32.dll", "int", "Beep", "long", 493.883, "long", 150)
sleep(50)
DllCall("kernel32.dll", "int", "Beep", "long", 880.000, "long", 150)
sleep(50)
DllCall("kernel32.dll", "int", "Beep", "long", 880.000, "long", 150)
sleep(50)
DllCall("kernel32.dll", "int", "Beep", "long", 880.000, "long", 150)
Sleep(50)
DllCall("kernel32.dll", "int", "Beep", "long", 783.991, "long", 150)
Sleep(50)
DllCall("kernel32.dll", "int", "Beep", "long", 698.456, "long", 150)
Sleep(50)
DllCall("kernel32.dll", "int", "Beep", "long", 659.255, "long", 150)
DllCall("kernel32.dll", "int", "Beep", "long", 523.251, "long", 150)
Sleep(150)
DllCall("kernel32.dll", "int", "Beep", "long", 440, "long", 150)
DllCall("kernel32.dll", "int", "Beep", "long", 391.995, "long", 150)
Sleep(450)
DllCall("kernel32.dll", "int", "Beep", "long", 659.255, "long", 150)
DllCall("kernel32.dll", "int", "Beep", "long", 523.251, "long", 150)
Sleep(150)
DllCall("kernel32.dll", "int", "Beep", "long", 391.995, "long", 150)
Sleep(300)
DllCall("kernel32.dll", "int", "Beep", "long", 415.305, "long", 150)
sleep(150)
DllCall("kernel32.dll", "int", "Beep", "long", 440.000, "long", 150)
DllCall("kernel32.dll", "int", "Beep", "long", 698.456, "long", 150)
sleep(150)
DllCall("kernel32.dll", "int", "Beep", "long", 698.456, "long", 150)
DllCall("kernel32.dll", "int", "Beep", "long", 440.000, "long", 150)
sleep(450)
DllCall("kernel32.dll", "int", "Beep", "long", 493.883, "long", 150)
sleep(50)
DllCall("kernel32.dll", "int", "Beep", "long", 698.456, "long", 150)
sleep(50)
DllCall("kernel32.dll", "int", "Beep", "long", 698.456, "long", 150)
sleep(50)
DllCall("kernel32.dll", "int", "Beep", "long", 698.456, "long", 150)
Sleep(50)
DllCall("kernel32.dll", "int", "Beep", "long", 659.255, "long", 150)
Sleep(50)
DllCall("kernel32.dll", "int", "Beep", "long", 587.330, "long", 150)
Sleep(50)
DllCall("kernel32.dll", "int", "Beep", "long", 523.251, "long", 150)
Sleep(1050)
DllCall("kernel32.dll", "int", "Beep", "long", 523.251, "long", 150)
Sleep(300)
DllCall("kernel32.dll", "int", "Beep", "long", 391.995, "long", 150)
Sleep(300)
DllCall("kernel32.dll", "int", "Beep", "long", 329.628, "long", 150)
Sleep(100)
DllCall("kernel32.dll", "int", "Beep", "long", 440, "long", 150)
Sleep(50)
DllCall("kernel32.dll", "int", "Beep", "long", 493.883, "long", 150)
Sleep(50)
DllCall("kernel32.dll", "int", "Beep", "long", 440, "long", 150)
Sleep(50)
DllCall("kernel32.dll", "int", "Beep", "long", 415.305, "long", 150)
Sleep(50)
DllCall("kernel32.dll", "int", "Beep", "long", 466.164, "long", 150)
Sleep(50)
DllCall("kernel32.dll", "int", "Beep", "long", 415.305, "long", 150)
Sleep(50)
DllCall("kernel32.dll", "int", "Beep", "long", 391.995, "long", 150)
DllCall("kernel32.dll", "int", "Beep", "long", 349.228, "long", 150)
DllCall("kernel32.dll", "int", "Beep", "long", 391.995, "long", 600)

;fur elise
DLLCall("kernel32.dll","int","Beep","long", 880.000,"long", 150)
DLLCall("kernel32.dll","int","Beep","long", 830.609,"long", 150)
DLLCall("kernel32.dll","int","Beep","long", 880.000,"long", 150)
DLLCall("kernel32.dll","int","Beep","long", 830.609,"long", 150)
DLLCall("kernel32.dll","int","Beep","long", 880.000,"long", 150)
DLLCall("kernel32.dll","int","Beep","long", 659.255,"long", 150)
DLLCall("kernel32.dll","int","Beep","long", 783.991,"long", 150)
DLLCall("kernel32.dll","int","Beep","long", 698.456,"long", 150)
DLLCall("kernel32.dll","int","Beep","long", 587.330,"long", 300)
Sleep(150)
DLLCall("kernel32.dll","int","Beep","long", 440.000,"long", 150)
DLLCall("kernel32.dll","int","Beep","long", 587.330,"long", 150)
DLLCall("kernel32.dll","int","Beep","long", 698.456,"long", 150)
DLLCall("kernel32.dll","int","Beep","long", 659.255,"long", 300)
Sleep(150)
DLLCall("kernel32.dll","int","Beep","long", 440.000,"long", 150)
DLLCall("kernel32.dll","int","Beep","long", 659.255,"long", 150)
DLLCall("kernel32.dll","int","Beep","long", 783.991,"long", 150)
DLLCall("kernel32.dll","int","Beep","long", 698.456,"long", 300)
Sleep(150)
DLLCall("kernel32.dll","int","Beep","long", 587.330,"long", 150)
DLLCall("kernel32.dll","int","Beep","long", 880.000,"long", 150)
DLLCall("kernel32.dll","int","Beep","long", 830.609,"long", 150)
DLLCall("kernel32.dll","int","Beep","long", 880.000,"long", 150)
DLLCall("kernel32.dll","int","Beep","long", 830.609,"long", 150)
DLLCall("kernel32.dll","int","Beep","long", 880.000,"long", 150)
DLLCall("kernel32.dll","int","Beep","long", 659.255,"long", 150)
DLLCall("kernel32.dll","int","Beep","long", 783.991,"long", 150)
DLLCall("kernel32.dll","int","Beep","long", 698.456,"long", 150)
DLLCall("kernel32.dll","int","Beep","long", 587.330,"long", 300)
Sleep(150)
DLLCall("kernel32.dll","int","Beep","long", 440.000,"long", 150)
DLLCall("kernel32.dll","int","Beep","long", 587.330,"long", 150)
DLLCall("kernel32.dll","int","Beep","long", 698.456,"long", 150)
DLLCall("kernel32.dll","int","Beep","long", 659.255,"long", 300)
Sleep(150)
DLLCall("kernel32.dll","int","Beep","long", 659.255,"long", 150)
DLLCall("kernel32.dll","int","Beep","long", 698.456,"long", 150)
DLLCall("kernel32.dll","int","Beep","long", 659.255,"long", 150)
DLLCall("kernel32.dll","int","Beep","long", 587.330,"long", 200)
Sleep(150)


DLLCall("kernel32.dll","int","Beep","long", 659.255,"long", 150)
DLLCall("kernel32.dll","int","Beep","long", 698.456,"long", 150)
DLLCall("kernel32.dll","int","Beep","long", 783.991,"long", 150)
DLLCall("kernel32.dll","int","Beep","long", 880.000,"long", 300)
Sleep(150)
DLLCall("kernel32.dll","int","Beep","long", 587.330,"long", 150)
DLLCall("kernel32.dll","int","Beep","long", 932.328,"long", 150)
DLLCall("kernel32.dll","int","Beep","long", 880.000,"long", 150)
DLLCall("kernel32.dll","int","Beep","long", 783.991,"long", 300)
Sleep(150)
DLLCall("kernel32.dll","int","Beep","long", 523.251,"long", 150)
DLLCall("kernel32.dll","int","Beep","long", 880.000,"long", 150)
DLLCall("kernel32.dll","int","Beep","long", 783.991,"long", 150)
DLLCall("kernel32.dll","int","Beep","long", 698.456,"long", 300)
Sleep(150)
DLLCall("kernel32.dll","int","Beep","long", 523.251,"long", 150)
DLLCall("kernel32.dll","int","Beep","long", 783.991,"long", 150)
DLLCall("kernel32.dll","int","Beep","long", 698.456,"long", 150)
DLLCall("kernel32.dll","int","Beep","long", 659.255,"long", 300)

Sleep(150)


DLLCall("kernel32.dll","int","Beep","long", 587.330,"long", 150)
DLLCall("kernel32.dll","int","Beep","long", 880.000,"long", 150)
DLLCall("kernel32.dll","int","Beep","long", 830.609,"long", 150)
DLLCall("kernel32.dll","int","Beep","long", 880.000,"long", 150)
DLLCall("kernel32.dll","int","Beep","long", 830.609,"long", 150)
DLLCall("kernel32.dll","int","Beep","long", 880.000,"long", 150)
DLLCall("kernel32.dll","int","Beep","long", 659.255,"long", 150)
DLLCall("kernel32.dll","int","Beep","long", 783.991,"long", 150)
DLLCall("kernel32.dll","int","Beep","long", 698.456,"long", 150)
DLLCall("kernel32.dll","int","Beep","long", 587.330,"long", 300)
Sleep(150)
DLLCall("kernel32.dll","int","Beep","long", 440.000,"long", 150)
DLLCall("kernel32.dll","int","Beep","long", 587.330,"long", 150)
DLLCall("kernel32.dll","int","Beep","long", 698.456,"long", 150)
DLLCall("kernel32.dll","int","Beep","long", 659.255,"long", 300)
Sleep(150)
DLLCall("kernel32.dll","int","Beep","long", 659.255,"long", 150)
DLLCall("kernel32.dll","int","Beep","long", 698.456,"long", 150)
DLLCall("kernel32.dll","int","Beep","long", 659.255,"long", 150)
DLLCall("kernel32.dll","int","Beep","long", 587.330,"long", 200)
Sleep(150)

DLLCall("kernel32.dll","int","Beep","long", 880.000,"long", 250)
Sleep(200)
DLLCall("kernel32.dll","int","Beep","long", 1174.659,"long", 150)

this is fun to do when you've got a few minutes/ are extremely bored lol.

Share this post


Link to post
Share on other sites
layer
get a life rofl this is amazing.. i havent seen anything like it! good work :lmao:

FootbaG

Share this post


Link to post
Share on other sites
SlimShady

I like the Mario theme.

Can you please tell me how you did it?

BTW, I optimized your code a bit, see attachment

A bit because there's not much you can optimize.

Edited by SlimShady

Share this post


Link to post
Share on other sites
Helge

Hehe !

Those scripts were very cool.

I really like the Mario theme ! :lmao:

Share this post


Link to post
Share on other sites
pcdestroyer

Hehe !

Those scripts were very cool.

I really like the Mario theme !  o:)

<{POST_SNAPBACK}>

looks amazing but for some reason i cant hear anything .... that happend with that morse code thing too .. it just doesnt make a sound :) what's wrong with my pc GRRRRRRRRRRRRRR :lmao:

Share this post


Link to post
Share on other sites
datkewlguy

nothing is wrong with your pc, if it doesnt play that just means that you dont have an internal soundcard/ the one you have isnt loud enough.

Share this post


Link to post
Share on other sites
CyberSlug

Unfinished, but youl should get the idea :lmao:

EDIT: See "complete" version at http://www.autoitscript.com/forum/index.ph...wtopic=8187&hl=

Play("E D C D E E E 0 D D D 0 E G G 0")
Play("E D C D E E E E D D E D C")

Func Play($music)
; the very last entry in $octave_four should be out of most people's hearing range
; and is used to simulate a rest
    Local $octave_four = StringSplit("246.94 261.63 277.18 293.66 311.13 329.63 349.23 369.99 392.00 415.30 440.00 466.16 32767", " ")
    Local $C=1, $D=3, $E=5, $F=6, $G=8, $A=10, $B=12, $0=13
    Local $i
    $music = StringSplit($music, " ")
    For $i = 0 to $music[0]
        DLLCall("kernel32.dll","int","Beep","long", $octave_four[Eval($music[$i])],"long", 300)
    Next
EndFunc
Edited by CyberSlug

Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!

Share this post


Link to post
Share on other sites
datkewlguy

that could be very useful cyber slug, how do u change octaves/ control flats and sharps? tell me when u finish

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×