Star on GitHubStar2.4k stars

Case study

DirectMusic: an open reimplementation of Microsoft’s music API

Re-implements DirectMusic, the adaptive-soundtrack API Microsoft shipped with early DirectX, as a portable C11 library that loads a game’s segment, style and DLS instrument files and renders the music to PCM. The README lists only the Gothic and Gothic II (Night of the Raven) soundtracks as tested, and as working “somewhat” correctly; the project calls itself incomplete and under heavy development. Instruments play through a vendored TinySoundFont synthesizer after DLS-to-SoundFont conversion.

Targets
Game
Category
Independent reconstruction cases
Relationship
Independent reconstruction project
Sources reviewed
Stars
63
Last commit
2026-03-02
Language
C

GitHub data as of 2026-11-09

Copy as MarkdownView JSONCite

Requirements & limits

  • The C11 library exposes its own DmLoader, DmSegment and DmPerformance API. End-and-intro embellishment, some curves and message types remain unimplemented.
  • Users supply their own .sgt segments, .sty styles and .dls collections from game data through a resolver callback; the repository ships none of these files.
  • Building needs a C11 compiler and CMake 3.10+. Linux, macOS and Windows are supported. The play-segment example needs <unistd.h> and <sys/stat.h>.
  • The README reports the Gothic and Gothic II soundtracks working “somewhat” correctly. CI builds the library for Linux, Android, macOS and Windows; no test suite or Microsoft runtime output comparison is listed.
  • LICENSE.md grants the MIT License (Modern Variant) for project code. TinySoundFont, miniaudio and the Gothic II theme rendering have separate rights; game music retains its rights.

Cite

BibTeX

@misc{dmusic-directmusic-reimplementation-case,
  title = {{DirectMusic: an open reimplementation of Microsoft’s music API}},
  howpublished = {\url{https://github.com/GothicKit/dmusic}},
  url = {https://github.com/GothicKit/dmusic},
  urldate = {2026-10-19},
  note = {Awesome REA entry: \url{https://awesomerea.org/resources/dmusic-directmusic-reimplementation-case/}}
}

Plain text

DirectMusic: an open reimplementation of Microsoft’s music API. https://github.com/GothicKit/dmusic (accessed 2026-10-19). Awesome REA entry: https://awesomerea.org/resources/dmusic-directmusic-reimplementation-case/

Useful? Star Awesome REA on GitHub2.4k

About this entry

The description was reviewed against primary sources.

Report an outdated entry Suggest a translation fix

Primary sources

  1. README.md GitHub · GothicKit/dmusic · Revision b73b270
  2. include/dmusic.h GitHub · GothicKit/dmusic · Revision b73b270
  3. CMakeLists.txt GitHub · GothicKit/dmusic · Revision b73b270
  4. src/util/Tsf.c GitHub · GothicKit/dmusic · Revision b73b270
  5. src/Performance.c GitHub · GothicKit/dmusic · Revision b73b270
  6. src/_Internal.h GitHub · GothicKit/dmusic · Revision b73b270
  7. examples/play-segment.c GitHub · GothicKit/dmusic · Revision b73b270
  8. .github/workflows/build.yml GitHub · GothicKit/dmusic · Revision b73b270
  9. LICENSE.md GitHub · GothicKit/dmusic · Revision b73b270
  10. https://dm.gothickit.dev/

More in Games

All 2976 entries in GamesGames case studies (2832)

↑↓ move↵ open⌘↵ new tab