Need help with Midi looping

Discussion in 'NDS - ROM Hacking and Translations' started by qwerty56543254, Jun 30, 2011.

Jun 30, 2011
  1. qwerty56543254
    OP

    Newcomer qwerty56543254 Newbie

    Joined:
    Jun 30, 2011
    Messages:
    5
    Country:
    United States
    I need help looping a midi file I made for pokemon black and white, I was hoping someone could convert a midi to .sseq and loop it for me
     
  2. FAST6191

    Reporter FAST6191 Techromancer

    pip
    Joined:
    Nov 21, 2005
    Messages:
    21,738
    Country:
    United Kingdom
    I lack the time to do it for you at present but this is very much a "those that help themselves" kind of section so in the spirit of that.

    Conversion- grab a copy of midi2sseq from
    http://sites.google.com/site/kiwids/
    Obviously that does not do anything with regards to looping so we get to play hacker
    Several docs on SSEQ but I like
    http://www.romhacking.net/docs/%5B469%5Dnds_formats.htm#SDAT
    Page search "Sequence Commands" to start having a look.

    You have a few choices but the obvious one is
    Commnd 0x94 with a 3 byte location which jumps to a postion in the track (it starts at the start of the data section so ignore the SSEQ header which is usually 1c hex in length). Tends to want to be backwards but that is what you appear to want anyway

    Adding it though you have just hosed up the SSEQ header so edit the Section Size command.

    Now you get to inject it back into the rom. I do not rate any SDAT building tools for anything really so it is time to go manual.

    Going in depth
    http://jul.rustedlogic.net/thread.php?id=7518

    In practice find the SSEQ you want to replace and if it is shorter fantastic (you just need to edit the SSEQ length in the FAT section although you might even be able to get away with that)
    If it is longer you get to either stick it at the end of the SDAT file (easy way- change the location in the FAT section, the overall file length value at the start of the header, the "Size of FILE Section" and the Section Size in the file section's header) or repoint the file (harder way as you have now shifted every file that came after it on top of the values mentioned in the easier way but more professional as it were).
     
  3. loco365

    Member loco365 GBAtemp Guru

    Joined:
    Sep 1, 2010
    Messages:
    5,459
    If you don't mind me tossing this in, this post in my tutorial explains looping in a nutshell. This thread has a slightly in-depth tutorial on this as well. I recommend both.
     
  4. qwerty56543254
    OP

    Newcomer qwerty56543254 Newbie

    Joined:
    Jun 30, 2011
    Messages:
    5
    Country:
    United States
    Okay I tried inserting it before looping it and the midi plays about 4 times too slow and I get a constant humming noise.
     
  5. loco365

    Member loco365 GBAtemp Guru

    Joined:
    Sep 1, 2010
    Messages:
    5,459
    Did you repair the .sseq?
     
  6. qwerty56543254
    OP

    Newcomer qwerty56543254 Newbie

    Joined:
    Jun 30, 2011
    Messages:
    5
    Country:
    United States
    I believe so. For every FF C0 I replaced the "C0" with "C7
     
  7. loco365

    Member loco365 GBAtemp Guru

    Joined:
    Sep 1, 2010
    Messages:
    5,459
    Did you also do this one:

    After exporting the midi, open it in a hex editor and change the 0x1C byte (should be 60) to C0, import it to FL Studio, and export it again (making sure it sounds about 2x as fast), and then change the 0x1C byte from (changes back to) 60 to 30?

    You have to do all of that before converting it to sseq.
     
  8. qwerty56543254
    OP

    Newcomer qwerty56543254 Newbie

    Joined:
    Jun 30, 2011
    Messages:
    5
    Country:
    United States
    Yeah I've done all of that to
     

Share This Page