internal pc speaker keyboard

Everything else that doesn't fall into one of the other PB categories.
Dreglor
Enthusiast
Enthusiast
Posts: 759
Joined: Sat Aug 02, 2003 11:22 pm
Location: OR, USA

internal pc speaker keyboard

Post by Dreglor »

i was bored and created internal pc speaker keyboard (aka electic piano)

it kinda quite on my system
so heres the code

Code: Select all

;********************************
;*Name: PC speaker keyboard     *
;*By: Dreglor                   *
;*last updated: 9-20-03 1:58pm  *
;********************************

InitKeyboard()
InitSprite()
OpenScreen(1024,768,32,"")
Repeat
ExamineKeyboard()
If KeyboardPushed(#PB_Key_1)
Beep_(500,1)
EndIf
If KeyboardPushed(#PB_Key_2)
Beep_(600,1)
EndIf
If KeyboardPushed(#PB_Key_3)
Beep_(700,1)
EndIf
If KeyboardPushed(#PB_Key_4)
Beep_(800,1)
EndIf
If KeyboardPushed(#PB_Key_5)
Beep_(900,1)
EndIf
If KeyboardPushed(#PB_Key_6)
Beep_(1000,1)
EndIf
If KeyboardPushed(#PB_Key_7)
Beep_(1100,1)
EndIf
If KeyboardPushed(#PB_Key_8)
Beep_(1200,1)
EndIf
If KeyboardPushed(#PB_Key_9)
Beep_(1300,1)
EndIf
If KeyboardPushed(#PB_Key_0)
Beep_(1400,1)
EndIf
Until KeyboardPushed(#PB_Key_Escape)
CloseScreen()
End
i guess opb onbly allows you to chack the keyboard only if you have a active screen...

this is exicting for about 60 seconds :P
dunno maybe i create a reader and write songs for it
~Dreglor