Loading MOD Audio files

BlitzMax Forums/BlitzMax Programming/Loading MOD Audio files

William Drescher(Posted 2008) [#1]
I keep getting random errors every time I try to load a *.mod file. Could someone please tell me how to load them?


REDi(Posted 2008) [#2]
what are you using to load the MOD files?


William Drescher(Posted 2008) [#3]
Well I tried TAudioSample loading and TSound loading and both return Null and cause an exception error when I try to play them.


xlsior(Posted 2008) [#4]
By default BlitzMax cannot load MOD files. (B3D had licensed fmod to handle that side of things, but this is not present in BlitzMax)

If you want to use .mod files, you'll need a 3rd party audio solution, such as:

- fmod (licensing cost if >5,000 sold, IIRC)
- bass (licensing cost, IIRC)
- maxmod (free -- See ReDI's .sig in his posting above)


William Drescher(Posted 2008) [#5]
I remember that Blitz3D, BlitzPlus, and the original BlitzBasic could all load .Mod files without the help of a 3rd party module. And the Bass.dll file was free when I got it for BlitzPlus.


William Drescher(Posted 2008) [#6]
Ok, I've installed MaxMod, now how do I use it to open .mod files?


Gabriel(Posted 2008) [#7]
And the Bass.dll file was free when I got it for BlitzPlus.

Free to download, not necessarily free to use. It definitely wouldn't be free for Mark to use as part of BlitzMax anyway.


REDi(Posted 2008) [#8]
There is a couple of examples in the docs mate, if you cant see the docs in the IDE then try running "Rebuild Documentation"


William Drescher(Posted 2008) [#9]
What I still don't understand is that BlitzPlus and Blitz3D had .mod file compatiblity, why take it out of BlitzMAX?


BladeRunner(Posted 2008) [#10]
Maybe the licence fees have changed and it would be too expensive to buy it for BMax. (Consider that a 'flat rate' for all sold copies of BMax would be a high sum of fee to pay)


xlsior(Posted 2008) [#11]
What I still don't understand is that BlitzPlus and Blitz3D had .mod file compatiblity, why take it out of BlitzMAX?


It's more a matter of 'not putting it in' than 'taking it out'.
fmod is expensive

That said -- maybe BRL ought to look at licensing MaxMod to be included as a standard BlitzMax module, it seems to work pretty well.


Brucey(Posted 2008) [#12]
FMOD, BASS and irrKlang are all free to use if you aren't "selling" your game.
They all expect a license payment for "shareware" type games, and a much higher price for "commercial" ones. They vary a lot in the price though. Depends what you are planning to release.

@REDi
Can't you make maxmods behave like a BlitzMax Audio driver? (or maybe it does already?!) - in that you can use the standard Audio commands to play the sounds/music.


Sledge(Posted 2008) [#13]
I quite like uFMOD.


Gabriel(Posted 2008) [#14]
What I still don't understand is that BlitzPlus and Blitz3D had .mod file compatiblity, why take it out of BlitzMAX?

It was never in, so it couldn't be taken out. It was never in because Blitz3D and Blitz2D were published by Guildhall/Idigicon and so they were the ones who had to license FMod. BlitzMax is self-published and therefore it's BRL who would need the FMod license. I don't know how they wangled it for BlitzPlus, but I do know that Brett ( the guy who developed FMod ) has neen getting ever more elitist in his attitudes toward developers, so quite possibly he wanted less money from them back then than he would want now.


REDi(Posted 2008) [#15]
@REDi
Can't you make maxmods behave like a BlitzMax Audio driver? (or maybe it does already?!) - in that you can use the standard Audio commands to play the sounds/music.

It already does mate, The only non standard command is "CreateAudioStream:TChannel"


Czar Flavius(Posted 2008) [#16]
For a poor man's solution, just find a mod-to-mp3/ogg converter online.


Digital Anime(Posted 2008) [#17]
You could also try mikmakmod which you can get from, it has a Blitzmax example included :

http://www.traklink.com/component/option,com_docman/task,cat_view/gid,2/Itemid,2/

the license is LGPL which is explained on the site when you want to download it. It's the cheapest option for me when using Mod or XM files in case I want to sell the game commercial.

Fmod & Bass have a lot more options, but it comes with a price which is a lot more too.