×

Discussion Board

Results 1 to 12 of 12
  1. #1
    Registered User
    Join Date
    Jun 2013
    Posts
    46

    Audio: How's the XMF / mXMF format doing these days?

    For Android, I can use AndModPlug to play MOD / XM / S3M / IT files in my games. These are awesome music formats for game-development, that allows for so much more control of the music in multiple ways. E.g. you can have your game-music change fluently from one style to another, like you might remember it was done in the classic Monkey Island.

    Due to the limitations of JavaME, we JavaME developers can't use that solution sadly, so we've been stuck with MIDI, which is great in regards of getting a small filesize, but not so great in regards of making sure your music sounds the same on all devices. And it leaves us with a relative poor table of instruments. Especially the drum table is a joke.

    BUT there is another format I bet you didn't know about, which has actually been supported (on paper) for years. It is called eXtensible Music Format or Mobile eXtensible Music Format (XMF / mXMF).

    An XMF file is essentially a MIDI file packed with a soundfont file, giving a result very similar to the MOD / XM format, except you can't jump around between patterns and such (since there aren't any patterns in a MIDI).
    But it does allow you to create a piece of music that still takes up very little filesize, while using whatever instruments / samples you want. First of all, that means your trakc will sound the same on all devices. Secondly, it also means you can use much much MUCH cooler instruments and samples, than offered in the somewhat boring GM MIDI table. (One of the first things a musicians looks for in this regard, are some better (awesome) drums).

    Some years back I spent a lot of time investigating the XMF format and made a ton of tests, which sadly led to the conclusion that the XMF format was useless on the JavaME platform, because:
    1) Sony Ericsson's feature phones messed it up. They only supported XMF files containing a soundfont of max 30kb, and that's simply just ridiculous.
    2) Sony Ericsson's feature phones would only play back XMF files in mono!

    Yes, Sony Ericsson ruined it. But that was then. What about now? What about Asha?

    The Symbian devices I tested on back then worked just fine. Sony Ericsson W950 and (today) Nokia N8 for example.

    Advantages of using XMF:
    1) Instead of using a 2mb mp3 for music, you use a 50kb XMF file. (Examples: http://www.indiegamemusic.com/viewtrack.php?id=84 and http://www.indiegamemusic.com/viewtrack.php?id=372)
    2) Like with a MIDI, you can control tempo of the tune and turn on/off channels, using MIDI Controls, without changing the pitch. In short, you can do so much more with the music while it's playing.
    3) You get to use much much MUCH cooler instruments while still keeping a small filesize.

    Now here's the best part: If you have your XM or MOD file, you can simply convert it to an XMF file with a tool from Un4seen Developments called 2MIDI. (http://www.un4seen.com/).

    So here's the idea: You have your musician create MOD / XM music for your Android / iPhone / Windows Phone version of your game, and then you convert the track to XMF for your JavaME version.

    Now the question is of course, whether or not Asha will play XMF files. Because the idea is useless if Asha doesn't play them. I'm hoping someone will help me test. I have prepared a small test midlet containing an XMF file of 325kb. It plays fine on my Nokia N8. Can someone tell me whether it plays on an Asha?
    http://www.dewfall.dk/mXMF_test.jar

    The original XM I've converted for the test, can be downloaded here for comparison: http://modarchive.org/data/downloads...slumberjack.xm

    Thanks!

  2. #2
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,737

    Re: Audio: How's the XMF / mXMF format doing these days?

    Devices "menu" above links Device specifications, and inside the specification page, "Multimedia" group contains supported audio formats. There is also a strange-blue Expert device search button which allows to construct a search as (Multimedia group) "Audio format must be equal to Mobile XMF", and the result lists virtually all devices for many years back in time (including all Asha-s). Mobile XMF may be different from the "full" version, but http://www.midi.org/techspecs/xmf/xmf_mobile.php still says that it is based on wavetable synthesis with custom samples. How it works in reality is an other question, I have no Series 40/Asha devices.

  3. #3
    Registered User
    Join Date
    Jun 2013
    Posts
    46

    Re: Audio: How's the XMF / mXMF format doing these days?

    That's exactly true. How it works in reality is (usually) another question. ;-)

    As I said, my extensive research a few years back revealed that Sony Ericsson's feature phones didn't playback XMF / mXMF too well. There were ridiculous restrictions, and some problems when attempting to playback the same track twice.

    As I've already tested on a few Symbian devices myself, I'm fairly sure all Symbian devices will playback XMF without problems.

    But I'd like to see how Asha behaves.

    There is another "bonus" functionality developers can use, if XMF is supported. And that is in the sound-effects area.
    Usually sound-effects are handled by pre-loading a few Player objects. Some devices can handle this, others can't.

    With XMF support, you can just load the Player object with the XMF file, and then have a sound-font file containing all the sound-effects. Then you can simply play a ton of sound-effects, even simultaneously, just by playing notes using a MIDI Control. Maybe even while the music is playing. In short, you have an XMF file containing your music + sound-effects, and you use e.g. the first 10 channels for the music, and thus have 6 channels left for sound-effects.

    Again, as far as I remember, testing that worked fine on Symbian devices, but not other devices. Therefore I never used that approach.

    It would be nice if future JavaME enabled devices supported XMF, so such an approach could be used.

  4. #4
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,737

    Re: Audio: How's the XMF / mXMF format doing these days?

    I do not want to ruin your other thread, so I put this addition here: as you write you have complete Java ME applications already, you may want to check https://www.developer.nokia.com/Deve..._program.xhtml, if you can apply to it. Then the offering contains an Asha device, so you could certainly check a number of things.

  5. #5
    Registered User
    Join Date
    Jun 2013
    Posts
    46

    Re: Audio: How's the XMF / mXMF format doing these days?

    Thanks for the suggestion.

    I won't be applying though. I'll just buy an Asha.

    But whatever we spend on test-phones, is tax deductible on the earnings. So it's no big deal spending a little cash on test-phones. :-)

    Besides, I'm curious to check out the Asha. I can always sell it again. (I rarely do though. We have more than 20 different test phones already, and probably 30 in total or so).

  6. #6
    Registered User
    Join Date
    Feb 2005
    Location
    Campina Grande/PB - Brazil
    Posts
    138

    Re: Audio: How's the XMF / mXMF format doing these days?

    Quote Originally Posted by misthalu View Post
    ...
    Now the question is of course, whether or not Asha will play XMF files. Because the idea is useless if Asha doesn't play them. I'm hoping someone will help me test. I have prepared a small test midlet containing an XMF file of 325kb. It plays fine on my Nokia N8. Can someone tell me whether it plays on an Asha?
    http://www.dewfall.dk/mXMF_test.jar
    ...
    Hi misthalu,

    I've tested your .JAR file in some Nokia Series 40/Asha devices and the result was:
    1. Mime-type "audio/xmf" not supported
    2. Mime-type "audio/mobile-xmf" not supported
    3. Sucess with mime-type "audio/vnd.nokia.mobile-xmf"

    The devices used for the test was:
    - Nokia X3-02
    - Nokia Asha 303
    - Nokia Asha 305
    - Nokia Asha 310


    The result was equals for all of them.

    Regards,
    Last edited by TK2000; 2013-06-17 at 22:36.

  7. #7
    Registered User
    Join Date
    Jun 2013
    Posts
    46

    Re: Audio: How's the XMF / mXMF format doing these days?

    That's great! Thanks a lot for testing TK2000.

    And it sounds fine to you? No weirdness? (Sometimes, devices will load the MIDI, but not the sound-font, resulting in some noisy stuff instead of an actual melody, because the MIDI isn't mapped to actual corresponding instruments in the MIDI table).

  8. #8
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,737

    Re: Audio: How's the XMF / mXMF format doing these days?

    Btw, when it is not important to actually hear the application, you can use the Remote device access service, part of "Devices" menu above. It allows you to test arbitrary code on a large number of Nokia models, sometimes with different firmware versions too. Just there is no sound as I know.

  9. #9
    Registered User
    Join Date
    Feb 2005
    Location
    Campina Grande/PB - Brazil
    Posts
    138

    Re: Audio: How's the XMF / mXMF format doing these days?

    Quote Originally Posted by misthalu View Post
    That's great! Thanks a lot for testing TK2000.
    You're welcome!

    Quote Originally Posted by misthalu View Post
    And it sounds fine to you? No weirdness? (Sometimes, devices will load the MIDI, but not the sound-font, resulting in some noisy stuff instead of an actual melody, because the MIDI isn't mapped to actual corresponding instruments in the MIDI table).
    I've tested on the Nokia N8 and on the Nokia 700 the result (sound/quality) is equals to the Asha/S40. I've downloaded the origital file too and listen on my desktop to hear the difference between them, but the quality is very good on both (desktop/mobile).

    I thinking here... the sound quality is superior to MIDI files, am I wrong!?

    Maybe I'll use this file format on my next game projects =)

  10. #10
    Registered User
    Join Date
    Jun 2013
    Posts
    46

    Re: Audio: How's the XMF / mXMF format doing these days?

    Quote Originally Posted by wizard_hu_ View Post
    Btw, when it is not important to actually hear the application, you can use the Remote device access service, part of "Devices" menu above. It allows you to test arbitrary code on a large number of Nokia models, sometimes with different firmware versions too. Just there is no sound as I know.
    Yes, but it seems that Linux isn't supported. I tried yesterday and just couldn't get it working. Tried again just now, and it still fails. So I'm guessing Linux just isn't supported there either. Otherwise it would be a neat option yes.
    http://www.developer.nokia.com/Commu...h-RDA-on-Linux

    Quote Originally Posted by TK2000 View Post
    I've tested on the Nokia N8 and on the Nokia 700 the result (sound/quality) is equals to the Asha/S40. I've downloaded the origital file too and listen on my desktop to hear the difference between them, but the quality is very good on both (desktop/mobile).
    Awesome! Next step it to test on newer Samsung devices. :-)

    Quote Originally Posted by TK2000 View Post
    I thinking here... the sound quality is superior to MIDI files, am I wrong!?

    Maybe I'll use this file format on my next game projects =)
    You're quite right. XMF is like a MIDI file, except you embed your own sound-font (sampled instruments). This means you can have any instrument you can think of, including people shouting "Hey!" or "Yea yea yea!". I remember JavaME devs back in 2006 getting very interested in a project that claimed to be able to playback XM and MOD files, because everyone knew it would give them superb music in their games. Of course it didn't work, partly because devices were too slow and partly because of fragmentation. (Meaning the project probably did work on some device out there. We just never found out which one it was. ;-)

    But XMF gives an almost equivalent result as an XM or MOD.

    The only drawback is that XMF isn't supported on all devices. And since I always preferred Sony Ericsson phones (because they were simply just the fastest JavaME devices out there) and they didn't support the XMF format, then I never used it myself. (I was quite disappointed in Sony Ericsson then, because I REALLY wanted to use the format).

    For devices that doesn't support the format, you can always have a MIDI to fall back on though. (When all 3 xmf mime-types fails, you just load a MIDI instead. All Player calls are still the same).

    But the best part about XMF is that any musician who's already creating MOD or XM music, can convert his music to XMF using the 2MIDI tool from Un4seen. So it shouldn't be difficult finding music.

    At www.IndieGameMusic.com you can find a lot of MOD and XM music (among other formats). So it's just about writing the authors and ask if they'd be willing to convert the track you like into XMF. :-) The site also offers a lot of JavaME-optimized MIDI files, but XMF is more interesting. :-D

    I've also heard that XMF is going to be supported as part of the HTML5 specification, some time in the future. I don't know what to think of this, because MIDI is apparently not supported. But if it's true, then it would mean that by using the XMF format, then you already have the music for your HTML5 port of your game as well. :-)

  11. #11
    Registered User
    Join Date
    Jun 2013
    Posts
    46

    Re: Audio: How's the XMF / mXMF format doing these days?

    I've just spent a few hours just now looking into the mXMF format again, trying to remember how to do everything.

    It's not quite as easy as I remember. And the tools required are virtually impossible to find online.

    Nevertheless, I managed to create an mXMF of an old XM file of mine:
    http://www.indiegamemusic.com/viewtrack.php?id=23

    This is another example of the possibilities with the format: You get to see the words "chiptune" and "JavaME" in the same sentence. ;-) You cannot make chiptunes with plain MIDI.

  12. #12
    Registered User
    Join Date
    Jun 2013
    Posts
    46

    Re: Audio: How's the XMF / mXMF format doing these days?

    Thought I'd just add this link:
    http://www.midi.org/techspecs/xmf/xmf_products.php

    That's a list of tools you should be able to use to create XMF files. Some links are dead though.

Similar Threads

  1. Record Audio in raw audio format and not in amr
    By ergunbaris in forum Mobile Java Media (Graphics & Sounds)
    Replies: 3
    Last Post: 2010-01-11, 05:26
  2. Only 10 days to go: Java Mobile & Embedded Developer Days countdown
    By terrencebarr in forum Mobile Java General
    Replies: 0
    Last Post: 2008-01-11, 14:05
  3. Player does not support playing back other format-audio than default format?
    By williampresent in forum Mobile Java Media (Graphics & Sounds)
    Replies: 0
    Last Post: 2005-08-09, 09:14
  4. help!!! audio format
    By dhirajgoel in forum Audio
    Replies: 0
    Last Post: 2004-06-17, 13:56

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×