Sign in to follow this  
Followers 0
daslick

Beep Player

3 posts in this topic

#1 ·  Posted (edited)

I made a test proggy to play beep songs (using the system speaker)... but when I start a song the only way to stop it is to end the program. How can I stop the song's function?

GuiSetState()
While 1
    $msg = GuiGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
        Exit
    Case $msg = $muteunmute
        _stop()
    Case $msg = $next
        if $song = "" then _mario()
        if $song = "mario" then _clockscoldplay()
        if $song = "clockscoldplay" then _mario()
    Case $msg = $previous
        if $song = "" then _clockscoldplay()
        if $song = "mario" then _mario()
        if $song = "clockscoldplay" then _clockscoldplay()
    Case Else
;
    EndSelect
WEnd


;songs
Func _mario()   
    $song = "mario"
    do
        _56(162)
        _56(162)
        _R(54)
        _56(162)
        _R(54)
    Until 1
EndFunc



Func _clockscoldplay()
    $song = "clockscoldplay"
    $count = 1
    Do
        _67(200)
        _62(200)
        _59(200)
        _R(10)
        $count = $count + 1
        Until not $song not = "clockscoldplay" or $count = 8
EndFunc

Func _stop()
    $song = ""
EndFunc

Let me know if you need more info or something.

Thanks EDIT:shortened the songs to save space on page

Edited by daslick

Share this post


Link to post
Share on other sites



Ok thanks for the link.

Does anyone know how to make it beep until you release the key in stead of beep over and over until you release the key.

I want to make a musical keyboard proggy :lmao:.

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  
Followers 0