MPU-401 Documentation

From OS2World.Com Wiki
Jump to navigation Jump to search

By Julien Pierre

About Theta Band Software

Theta Band Software, LLC was founded in October 1997 by a team of multimedia and internet software experts.

Theta Band Software is committed to delivering next-generation multimedia and internet applications and system software for personal computers.

Theta Band Software products will primarily target IBM's OS/2 Warp operating system family, ensuring that OS/2 users will always be the first and best supported by our technologies and products. Versions for other platforms will be released with the intent of supporting our OS/2 customers.

After all, we could write only Windows software, but where's the fun in that?

Please visit the Theta Band Software website at http://www.thetaband.com

About MM Pack 1.0

Theta Band Software proudly announces the MM Pack - a collection of utilities to enhance OS/2 multimedia. But before we can tell you what the MMPack does, you need to know some basics about multimedia and OS/2.

What is MMPM/2?

MMPM stands for "Multi Media Presentation Manager." It's just the name of the multimedia subsystem of OS/2.

What exactly is multimedia?

The term "multimedia" is a combination of words "multi" and "media". "Media" refers to things like digital audio, MIDI, or video. Multimedia is the process of combining two or more of these media together, hence the "multi" in "multimedia". Technically speaking, playing a wave file by itself is not multimedia, but playing a video file that has an audio track is multimedia. However, few people recognize the distinction, so anything that has to do with audio or video is considered multimedia.

What does OS/2's multimedia subsystem do?

MMPM/2 provides two core functions:

  • Playing and recording of different types of media, like digital audio, video, and MIDI
  • Synchronization between multiple "streams" of these media, so that when you play a video, the audio track is synchronized (for example).

This is just what the core of MMPM/2 does. Most of the interesting work is handled by a variety of "plug-ins" that allow it to understand the different types of media as well as the different types of hardware that you need in order to play or record the media. MMPM/2 supports plug-ins that ...

  • understand the differences between file formats, such as an AVI movie vs. a QuickTime movie. These plug-ins are called "input/output procedures", or IOProcs.
  • understand the differences between data encodings, such as the Intel Indeo AVI format vs. the Microsoft Video for Windows AVI format. These plug-ins are called "compressors/decompressors", or codecs.
  • understand the difference between hardware devices, such as a SoundBlaster 16 vs. an ESS 1868. These plug-ins are called device drivers.

IBM provides several plug-ins with OS/2, but not enough. In addition, some of the existing plug-ins don't always work right, or work the way you want them to. For instance, we've all had problems installing device drivers, or maybe there's a MIDI file that works great in Windows but won't work in OS/2. Or maybe you'd like to be able to play two wave files at once. This is where our MMPack comes in.

What will Theta Band Software's MMPack do for me?

The goal of the MMPack is to fill in all of these holes in MMPM/2. It is a collection of ioprocs, codecs, device drivers, and other utilities which bring out the true power of MMPM/2, and make multimedia under OS/2 more useful and, more importanly, more enjoyable.

MMPack 1.0 includes the following software:

  • MMCHECK - This is a utility that checks your MMPM/2 installation (i.e. MMPM2.INI) for errors or suspicious settings. If it finds any, it will tell you what they are, so that you can fix them.
  • MPU-401 Driver - This is a replacement for IBM's MPU-401 driver, which is used to MIDI support for a number of sound cards, including sound cards that use the Crystal Semiconductor drivers. Enhancements over IBM's driver include:
    • fixes for Warp 3
    • SMP compatibility
    • better hardware compatibility
    • DOS sharing
    • and more!
  • NPDSMI 2.0 - An enhancement over the free DSMI Netscape plug-in, this new version supports compressed (zip and gzip) module files.

About the MPU-401 audio device driver

The Theta Band Software MPU-401 audio device driver is an OS/2 device driver that provides MIDI playback and recording support. It supports both MMPM/2 and RTMIDI.

This package is a replacement for the MPU-401 driver from IBM and Crystal Semiconductor. It provides a complete feature superset over these two drivers.

Help for Selecting Number of Adapters

The MMPM/2 installation procedure assumes that a device driver can only support one adapter or one device. Therefore, if you have more than two of the same adapter in your computer, you must install two copies of the device driver. Specifying the number of adapters in the computer is the same as specifying how many copies of the device driver need to be installed.

The MPU-401 driver behaves somewhat differently from most audio device drivers.

First, the driver does not support adapters per se. Rather, it supports MPU-401 compatible devices, and a single adapter card can have more than one of these devices. To the MPU-401 driver, these multiple devices will appear as if they exist on separate adapter cards.

Second, a single copy of the MPU-401 driver can be configured to support multiple devices. This breaks the one-to-one ratio between the number of drivers installed and the number of physical adapters (or in this case, devices) in the computer.

However, the default installation tells the MPU-401 driver to locate only one MPU-401 device. This maintains the one-to-one ratio that makes MMPM/2 happy. This default is settable by the Number of devices to autodetect option.

When the base I/O address is manually selected during install (i.e. it is not set to "autodetect"), the driver will only support one device, and the Number of devices to autodetect option is ignored. If you wish to manually specify the I/O address for more than one port, you must either install multiple copies of the driver, or manually add /P switches on the command-line.

If you select "autodetect" for the base I/O address, each copy of the driver, at boot time, will attempt to locate and provide support as many as nine MPU-401 devices (although the default behavior is to locate only one). Of these, only the "first" will be available to MMPM/2, since MMPM/2 expects there to be only one MIDI device for each copy of the driver installed. The remaining devices will only be visible to RTMIDI (the real-time MIDI subsystem).

