Microsoft DirectX 8.1 (Visual Basic)

Step 5: Download the Band

An easily overlooked step in playing a segment is to download the band. This step is not needed for wave files, but does no harm. For MIDI files and DirectMusic Producer segments, it is essential, so that the synthesizer can play note messages with the correct timbres.

The DirectMusicSegment8.Download method takes either an audiopath or the performance as a parameter. Since most applications use only a single synthesizer, it doesn't matter which you use. In the sample, the segment's bands are downloaded to the audiopath created in Step 3: Create the Audiopath.

dmSeg.Download dmPath

The LoadSound procedure concludes by initializing the volume and 3-D positioning of the sound:

  scrlPan_Change
  scrlVol_Change
End Sub

Next: Step 6: Play the Sound on the Audiopath