WAV2EA | Convert Wavs to a EA insertable format


Download: https://www.dropbox.com/s/imfzsb3erjprxio/WAV2EA.rar?dl=1

Now, I know this tool is pretty useless, considering wavs takes too much space, but heh, I was bored

How to use:
1: Convert the Wav using WAV2GBA(Included in the download)
2: Specify where your .bin is in WAV2EA
3: Fill in the textboxes(The ids for Replacing ids can be found in Music List.txt, and for group its in Group List.txt.)
4: Click save, the installer file should be in the same folder as the .bin
5: Copy paste MPlayDef.event in said folder
6: assemble with Event Assembler

[FE8] (and maybe FE7) Leonarth's ASM thingies

This is an error with Event Assembler or myself, not your program, but it still is related(maybe).

Whenever I attempt to assemble the text file, I get this error:
File Installer.txt, Line 5, Column 13: Didn’t reach end, currently at Comma(,)
where Line 5 is:

I tried with Event Assembler 11.0.1 and some older version from a year or so ago, but I still get the same error. I also added “#include EAstdlib.event” to the text file, but the error remains the same. Any idea(s) on how I could fix it?


#define SongTableOffset 0x224470
#define SongTable(index,SongPointer,Group) "PUSH; ORG SongTableOffset+(8*index); POIN SongPointer; SHORT Group Group; POP"
try adding those two definitions to the file?


How big are .wav files compared to a typical midi file? What would be the best way to edit a wav file for the best transition into a gba rom?


The error disappears, but when I try to play the song in the Sound Room, the game freezes. I assumed this worked for FE7, but the SongTableOffset was that of FE8(I changed it accordingly to FE7’s table). Now I am wondering if it has something to do with my wav files or if I am just doing something wrong. I tested two different wav files, but both freeze the game.

ORG 0x14CC170
#include EAstdlib.event
#define SongTableOffset 0x69D6E0
#define SongTable(index,SongPointer,Group) "PUSH; ORG SongTableOffset+(8*index); POIN SongPointer; SHORT Group Group; POP"

    #include "MPlayDef.event"

    #define    loop_sfx_grp  Brave3_map
    #define    loop_sfx_pri  0
    #define    loop_sfx_rev  0
    #define    loop_sfx_mvl  127
    #define    loop_sfx_key  0
    #define    loop_sfx_tbs  1
    #define    loop_sfx_exg  0
    #define    loop_sfx_cmp  1

    ALIGN 4

    BYTE        VOL     127*loop_sfx_mvl/mxv
    BYTE    KEYSH   loop_sfx_key+0
    BYTE        VOICE   0
    BYTE        TIE     Cn3   v064
    BYTE    W96
    BYTE    W96
    BYTE    W96
    BYTE    GoTo
     POIN2    loop_sfx_1_B1
    BYTE    W06
    BYTE        EOT     Cn3 
    BYTE    FINE

    ALIGN 4

    BYTE    1    // NumTrks
    BYTE    0    // NumBlks
    BYTE    loop_sfx_pri    // Priority
    BYTE    loop_sfx_rev    // Reverb.

    POIN2    loop_sfx_grp

    POIN2    loop_sfx_1

WORD $3c00
POIN Brave3_wav

#incbin "Brave3.bin"

Where the only thing I added to the text file are the lines above “SongTable(31,Brave3,1)”.
Am I forgetting something/doing something wrong?

Ignore me. I thought the “Replacing ID” was in hexadecimal and therefore was expecting 0x31’s song to be replaced. It turns out that it works fine. Continue on.


A 1:00 wav is around 1 mo converted, if you use the “lightest” settings, aka a frequency of 22050, 8 bits, and mono sound.


I actually use .wavs all the time for custom samples in music. Thank you!


I keep getting this error. How would I go about fixing it?

File Installer.txt, Line 1, Column 17: Didn't reach end, currently at Comma(,)


Assuming you have made no edits to the text file, try adding

before the first line.


I added that, now i get this:

File Installer.txt, Line 36, Column 14: Didn't reach end, currently at Colon(:)```

Ok I fixed the issue above, but whenever I assemble it, it takes like 3 minutes and crashes the game at the start. What am I doing wrong?


What version of Event Assembler are you using?


Wait, I fixed it, I never had an ORG at the beginning


Maybe this isn’t the place to ask this, but how would we make a song created with this tool loop?


make a midi that plays the wav, make the midi loop


How would I do this? I tried ripping the inserted wav from a rom using vgmtrans/gba music ripper, and neither results in a midi file that plays any kind of sound.


iirc WAV2GBA has a flag that tells it to loop the wav, lemme try to ask circles on discord(or you can try to ask him on discord too if you want)


you have to make your own MIDI


Ah, you’re right it does have that flag. This should probably be added to the readme.


Updated. added the definition for SongTable(I forgot to add it in the first version) and updated Dummy.txt.
also now instead of outputting Installer.txt it will output [name] Installer.txt.


I tried inserting a wav that would loop, but instead of looping, at a random spot in the song, the game would jump back to the beginning of the song and then end abruptly at another point(further into the song). Judging by the point in the song when it stopped, I think the length of the song that played(from the early “repeat” to the mid-song stop) is about the same length as the wav itself(I have not tested the exact length, however). I tried using about four different markers in Wavosaur to make it loop, all with the same result.
Since I was using an older version of the wav2ea file, I thought it might be because it was outdated, but when I use the newest version of the program, I got the error: “Symbol loop_sfx_mvl isn’t in scope”.

Am I doing something wrong or did I forget something?