Skip to content

Instantly share code, notes, and snippets.

@Clijsters
Created December 21, 2014 18:00
Show Gist options
  • Save Clijsters/25cc606ddca66615916f to your computer and use it in GitHub Desktop.
Save Clijsters/25cc606ddca66615916f to your computer and use it in GitHub Desktop.
beep tone through internal beeper
Module Module1
Dim a, b As Long
Declare Sub Beep Lib "kernel32.dll" (ByVal tone As Integer, ByVal dauer As Integer)
Public Function Rand(ByVal Low As Long, _
ByVal High As Long) As Long
Rand = Int((High - Low + 1) * Rnd()) + Low
End Function
Sub Main()
Console.Write( _
" _--~~--_ " & vbCrLf _
& " /~/_| |_\~\ " & vbCrLf _
& " |____________|" & vbCrLf _
& " |[][][][][][]|" & vbCrLf _
& " __| __ |__" & vbCrLf _
& " | ||. | == | |" & vbCrLf _
& "(| ||__| == | |" & vbCrLf _
& " | |[] [] == | |" & vbCrLf _
& " | |____________| |" & vbCrLf _
& " /__\ /__\" & vbCrLf _
& " ~~ ~~" & vbCrLf)
For i = 0 To 200000
a = Rand(800, 3500)
b = Rand(35, 185)
Beep(a, b)
Next
End Sub
End Module
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment