SAMPLE: MIDISmpl.exe Demonstrates How To Control MIDI DevicesLast reviewed: February 20, 1998Article ID: Q181360 |
The information in this article applies to:
SUMMARYMIDISmpl.exe is a self-extracting compressed file containing a Visual Basic project that demonstrates controlling a MIDI device using some Windows API functions. You can use the code in this project to control a MIDI device from within your program.
MORE INFORMATIONThe following file is available for download from the Microsoft Software Library:
~ MIDISmpl.exe (size: 29039 bytes)For more information about downloading files from the Microsoft Software Library, please see the following article in the Microsoft Knowledge Base:
ARTICLE-ID: Q119591 TITLE : How to Obtain Microsoft Support Files from Online ServicesWhen you run the self-extracting executable file, the following files are expanded into the MIDI Sample Project directory of your hard drive:
The MIDI Device menu allows you to set the MIDI device to another MIDI device. The contents of this menu depends upon the number of MIDI output devices you have installed in your system. The Channel menu allows you to set what MIDI channel the project will control. The Base Note menu allows you to set the note of the first key in the keyboard. For example, the default setting of 60 corresponds to the middle C note. The first key in the keyboard or the Z key will play a middle C.
How the Sample WorksThe midiOutGetNumDevs function is used to determine if there are any MIDI devices and how many devices in the system. To find out the capabilities of the MIDI device in the system, use the midiOutGetDevCaps that contains a pointer to the User defined type variable containing the capability information. The midiOutOpen and midiOutClose functions respectively open and close the MIDI devices to receive MIDI instructions. The midiOutShortMsg function is used to send the MIDI instruction. (c) Microsoft Corporation 1998, All Rights Reserved. Contributions by Arsenio Locsin, Microsoft Corporation Keywords : vb5all VBKBWinAPI kbsample Version : WINDOWS:5.0 Platform : WINDOWS Solution Type : kbfile |
================================================================================
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |