darklight at May 3rd, 2003 16:54 — #1
Ok, I want to use DirectMusic in my game just for playing MIDIs as background music. I read a lot about DirectSound but almost nothing about DirectMusic and I didn't find information of how playing external MIDI
Can someone tell me how to start?
ray_f at July 10th, 2003 00:01 — #2
Check out the samples in DirectX SDK, there are load of sample code running DirectMusic.
bladder at September 22nd, 2003 02:44 — #3
direct music is actually easier to use then direct sound becuase you dont have to deal with the buffers manually. The basic idea is that you create an IDirectMusicLoader and an IDirectMusicPerformance. Once those are initialized you need to get an IDirectMusicSegment interface. through the IDirectMusicLoader::GetObject method.
Then through the segment you can play the midi file and do stuff with it. You also need to tell directmusic that it's a midi file since those are handled differently then WAV files becuase of the instrument data, you do this with the IDirectMusicSegment::SetParam method by specifying GUID_StandartdMidiFile as the first parameter
Now use the IDirectMusicPerformance to play an IDirectMusicSegment interface.
in short...check the sdk docs.
beda at May 19th, 2005 05:05 — #4
I am a Newbie to DirectX , DirectSoundand DirectMusic.
Just want to know, I want to get all the frequency information (Amplitude) at each instance of time ( 1/100 second) when playing a wav file and I am wondering which to one to use.
Could you help me ?