[comp.windows.ms] MIDI for Windows

patrickd@chinet.chi.il.us (Patrick Deupree) (02/20/90)

Hey one and all.  I've got a customer here that wants to develop apps
for MIDI in Windows.  Problem is, what sort of device drivers are there
available?  He's got a Roland MPU-401 and has called Roland (no luck,
they say they've trashed the project).  He's called the companies that
write MPU-401 software and they've basically told him that they won't sell
the driver or tell him how they developed it.

Sooooo, would anyone out there have an mpu-401 driver that they've developed
and/or obtained?  If the price was right I'm sure these guys would pay
money for such a thing.

Thanks,

Patrick
-- 
"Organized fandom is composed of a bunch of nitpickers with a thing for
 trivial pursuit."
					-Harlan Ellison

carlc@mars.SanDiego.NCR.COM (Carl Christofferson) (02/21/90)

In article <1990Feb19.205639.15983@chinet.chi.il.us> you write:
>Hey one and all.  I've got a customer here that wants to develop apps
>for MIDI in Windows.

I am also interested in developing MIDI/music apps for Windows, but I have
no experience in this area at all!  Can anyone direct me to some good books
on developing MIDI/music apps and on how to use the Windows Sound functions?
Petzold doesn't mention them at all.

Thanks in advance!  Anything will help!

Carl Christofferson
carlc@mars.SanDiego.NCR.COM
disclaimer:  Any opinions expressed are entirely my own ... 

bcw@rti.UUCP (Bruce Wright) (02/21/90)

In article <2540@ncr-sd.SanDiego.NCR.COM>, carlc@mars.SanDiego.NCR.COM (Carl Christofferson) writes:
> In article <1990Feb19.205639.15983@chinet.chi.il.us> you write:
> >Hey one and all.  I've got a customer here that wants to develop apps
> >for MIDI in Windows.
> 
> I am also interested in developing MIDI/music apps for Windows, but I have
> no experience in this area at all!  Can anyone direct me to some good books
> on developing MIDI/music apps and on how to use the Windows Sound functions?
> Petzold doesn't mention them at all.

I'm a bit puzzled by this question.  It might be easier to answer 
questions if I knew what problem you are having.  The Windows sound 
functions are simple enough (really too simple for a lot of purposes).
One of the big problems is that IBM-PC only has one voice unless you 
get additional hardware, & as someone mentioned finding a driver for 
the new hardware might be difficult.  I haven't done this - just played 
around with the sound functions a bit on the standard hardware.  The
generalization to programming on more sophisticated hardware is pretty
straightforward, given the hardware and a driver for it;  however the
functions available to the Windows app are not really going to be able
to take full advantage of sophisticated hardware;  the best you will
be able to do will probably be calling up predefined wave shapes and
multiple voices (no way, for example, to define your own shapes).

The only major problem I've had is that the SDK documentation does not 
say how the notes map into the numbers passed to SetVoiceNote, and the 
notes produced by any reasonable values I've tried sound "off" to my ear.
Maybe it's just that the PC's speaker is of such low fidelity.  I've
had it on my list of things to do to try programming the actual note
frequencies with SetVoiceSound, but have never gotten around to it.

Unfortunately I don't know any better books than the SDK, though 
since the routines are so simple (at least compared to the GDI), the
SDK is (barely) adequate.  If you have a specific question I'll try 
to answer it ...

						Bruce C. Wright

rogerson@PEDEV.Columbia.NCR.COM (Dale Rogerson) (02/21/90)

In article <1990Feb19.205639.15983@chinet.chi.il.us> patrickd@chinet.chi.il.us (Patrick Deupree) writes:
>Hey one and all.  I've got a customer here that wants to develop apps
>for MIDI in Windows.  Problem is, what sort of device drivers are there
>available?  He's got a Roland MPU-401 and has called Roland (no luck,
>they say they've trashed the project).  He's called the companies that
>write MPU-401 software and they've basically told him that they won't sell
>the driver or tell him how they developed it.
>
>Sooooo, would anyone out there have an mpu-401 driver that they've developed
>and/or obtained?  If the price was right I'm sure these guys would pay
>money for such a thing.

	I have been meaning to post a message on this topic for some time.
	I am also interested in writting MIDI apps for Windows since I
	feel that "multi-tasking" and data-sharing features of Windows would be 
	ideal for running MIDI equipment.  Picture having the best sequencer,
	editor, and printing programs all running at the same type and using
	similar interfaces and sharing data, but all from different companies.

	However, before this dream can become a reality, we need a MIDI
	software standard.  One of the reasons Windows is supposed to be
	desirable is that it should shield the developer from the hardware
	of the system.  You do not need to know what display the system
	has (only its capablities) so why should you have to know which
	MIDI card is in the system.  I would like to avoid the problems  
	currently found in the MS-DOS MIDI market where your card has to
	be of certain type to run certain software and each manufactorer
	must make his card compatible with someone else.  This is just
	not the way things should work in the 90s. 

	What I am proposing is the development of a standard software interface
	to the MIDI interface spec.  This standard software interface would 
	then be implemented with DLLs.  The user would only have to have the
	correct DLL for his card and any software would work with it.  Windows
	was really designed to do things like this.

	Now the problem is - Who is going to develop this software standard.
	I would think that the best people would be the developers of MIDI 
	software since they know how MIDI works.  However,  getting PC
	software manufactorers to work together on something may be impossible.
	I do not think Microsoft will do it anytime soon (although I did
	hear that Windows 3.0 had such a beast :-) and would probably not
	do it right (or everyone would at least complain about it).  I don't
	think Roland would like this idea since it would remove the standard
	that they set, but then how many people are buying their MIDI cards
	instead of a clone. 

	Maybe we should start a project to develop such a beast ourselves and
	release it to the Public Domain.  There is not that much midi stuff out
	for Windows.  Does anybody have a list of MIDI software which runs 
	under Windows?  I only know of M/pc.  If a PD standard was released
	in the near future and half-way worked, it might get used by default.

	Just imagine having some "musical objects" defined in Actor with which
	you could compose/program your music interactively.  It really has some
	interesting possiblities.

	Any comments or sugestions?	

	-----Dale
		Rogerson-----

