[directmusic] Connect to DLS Collection

  • From: Abhijit Patait <abhijit_patait@xxxxxxxxx>
  • To: directmusic@xxxxxxxxxxxxx
  • Date: Sat, 21 Jun 2003 16:10:00 -0700 (PDT)

All
 
I have an application in which I want to play sounds on custom instrument(s) 
(via DLS Collections) by sending MIDI messages to IDirectMusicPerformance8 
interface. I have written the code to send the DMUS_PMSGs to the performance, 
but I am stuck at the step where I have to set up the DLS collection to connect 
to the performance.
 
The DM documentation says "Once you have obtained a pointer to the 
IDirectMusicCollection8 interface (after loading the collection), you have 
access to all the instruments in the collection. At this point, though, none of 
them have been downloaded to a port. To download an entire collection at once, 
you must associate the collection with a segment and then call the 
IDirectMusicSegment8::Download method".
 
My problem is that I do not have any IDirectMusicSegment8 interface object. I 
just want to send MIDI messages (note on/off, pitch bend, control, bank/patch 
change etc) via directmusic performance interface 
(IDirectMusicPerformance8:SendPMsg). There is no way I can call 
IDirectMusicSegment8::Download as mentioned in the documentation 
(IDirectMusicSegment8 does not exist). What do I do then? How do I ensure that 
the audio data from the DLS collection is downloaded to the synthesizer and is 
connected to the MIDI messages I am sending?
 
Thank you in advance for help.
 
-Abhijit

---------------------------------
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!


Other related posts: