Creative AWE32 User manual

Version 3.01
Developer's Information
Pack
Creative Technology Ltd.
Creative Technology Ltd.
Copyright © Creative Technology Ltd., 1994-96. All rights reserved.

SB AWE32 Developer's Information Pack Contents ••i
Copyright Creative Technology Ltd., 1994-1996 Version 3.00
Contents
PART I Introduction 4
License Agreement/Limitation And Disclaimer Of Warranties................................................... 4
This Package............................................................................................................................... 5
Using This Manual...................................................................................................................... 6
Document Conventions................................................................................................................ 7
Getting Assistance....................................................................................................................... 8
What You Need To Know........................................................................................................... 8
PART II DOS Real/Protected Mode API 11
Overview.................................................................................................................................. 11
Hardware Detection And Initialization..................................................................................... 12
awe32Detect............................................................................................................... 12
awe32DetectEx........................................................................................................... 12
awe32InitHardware.................................................................................................... 13
awe32Terminate......................................................................................................... 13
MIDI Services........................................................................................................................... 13
awe32InitMIDI........................................................................................................... 14
awe32InitNRPN ......................................................................................................... 14
awe32NoteOn............................................................................................................. 14
awe32NoteOff............................................................................................................ 15
awe32ProgramChange................................................................................................ 15
awe32PitchBend......................................................................................................... 16
awe32Controller......................................................................................................... 16
awe32ChannelPressure............................................................................................... 17
awe32PolyKeyPressure.............................................................................................. 18
awe32Sysex................................................................................................................ 18
__awe32NoteOff........................................................................................................ 19
__awe32IsPlaying ...................................................................................................... 20
SoundFont Bank And Downloadable DRAM Services............................................................. 20
awe32TotalPatchRam................................................................................................. 21
awe32DefineBankSizes.............................................................................................. 22
awe32SFontLoadRequest........................................................................................... 22
awe32StreamSample.................................................................................................. 23
awe32SetPresets......................................................................................................... 24
awe32ReleaseBank .................................................................................................... 24
awe32ReleaseAllBanks.............................................................................................. 25
awe32WPLoadRequest............................................................................................... 25
awe32WPLoadWave.................................................................................................. 26
awe32WPStreamWave............................................................................................... 26
awe32WPBuildSFont................................................................................................. 27
Real and Protected Mode API Programming Guide.................................................................. 27
Using the libraries ...................................................................................................... 28
Initialization................................................................................................................ 28

SB AWE32 Developer's Information Pack Contents ••ii
Copyright Creative Technology Ltd., 1994-1996 Version 3.00
Termination ................................................................................................................ 29
Using embedded GM presets...................................................................................... 29
Loading a SoundFont Bank......................................................................................... 29
Loading wave data as an instrument ........................................................................... 30
Using awe32DefineBankSizes.................................................................................... 31
Starting and ending addresses..................................................................................... 32
Significance of awe32NumG variable........................................................................ 33
Enable real-time panning using awe32RTimePan variable ........................................ 33
CTPNP.CFG Sample ................................................................................................................ 34
PART III Windows Driver API 35
Overview.................................................................................................................................. 35
Application Programmer Interface.............................................................................. 36
AWE Manager DLL.................................................................................................................. 36
AWE Manager message function................................................................................ 37
Manager Messages ..................................................................................................... 38
Message Reference..................................................................................................... 40
Error Messages........................................................................................................... 73
Windows Programming Guide.................................................................................................. 75
Opening and closing ................................................................................................... 75
Querying for supports................................................................................................. 76
Retrieving selections.................................................................................................. 79
Issuing selections........................................................................................................ 80
PART IV MIDI NRPN Implementation 83
What Is MIDI Non-Registered-Parameter-Number?................................................................. 83
How do I use SBAWE32 NRPN?............................................................................................. 83
The EMU8000 Sound Architecture.......................................................................................... 84
EMU8000 Sound Elements ....................................................................................................... 86
Oscillator.................................................................................................................... 86
Low Pass Filter .......................................................................................................... 86
Amplifier.................................................................................................................... 86
LFO1 .......................................................................................................................... 86
LFO2 .......................................................................................................................... 86
Filter Resonance......................................................................................................... 86
LFO1 to Volume (Tremolo)........................................................................................ 86
LFO1 to Filter Cutoff (Wah-Wah).............................................................................. 86
LFO1 to Pitch (Vibrato).............................................................................................. 87
LFO2 to Pitch (Vibrato).............................................................................................. 87
Volume Envelope ....................................................................................................... 87
Pitch and Filter Envelope........................................................................................... 87
Pitch/Filter Envelope Modulation .............................................................................. 88
SB AWE32 MIDI NRPN List ................................................................................................... 88
NRPN LSB 0 (Delay before LFO1 starts)................................................................. 88
NRPN LSB 1 (LFO1 Frequency)................................................................................ 88
NRPN LSB 2 (Delay before LFO2 starts).................................................................. 88
NRPN LSB 3 (LFO2 Frequency)................................................................................ 88
NRPN LSB 4 (Envelope 1 delay time)....................................................................... 89
NRPN LSB 5 (Envelope 1 attack time) ...................................................................... 89
NRPN LSB 6 (Envelope 1 hold time)......................................................................... 89
NRPN LSB 7 (Envelope 1 decay time) ...................................................................... 89
NRPN LSB 8 (Envelope 1 sustain level).................................................................... 89
NRPN LSB 9 (Envelope 1 release time).................................................................... 89

SB AWE32 Developer's Information Pack Contents ••iii
Copyright Creative Technology Ltd., 1994-1996 Version 3.00
NRPN LSB 10 (Envelope 2 delay time)..................................................................... 90
NRPN LSB 11 (Envelope 2 attack time) .................................................................... 90
NRPN LSB 12 (Envelope 2 hold time)....................................................................... 90
NRPN LSB 13 (Envelope 2 decay time) .................................................................... 90
NRPN LSB 14 (Envelope 2 sustain level).................................................................. 90
NRPN LSB 15 (Envelope 2 release time).................................................................. 90
NRPN LSB 16 (Initial Pitch)...................................................................................... 91
NRPN LSB 17 (LFO1 to Pitch).................................................................................. 91
NRPN LSB 18 (LFO2 to Pitch).................................................................................. 91
NRPN LSB 19 (Envelope 1 to Pitch) ......................................................................... 91
NRPN LSB 20 (LFO1 to Volume).............................................................................. 91
NRPN LSB 21 (Initial Filter Cutoff) .......................................................................... 92
NRPN LSB 22 (Initial Filter Resonance Coefficient)................................................. 92
NRPN LSB 23 (LFO1 to Filter Cutoff)....................................................................... 92
NRPN LSB 24 (Envelope 1 to Filter Cutoff).............................................................. 93
NRPN LSB 25 (Chorus Effects Send) ........................................................................ 93
NRPN LSB 26 (Reverb Effects Send)........................................................................ 93
PART V 3D Positional Audio API 94
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...................................................................................................................... 97
c3daSetDopplerEffect ................................................................................................ 98
c3daSetMaxDistance.................................................................................................. 98
Emitter Functions...................................................................................................................... 98
c3daCreateEmitter...................................................................................................... 99
c3daDestroyEmitter.................................................................................................... 99
c3daSetEmitterPosition ............................................................................................ 100
c3daSetEmitterOrientation........................................................................................ 100
c3daSetEmitterSoundState........................................................................................ 101
c3daSetEmitterGain.................................................................................................. 101
c3daSetEmitterPitchInc............................................................................................. 101
c3daSetEmitterDelay................................................................................................ 102
c3daSetEmitterMIDISource...................................................................................... 102
Receiver Functions ................................................................................................................. 103
c3daCreateReceiver................................................................................................. 103
c3daDestroyReceiver............................................................................................... 103
c3daSetActiveReceiver............................................................................................ 104
c3daGetActiveReceiver ........................................................................................... 104
c3daSetReceiverPosition.......................................................................................... 104
Programming Example............................................................................................................ 105
Implementing Receiver Orientation......................................................................................... 107