dsampson@x102a.harris-atd.com (sampson david 58163) (02/22/90)

In article <3601@rti.UUCP> bcw@rti.UUCP (Bruce Wright) writes:

   In article <2540@ncr-sd.SanDiego.NCR.COM>, carlc@mars.SanDiego.NCR.COM (Carl Christofferson) writes:
> In article <1990Feb19.205639.15983@chinet.chi.il.us> you write:
> >Hey one and all.  I've got a customer here that wants to develop apps
> >for MIDI in Windows.
> 
> I am also interested in developing MIDI/music apps for Windows, but I have
> no experience in this area at all!  Can anyone direct me to some good books
> on developing MIDI/music apps and on how to use the Windows Sound functions?
> Petzold doesn't mention them at all.

#  I'm a bit puzzled by this question.  It might be easier to answer 
#  questions if I knew what problem you are having.  The Windows sound 
#  functions are simple enough (really too simple for a lot of purposes).


Bruce,  

I sent the original poster some e-mail about the driver.  However, I
think this may be of intrest to more than one person, so here goes....


I think that Carl Christofferson's premise is slightly confused.
Programming for a MIDI port, MIDI device, and programming for MS
Windows can be, and in most cases, are two different subjects.

What I mean is that one doesn't use the Windows Sound functions to
control a MIDI card or instrument.  When dealing with MIDI there are
two subject areas:

1) A seperate set of rountines that have absolutely nothing to do with
Windows but are used to control the MIDI card/port.

2) Controlling the actual MIDI instrument.  All of the MIDI charts in
the back of the your instrument owner's manual show the format of the
commands and responses for your MIDI device (keyboard or whatever).


Item 1:

Generally one has an assembler object file that you link with your
Windows files at compile time that contain routines that Get & Put a
byte to/from the MIDI port, and check the Status of the MPU-401 card.
The Get/Put and functions are written to interface with C so that they
can be called inside your C source like any other C function.


Item 2:

Once you can check the MIDI card status, and Get and Put a byte of
data to and from the port, all you have to do is follow the MIDI
instrument owner's manual command and response data format to control
the device or dump parameters.  However, the way you trigger commands
or display results becomes important at this stage, so you have to
address the design of the Windows based program that will paint the
stuff you want on the screen and do all those fancy MS Windows type of
things.  You have to write the code (and create the data structures)
that you use to control the MIDI instrument and store & manipulate the
data received from the MIDI device.


I bought a couple of books from M&T Publishers (found them at B.
Daltons).  One is called "C Programming for MIDI" by Jim Conger.  The
other is "The MIDI Book" (The specific title and the authors escape
me.  I don't have the book here at work.  However, one of the authors
is a columnist for Keyboard Mag --- last name is De Figuroria or
something like that).

Conger's book has an assembly routine that controls the MIDI port as I
described in above.  The other book provides an excellent description
of the MIDI spec (i.e. send this chunk of data and your MIDI device
will respond with that chunk of data).

Between the two books, I've learned how to manipulate anything on my
Korg M1.  In fact "The MIDI Book" has several examples using the Korg
M1.

I've just starting to write a MS Windows based Editor/Libarian for
the M1.  I'll come up for air in a couple of months.



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

David Sampson                                         Harris Corporation
dsampson@x102a.ess.harris.com                   Gov't Aerospace Systems Divison
uunet!x102a!dsampson                                  Melbourne, Florida

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

patrickd@chinet.chi.il.us (Patrick Deupree) (02/23/90)

In article <2927@PEDEV.Columbia.NCR.COM> rogerson@PEDEV.Columbia.NCR.COM (Dale Rogerson) writes:
>
>	What I am proposing is the development of a standard software interface
>	to the MIDI interface spec.  This standard software interface would 
>	then be implemented with DLLs.  The user would only have to have the
>	correct DLL for his card and any software would work with it.  Windows
>	was really designed to do things like this.
>
I just found something on CompuServe (or, to be fair, I was referred to
something on CompuServe).  There's a company that has put out a set of shareware
MIDI programs.  They support about four or five different interfaces (including
the MPU401) via DLL's.  All you have to do is rename the DLL to some stock
name and the program will look for it.  I'd had this same idea and was going
to do something of the sort in the future.  Guess these guys beat me to it.

>	Just imagine having some "musical objects" defined in Actor with which
>	you could compose/program your music interactively.  It really has some
>	interesting possiblities.
>
Sometime in the future (when I can afford to buy the MPU401 to go with my
Ensoniq ESQ-1) I was planning to do something with Actor and MIDI.  Anyone
out there know where I could get an MPU401 cheap?

-- 
"Organized fandom is composed of a bunch of nitpickers with a thing for
 trivial pursuit."
					-Harlan Ellison