Using .Mod Files with Blitzmax. How do you do so?
BlitzMax Forums/BlitzMax Beginners Area/Using .Mod Files with Blitzmax. How do you do so?
| ||
Hey everyone! Is there a module or something that lets you use .mod music files in BlitzMax? Thanks, |
| ||
Yup, there's multiple options there: Personally I prefer MaxMod2, but there's also a couple of wrappers for fmod and BASS. IIRC fmod and bass both require licensing fees to be used in commercial software, though. |
| ||
Thanks!, I'll poke around for a MaxMod2 link :) |
| ||
MaxMod2 looks like a lot of trouble to set up without Allegro installed. I checked the release date for the latest version of MaxMod2, and it was for 2005. However the oldest available version of Allegro seems to be from early 2009. So I have 2 questions. 1: Would Allegro still be compatible with MaxMod2 since its much more recent? 2: Do I need Allegro, or can I set MaxMod up anyways without it? Thanks! |
| ||
There are several releases of Maxmod, and over the years there have been several changes in the sound rendering library. They've used DUMB, older versions used DirectSound, and I believe that the original MaxMod used yet another engine. You may have more luck using MaxMod 1, or one of the older releases of MaxMod2? (The older ones may not necessarily be worse. They may not have some of the dependencies of the later versions, but the biggest difference is how it renders the sound. The mod formats are really kind of hard to decode, since a lot of things are simply 'assumed' instead of spelled out. The same module doesn't always sound the same in all players. However, if your particular modules sound good (and the vast majority of them do) then there is no reason not to just use an older version |
| ||
Ok, I'll try setting it up today and post back if I have any problems :) Thanks xlsior! |
| ||
You can use BASS to play mod files, you can grab it from Brucey's SVN. Cheers Charlie |
| ||
xlsior said BASS charges a licensing fee to use the files in a commercial program, and since Ping Pong Battle will be a commercial program, I kind of have to stick with maxmod2 ;( I am having a bit of trouble setting up maxmod2 by the way, because this is the first module I've ever used for BlitzMax, other than the built in ones. If it wouldn't be too much trouble, could someone give me some step by step instructions to set it up? Thanks! |
| ||
Followed the tutorial on the maxmod site, and when I try to import any of the maxmod2 modules, I get an error that says 'Can't find interface for module"Maxmod2.(Whatever I'm trying to load)" ' I can load the blitz modules just fine, just not these. I even ran two of the blitzmax example programs, and they came up with the same error. Anyone know whats wrong? Thanks, |
| ||
Well I found the problem. looks like I need to 'rebuild' the module. Following these instructions now :) http://www.blitzbasic.com/Community/posts.php?topic=87999#998654 Hopefully it will work out ok. |
| ||
Hi WERDNA Sorry mate, been on vacation for the past few weeks, did you get it working in the end? |
| ||
No. Still working on it ;( I'm getting a handle on how to set up modules, and know what 'should' fix it, but it ain't working ;) Currently I'm trying to set up the older versions. Might need to try a different version of MiniGW I guess. because the older versions aren't working out so well... When I try to Import maxmod2.DUMB and then compile my code, I get about a dozen C++ errors, mainly pointing at 'void' variables. or some STD problems. So iffy.... |
| ||
Have you tried that BlitzMax Companion util... http://www.blitzmax.com/Community/posts.php?topic=79814 It'll install MinGW for you and set the required environment variables |
| ||
Trying it out now :) Thanks for the link! |
| ||
YES! I think I got it at last!!!! Was the version of MinGW I had installed. I might not have downloaded the full version when I first installed it, lol. I can now Import MaxMod2.Dumb into my project just fine :) Now all I need to do is figure out how to actually play them, lol. if someone could just post a quick, simple example of how to load and play a .mod file, I would really appreciated it! Thanks for your help so far everyone ;) |
| ||
if someone could just post a quick, simple example of how to load and play a .mod file, I would really appreciated it! Doesn't it come with an example?? |
| ||
Have a look in the module for a folder called "examples" or see the examples in the documentation ;) |
| ||
Just use bass. It's cheap for shareware titles. Commercial means "retail" and unless I'm wrong, your pong battle won't be on retail shelves will it? |
| ||
Commercial means "retail" Since when, exactly? The BASS license only allows free use for individuals who are not charging for their product. Digital distribution for compensation also requires a license, even when it's not physically sitting on store shelves somewhere. BASS charges 100 euro for a shareware license, 950 euro for a single commercial product license, or 2450 euro for an unlimited number of your commercial products. |
| ||
None of the examples are blitzmax :) They all appear to be C++. Since maxmod is nearly ready, I don't want to bother trying to set up another module. setting up one was hard enough, lol. |
| ||
Tis works at last. after scouring the forums, I found this old code example, and modified it a little to load .DUMB instead ot .rtaudio. Framework MaxMod2.RtAudio Import MaxMod2.DUMB SetAudioDriver "MaxMod RtAudio" Local Channel:TChannel = CueMusic(RequestFile("",MusicExtensions())) ResumeChannel Channel While ChannelPlaying(Channel) Delay 10 Wend I now shed tears of joy while playing bon jovi music. I FINALLY have it working ;)!!!!!!!! |
| ||
On the bright side, it'll now be trivial to download and compile other modules as well. I'd recommend taking a peek at the massive collection of modules that Brucey has up for download, they add some reall nice features to Blitzmax. |
| ||
Sounds like a plan. I've heard about how cool some of them are. |
| ||
"It's cheap for shareware titles." "BASS charges 100 euro." Very inexpensive for a stable reliable solution. |
| ||
Its kind of a moot point now, unless I can get my hands on some new .mod files. Just found out the 30+ that had come with 'game programming for teens' are only royalty free if you don't use them in a commercial product, or packaged bundle of any kind(Like a game...). |
| ||
:-(( nice to read you got it at least to work with maxmod2. Sadly my files (even the examples) won't link after compiling, exiting with the message: Linking:MiniPlayer.exe D:/Program Files/BlitzMax/bin/ld.exe: cannot find -ldsound Build Error: Failed to link D:/Program Files/BlitzMax/mod/maxmod2.mod/examples/MiniPlayer.exe BlitzMax Version is 1.39 / MinGW is 5.1.6 Anyone has an idea what's going wrong? Henry |