SB AWE32 Developer's Information Pack PART I Introduction ••4
Copyright Creative Technology Ltd., 1994-1996 Version 3.00
PART I Introduction
License Agreement/Limitation And Disclaimer Of
Warranties
IMPORTANT NOTE : BY DOWNLOADING AND/OR USING THE SOFTWARE AND/OR
MANUAL ACCOMPANYING THIS LICENSE AGREEMENT, YOU ARE HEREBY
AGREEING TO THE FOLLOWING TERMS AND CONDITIONS:
The software and related written materials, including any instructions for use, are provided on an "AS
IS" basis, without warranty of any kind, express or implied. This disclaimer of warranty expressly
includes, but is not limited to, any implied warranties of merchantabilityand/or of fitness for a particular
purpose. No oral or written information given by Creative Technology Ltd., its suppliers, distributors,
dealers, employees, or agents, shall create or otherwise enlarge the scope of any warranty hereunder.
Licensee assumes the entire risk as to the quality and the performance of such software and licensee
application. Should the software, and/or Licensee application prove defective, you, as licensee (and not
Creative Technology Ltd., its suppliers, distributors, dealers or agents), assume the entire cost of all
necessary correction, servicing, or repair.
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. By downloading and/or using this manual and
software, Licensee agrees to be bound to the terms of this agreement and further agrees that :
(1) CREATIVE'S BBS/FTP/COMPUSERVE ARE THE ONLY ONLINE SITES WHERE USERS
MAY DOWNLOAD ELECTRONIC FILES CONTAINING THE MANUAL AND/OR
SOFTWARE,
(2) LICENSEE SHALL USE THE MANUAL AND/OR SOFTWARE ONLY FOR THE PURPOSE
OF DEVELOPING LICENSEE APPLICATIONS COMPATIBLE WITH CREATIVE’S SOUND
BLASTER AWE32 SERIES OF PRODUCTS, UNLESS OTHERWISE AGREED TO BY
FURTHER WRITTEN AGREEMENT FROM CREATIVE TECHNOLOGY LTD.; AND,
(3) LICENSEE SHALL NOT DISTRIBUTE OR COPY THE MANUAL FOR ANY REASON OR BY
ANY MEANS (INCLUDING IN ELECTRONIC FORM) OR DISTRIBUTE, COPY, MODIFY,

SB AWE32 Developer's Information Pack PART I Introduction ••5
Copyright Creative Technology Ltd., 1994-1996 Version 3.00
ADAPT, REVERSE ENGINEER, TRANSLATE OR PREPARE ANY DERIVATIVE WORK
BASED ON THE MANUAL OR SOFTWARE OR ANY ELEMENT THEREOF OTHER THAN
FOR THE ABOVE SAID PURPOSE, WITHOUT THE EXPRESS WRITTEN CONSENT OF
CREATIVE TECHNOLOGY LTD.. CREATIVE TECHNOLOGY LTD. RESERVES ALL
RIGHTS NOT EXPRESSLY GRANTED TO LICENSEE IN THIS LICENSE AGREEMENT.
LIMITATION OF LIABILITY
In no event will Creative Technology Ltd., or anyone else involved in the creation, production, and/or
delivery of this software product be liable to licensee or any other person or entity for any direct or
other damages, including, without limitation, any interruption of services, lost profits, lost savings, loss
of data, or any other consequential, incidental, special, or punitive damages, arising out of the purchase,
use, inability to use, or operation of the software, and/or licensee application, even if Creative
Technology Ltd. or any authorised Creative Technology Ltd. dealer has been advised of the possibility
of such damages. Licensee accepts said disclaimer as the basis upon which the software is offered at the
current price and acknowledges that the price of the software would be higher in lieu of said disclaimer.
Some states do not allow the limitation or exclusion of liability for incidental or consequential damages
so the above limitations and exclusions may not apply to you.
Information in this document is subject to change without notice. Creative Technology Ltd. shall have no
obligation to update or otherwise correct any errors in the manual and software even if 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.
Creative Technology Ltd. does not warrant that the functions contained in the manual and software will
be uninterrupted or error free and Licensee is encouraged to test the software for Licensee's intended use
prior to placing any reliance thereon.
Copyright 1994-96 by Creative Technology Ltd. All rights reserved.
Sound Blaster Advanced WavEffects is a trademark of Creative Technology Ltd.
MS-DOS is a registered trademark and Windows is a trademark of Microsoft Corporation.
SoundFont is a registered trademark of E-mu Systems, Inc.
All other products are trademarks or registered trademarks of their respective owners.
This Package
This developer's information pack is made for third party DOS and Microsoft Windows developers who
intend to develop MIDI oriented software programs for Creative's Sound Blaster AWE32. It includes
easy-to-use functions and a complete interface that supports MIDI playback and Sound Blaster AWE32
DRAM downloading.
This document describes the pack's set of low level DOS and Microsoft Windows API to program the
Sound Blaster AWE32. It contains object libraries for common MIDI routines and SB AWE32
SoundFont bank downloading for DOS (real and protected modes) and Microsoft Windows. These

