Page 4
NRPN LSB 26 (Reverb Effects Send)................ 93 PART V 3D Positional Audio API Library Overview ........................94 3D Positional Audio Overview ....................94 SB AWE32 DOS 3D Positional Audio Library ................ 96 Types and Structures......................... 96 System Functions........................97 c3daInit........................97 c3daEnd........................
RESTRICTIONS ON USE Creative Technology Ltd. retains title and ownership of the manual and software as well as ownership of the copyright in any subsequent copies of the manual and software, irrespective of the form of media on or in which the manual and software are recorded or fixed.
Creative Technology Ltd. is aware of such errors and Creative Technology Ltd. shall be under no obligation to provide to Licensee any updates, corrections or bug-fixes which Creative Technology Ltd. may elect to prepare.
Embedded MIDI applications We at Creative Labs has spent much effort in creating the drivers and libraries to save your development time. We have taken great care to meet the requirements of the various types of developers and to reduce the possibilities of clashes with other TSRs or Windows system drivers.
A flat model protected mode library is also provided. Before you proceed to Part II, III and IV of this manual, you need to familiarize yourself with the hardware functional blocks of the Sound Blaster AWE32 audio card. A diagram of the functional blocks is provided below.
Page 10
• The ROM contains 1MB of General MIDI sound samples. • DRAM This is the supplied 512 KB of DRAM on Sound Blaster AWE32 and Sound Blaster AWE32 Value Edition for custom sound samples and GS support. • SIMM Socket 2 optional SIMM sockets for DRAM expansion.
Page 11
X, Y, and Z = 2, 4, 6, or 8. They follow the base I/O address of the SB16. This is generally true for legacy ISA SB AWE32 cards. However, with the introduction of Plug and Play cards, the relationships between X, Y, and Z, and SB16 may not be true.
HARDWARE.OBJ, SBKLOAD.OBJ, WAVLOAD.OBJ and SFHELP2.OBJ are discardable after they have been used. For example, in a TSR program, after you have initialized the SB AWE32 hardware and loaded your SoundFont bank file, you can mark portions of your code that must stay resident (the MIDI engine, the embedded General MIDI preset data and any SoundFont preset data), and discard the hardware and the SoundFont loader module.
BLASTER environment variable with a 'E' prefix. For example, E620. The ‘E’ BLASTER environment parameter is introduced to cater for future derivatives of the SB AWE32 sound card that may have the EMU8000 at different I/O addresses. Please refer to chapter CTPNP.CFG Sample for details on obtaining base I/O addresses for SB AWE32 PnP cards.
WORD PASCAL awe32TotalPatchRam(SOUND_PACKET FAR* SP) Actions Determine the total amount of RAM on the AWE32. This is not the amount of “unused” RAM but the total amount of RAM. awe32TotalPatchRam assumes the AWE32 card has been detected and initialized. Parameters Points to the SOUND_PACKET.
PASCAL awe32DefineBankSizes(SOUND_PACKET FAR* SP) Action Divide the AWE32’s RAM into banks. All previous bank divisions are forgotten. You would normally invoke this API at the beginning of your application. Parameters Points to the SOUND_PACKET data object in which the size of each bank and the number of banks is specified.
FAR keyword has been defined away, LPBYTE is the same as PBYTE. Initialization The SB AWE32 EMU8000 subsystem must be properly initialized prior to any MIDI playback. Two steps are required for initialization as shown below. The first example assumes that the base I/O addresses of the EMU8000 subsystem is at 0x620 and are spaced 0x400 apart.
Termination The SB AWE32 EMU8000 subsystem must be properly terminated when your application wishes to quit. Failure to do so may render any subsequent playing of FM music inaudible. if ( awe32Terminate() ) { // Error, termination failed Using embedded GM presets General MIDI presets are included in this package, EMBED.OBJ.
• To define additional banks. The new banks have to be added beyond the last bank. Assume that the RAM on the SB AWE32 is divided into 3 banks of 128 kilobytes each. LONG banks[4]; /* reserve for 4 banks */ SOUND_PACKET sp;...
The file is introduced because the relationships between the 3 EMU8000 I/O windows and SB16 base I/O address may not be true for the SB AWE32 PnP card. In fact, even the 3 EMU8000 I/O windows themselves may not be related at all, i.e. not 0x400 apart. The Plug and Play Configuration Manager may choose to assign any I/O windows to the SB AWE32 PnP card and hence breaking all the relationships of a typical legacy ISA card.
AWE Manager will relay the request to the SBAWE32.DRV driver. This driver will download the required effect microcodes into the AWE32. The diagram below depicts the relationships of the libraries and drivers for the Sound Blaster AWE32.
The current implementation of API is via message-based system (different from Windows' WM_USER). The API provides parent applications with a set of messages, accessing the features of AWE32. The API exports one function call AWEManager. Applications communicate to AWEMAN.DLL through this function using the pre-defined messages.
Windows, the manager's message function can be accessed using a pointer to a function. It is important to realize that AWE Manager will only support one user application accessing the AWE32 per hardware device. It is the task of user application to 'release' the device before it can be accessed by other user application.
} CDevObject; The CDevObject structure can be used to identify the capabilities of available SB AWE32 devices on the system. Some of the fields are only meaningful in certain platform. All the above mentioned structures are already provided in the AWE_DLL.H header file. Hence, by including this header file in your application, the AWE Manager will be ready for accessing.
Page 42
AWE_ERR_ACCESS_NOT_PERMITTED AWE_ERR_VERSION_INVALID See Also AWE_CLOSE AWE_CLOSE Actions An application sends this message to AWE Manager when it wishes to release control of the acquired AWE32 device to other applications. Parameters lParam1 Unused. lParam2 Unused. hUserID Current ID assigned to the application by AWE Manager during initialization.
Page 43
Unused. Remarks The returned number gives an indication of how many AWE32 devices are actually supported by the MIDI driver. This is dependent on the different Windows platforms. Currently, only Windows 95 supports multiple devices. For other platforms, the number returned will always be 1 if the driver is successfully initialized.
Page 51
The path specified by the user can be found in the SBWIN.INI file under "AWE32" section. The entry name for each respective synthesizer emulation are listed in the table. Hence, [AWE32] GM = C:\SBANK\USER1.SBK...
Page 53
" SOUND ". The default name is used whenever a user specified file cannot be located. The path specified by the user can be found in the SBWIN.INI file under the "AWE32" section. The entry name for each respective synthesizer emulation is listed in the table. Hence, [AWE32] GM = C:\SBANK\USER1.SBK...
This chapter provides you with examples on how to use the API provided by AWEMAN. The examples provided, in fragments of code, are sufficient to let you start accessing and manipulating the Sound Blaster AWE32. This guide will show, in step by step examples, how the AWE32 features can be programmed using the DLL provided.
How do I use SBAWE32 NRPN? For SB AWE32 NRPN to be functional, NRPN MSB has to be 127, and NRPN LSB set to the desired parameter to be controlled (see the following for a list of available NRPN LSB for each parameter).
A filter alone would be like an equaliser, making a bright audio signal duller, but the addition of resonance greatly increases the creative potential of a filter. Increasing the resonance of a filter makes it emphasis signal at the cutoff frequency, giving the audio signal a subtle “wah-wah”, i.e., imagine a siren sound going from bright to dull and bright again periodically.
The 3D Positional Audio Library provides programmers a low-level access to audio spatialization algorithms implemented on the SB AWE32. The library provides programmers the ability to create and move in 3D space basic audio spatialization objects such as sound emitters and receivers. The library attempts to control the apparent location of sound emitters relative to a receiver by modeling a small set of physical and psycho-acoustic phenomena.
Typical sounds that will localize poorly include pure steady tones and simple waveforms. SB AWE32 DOS 3D Positional Audio Library The SB AWE32 implementation of the 3D Positional Audio Library imposes some limits because of its tight integration with the MIDI engine.
Page 107
= preset; /* SoundFont preset space */ awe32WPBuildSFont(&wp); Initialize the 3D Positional Audio Library and creative an emitter base on the loaded sound sample. c3daInit(); c3daCreateEmitter(&em, 1, 0, 60); c3daSetEmitterMIDISource(&em, 1, 0, 60); c3daSetEmitterSoundState(&em, c3daSTART); Save current interrupt vector and hook on to interrupt 1CH.
Need help?
Do you have a question about the AWE32 and is the answer not in the manual?
Questions and answers