VOGONS

Common searches


First post, by lucasaugustovd

User metadata
Rank Newbie
Rank
Newbie

Hello, does anyone know of a small MUS library written in C? I don't care much about how good it sounds as my purpose is to merge the code into a small Doom source-port I am writing, I am aware of fluidsynth, wildmidi and timidity; the later one is somewhat attractive because it has been available since 1995 but documentation for it is non-existent nowadays, and it depends on a somewhat big file in order to work, so something smaller would be really cool.
For now what I have is just a Linuxdoom with proper sound support and the most annoying bugs addressed, that makes it functional and stupidly easy to build and modify, but there are no new features.

Reply 1 of 3, by enaiel

User metadata
Rank Member
Rank
Member

Are you looking for a MUS library, a MIDI library, or a MIDI soft synth? AFAIK, they are 3 very different things. Fluidsynth, wildmidi and timidity are all MIDI soft synths.
* MUSLib is a MUS library in C, but only for DOS.
* TinySoundFont is a small cross-platform C soft synth, but it doesn't support MIDI.
* TinyMIDI is a small C MIDI library for Linux, which you combine with TinySoundFont to get a MIDI soft synth 😀

Hope that helps and best of luck in your DOOM port!

#1 VIA C3 Ezra-T 1.0GHz / MSI MS-6368 / Voodoo2+ViRGE GX / SBPro2+YMF744+AWE64+SC-7
#2 Pentium III-S Tualatin 1.40GHz / QDI A10T / Voodoo3 3000+GF4 Ti4200 / Audigy+AU8830+SC-50

Reply 2 of 3, by lucasaugustovd

User metadata
Rank Newbie
Rank
Newbie
enaiel wrote on 2021-05-12, 03:18:
Are you looking for a MUS library, a MIDI library, or a MIDI soft synth? AFAIK, they are 3 very different things. Fluidsynth, wi […]
Show full quote

Are you looking for a MUS library, a MIDI library, or a MIDI soft synth? AFAIK, they are 3 very different things. Fluidsynth, wildmidi and timidity are all MIDI soft synths.
* MUSLib is a MUS library in C, but only for DOS.
* TinySoundFont is a small cross-platform C soft synth, but it doesn't support MIDI.
* TinyMIDI is a small C MIDI library for Linux, which you combine with TinySoundFont to get a MIDI soft synth 😀

Hope that helps and best of luck in your DOOM port!

Thank you for your suggestions, if MUSLib proves to be difficult to port, the other two will certainly save me a lot of work! I am not aware of the of the differences between them so I am unable to be more specific, to clarify, my goal is to have the source-port itself play the MUS files (lumps, format specified in [1], [2], and [3]) that comes with the game so it can finally play music, support for MIDI files is not necessary but modifying something akin to TinyMIDI to become a "TinyMUS" should not be that difficult, I think.

[1] https://moddingwiki.shikadi.net/wiki/MUS_Format
[2] http://www.vgmpf.com/Wiki/index.php?title=MUS
[3] http://www.vgmpf.com/Docs/Format-MUS-MUSForm.html

Reply 3 of 3, by enaiel

User metadata
Rank Member
Rank
Member

Most DOOM source-ports do not play MUS files directly. Instead, they convert them to MIDI files on the fly, and play those via a MIDI soft synth like Timidity, Wildmidi, Fluidsynth, etc. See Chocolate DOOM's MUS2MID.c, for instance. In fact, the Chocolate DOOM source-port would be a great starting place for any new DOOM port, IMHO. Although I currently prefer Crispy DOOM for the few extra features. But these are just suggestions, don't let me stop you from doing your own thing!

#1 VIA C3 Ezra-T 1.0GHz / MSI MS-6368 / Voodoo2+ViRGE GX / SBPro2+YMF744+AWE64+SC-7
#2 Pentium III-S Tualatin 1.40GHz / QDI A10T / Voodoo3 3000+GF4 Ti4200 / Audigy+AU8830+SC-50