The Active Network

ActiveWin: DirectX Active Network | Articles | Editorials | Interviews | FAQ's | Forums



DirectMusic is the musical component of the DirectX® application programming interface (API). DirectMusic, unlike DirectSound (which allows for the capture and playback of digital sound samples), works with message-based musical data. Music can be synthesized either in hardware, in the Microsoft® Software Synthesizer, or in a custom synthesizer. DirectMusic supports the Musical Instrument Digital Interface (MIDI) and downloadable sounds (DLS) standards. However, DirectMusic allows the music in a game to change dynamically to what is happening. Take for example, a shoot-‘em-up game. The programmers of this game would like one song to remain during the current level. Using the DirectMusic Producer program, they could create a musical score for the entire level. This score, however, would change depending on the actions of the character in the game. If the character was walking around a level, without doing anything, the music could be calm. When he engaged in battle with an enemy, the volume could rise, or the instruments could change. When the battle ended, the music could return to a calm pace. This would all happen without a pause, because DirectMusic allows for the music be generated on the fly, played with variations, and can respond to certain events. Like other components of DirectX, DirectMusic provides an API based on the Component Object Model (COM).

Why Use DirectMusic?

· Consistent playback experience. By using downloadable sounds, an application can count on musical instruments sounding the same on all machines, and can perform with instruments of its own design.

· Jitter-free timing. Playback of MIDI-generated music has timing accuracy within two milliseconds.

· Hardware acceleration.

· Software emulation. Machines without hardware acceleration are fully DirectMusic-capable with minimum impact on performance.

· Extensibility. DirectMusic does not restrict vendors to a base-level feature set.

· Generic mechanism for loading and performing musical segments, regardless of the performance technology. DirectMusic equally supports standard MIDI files, interactive music sections, and third-party technology.

· Multiple performances. More than one piece of music can be played at once, with completely separate timing, instrument sets, and so on.

· More than 16 MIDI channels. By mapping performance channels to channel groups, DirectMusic breaks through the 16-channel limitation and makes it possible for virtually any number of voices to be played simultaneously.

· Automated management of DLS instruments.

· Dynamic and interactive playback. In combination with DirectMusic Producer, the DirectMusic performance engine can be used to create dynamic musical soundtracks based on stored compositional material. The music is generated on the fly, is played with variations, and can respond to program events.

So What Does This Mean?

This means better games, with a different experience each time. Have you ever played a game and have been bored by the same music being played over and over? Because DirectMusic generates music on the fly, the music is different every time. DirectMusic uses the same score, but varies it depending on the mood, the location, and the personality of your character. Personality? If DirectMusic recognizes that you are playing very confidently, the music will change to fit that mood. If you are playing it safe, hiding away, DirectMusic will also change the music to fit the mood. This means more realism, and better game play. In a tense situation, the music will get tense, instead of staying the same during the whole level. Sounds much better, doesn't it?

DirectX Media
DirectX Media

DirectX Contents Index
DirectX Problems
DirectX Problems


  *   *