Java MOD/XM Playback

Very nice, tested it with some old amiga .mod and .xm worked like a charm. Keep up the good work. :slight_smile: :slight_smile:

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.jar

Cheers,
Martin

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.jar

If 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 :slight_smile:

I’ll update the website soon.

Cheers,
Martin

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

Wee ;D/

Very very very cool! :slight_smile:

Kev

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

uh - nice and small - great wrapper kev

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.jar

Cheers,
Martin

Thanks for sharing :slight_smile:

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

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?

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

Does anyone know any good software for composing mods?

Maybe just using some setter for enabling that automatic endian twisting?

Does anyone know any good software for composing mods?

modplug, bero, milky, skale (I dont like that one because it sounds quite different)…

How annoying, the native alBufferData() function does require you to specify the byte-ordering, but that isn’t exposed. That change would break the Javasound player , Kev, unless you also do a nativeOrder() check in the player application when setting up the AudioFormat.

Rather than checking the byte-ordering twice, I think the neatest change is to add a boolean to the IBXM get_audio() method to specify the byte-ordering., then do the byte-ordering detection in the wrapper.

So much for hiding platform differences!

Well, I suppose is Java Sound was to need the input switched on MacOS then there could be a default get_audio() which used the platform native ordering. I mean there’d still be cases where you’d want specific ordering anyway - streaming audio from a server for instance.

Kev

In Javasound you specify the endian-ness when you open the device. I suppose it’s possible an implementation might throw a FormatUnsupportedException, but the default Windows Javasound implementation is happy with both. There might not even be a byte-swapping overhead, since WAV is always little-endian, and CDDA is always big-endian the hardware could well support both natively.

It’s a fair bet that opening the device using the system endian-ness is a good choice, though.

What is it with me and old trackers? I don’t want to think about how much of my free time gets spent on this sort of thing! I love the sound, but I also like the technology (I didn’t say it was good technology, it’s awful :slight_smile:

I’ve been meaning to clean up the S3M support in IBXM for a while, as it’s a mess. S3M and XM are substantially different, and it’s quite complicated converting between the two. I eventually decided to write a simple-as-possible S3M only player. It’s not quite as small and simple as I hoped, but that’s S3M for you. I did a version of Micromod based on the design, aswell, which is now the smallest and simplest (I didn’t say it was simple…) ever!

http://geocities.com/sunet2000/micromod2007/Micromod.java
http://geocities.com/sunet2000/micromod2007/Micros3m.java

Both have high quality mixing should match IBXM in sound quality. Let me know if you find any bugs. I suspect you might.

Just to keep things relevant, if you can get the latency low enough (I’m still working on that) you can use either one of these to provide in-game special effects, with or without music. I do intend to write a small game at some point (no, really).

Cheers,
Martin

Sorry, I do not want to interrupt this thread but maybe anyone would like to try this java mod player as well:
www.quippy.de/mod.html
or to download directly
http://www.quippy.de/modplayer/javamod.jar

The sources are downloadable as well. Currently I am working on IT-Mods. XM, MOD, STM, S3M and WOW is already supported.

The project is supposed to demonstrate the capabilities of java in rendering music ā€œjust in timeā€ - not to show what you can do with SWING. The user interface needs some update.

And sorry, the page is yet only german - I am working on that, too

:wink: