From: 70233.1552@CompuServe.COM (Mark T. Pflaging)
Newsgroups: sci.virtual-worlds
Subject: TECH: Annoucing-- Musical Glove Program!
Date: 11 Nov 92 08:45:19 GMT
Article-I.D.: u.1992Nov12.021824.22863
Organization: University of Washington
Originator: hlab@stein.u.washington.edu


Edited and crossposted from Compuserve message base:

NEWS FLASH!  The first PC program to use the glove to generate music
has been created!  The file will be available via anonymous ftp within a
few days.  Read on...

--------------------

Musical VR'ers:

I have uploaded midiglov.zip to library 11 [of graphdev forum on
Compuserve].  It contains two .exe's using the Nintendo power glove
as a midi controller.  It has a theramin type effect.

DOCUMENT FILE FOR MIDI ADDITION TO O2GLOVE by Mick Imfeld The files
in this Zip are files from o2glov.zip into which I spliced midi
control functions using the Musicquest Toolkit.

HELPME!.DOC and THEGLOVE.DOC are included in unaltered form. These files
tell how to hook the Nintendo Power Glove to the parallel port of an IBM
compatible computer, and how to maximize the glove's performance.

The files:

UF_GLOV1.CPP UF_GLOV2.CPP GLGRPH1.CPP GLGRPH2.CPP MO2GLOVE.PRJ
MO2GLOVE.DSK

are my modifications of files by the same name (minus the first letter
"M" which I added so you would not overwrite your o2glove files of
the same name if you unzip in the directory where you have the
o2glove files stored) from o2glov.zip.  To produce midiglov.exe,
change uf_glov1.cpp and glgrph1.cpp to uf_glove.cpp and glgrph.cpp.
To produce midiglo2.exe rename uf_glov2.cpp and glgrph2.cpp to
glgrph.cpp and ul_glove.cpp.

Midiglov.exe and midiglo2.exe are executables file which will behave
in the same manner as o2glove.exe except that midi transmissions are
linked to the glove movements as well as the graphic display.  For
the difference in the two see PROBLEMS.

X-Axis:  the X Axis sends midi note numbers.  The note-on note-off
function is controlled by the index finger of the glove.  (fist=off)
The program asks you how many notes you wish to spread over the 256
X axis values.

Y-Axis:  the Y Axis controls midi pitch bend messages, with up bending up
(big surprise).  You are asked upon startup if you wish to turn this
function on or off.  Pitch bend range must be done on your instrument for
now, but it should be controlled in the software as the project develops.

Z-Axis:  the Z Axis controls volume by sending midi controller 7 volume
control messages.  If your midi instrument does not receive this
controller the program probably will not work for you.  Some volume
scaling is available depending on how far from the glove receivers the
glove is placed when you center the glove.  Greater control over the
volume range is needed.

PROGRAMMING:  In order to compile this program, besides adjusting the
directory parameters and adjusting for the differences between Turbo
C++ 3.0 which I used and another compiler, you must have the files
mcc.h and mcctkf.asm compiled for large model.  These files are
contained in the Musicquest Programmers Toolkit.  (Note Musicquest
compiles their large model obj as mcctkfl.obj, while I used the name
mcctkf.obj.)

All I did was to locate the portion of the o2glove code where the
glove parameters are sent to the graphics screen and insert a function
which also sends the parameters to the above described functions on
the midi card.  This is located in the file glgrph.cpp.  I added to 
the main program file ul_glove.cpp the interface initialization
routines and some user input code, and interface close code.

I believe the program should function on any MPU 401 compatible card,
although I have only tried it on an MQX32M.

PROBLEMS:  Obviously this is just a programming example and does not
begin to touch the potential of the glove as a midi controller.

The biggest problem so far is that my method of sending note off
messages does not catch all of the note on's generated by the glove.
If the midi intstument receives the "all notes off" message, this is
not a probem.  My Roland D-5 does.  My Keyboard model EPS 16+ does not.
I created midiglo2.exe for instruments which do not accept midi all
note off messages.  The only thing I could think of (in the 2 hours
since I discovered the problem) was to send multiple individual note
off messages.  I have covered from two notes below the range to two
notes above so as to catch the effect of the pitch bend.  It seems to
slow down the whole works, so I am anxious to see what clever 
solutions our predigious programmer members come up with.

In fact, my hope is that a number of the experienced programmers here
will take this idea and run with it, creating a wonderful new musical
experience for enthusiasts like me.  [not as yet.]

DISCLAIMER:  This is freeware.  I can only offer it for free if you
agree to waive all rights against me if the program crashes your
comupter, overwrites your operating system and the last 10 years
accounting records, melts down your synth and breaks the water pipes
in the toilet, or any other damage I may have left out.  I an not a
professional programmer.  I barely know enough to get this thing to
work.  I do not profess to know anything about C++ programming
technique.  The whole thing is a kludge, but what the heck, I'm
having a good time.

ACKNOWLEDGEMENTS:  To the extent this program works, please give
credit to Mark Pflaging and all of the others who worked to create
o2glove, and who are credited in various files in the o2glov.zip.

Mick Imfeld  contact: Cserve graphdev Sections 10 & 11.

[Internet people:  Please contact me (Mark Pflaging) at
70233.1552@CompuServe.com. Mick does not wish to be flooded with
technical questions.]

Ideas on uses for midi glove:

right now the glove takes the notes you specify for the X Axis and plays
them sequentially.  Instead, an array could be built which could load a
series of jazz scales which the glove could go through by setting up the
sequence of scales beforehand then selecting them with the 10 glove
buttons.

Other ideas?




Distribution:
  GloveList INTERNET:glove-list@win30.nas.nasa.gov
  Internet Sci-VW INTERNET: hlab@milton.u.washington.edu