SB AWE32 Developer's Information Pack PART I Introduction ••6
Copyright Creative Technology Ltd., 1994-1996 Version 3.00
library functions are designed with the objective of allowing you to create your own code in the
following forms :
• Terminate-stay-resident MIDI drivers
• Loadable MIDI drivers
• 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. It is our hope that all the
facilities provided in this information pack meet with your development needs.
Using This Manual
This document is organized into four main parts. The first details the API for DOS, the second the API
for Windows and the third on SB AWE32’s MIDI non-registered-parameter-number implementation. The
last part describes the 3D Positional Audio Library. The organization, in detail, is as follows:
PART II DOS Real/Protected Mode API, describes the SB AWE32 DOS real and protected mode
API.
Overview, gives a quick look at the SB AWE32 DOS real and protected mode API.
Hardware Detection And Initialization, provides interfaces to prepare the EMU8000
subsystem for use.
MIDI Services, provides interfaces to process MIDI events.
SoundFont Bank And Downloadable DRAM Services, gives interfaces to load SoundFont
banks and wave data.
Real and Protected Mode API Programming Guide, gives a general description on using the
DOS Real and Protected mode API.
CTPNP.CFG Sample, gives a sample of a typical CTPNP.CFG configuration file.
PART III Windows Driver API, describes the SB AWE32 Windows driver API.
Overview, gives a general look at the SB AWE32 Windows driver API.
AWE Manager DLL, provides a detailed description of the AWE Manager and its functions.
Windows Programming Guide, provides C examples to let you access and manipulate the
Windows drivers.
PART IV MIDI NRPN Implementation, describes the MIDI NRPN implementation of the SB AWE32.
SB AWE32 MIDI NRPN List, details the Non-Registered Parameter Number implementation
of the SB AWE32 Window MIDI driver.
PART V 3D Positional Audio API, describes the a low-level access to 3D audio algorithms running on
the SB AWE32.
Library Overview, gives a quick look at the 3D Positional Audio API implementation on the
SB AWE32.
SB AWE32 DOS 3D Positional Audio Library, gives an example of using the DOS 3D
Positional Audio Library.

