home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The World of Computer Software
/
World_Of_Computer_Software-02-385-Vol-1of3.iso
/
p
/
ptv3n5.zip
/
VBMIDI.ZIP
/
FORMLOAD.BAS
< prev
next >
Wrap
BASIC Source File
|
1992-10-15
|
692b
|
29 lines
Sub Form_Load ()
' Try to open the default MIDI device.
ErrCode = midiOutOpen(hmidi, -1, 0, 0, 0)
' Quit w/error if unable to.
If ErrCode <> 0 Then
st$ = "Error code " + Str$(ErrCode)
MsgBox (st$) ', 16, "Error!")
End
Else
' Send the patch change
' for voice 25, the steel-
' string guitar in General MIDI.
lmessage = &HC0 Or 0 Or (25 * 256) Or (0 * 65536)
ic& = midiOutShortMsg(hmidi, lmessage)
End If
' Set default values in the text boxes.
' This is the Note On message.
text1.text = "&h90"
' This value isn't used for note on.
text2.text = "0"
' Middle C.
text3.text = "64"
' Maximum volume.
text4.text = "127"
End Sub