c_lilian
Senior Member    Projects: 1
Java games will probably rock someday...
|
 |
«
Reply #30 - Posted
2005-03-24 07:50:10 » |
|
Thank you
So you'll have to update the demo applet, which has a class version of '49' (java 1.5).
Lilian
|
|
|
|
Mark_J
Senior Newbie 
Java games rock!
|
 |
«
Reply #31 - Posted
2005-03-24 21:22:18 » |
|
Look forward to a new version! ive currently got your micromod libraries working in some *VERY* early game code and the mods play great......until I try to put everything into a jar file and then my code just dies as with a previous members post, couldnt fathom out how to get the mod file loaded from within the jar file etc.! Searched for more info on the RandomAccessFile to see if I could get it working but no luck (still a newbie so some of the docs may as well be written in Swahili  ) PS. great to be able to hear some classic Amiga mods again!
|
total noob, so forgive my complete and utter dumb questions!
|
|
|
mumart
Junior Member   Medals: 1Projects: 1
IBXM Java Music Player
|
 |
«
Reply #32 - Posted
2005-03-24 23:39:38 » |
|
A neat trick for getting hold of files inside jars is to make use of a classloader. This works for me with images, so it should work with mods aswell.
If you put the file in the same place as the current class, this should return a URL to the file, whether it's in a Jar or not:
URL url = this.getClass().getResource("filename");
|
|
|
|
|
Games published by our own members! Check 'em out!
|
|
mumart
Junior Member   Medals: 1Projects: 1
IBXM Java Music Player
|
 |
«
Reply #33 - Posted
2005-03-24 23:41:18 » |
|
Thank you
So you'll have to update the demo applet, which has a class version of '49' (java 1.5).
Lilian Doh! Will recompile.
|
|
|
|
|
Mark_J
Senior Newbie 
Java games rock!
|
 |
«
Reply #34 - Posted
2005-03-25 09:56:07 » |
|
Got the classloader getting the file path etc, but just cant fathom out how to then pass the info to the: 1
| module = ModuleLoader.read(new RandomAccessFile(modFile, "r")); |
as it keeps throwing an error no matter how i try to pass the url to it (even converting to a String it lets it compile, but then get a NullPointerException :-/)
|
total noob, so forgive my complete and utter dumb questions!
|
|
|
mumart
Junior Member   Medals: 1Projects: 1
IBXM Java Music Player
|
 |
«
Reply #35 - Posted
2005-03-25 14:20:51 » |
|
Got the classloader getting the file path etc, but just cant fathom out how to then pass the info to the: 1
| module = ModuleLoader.read(new RandomAccessFile(modFile, "r")); |
as it keeps throwing an error no matter how i try to pass the url to it (even converting to a String it lets it compile, but then get a NullPointerException :-/) Here's a micromod jar with a built-in mod to show you how it's done. You'll probably need Java 1.5 to run the jar, because that's what I compiled it with. [EDIT] I've rebuilt it, and it should work on 1.3+ now. http://geocities.com/sunet2000/micromod098.jarCheers, Martin
|
|
|
|
|
mumart
Junior Member   Medals: 1Projects: 1
IBXM Java Music Player
|
 |
«
Reply #36 - Posted
2005-03-25 14:58:16 » |
|
Thank you
So you'll have to update the demo applet, which has a class version of '49' (java 1.5).
Lilian OK, I've recompiled the applet with -source 1.3 and -target 1.1, so it'll work on pretty much anything that has a JavaSound implementation now. Martin.
|
|
|
|
|
Mark_J
Senior Newbie 
Java games rock!
|
 |
«
Reply #37 - Posted
2005-03-25 17:10:16 » |
|
Thanks Martin, just about to download the jar file! Fingers crossed the game will get finished (first EVER game on the PC so its a REALLY slow process hehehe) so you'll be able to see your name in lights (well, lots of phosphor dots anyway! hehehe) with the mod player credit!  PS. Just downloaded it! nice music! hehe.. takes me back to the mid 70's when i was a teeny tiny kid! haha.. PPS! works great! thanks m8! much appreciated!
|
total noob, so forgive my complete and utter dumb questions!
|
|
|
mumart
Junior Member   Medals: 1Projects: 1
IBXM Java Music Player
|
 |
«
Reply #38 - Posted
2005-03-25 17:25:58 » |
|
Thanks Martin, just about to download the jar file! Fingers crossed the game will get finished (first EVER game on the PC so its a REALLY slow process hehehe) so you'll be able to see your name in lights (well, lots of phosphor dots anyway! hehehe) with the mod player credit!  PS. Just downloaded it! nice music! hehe.. takes me back to the mid 70's when i was a teeny tiny kid! haha.. Nice one! Java can be hard work at times. I think the classes are usually well designed, but they don't seem to do much to help you get things done. Getting drag and drop to work was an exercise in futility! Cheers, Martin
|
|
|
|
|
mumart
Junior Member   Medals: 1Projects: 1
IBXM Java Music Player
|
 |