SB AWE32 Developer's Information Pack PART I Introduction ••7
Copyright Creative Technology Ltd., 1994-1996 Version 3.00
Types and Structures, describes the data types and structures used by the 3D Positional Audio
Library.
System Functions, describes the system wide, environment functions.
Emitter Functions, describes the operations on the emitters.
Receiver Functions, describes the operation on the receivers.
Programming Example, gives an example of using the 3D Positional Audio Library.
Document Conventions
To help you locate and identify information easily, this manual uses visual cues and standard text
formats. The following typographical conventions are used throughout this document:
Example Description
bold_letter Bold letters indicate variable names, library functions, or commands. These
are case-sensitive. Bold letters are also used for terms intended as keywords
or for emphasis in certain phrases.
BOLD_CAPS All bold capital letters indicate constants.
NORMAL_CAPS All capital letters indicate file names or directory names.
italics Italic letters represent actual values or values of variables that you are
expected to provide.
program This font is used for example codes.
program Vertical ellipsis in an example programindicate that part of the program has
been intentionally omitted.
.
.
fragment
[ ] Square brackets in a command line indicate that the enclosed item is optional.
< > Angle brackets in a command line indicate that you must provide the actual
value of the enclosed item.
/ A forward slash in a command line indicates an either/or choice.
In this document, "you" refers to you the developer or sometimes your application. The word "user"
refers to the person who uses your application.

SB AWE32 Developer's Information Pack PART I Introduction ••8
Copyright Creative Technology Ltd., 1994-1996 Version 3.00
Getting Assistance
If you have any comments, suggestions, questions, or problems concerning this information pack, please
feel free to contact us. You can reach us at:
CompuServe: GO BLASTER
What You Need To Know
This manual assumes you are an experienced software developer who is familiar with using Sound
Blaster cards or any of its derivatives. Thus, the focus in this document is on highly technical aspects of
the cards.
This developer information pack supports the following programming tools :
• Microsoft Visual C++ version 1.0 and 1.5
• Microsoft C version 6.0 and 7.0
• Borland C++ version 3.1 and 4.0
• Watcom C/C++32 version 9.5 and 10.0
• MetaWare High C/C++ version 3.2
• Symantec C/C++ version 6.1
The real mode DOS object libraries are available for the following memory models:
• Small
• Compact
• Medium
• Large
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 diagramof the functional blocks
is provided below.

SB AWE32 Developer's Information Pack PART I Introduction ••9
Copyright Creative Technology Ltd., 1994-1996 Version 3.00
Bus Interface
Chip
Joystick Port
MCU
MIDI Port
(SB&
MPU-401)
16 bit AD/DA
Mixer
EMU8000
Tank DRAM
ROM
DRAM
SIMM Socket
EMU8000 Subsystem
C-BUS
Music
Synthesizer 3D
Stereo
Enh Power
Amplifier
Line-In
Mic-In
CD-In
Line-Out
Phone-Out
Functional Block Diagram of Sound Blaster AWE32
The EMU8000 subsystem consists of the following parts:
• ROM
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. You can expand the on-board DRAM a
maximum of 28 MB by inserting off-the-shelf SIMM modules.
The following lists the I/O ports used by the EMU8000 subsystem :
• 0x6X0 - 0x6X3

SB AWE32 Developer's Information Pack PART I Introduction ••10
Copyright Creative Technology Ltd., 1994-1996 Version 3.00
• 0xAY0 - 0xAY3
• 0xEZ0 - 0xEZ3
where 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. Please refer to the chapter CTPNP.CFG
Sample for more details.
For a detailed look at the other functional blocks in the diagram, refer to “Developer Kit for Sound
Blaster Series Hardware Programming Reference” documentation from us.

SB AWE32 Developer's Information Pack PART II DOS Real/Protected Mode API ••11
Copyright Creative Technology Ltd., 1994-1996 Version 3.00
PART II DOS Real/Protected Mode
API
Overview
This chapter gives an overview of the DOS object modules and the sample applications. Note that this
chapter does not attempt to cover programming the Sound Blaster. Please refer to “Sound Blaster
Developer Kit for Sound Blaster Series, 2nd Edition” if you need more information on programming the
Sound Blaster.
The object modules are provided in five memory models; SMALL, COMPACT, MEDIUM, LARGE and
FLAT. The object module files are :
MIDIENG.OBJ MIDI engine. Contains all MIDI channel message services.
SYSEX.OBJ SysEx parser
SFHELP1.OBJ SoundFont helper module 1
SFHELP2.OBJ SoundFont helper module 2 shared by SBKLOAD.OBJ and
WAVLOAD.OBJ
EMBED.OBJ General MIDI preset module
MIDIVAR.OBJ MIDI variables, used by all modules
HARDWARE.OBJ EMU8000 hardware initialization module
SBKLOAD.OBJ SoundFont bank loader module
WAVLOAD.OBJ Wave PCM loader module
NRPN.OBJ Non-Registered Parameter Number interpreter.
NRPNVAR.OBJ Data buffers use by Non-Registered Parameter Number interpreter.
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.
A sample application is included in this information package.

