Programming Audio in the ECE291 Lab
How to play digitized sound and MIDI
using the computers in our lab
John Lockwood
Playing Digitized Audio
- Download the 'Sound Library for 291'
Sound_lib_291.zip.
This library contains complete and
documented source code to play digitized audio.
Current Verwion = 2.0a
- Run the program SBTEST.EXE.
It sould play the sample
wave file included in the ZIP file.
- If no sound plays, check that
- Your volume is set to an audible level
- You have an environmental variable set like:
BLASTER=A220 I5 D1 T4
- Your control-panel settings for the
Address, IRQ, and DMA match the BLASTER value.
- Read the SB_LIB_291
Documentation included with the package
- Browse the SBTEST.ASM to use library usage
- Browse the SBLIB291.ASM to see library implementation
- Do not use DIGPAK for DSP audio.
That code is buggy and unstable.
Installing MIDPAK
- Unzip DMKIT.ZIP to your network drive.
Be sure to preserve directories
- Configure your hardware
- Run setd to set up your audio hardware.
- Select 'y' to autodetect.
- For best results, select 'SoundBlaster Clone'
- Crank up the volume on the speakers and test the card.
- Note the base address, IRQ, and DMA listed at the bottom
of the screen -- in particular, note the IRQ number -- usually 5 or 7.
- You should hear music (I do in the lab).
- Select 'y' if you hear music.
- Configure your MIDI
- Run Setm to install the midi driver
- Select 'adlib or compatible'
- Select if 'y' if you hear music. (I do in the lab)
- Now, you need to run the 'MIDPAK.COM' program to actually
load the driver.
- Run the menu program to verify that midi files play. (they should)
- Develop your program using MIDPKAPI.DOC as a reference and the
program REAL\SEGUE.C as a reference. You will need to convert the
C routines into ASM.
- Problems with MidPak
- Do not uninstall midpak driver from within code.
Rather, stop playing midi (705h), then use MIDPAK u to
uninstall driver
- Include Midpak.com, Midpak.adv, and Midpak.av
in same directory as code.
Final Notes
- For more information, carefully read the documentation and
source code included with the programs above.
- Remember, the purpose of this class is to be instructional -- not
tedious. Your time is best spent writing your own code.
John Lockwood