«
Reply #39 - Posted
2005-04-07 21:00:16 » |
|
OK, I didn't make the 2-week deadline, but it's good to put pressure on yourself from time to time! Here's an alpha of my new player, called IBXM. I've spent the last couple of days tuning it, and it sounds much better than KBXM on a lot of modules. http://geocities.com/sunet2000/ibxm-alpha26.jarPlays MOD and XMs. S3M support is not done (but only because I haven't written the loader yet). SPI is coming soon. The player is 100% integer arithmetic, and has generally cleaner code than KBXM (which itself wasn't so bad IMO). Use the commandline to test (as usual): java -jar ibxm-alpha26.jar <modfile> Cheers, Martin
|
|
|
|
|
Games published by our own members! Check 'em out!
|
|
oNyx
|
 |
«
Reply #40 - Posted
2005-04-08 04:32:56 » |
|
Good work  Did switching to integer arithmetic improve performance? (Do you have some numbers?) >BSD licence! Thanks  Oh and right now there isn't a way to cleanly exit the demo player. Pressing ctrl+c can result in an endless loop of the last frame (until you reboot), because the cleanup stuff isn't reached. There are several ways to fix it, but it would make the programm more complicated, which isn't necessarly a good thing. So, just print a message that it's better to let it run through 
|
|
|
|
mumart
Junior Member   Medals: 1Projects: 1
IBXM Java Music Player
|
 |
«
Reply #41 - Posted
2005-04-08 12:16:34 » |
|
Good work  Did switching to integer arithmetic improve performance? (Do you have some numbers?) I measured the time it takes to mix the entire song at 44100hz with linear interpolation without writing the result on a bunch of different versions, all use integer arithmetic except for KBMod. Tests done on a 1500mhz Sempron with Java 1.5.0: Song: Jogeir Lilljedahl - Guitar Slinger (299 seconds) MicroMod 0.83 : 1516ms MicroMod 0.98 : 2250ms KBMod : 6359ms IBXM: 1672ms IBXM-Fastmix: 1156ms Song: TNT - Once More TNT (195 seconds) MicroMod 0.83 : 906ms MicroMod 0.98 : 1297ms KBMod : 3344ms IBXM: 984ms IBXM-Fastmix: 687ms Even the slowest of these only takes 2% of this cpu  IBXM is nearly 4x faster than KBMod. Floating point has quite a speed penalty! "IBXM-Fastmix" is a test version that directly mixes into a mono 8 bit byte array and only supports forward sample loops. Since it's only 50% faster and poor quality I probably won't follow it up. The fastest player with good quality mixing is MicroMod 0.83, but only by 10% or so, which did surprise me, given how naive the mixing code is in that player. IBXM sounds much better, anyway  I may be able to optimise it to close that gap. The slowness of MicroMod 0.98 comes as no surprise. I'm surprised it's not slower, given how much buffer copying it does. Oh and right now there isn't a way to cleanly exit the demo player. Pressing ctrl+c can result in an endless loop of the last frame (until you reboot), because the cleanup stuff isn't reached. There are several ways to fix it, but it would make the programm more complicated, which isn't necessarly a good thing. So, just print a message that it's better to let it run through  I see, I've never come across that problem before. I'll bear it in mind. Cheers, Martin
|
|
|
|
|
oNyx
|
 |
«
Reply #42 - Posted
2005-04-08 15:02:26 » |
|
Wow. It's surprisngly fast  Good to know 
|
|
|
|
Mark_J
Senior Newbie 
Java games rock!
|
 |
«
Reply #43 - Posted
2005-04-08 18:11:25 » |
|
as you know, im using micromod in my (still very early) game, and as a test I stuck it in the actual game loop to test if it made any noticable diff to the speed, and with 640x480 parallax scrolling (32x32 tiles 2 layers, 1 opaque and the foreground bitmasked) with a 96x64 player sprite, upto about 8 or so bullets and had 10 84x124 (i think! :-/) 'enemy' dudes wandering about (not that there will be THAT many enemies on screen at once at that size in the actual game!) it still ran lovely! even got a few sound effects playing over the top when the lil fella walks and fires etc!
(MicroMod V 0.98kX is the one im using)
so even micromod gets the BIG Thumbs up from me! well chuffed with it!
|
total noob, so forgive my complete and utter dumb questions!
|
|
|
mumart
Junior Member   Medals: 1Projects: 1
IBXM Java Music Player
|
 |