SB AWE32 Developer's Information Pack PART II DOS Real/Protected Mode API ••12
Copyright Creative Technology Ltd., 1994-1996 Version 3.00
Hardware Detection And Initialization
This group of API consists of the following :
• awe32Detect
• awe32DetectEx
• awe32InitHardware
• awe32Terminate
awe32Detect
WORD
PASCAL
awe32Detect(WORD wBaseIOAddx)
Actions Detect the presence of the EMU8000 subsystem.
Parameters wBaseIOAddx
Specify the base I/O address of the EMU8000 subsystem. The address can be found in
the 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.
Return The return value is 0 if the EMU8000 is detected, and non-zero if otherwise.
awe32DetectEx
WORD
PASCAL
awe32DetectEx(
WORD wBaseIOAddx1,
WORD wBaseIOAddx2,
WORD wBaseIOAddx3
)
Actions Detect the presence of the EMU8000 subsystem for systems where the base I/O
addresses set are not 0x400 apart.
Parameters wBaseIOAddx1, wBaseIOAddx2, wBaseIOAddx3
Specifies the base I/O addresses of the EMU8000 subsystem. In Windows 95, the I/O
addresses used can be found in the ‘CTPNP.CFG’ configuration file located in the
Windows directory. Refer to the CTPNP.CFG Sample at the end of this section.
Return The return value is 0 if the EMU8000 is detected, and non-zero if otherwise.

SB AWE32 Developer's Information Pack PART II DOS Real/Protected Mode API ••13
Copyright Creative Technology Ltd., 1994-1996 Version 3.00
awe32InitHardware
WORD
PASCAL
awe32InitHardware(VOID)
Actions Prepare the EMU8000 subsystem for MIDI playback.
Parameters None.
Return Return 0 if the EMU8000 subsystem had been properly initialized, and non-zero if
otherwise.
awe32Terminate
WORD
PASCAL
awe32Terminate(VOID)
Actions Restore the EMU8000 chip to a known state.
Parameters None.
Return Return 0 if the EMU8000 subsystem had been properly terminated, and non-zero if
otherwise.
Remarks The EMU8000 will be initialized to process FM audio. The FM initialization has a
tight timing loop. It is recommended that all interrupts are disabled before calling
awe32Terminate.
MIDI Services
This group of API consists of the following :
• awe32InitMIDI
• awe32InitNRPN
• awe32NoteOn
• awe32NoteOff
• awe32ProgramChange
• awe32PitchBend
• awe32Controller
• awe32ChannelPressure
• awe32PolyKeyPressure
• awe32Sysex
• __awe32NoteOff

SB AWE32 Developer's Information Pack PART II DOS Real/Protected Mode API ••14
Copyright Creative Technology Ltd., 1994-1996 Version 3.00
• __awe32IsPlaying
awe32InitMIDI
WORD
PASCAL
awe32InitMIDI(VOID)
Actions Initialize MIDI engine. It resets all controller values and prepares for subsequent
MIDI engine calls.
Parameters None.
Return The return value is 0 if the initialization is successful, non-zero if otherwise.
awe32InitNRPN
WORD
PASCAL
awe32InitNRPN(VOID)
Actions Initialize the data buffer used for NRPN and to link in the NRPN.OBJ and
NRPNVAR.OBJ modules.
Parameters None.
Return Return 0 upon successful initialization, and non-zero if otherwise.
Remark NRPN is not supported for SoundFont2 library.
awe32NoteOn
WORD
PASCAL
awe32NoteOn(
WORD wMIDIChannel,
WORD wNoteNumber,
WORD wVelocity
)
Actions Turn on a MIDI note.
Parameters wMIDIChannel
Specify from which MIDI channel the note on originated. Valid range for this variable
is from 0 to 15 decimal.
wNoteNumber
Specify the MIDI note number. Valid range for this variable is from 0 to 127.
wVelocity
Specify the MIDI note's velocity. Valid range for this variable is from 0 to 127.
Return The return value is 0 if the MIDI note on is successful, non-zero if otherwise.

