Microsoft DirectX 8.1 (C++)

IDirectMusicInstrument8

The IDirectMusicInstrument8 interface represents an individual instrument from a DLS collection.

IDirectMusicInstrument8 is a type definition for IDirectMusicInstrument. The two interface names are interchangeable.

The only way to create a DirectMusicInstrument object to download an instrument is to first create a DirectMusicCollection object, and then call the IDirectMusicCollection8::GetInstrument method. GetInstrument creates a DirectMusicInstrument object and returns its IDirectMusicInstrument8 interface pointer.

To download the instrument, pass its interface pointer to the IDirectMusicPort8::DownloadInstrument or the IDirectMusicPerformance8::DownloadInstrument method. If the method succeeds, it returns a pointer to an IDirectMusicDownloadedInstrument8 interface, which is used only to unload the instrument.

The methods of IDirectMusicInstrument8 operate only on an instrument that has not been downloaded. Any instances of the instrument that have been downloaded to a port are not affected by the IDirectMusicInstrument8::GetPatch and IDirectMusicInstrument8::SetPatch methods.

In addition to the methods inherited from IUnknown, the IDirectMusicInstrument8 interface exposes the following methods.

Method Description
GetPatch Retrieves the patch number for the instrument.
SetPatch Sets the patch number for the instrument.

The LPDIRECTMUSICINTRUMENT8 type is defined as a pointer to this interface.

typedef IDirectMusicInstrument8 *LPDIRECTMUSICINSTRUMENT8;

Requirements

  Header: Declared in dmusicc.h.