«
Reply #44 - Posted
2005-04-10 01:53:59 » |
|
In the spirit of not keeping things back, here's another alpha! http://geocities.com/sunet2000/ibxm-alpha30.jarThe framework is now feature complete, and the interface is not likely to change. Probably still has quite a few bugs, though. XM is an amazingly quirky format. Some might even say "baroque"  All the effects that I want to implement are now done. I've had some feedback and it appears that playback is very accurate (or as he put it, "blimmin amazing!!") and much better than kbxm. Certainly good enough for gaming! Also there has been a bit more tuning and bugfixing, and the commandline player application now lets you choose the interpolation. Next job is S3M  Cheers, Martin
|
|
|
|
|
|
|
mumart
Junior Member   Medals: 1Projects: 1
IBXM Java Music Player
|
 |
«
Reply #46 - Posted
2005-04-14 18:55:20 » |
|
Another day, another alpha. There are a couple of major fixes (any xm that attempted a global volume slide down would simply fall silent). There's also a seekable InputStream for use in an SPI, and a WAV InputStream. http://geocities.com/sunet2000/ibxm-alpha31.jarCheers, Martin
|
|
|
|
|
mumart
Junior Member   Medals: 1Projects: 1
IBXM Java Music Player
|
 |
«
Reply #47 - Posted
2005-05-09 16:38:19 » |
|
Some more MOD related bits and pieces. I guess it's a hobby of mine :-/ This one has some tuning of the MOD playback, so PC mods with more than 4 channels now work well. There's still no S3M loader, but you can always convert to XM if you're desperate ... http://geocities.com/sunet2000/ibxm-alpha31c.jarIf IBXM is too bulky for you, try http://geocities.com/sunet2000/Micromod.java - a full featured MOD-only player with a turbocharged mixer in less than 600 lines of code, which compiles to just one 12k class  I'll update the website soon. Cheers, Martin
|
|
|
|
|
sunet2000
Senior Newbie 
I want my mumart account back!
|
 |
«
Reply #48 - Posted
2006-04-26 01:51:20 » |
|
Had an attack of enthusiasm a couple of weeks ago. IBXM now has cleaner code, faster mixing, and S3M is finally supported! After only 12 months! http://geocities.com/sunet2000/Cheers, Martin
|
|
|
|
|
oNyx
|
 |
«
Reply #49 - Posted
2006-04-26 04:13:59 » |
|
Wee \  /
|
|
|
|
kevglass
|
 |
«
Reply #50 - Posted
2006-04-26 04:34:51 » |
|
Very very very cool!  Kev
|
|
|
|
kevglass
|
 |
«
Reply #51 - Posted
2006-04-26 08:14:55 » |
|
Couple of under-tested classes for using the lib to play back through OpenAL (LWJGL) are here: http://www.cokeandcode.com/ibxm/Great work again, really appreciate the efforts! Kev
|
|
|
|
Matzon
|
 |
«
Reply #52 - Posted
2006-04-26 08:58:23 » |
|
uh - nice and small - great wrapper kev
|
|
|
|
sunet2000
Senior Newbie 
I want my mumart account back!
|
 |
«
Reply #53 - Posted
2006-05-26 23:43:11 » |
|
Thanks for the feedback, guys! Slightly updated version, with a couple of small fixes and improvements to the mixing (15% faster). http://geocities.com/sunet2000/ibxm-alpha47.jarCheers, Martin
|
|
|
|
|
oNyx
|
 |
«
Reply #54 - Posted
2006-05-27 07:13:59 » |
|
Thanks for sharing 
|
|
|
|
kevglass
|
 |
«
Reply #55 - Posted
2006-06-13 22:11:27 » |
|
Has this been tested on the MacOSX? My OpenAL wrapper produced noise there - I've fixed it locally (its just the change of edianess on the platform - but I'm not sure whether the change need to be in IBXM or just locally for OpenAL users? Java Sound might well morph the endian-ness out of the question.
Thoughts?
Kev
|
|
|
|
sunet2000
Senior Newbie 
I want my mumart account back!
|
 |
«
Reply #56 - Posted
2006-06-15 00:01:34 » |
|
Interesting. The current version only ouputs 16-bit little-endian stereo as a byte stream. It doesn't surprise me that Macs default to big-endian for their audio system.
Is it possible to tell OpenAL to expect little-endian input?
|
|
|
|
|
kevglass
|
 |
«
Reply #57 - Posted
2006-06-15 00:52:35 » |
|
Doesn't seem like it - though I'm not sure - I still have to ask OpenAL nicely to do stuff for me.
I just hacked in a change in IBXM where it adds the two bytes to the buffer to swap them round if ByteOrder.nativeOrder() came back the otherway round. Seems to work fine but I haven't made it available for fear that it'd break JavaSound (I don't use JavaSound)
Thanks again for the great library, my game music is 84k because of this - brilliant!
Kev
|
|
|
|
kaffiene
|
 |
«
Reply #58 - Posted
2006-06-15 03:36:56 » |
|
Does anyone know any good software for composing mods?
|
|
|
|
|
|
|
|