SB AWE32 Developer's Information Pack PART II DOS Real/Protected Mode API ••15
Copyright Creative Technology Ltd., 1994-1996 Version 3.00
Remarks To prevent note stealing, especially for lengthy special effects, add 16 to the channel
number. Care must be taken to issue a corresponding note-off with the same channel
number.
awe32NoteOff
WORD
PASCAL
awe32NoteOff(
WORD wMIDIChannel,
WORD wNoteNumber,
WORD wVelocity
)
Actions Turn off a MIDI note.
Parameters wMIDIChannel
Specify fromwhichMIDI channel the note off originated. Valid range for this variable
is from 0 to 15 decimal.
wNoteNumber
Specify the MIDI note number. Valid range for this variable is from 0 to 127.
wVelocity
Specify the MIDI note's velocity. Valid range for this variable is from 0 to 127.
Return The return value is 0 if the MIDI note off is successful, non-zero if otherwise.
awe32ProgramChange
WORD
PASCAL
awe32ProgramChange(
WORD wMIDIChannel,
WORD wProgram
)
Actions Select a program.
Parameters wMIDIChannel
Specify fromwhich MIDI channel the program change originated. Valid range for this
variable is from 0 to 15 decimal.
wProgram
Specify the desired program value. Valid range for this variable is from 0 to 127.
Return The return value is 0 if the MIDI program change is successful, non-zero if otherwise.

SB AWE32 Developer's Information Pack PART II DOS Real/Protected Mode API ••16
Copyright Creative Technology Ltd., 1994-1996 Version 3.00
awe32PitchBend
WORD
PASCAL
awe32PitchBend(
WORD wMIDIChannel,
WORD wLSB,
WORD wMSB
)
Actions Pitch bend all notes sounding in a MIDI channel.
Parameters wMIDIChannel
Specify from which MIDI channel the pitch bend originated. Valid range for this
variable is from 0 to 15 decimal.
wLSB
Specify the MIDI pitch bend LSB data value. Valid range for this variable is from 0 to
127.
wMSB
Specify the MIDI pitch bend MSB data value. Valid range for this variable is from 0
to 127.
Return The return value is 0 if the MIDI pitch bend is successful, non-zero otherwise.
awe32Controller
WORD
PASCAL
awe32Controller(
WORD wMIDIChannel,
WORD wControlNumber,
WORD wControlData
)
Actions Controller change on a MIDI channel.
Parameters wMIDIChannel
Specify fromwhichMIDI channel the note on originated. Valid range for this variable
is from 0 to 15 decimal.
wControlNumber
Specify the MIDI controller number. Valid range for this variable is from 0 to 127.
wControlData
Specify the MIDI controller's data value. Valid range for this variable is from 0 to
127.
Return The return value is 0 if the MIDI control change is successful, non-zero if otherwise.
Remarks Supported controllers are:
• CC0 Bank Select
• CC1 Modulation Wheel