If you select to install zero devices, then you will remove support for all MPU-401 devices that have been previously installed by MMPM/2.

Number of devices to autodetect

This setting is ignored if I/O port autodetection is not enabled.

When this setting is set to the default of "Only One", the driver will stop searching after it has found one MPU-401 device. This allows the autodetection routine to conform to MMPM/2's requirement that each copy of the driver represents only one device.

For example, say that there are three MPU-401 devices in the computer. To get MMPM/2 to recognize all of them, three copies of the driver would need to be loaded.

Base I/O Address

This field allows you to select the base I/O address for the MPU-401 device. Specify either one of the 19 address, or select "Autodetect". If "Autodetect" is selected, the driver will, on every boot, search all 19 addresses for an MPU-401 device. Each device found will be registered with RTMIDI. The first device found will be used with MMPM/2. Use the Number of devices to autodetect option to specify how many devices the driver should look for.

The default is "Autodetect". The other choices are 330, 300, 332, 334, 336, 200, 210, 220, 230, 240, 250, 260, 270, 310, 320, 340, 350, 360, and 370.

If you install only one copy of the device driver (i.e. you specified that you have only one MPU-401 installed), then you should generally use Autodetect unless:

  • The first device is not the device you want to use with MMPM/2 (applicable only if the Number of devices to autodetect option is set to "All of them").
  • You know that autodetection will cause problems.
  • You are using the /O:NOCHECKIO option. A boot error will occur if /O:NOCHECKIO is combined with I/O autodetection, and the driver will not load.

The /O:NOCHECKIO option is specified if you select "Check only IRQ" or "Check neither" under the I/O and IRQ boot-time checking section.

This settings corresponds to the /P command-line parameter. Base I/O address autodetection is enabled if there are no /P parameters specified on the command-line.

NOCHECKIO - Do not verify I/O addresses

Tells the driver not to verify whether an MPU-401 device exists at the I/O addresses specified by the /P switches. Use this option when the sound card is initialized after the driver is loaded, e.g. by a DOS application. When this option is specified, the /O:NOCHECKIRQ option is implied.

Understand that this parameter tells the driver not to check whether the specified I/O port exists or whether the hardware at that I/O port is functioning. Therefore, it is your responsibility to make sure that the I/O port specified with the /P option is correct and that the hardware is functioning. Otherwise, when an application attempts to use the hardware, it will receive an error message.

If you want the MPU-401 driver to also ignore the hardware when an application requests it, specify the /O:QUIETINIT option.

This parameter can be set with the I/O and IRQ boot-time checking option.

QUIETINIT - Ignore Initialization Errors

Tells the driver to ignore errors when an OS/2 MMPM/2 application wants to play a MIDI file. This option may be necessary for some audio adapters.

/Pn:hhh - Base I/O (Port) Address

This parameter specifies the base I/O address for given port. For example, /P5:208 says that device #5 is located at I/O address 208 hexadecimal.

This parameter can be set with the Base I/O Address option.

I/O and IRQ boot-time checking=

By default, the MPU-401 drivers checks for the existance of MPU-401 hardware at each boot. With certain sound cards, such as those that use a DOS application to initialize the board, the hardware is not visible until after the driver has loaded. This option allows you to specify if the driver should check for actual hardware at boot time, or if it should simple assume that the hardware is there.

The options are to check both the base I/O address and the IRQ, to check only the base I/O address, or to check neither. Since a base I/O address is needed to check for an IRQ, it is not possible to check for an IRQ but not a base I/O address.

If I/O autodetection is enabled, then I/O checking must also be enabled. Similarly, if IRQ autodetection is enabled, IRQ checking must also be enabled. A boot error will occur if these requirements are not met, and the driver will not load.

Note that if IRQ checking is disabled, and the IRQ is not specified, then there will be no IRQ assigned to the MPU-401 device, and MIDI recording will not be possible.

This settings corresponds to the /O:NOCHECKIO and /O:NOCHECKIRQ command-line parameters.

NOCHECKIO - Do not verify I/O addresses

Tells the driver not to verify whether an MPU-401 device exists at the I/O addresses specified by the /P switches. Use this option when the sound card is initialized after the driver is loaded, e.g. by a DOS application. When this option is specified, the /O:NOCHECKIRQ option is implied.

Understand that this parameter tells the driver not to check whether the specified I/O port exists or whether the hardware at that I/O port is functioning. Therefore, it is your responsibility to make sure that the I/O port specified with the /P option is correct and that the hardware is functioning. Otherwise, when an application attempts to use the hardware, it will receive an error message.

If you want the MPU-401 driver to also ignore the hardware when an application requests it, specify the /O:QUIETINIT option.

This parameter can be set with the I/O and IRQ boot-time checking option.

NOCHECKIRQ - Do not verify IRQs

Same as the /O:NOCHECKIO option, except it applies to the IRQ level.

Understand that this parameter tells the driver not to check whether the specified IRQ exists or whether the hardware at that IRQ is functioning. Therefore, it is your responsibility to make sure that the IRQ specified with the /I option is correct and that the hardware is functioning. Otherwise, when an application attempts to use the hardware (i.e. an RTMIDI application that wants to record MIDI), it will receive an error message.

This parameter can be set with the I/O and IRQ boot-time checking option.

/Pn:hhh - Base I/O (Port) Address

This parameter specifies the base I/O address for given port. For example, /P5:208 says that device #5 is located at I/O address 208 hexadecimal.

This parameter can be set with the Base I/O Address option.