Dark Bit Factory & Gravity
PROGRAMMING => C / C++ /C# => Topic started by: Blacksheep8Bit on February 07, 2012
-
So, i was wondering, whats the best or smallest xm/mod player? Where i can find it and how to use it with my demo.
I've already asked in pouet forums, but they told me i would get better results posting the question here, and please, no BASSMOD, because the dlls is not small, 34kbs is alot if you want to make 64k demos :D
-
Welcome BlackSheep8Bit...
You may want to check out this (http://www.dbfinteractive.com/forum/index.php?topic=3700.0) thread here for some info.
-
Hi BlackSheep8Bit. I saw the thread on Pouet the other day :)
Personally, I use Minifmod to do what you're trying to do. It's fairly small and allows me to embed both the player and xm file in the exe. You could also do the same with uFmod I believe, but I've never tried uFmod personally. The replayer is probably a tiny bit smaller due to it being ASM rather than C.
I posted a couple of projects with source here for competitions a while back that has minifmod and an embedded XM in it. You can grab them here (http://www.dbfinteractive.com/forum/index.php?topic=5180.0) and here (http://www.dbfinteractive.com/forum/index.php?topic=5456.0). I store the XM file as a resource in the project. You should find everything you need in that project to get you going.
The compatibility with Minifmod doesn't seem to bad at all to me personally, I've heard people bitch about it not playing all XM files well but it seems to handle everything I've thrown at it so far.
Not sure if anyone else here has used uFmod and can give you some idea of how many bytes you'll save vs minfimod. I understand you're making a 64k intro - good luck! I look forward to seeing it :)
Hope you stick around.
raizor
-
I've never tried uFmod personally. The replayer is probably a tiny bit smaller due to it being ASM rather than C.
uFmod is not only the smaller library, it also converts modules to a minimal and more compressor friendly format.
Although uFmod was originally based on miniFmod, it sometimes sounds rather different - so the mentioned conversion-process probably works a bit too optimistically.
uFmod's source-code is pretty much unmaintainable, though. You're fucked if it doesn't do what you want.
miniFmod on the other hand is all nice and smooth :)
Back in the days there was also mxmplay/w (http://elitegroup.demo.org/down/e-mxmpw.zip), a windows port of mxmplay (which was a mini-xm spinoff from cubic player) which gave birth to a couple of hacks.
In particular Sagacity/Thressstate (http://www.pouet.net/groups.php?which=65) included a (somewhat lossy) sample-compressor made by Digisnap/Matrix (http://www.pouet.net/groups.php?which=169) which was used here (http://www.pouet.net/prod.php?which=428).
I doubt that there's any usable version of the player around, though.
-
Welcome aboard BlackSheep8Bit :)
I made two examples for you to test, one using uFmod and another using miniFmod (a compiled version).
See which one you like more and start coding your demo/intro :)
-
Welcome aboard BlackSheep8Bit :)
I made two examples for you to test, one using uFmod and another using miniFmod (a compiled version).
See which one you like more and start coding your demo/intro :)
Thank you for those exemples, i will make a good use of it!
Thanks everybody that helped me!
-
@rbz, ufmod sounds much nicer in your example binary than minifmod imo. I also noticed that the L/R channels are switched between the two.
Decent tune also ;)
-
So, it worked, but after i transformed my music into a .h, and included it, when i compile it i got "undeclared identifier", with both EFF and BIN2C (i also tryed BIN2H but nothing)
I Tried with 10 musics, none of them work.
Currently using Visual c++ 2010
I Tried with uFmod and miniFmod
-
I Tried with 10 musics, none of them work.
Currently using Visual c++ 2010
I Tried with uFmod and miniFmod
so are yu able to post yur project?!
-
"undeclared identifier" means that there is no declaration for the particular item.
You need to pass your new song "array name" to ufmod / minifmod
static unsigned char secret_gardens_xm[] = {
0x45,0x78,0x74,0x65,0x6E,0x64,0x65,0x64,0x20,0x4D,0x6F,...................
};
On the example above, the song array name is "secret_gardens_xm"
So, just use it like this:
HWAVEOUT* hWave = uFMOD_PlaySong(secret_gardens_xm,(void*)sizeof(secret_gardens_xm),XM_MEMORY);
-
"undeclared identifier" means that there is no declaration for the particular item.
You need to pass your new song "array name" to ufmod / minifmod
static unsigned char secret_gardens_xm[] = {
0x45,0x78,0x74,0x65,0x6E,0x64,0x65,0x64,0x20,0x4D,0x6F,...................
};
On the example above, the song array name is "secret_gardens_xm"
So, just use it like this:
HWAVEOUT* hWave = uFMOD_PlaySong(secret_gardens_xm,(void*)sizeof(secret_gardens_xm),XM_MEMORY);
I Know, i tried everything and got this error :/
EDIT: I Found the soluction, i have to include first the music, then the part i use for play it ( my resource have 3 parts, 1. Framework, 2. Drawing/playmusic, 3. Music)
Actual order:
Framework
Music
Drawing/playmusic
Thanks everybody! :D