Microsoft DirectX 8.1 (C++)

What's New in DirectX Audio

The audio components of Microsoft® DirectX® have undergone a major revision. Microsoft® DirectMusic® and Microsoft® DirectSound® are now a more unified API for playing sounds of all kinds, and many new capabilities have been added.

The following list describes some of the new features:

Integration of waves and message-based sounds in a single playback mechanism

Wave files and resources can now be loaded by the DirectMusic loader and played by the DirectMusic performance. The application no longer needs to parse the wave and copy or stream it to a DirectSound buffer. The timing of wave playback is based on the DirectMusic master clock, and waves can be synchronized to musical events and processed by tools just like any other segment.

The DirectSound API continues to be supported, and you can still play waves directly through DirectSound buffers. DirectSound continues to be the API for wave capture and full duplex.

More flexible and powerful audiopath model

In previous versions of DirectMusic, performance channels were mapped to ports, and each port sent its output to a single DirectSound buffer. Under the new model, channels in a segment are mapped to audiopaths that control the data flow from the performance to the final output. Output from the synthesizer can be sent to multiple playback buffers, each with its own 3-D positioning and effects. Audiopaths can be created dynamically by the application or authored into segments.

Individual control over segment states

Each playing instance of a segment can have its own audiopath, so parameters such as volume, pan, and pitch bend can be modified for each segment state individually.

DLS2 Synthesis

The DirectMusic synthesizer is now based on the Downloadable Sounds (DLS) Level 2 standard, providing higher-quality sound synthesis. New features of the DLS2 synthesizer include six-stage envelopes, layering of voices, release waveforms, and additional low-frequency oscillators (LFOs). Each voice has an optional low-pass resonant filter.

Special effects

DirectX Media Objects can be attached to sound buffers to add effects. Standard effects such as musical reverb, I3DL2 (Interactive 3-D Audio Level 2) environmental reverb, distortion, and echo are provided by DirectX Audio, and third-party effects can be added.

Greater control over cueing

A composer can set points in a segment that specify where the segment can begin playback, so that the segment can maintain its relationship to the time signature. Primary segments can contain arbitrary points where other segments can be cued, allowing greater control than cueing to the nearest measure, beat, or grid. A new segment cue flag, DMUS_SEGF_SEGMENTEND, causes the segment to play when the current primary segment finishes playing.

Notification of impending silence

The performance notification event has a new notification type, DMUS_NOTIFICATION_MUSICALMOSTEND, which indicates that the last primary segment in the queue is about to end. This notification gives the application a chance to schedule a new segment.

Enhanced MIDI controller support

Curve messages now support RPN (registered parameter number) and NRPN (nonregistered parameter number) controller changes.

Infinite repetition of segments

The new DMUS_SEG_REPEAT_INFINITE flag allows a segment to play for an indefinite time.

Simplified downloading and unloading of bands

Bands can be downloaded and unloaded with a simple method call on the segment object.

Dynamic track data generation

New track configuration and play flags allow tracks to be recomposed each time the segment is played or looped. For example, a chordmap track can be configured to establish a new chord progression each time the segment plays.

Audio scripting

Music composers and sound designers can gain greater control over the performance by using scripts. The application does not handle the details of playback but instead calls into the script. For example, a game event might trigger a script function. The script author can easily modify the soundtrack's response to the game event by modifying the function.

Improved run-time control over tracks

Applications can set individual track configurations to disable playback and parameter control. Tracks can be configured to operate in clock time rather than music time. Tracks in self-controlling segments can be configured to override parameter tracks in controlling or primary segments.

Container object

All components of a Microsoft DirectMusic Producer project can be kept in a single file, making it easier to find and load all objects. Containers can also be embedded in segments, so that everything necessary to play a segment is kept within the segment.

Lyrics track

Time-stamped text is sent to the performance by a segment containing a lyrics track.

Improved cache management

Applications can more easily release unused objects that were loaded by other objects.