PDA

View Full Version : DirectMusic



cairnswm
25-11-2003, 08:46 PM
Anyone have a download available for DirectMusic.pas (For DirectX 8 or DirectX 7 if it was available for DX7). I havn't been able to find it anywhere.... For Dx9 is available but the older files are not.

Also - anyone have examples/tutorials on using DirectMusic for playing Midi files. I've got someone interested in supplying Midi files for free for my games.

M109uk
26-11-2003, 02:17 AM
I have a copy of DirectMusic.pas (http://www.biocoders.org/downloads/DirectMusic.pas 288Kb) for DirectX 8 (but no examples) or i have WDirectX Component set (http://www.biocoders.org/downloads/wdx_20000922-5.zip 632Kb) which have the units for DirectX 7 (which include examples).

Hope these help

cairnswm
26-11-2003, 05:55 AM
Thanks - I'll try them tonight or tomorrow. (Tonight is kiddies xmas party at the nursery school)

Clootie
26-11-2003, 06:03 AM
DirectMusic has not changed since DirectX8. But it's greatly improved/unified with DSound in DX7->DX8 transition. So, I'll recommend you to use DirectMusic8 available throw DirectX 8.0 and runnable on all version of Windows (including Win95).

cairnswm
27-11-2003, 08:48 AM
I've tried both the Dx8 and DX7 files and couldn't get a program working that will play a Midi file - I got a program to compile but it didn't accept some of the commands (caused access violations).

Could someone cleverer than me pleas eput together an example of playing a midi (looped) and let me know where I can download it (please include the DirectMusic.pas etc files you use).

I'd really like it to work with Dx7 as thats the level I'm using at the moment.

Thanks

M109uk
27-11-2003, 05:29 PM
Why not just use the TMediaPlayer component to play Midi's?!?
But anyway i have found a site with what you are looking for (but its not in delphi, but you might be able to translate it)::
http://francis.dupont.free.fr/coindev/english/directmusic/midi.htm
Hope this helps...

cairnswm
28-11-2003, 06:16 AM
Thanks - I'll give it a try.

Mike
11-01-2004, 10:23 PM
I made a little sample for you cause I didn't have anything better to do :)
http://koti.mbnet.fi/smiika/downloads/DMSample.zip

It shows how to initialize DirectMusic and load & play midi file. It can also play sgt and sgp files which are native fileformats of DirectMusic. They can also contain sound samples in the file, a bit like mod or xms.

M109uk, there are many benefits using DirectMusic in insted of TMediaPlayer. DirectMusic has a pretty good sounding software synthesizer which supports DLS files and you can even use SoundFonts (though it's a bit tricky) and synth supports also reverb, chrous, flanger and many other effects which can be all adjusted on the fly. Most of soundcards (or integrated AC'97 chips which don't have hardware midi at all) lack all these features anyway.

cairnswm
12-01-2004, 05:22 AM
Thanks - I've downloaded it and will try tonight.

marmin
06-06-2005, 05:57 PM
heh! that sample was exactly what i was looking for!!!
YEAH!