DirectMusic[1] is a deprecated Windows API for playing dynamic music scores authored using DirectMusic Producer[2]. It was originally released as part of DirectX in 1999 and discontinued with the release in Windows Vista around 2009-ish.
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...
Apparently Unreal 2, Final Fantasy 8 (original) and Midnight Club II use DirectMusic.