Show HN: I wrote a partial re-implementation of DirectMusic (github.com)
Due to my involvement with projects[3] re-implementing an old game engine for the early 2000's games Gothic and Gothic II[4], I came to notice that existing solutions[5] were incorrect and hard to use. Thus, I was tasked with writing a new, correct re-implementation of the API.
Today, my re-implementation is able to (mostly) play back so-called style-based segments[6] and is fully tested against both the Gothic and Gothic II soundtracks. I am actively working on getting the Lego Island 2 soundtrack working as well.
There are many features of DirectMusic which the library does not currently support, simply because I have not been able to find or test soundtracks using them, so if you want to contribute, I'd love to know about software shipping with DirectMusic soundtracks!
[1]: https://en.wikipedia.org/wiki/DirectMusic
[2]: https://www.vgmpf.com/Wiki/index.php?title=DirectMusic_Produ...
[3]: Specifically GothicVR (https://github.com/GothicVRProject/GothicVR) and OpenGothic (https://github.com/Try/OpenGothic) through my ZenKit library (https://github.com/GothicKit/ZenKit)
[4]: https://en.wikipedia.org/wiki/Gothic_II
[5]: There is libdmusic (https://github.com/libdmusic/libdmusic) which is unmaintained and an embedded implementation in OpenGothic (https://github.com/Try/OpenGothic)
[6]: https://documentation.help/DirectMusic/howmusicvariesduringp...
20 comments
[ 4.8 ms ] story [ 52.1 ms ] threadDidn't see you mentioning wine, are you not aware of it?
My library uses a "pull"-model, meaning the application must call a function to render more music. DirectMusic was more of an unattended "push"-model where you'd just tell it to play something and it'd set up playback automatically. It'd just play the music in a background thread (maybe even on hardware) and your application could subscribe to certain events (like get a callback on every beat).
That said, I'm not knocking you for that, there likely are some win32 dependencies.
Apparently Unreal 2, Final Fantasy 8 (original) and Midnight Club II use DirectMusic.
The Creatures series used procedural music for their MNG format[1] starting with Creatures 2, but I don't know if it's backed by DirectMusic. It may be on Windows, but I never did any disassembly to check.
Regardless, thank you for posting something procedural which isn't backed by LLMs!
[1]: https://creatures.wiki/MNG_files
It's been a while since I've worked on anything Creatures-related. Are you still working on getting old things working on more recent platforms?
[1]: https://www.fmod.com/
[2]: https://www.audiokinetic.com/en/wwise/overview/
The server was never made available and even if it was, I wouldn’t want to host a DirectPlay server from over 20 years ago online.
Caveat is here I would prefer to write the server in C#.
So if there was ever an open source implementation of DirectPlay for emulation/preservation reasons, I’d jump on the opportunity to get the game working again.
Well it’s either that or I try do some reverse engineering of packets with wireshark…