Microsoft DirectX 8.1 (Visual Basic)

Loading and Downloading Collections

To load an instrument collection, call the DirectMusicLoader8.LoadCollection or the DirectMusicLoader8.LoadCollectionFromResource method. Each of these methods returns a DirectMusicCollection8 object. This object has no methods, and its only role is to be passed as a parameter to DirectMusicSegment8.ConnectToCollection. You call that method to associate the collection with a segment, and then download the instruments by calling DirectMusicSegment8.Download. For an example, see Playing a MIDI File with Custom Instruments.

These steps are necessary only when you want to use a collection other than the default one. Normally, when you call DirectMusicSegment8.Download, the instruments downloaded to the port are from the default collection authored into the segment, or from the General MIDI set if the segment does not reference a collection. When you download a band, all DLS data needed by the instruments in that band is downloaded. See Using Bands.