Playing modules MOD XM IT S3M

DOS specific questions.
Post Reply
Ratchet
Posts: 1
Joined: Mar 27, 2019 9:14

Playing modules MOD XM IT S3M

Post by Ratchet »

Is there a lib to play module files in DOS?
I know there are libs like fmod, bass or fbsound. But theyare only available for Win/Linux.
I wanna play old school module music under DOS ;)
xlucas
Posts: 334
Joined: May 09, 2014 21:19
Location: Argentina

Re: Playing modules MOD XM IT S3M

Post by xlucas »

I don't know any DOS library for this. If anybody does, then that'll be a better answer to your question, but just in case no one does, this is what I do know:

MOD and S3M format are very documented everywhere. I have made programs in the past that handled these formats. Yet, if you're to reproduce them, the complexity resides in the effects. If you just make a routine to scale the samples, you could start just ignoring all effects and just playing the thing and then work on each effect as you need them. It takes time, but would be interesting to do if you're willing to play with DOS :) There exists also a 8-channel MOD format. I have never worked with XM or IT, though.

If you just want to play DOS style music, you may also be interested in MID and CMF files, which are not tracker files, but were used by many DOS games to store their music. For CMF files (which are MIDI files with OPL2 instruments embedded in them), there exists not a library, but a TSR you can use called SBFMDRV.COM (there also exists a DRV version, which you have to load in memory manually). You can easily interact with the driver using the INT 80h or you can set it to another interrupt. I have the specs on how to program it and it's very straightforward. I can get it to you if you're interested. Playing MID files with the SB requires you to provide the instruments, but you could well borrow them from CMF files and use SBFMDRV to play them as well. SBFMDRV came with several Creative sound cards.

SBFMDRV.COM is here: http://www.vogonsdrivers.com/getfile.php?fileid=48
MOD file format: https://wiki.multimedia.cx/index.php/Protracker_Module
S3M file format: http://www.shikadi.net/moddingwiki/S3M_Format
angros47
Posts: 2321
Joined: Jun 21, 2005 19:04

Re: Playing modules MOD XM IT S3M

Post by angros47 »

There are some examples in QuickBasic that allow to open a .MOD file. Some can be ported to FreeBasic (but accessing the audio card is more complex in DOS FreeBasic)

Otherwise, a multiplatform library that does what you need is LibMikMod, there should be a version for DOS too
rugxulo
Posts: 219
Joined: Jun 30, 2006 5:31
Location: Usono (aka, USA)
Contact:

Re: Playing modules MOD XM IT S3M

Post by rugxulo »

angros47 wrote:a multiplatform library that does what you need is LibMikMod, there should be a version for DOS too
This sounds like something that should be on DJGPP mirrors, but I can't find it offhand. I've never used it (nor similar), so I'm a bit inexperienced, to say the least.

The one that comes to mind, to me, is DUMB (SF.net). Years ago, I wanted somebody to port it (make a binding) to FBC. I remember vaguely telling someone, but they never got around to it, and I was (and still am) too inexperienced. IIRC, it worked in DOS (but only on ancient cards like SB16, obviously). Probably not directly helpful, but that's as close as I can remember.
Post Reply