SB AWE32 Developer's Information Pack PART II DOS Real/Protected Mode API ••17
Copyright Creative Technology Ltd., 1994-1996 Version 3.00
• CC6 Data Entry MSB
• CC7 Master Volume
• CC10 Pan Position
• CC11 Expression
• CC38 Data Entry LSB
• CC64 Sustain Pedal
• CC91 Effects Depth (Reverb)
• CC93 Chorus Depth
• CC98 Non-Registered Parameter Number LSB
• CC99 Non-Registered Parameter Number MSB
• CC100 Registered Parameter Number LSB
• CC101 Registered Parameter Number MSB
• CC120 All Sound Off
• CC121 Reset All Controllers
• CC123 All Notes Off
RPN recognizes controller value 0 (pitch-bend sensitivity). Reset All Controllers
resets the following:
• Pitch Wheel
• Modulation Wheel
• Expression (CC11)
• Sustain Pedal (CC64)
• Channel Pressure
• Non-Registered Parameter Numbers
awe32ChannelPressure
WORD
PASCAL
awe32ChannelPressure(
WORD wMIDIChannel,
WORD wData
)
Actions MIDI Channel Pressure.
Parameters wMIDIChannel
Specify from which MIDI channel the channel pressure originated. Valid range for this
variable is from 0 to 15 decimal.
wData
Specify the channel pressure data value. Valid range for this variable is from 0 to 127.

SB AWE32 Developer's Information Pack PART II DOS Real/Protected Mode API ••18
Copyright Creative Technology Ltd., 1994-1996 Version 3.00
Return This function will return 0 if successful, and non-zero if otherwise.
awe32PolyKeyPressure
WORD
PASCAL
awe32PolyKeyPressure(
WORD wMIDIChannel,
WORD wNoteNumber,
WORD wData
)
Actions None.
Parameters wMIDIChannel
Specify from which MIDI channel the polyphonic key pressure originated. Valid range
for this variable is from 0 to 15 decimal.
wNoteNumber
Specify the MIDI note number. Valid range for this variable is from 0 to 127.
wData
Specify the polyphonic key pressure data value. Valid range for this variable is from 0
to 127.
Return This function will always return 0.
Remarks This function is a dummy place holder and does not do anything in its main body. It is
provided for MIDI compatibility purposes.
awe32Sysex
WORD
PASCAL
awe32Sysex(
WORD wMIDIChannel,
LPBYTE lpSysexBuffer,
WORD wBufferSize
)
Actions MIDI Sysex command
Parameters wMIDIChannel
Specify from which MIDI channel the Sysex originated. Valid range for this variable
is from 0 to 15 decimal.
lpSysexBuffer
Specify a far byte pointer to a string of Sysex data.
wBufferSize
Specify the size of the Sysex buffer.
Return The return value is 0 if the MIDI Sysex command is successful, non-zero if otherwise.

SB AWE32 Developer's Information Pack PART II DOS Real/Protected Mode API ••19
Copyright Creative Technology Ltd., 1994-1996 Version 3.00
Remarks This current API recognizes the Sysex message switching Reverb/Chorus effects
variation.
Reverb Sysex macro :
F0 41 10 42 12 40 01 30 XX CS F7
where XX denotes the Reverb variation to be selected, and CS denotes a checksum
value that is not verified. The valid values for XX are
0 - Room 1
1 - Room 2
2 - Room 3
3 - Hall 1
4 - Hall 2
5 - Plate
6 - Delay
7 - Panning Delay
Chorus Sysex macro
F0 41 10 42 12 40 01 38 XX CS F7
again, XX denotes the chorus variation to be selected, and CS notes a checksum value
that is not verified. The valid values for XX are :
0 - Chorus 1
1 - Chorus 2
2 - Chorus 3
3 - Chorus 4
4 - Feedback chorus
5 - Flanger
6 - Short Delay
7 - Short delay (FB)
__awe32NoteOff
WORD
PASCAL
__awe32NoteOff(
WORD wMIDIChannel,
WORD wBank,
WORD wPreset,
WORD wNote
)
Actions Turn off a MIDI note. You would use this function to turn off a specific user bank
note.
Table of contents
Popular Microcontroller manuals by other brands

Texas Instruments
Texas Instruments LaunchPad MSP430FR2476 user guide

Intel
Intel BX80539T2500 - Core Duo 2 GHz Processor user manual

Altera
Altera Stratix III Device handbook

Fujitsu
Fujitsu F2MC-8FX MB95200H/210H Series Application note

Texas Instruments
Texas Instruments AM243 Series user guide

NXP Semiconductors
NXP Semiconductors MC68HC16Z1 user manual