MIDI-2-OpenGL demonstration
by Ryan Avery (ravery@umail.ucsb.edu)

This program opens your default MIDI input and output devices, and responds to all incoming MIDI messages. Notes C2 to C4 on the MIDI input correspond to the 25 rotating spheres displayed in the OpenGL pane.

Though it was intended to work out of the box with an Oxygen8 MIDI controller, most any controller should work fine, but re-programming the controller knobs may be required for other setups.

MIDI controller messages modify the lighting parameters as follows:

Controller #	Controls
1		Y-coord of light
7		X-coord of light
11		Red value of diffuse light
12		Green value of diffuse light
13		Blue value of diffuse light
15		Red value of ambient light
16		Blue value of ambient light
17		Green value of ambient light

Press Escape to quit

IMPORTANT NOTE: This demonstration outputs OpenGL as fast as possible, and as such maxes out your processor when running. Take note of this fact when using it.


To compile this project in Visual C++ .Net:

You must include the pm_common and porttime directories in the PortMidi API in your Additional Include Directories option under Properties > C/C++ > General:
PortMidi\pm_common
PortMidi\porttime

Make sure the following libraries are included in Properties > Linker > Input > Additional Dependencies:
opengl32.lib
glu32.lib
odbc32.lib
odbccp32.lib
winmm.lib
portmidi.lib
porttime.lib
pm_dll.lib

As this is only a quick technology/interfacing demo, some re-coding might be necessary for this to run on your machine. As every MIDI I/O situation is different, you MAY need to change the IN and OUT parameters in openMidi to suit your specific setup. Run the test application packaged with PortMidi to determine the proper parameters to use with your system.