|
-
Apr 1st, 2001, 10:22 PM
#1
Thread Starter
New Member
I have created a program to simply playa single MIDI note, I will later add several to play songs. I have so far been able to play a note as well as a song and it works very well, however, I am stuck with the Grand Piano! I would like to know how to change the instrument as well as (if possible) get a list of instruments.
==
==Form1
Dim hMIDI, MIDIMSG As Long Private Sub Command1_Click()
midiOutOpen hMIDI, 0, 0, 0, 0
MIDIMSG = 144 + (60 * 256) + (127 * 65536) + 0
midiOutShortMsg hMIDI, MIDIMSG
midiOutClose hMIDI
End Sub
==The equation (I found this from Microsoft corp @ http://support.microsoft.com/support.../Q181/3/60.asp)
MIDIMSG = &H90 + (intNote * &H100) + (intVolume * &H10000) + intChannel
midiOutShortMsg hMIDI, MIDIMSG
==Module1
Declare Function midiOutClose Lib "winmm.dll" (ByVal hMidiOut As Long) As Long
Declare Function midiOutOpen Lib "winmm.dll" (lphMidiOut As Long, ByVal uDeviceID As Long, ByVal dwCallback As Long, ByVal dwInstance As Long, ByVal dwFlags As Long) As Long
Declare Function midiOutShortMsg Lib "winmm.dll" (ByVal hMidiOut As Long, ByVal dwMsg As Long) As Long
==
Thank you for your time and help!
Last edited by Dougs3761; Apr 2nd, 2001 at 10:20 AM.
•Doug
-
Apr 5th, 2001, 09:12 PM
#2
Thread Starter
New Member
Thanks to anyone who read this. I have gotten an answer, however, from Microsoft Corp help.
Thank you
-
Apr 6th, 2001, 12:20 PM
#3
Monday Morning Lunatic
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|