Page 1 of 1

MIDI Programming

Posted: Sun Jun 11, 2006 11:00 pm
by Fabba
Hello,
I am trying to add MIDI music support to my "OS", but the only useful resource I could find so far is http://www.borg.com/~jglatt/tech/games.htm. This allows me to control the MPU, and seems to work fine from the software point of view with my (Realtek AC'97) OnBoard sound card (can't tell whether it really works though, as I couldn't get the MIDI/Game port to work with this PC at all, yet).
This leaves me with two problems, though:
  • What I currently have will probably allow access to the MIDI connector only, not to the built-in synthesizer
  • This doesn't work on anything but my OnBoard MPU - not on the controller card (including a midi connector) I have on a very old PC (not too important), nor on the SB AWE 64 Gold (ISA/PNP) I have on my test PC (the card is supposed to have an MPU emulator)
In "Drivers! Main Problem for OS dev!", I read the following:
[quote=Brendan]For sound cards, there's about 5 common digitized sound interfaces, 3 common MIDI interfaces and the game port is standard. Writing device drivers for all of these common interfaces will get about 60% of sound cards working enough.[/quote]
I'd be very interested if anyone knows any good resources on programming MIDI (possibly the three interfaces Brendan mentioned) - my main aim would be getting the built-in synth and the output port on the AWE64 working.

Thanks in advance *starts playing with ISAPNP*
Fabba

Re: MIDI Programming

Posted: Sun Jun 11, 2006 11:00 pm
by Dex
Here is my understanding, most modern sound cards have the midi interface,
But are turn off as standard, windows etc, turns them on, so if you want to uses them from your OS, the interface to do this (eg: test for right card if found, switch the right bits.)needs to be done for each card :(, or some BIOS you can turn compatibility on.

http://www.sanction.de/ftp/snc_omni.zip
Is a good demo of using midi, but theres no source, but by booting it from a win98 startup disk its a good test for midi support.
And uses General Midi Port at 330h-331h.