don't click here

xm4smps

Discussion in 'Engineering & Reverse Engineering' started by Puto, Dec 9, 2008.

Thread Status:
Not open for further replies.
  1. Puto

    Puto

    Shin'ichi Kudō, detective. Tech Member
    2,013
    0
    16
    Portugal, Oeiras
    Part of Team Megamix, but haven't done any actual work in ages.
    Ever since the beginning of November, I've been developing a tool similar to xm3smps, but with several improvements made to it. Now, it's finally ready for its first release. Behold: xm4smps!

    [​IMG]

    Created entirely from scratch, xm4smps has an interface similar to xm3smps' (but with my own touch). Internally, however, xm4smps is completely different from xm3smps. Some of the key differences to note:

    - xm4smps generates songs in ASM format as opposed to raw song binaries, though they are assembled for the convenience of the user.
    - By reading and converting each pattern of the XM separately, and comparing them individually within each channel, several optimisations can be achieved. For this reason, in about 95% of cases, a song converted by xm4smps will be smaller than the same song converted by xm3smps.
    - xm4smps is multi-platform.
    - It supports the E7 coordination flag (aka "smpsNoAttack").

    Using xm4smps is very similar to using xm3smps, since I intentionally made the user interface similar. Therefore, it shouldn't be complicated to adapt at all. However, a very important point needs to be made here. Due to the different way in which xm4smps converts songs, it is absolutely imperative that you do not, under any circumstances, start a channel on the XM without a note or a rest. In other words, don't do this:

    [​IMG]

    Instead, do this:

    [​IMG]

    Download links:

    Win32 version
    Win64 version
    Mac OS X version
    Source code (should compile on any system with the Qt library)

    To use xm4smps on Windows, you only need to extract and run it. To use it on Mac OS X, it's a similar concept, however, if you wish to be able to assemble binary song files, as opposed to only getting the assembly source, you need to install ASMX by Bruce Tomlin (ASMX is already included in the windows versions). On Linux, you should compile it using "qmake xm4smps.pro; make" (if you're using QT3) or with "qmake xm4smps.pro4; make" (if you're using QT4). Like with Mac OS X, you also need to install ASMX if you want to be able to generate binary files.

    To put the E7 coordination flag behind a note, just put "g15" in the volume column of said note on the XM (that represents a maximum-speed note portamento, which pretty much does the same thing as E7)

    Special thanks go to:
    - Nineko for doing the original xm3smps, and helping me along when making this tool
    - Tweaker and Saxman for breaking down the SMPS format
    - Marc/Cinossu for developing s1smps2asm (I included the s1smps2asm macros with this tool, with his permission)
    - roxahris, Nineko (again), and oerg866, for testing this
    - Bruce Tomlin for creating ASMX, which is used by this tool to assemble the output asm.

    Have fun!
     
  2. Holy shit Puto, I love you. I'll be sure to use this!
     
  3. Bibin

    Bibin

    DON'T LET THE SUN LAUGH AT YOU. Member
    881
    0
    0
    New York City
    Ghost in the Machine
    This looks excellent, but it would be great if music binaries could also be produced (or the process of conversion could be made obvious for those who are not so bright, such as me).

    Also while we are discussing tracked music, is there a port of ModPlug Tracker for Mac OS X that will run on PPC processors? ReNoise is just terrible.
     
  4. Puto

    Puto

    Shin'ichi Kudō, detective. Tech Member
    2,013
    0
    16
    Portugal, Oeiras
    Part of Team Megamix, but haven't done any actual work in ages.
    also, in case you missed it
    I guess I should probably try to provide a precompiled ASMX for OS X. I'll look into doing a .pkg for that or something later today.

    No, but there's MilkyTracker which is supposedly really good (never tried it myself, so I can't say for sure).
     
  5. Mastered Realm

    Mastered Realm

    Member
    3,830
    556
    93
    -
    Isso merece um post em português!

    Parabens, esta nova interface está incrivel! Eu vi que as suas imagens estão hospedadas no seu site e quando fui ver, era um servidor de armazenamento, acredite, escutei os xm do Pokémon do GBC, estão realmente muito bons, nunca consegui uma musica 100% perfeita como as suas, preciso treinar mais. Poderia me dar uma dica de qual conversor de midi para xm posso usar? (Eu uso o OpenModPlugTracker). Bom trabalho! =P

    Translating...:

    That desires a post in portuguese!

    Congs, this new interface is incredible! I saw that your images were hosted on your site and when I checked the url, I saw that was your hosting server, believe me, I listened to your xm of Pokémon for the GBC, they are really very good, I never reached that perfection point in a song as yours, I need training more. Can you give me a tip about which tracker should I use? (I use OpenModPlugTracker). Good job! =P
     
  6. I love you.

    Well, I was quite amazed when I saw this :(

    Amazing job!
     
  7. Puto

    Puto

    Shin'ichi Kudō, detective. Tech Member
    2,013
    0
    16
    Portugal, Oeiras
    Part of Team Megamix, but haven't done any actual work in ages.
    Obrigado :(

    O resto do post esta em inglês porque acho que da jeito que todos o percebam :P

    I use OpenMPT as a tracker, but to convert MIDIs to XMs I usually use MID2XM. It takes a bit of work to configure, but the output's pretty good.
     
  8. Yeah, I use that too. It's pretty iffy until you get perfect output though.
     
  9. amphobius

    amphobius

    doing more important things with my life Member
    2,120
    0
    16
    life
    Is it me or does this thing not like my voices?

    Everytime I load up them the program crashes.
     
  10. Endri

    Endri

    Officer I don't have my drivers license with me. C Tech Member
    Meu Deus! Ataque português! ^_^

    Realmente, como o nosso amigo Master Emerald disse, isso merece um post em português!
    É maravilhoso o esforço e a dedicação que você colocou nesse programa. O programa está simplesmente incrível!
    Eu sei que eu já havia falado isso antes durante a SAGE, mas, Puto, você é fantástico!

    ...>->-> after you all been portuguese-attacked...

    Puto, the app is simply wonderful and I love the gui...
    ...long story short: Puto, you're awesome!
     
  11. Puto

    Puto

    Shin'ichi Kudō, detective. Tech Member
    2,013
    0
    16
    Portugal, Oeiras
    Part of Team Megamix, but haven't done any actual work in ages.
    This is really weird. roxahris and Aquaslash mentioned something like that too, but when they sent me their voices, they worked fine on my PC. I have no idea what's going on...
     
  12. I think they're trying to load the wrong file format?
     
  13. amphobius

    amphobius

    doing more important things with my life Member
    2,120
    0
    16
    life
    Actually I'm trying to load the x3v format. Allough my other x3v files load fine, the one (with a ton of voices that I tend to use alot) doesn't load up specifically.
     
  14. Well, maybe X4S can't handle that many voices? :S
     
  15. Puto

    Puto

    Shin'ichi Kudō, detective. Tech Member
    2,013
    0
    16
    Portugal, Oeiras
    Part of Team Megamix, but haven't done any actual work in ages.
    It should handle any number of voices... still, how many voices does your file have?
     
  16. nineko

    nineko

    I am the Holy Cat Tech Member
    6,308
    486
    63
    italy
    I designed the x3v format to be limited to 255 voices, and for what I know, the x3v input filter in xm4smps should be 100% able to read that many voices. Would you mind to share that file with me and/or with Puto?
     
  17. amphobius

    amphobius

    doing more important things with my life Member
    2,120
    0
    16
    life
    211. Yeah, I'd be able to send it over, but I shouldn't be the one giving it: Rox should. He released the file :3
     
  18. SephyUK

    SephyUK

    WHY SO CURIOUS? Member
    597
    0
    0
    Qatar
    Some Freakishly Long Anime
    Holy fuck! This is amazing work, Puto. I'm gonna try this out right now!
     
  19. nineko

    nineko

    I am the Holy Cat Tech Member
    6,308
    486
    63
    italy
    That file works fine for me in both xm3smps and xm4smps. Also, in before Puto (spoiler: it works also for him).
     
  20. Puto

    Puto

    Shin'ichi Kudō, detective. Tech Member
    2,013
    0
    16
    Portugal, Oeiras
    Part of Team Megamix, but haven't done any actual work in ages.
    Code (Text):
    1. else if (filter=="xm3smps voice files (*.x3v)") {
    2.         // x3v voice filter
    3.         uchar numvoices=voice_file[0];
    4.         rawvoices_file = new uchar[numvoices*0x19];
    5.         voice_file++;
    6.         for (uchar I=0; I<numvoices; ++I) {
    7.             for (uchar j=0; j<0x19; ++j)
    8.                 rawvoices_file[I*0x19+j]=*(voice_file++);
    9.             uchar numbytes_name = *(voice_file++);
    10.             QString name_voice = "";
    11.             for (uchar j=0; j<numbytes_name; ++j)
    12.                 name_voice += *(voice_file++);
    13.             lstVoicesFile->insertItem(name_voice);
    14.            
    15.         }
    16.         delete voice_file; // Remove the x3v from memory, now that it has been loaded
    17.     }
    There is nothing here that limits the possible size of the x3v except that num_voices has to be <= 255. So there's no reason why this shouldn't work :/ (and it does for me).
     
Thread Status:
Not open for further replies.