DirectX SDK

IDirectMusicInstrument

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

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

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

The methods of IDirectMusicInstrument 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 IDirectMusicInstrument::GetPatch and IDirectMusicInstrument::SetPatch methods.

The interface has the following methods:

IDirectMusicInstrument GetPatch
  SetPatch

All COM interfaces inherit the IUnknown interface methods. This interface supports the following three methods:

IUnknown AddRef
  QueryInterface
Release

Requirements

  Windows NT/2000: Requires Windows 2000.
  Windows 95/98: Requires Windows 95 or later. Available as a redistributable for Windows 95.
  Header: Declared in dmusicc.h.