Sample is -1 octave in febuilder

Before asking, make sure to search! Press the :mag: in the upper right to search.

  • Hacking method: FEBuilder GBA
  • Base Game: FE7U-FE6
  • Steps to reproduce: export sample 34 from Fe6’s NI map; import it into FE7’s NImap in a dummy slot(not changing the frequency or removing silence but multiplying it’s volume by 300%; ) export that sample and add it to an SF2 file (I used Polyphone to do this;) change the tuning to 48 (C); export sample from sf2 file; Import it back into FEBuilder in the same slot without changing anything in the previewer; import a midi using the new instrument into FE7 and open the same midi using your new SF2 file in anvil studio or other; the midi in FEbuilder should sound lower in pitch than the other, that’s where the problem lies.
After following the steps above, I have a sample in FEbuilder playing 1 octave lower than the same in another program, how do I fix this?

If it’s an octave lower, why not just raise it an octave?

NIMAP is played by instruments in vanilla ROM.
The instruments in the ROM are not exactly the same as MIDI instruments.
They are just found and assigned similar sounds, so it is quite common for them to be different.

All you need for music is a score and an instrument.
If you don’t change the instrument data from NIMAP, you will have to change the score data (s file or midi).

To begin with, you claim that the sound changes, but you do not attach any evidence of this.
At the very least, you should provide a link to the s file that proves it, and specifically what part of it is strange.
Otherwise, we will not be able to verify if your claim is true.

  1. that is the logical solution, yet the reason I want to fix this is mainly pride and and a desire to solve this issue.
    2 I probably shouldn’t have mentioned the NIMap. What I was talking about was simply having imported a sample into an instrument table so i could listen to the sample while it was in the rom and importing the same sample into an SF2 file so that I could listen to it on anvil studio
    3 I did change the instrument data (Imported new instruments into unused slots on the fe7 NIMap
    4 lastly here are the files that I neglected to attach to the original post 25/2/23 - Google Drive
    Files are 2 wav files simulating how the sample sounds in FEbuilder and Anvil studio respectively, 1 test midi using instrument #35 “Fretless Bass,” and the original sample I used.

I hope this info is what you need :slight_smile:

There is one thing I would like to confirm.
Have you changed the instrument data in ROM ?
Or have you changed the instrument data in ROM?

Since you are doing multiple processes, you would need to establish which layer has the error.
To begin with, FEBuilderGBA only supports sf2 export.
It does not support sf2 import.
Also, sf2 export only supports export using GBA mus ripper.

You seem to have done it using some different software, which should be verified from the validity of the processing results of that software.
If you changed the instrument data in the ROM using that software and the result is strange, then there must be a problem with that software?
At least, I don’t think FEBuilderGBA has anything to do with it.

You claim that the instrument data in the ROM has been rewritten by some strange software that you do not understand, and as a result, the sound has become strange.
The only thing that FEBuilderGBA can do is to confirm what exactly was rewritten by the strange software that you do not understand.
Check the DirectSound instrument data for that instrument.

There should be something different from what it was before the change.
DirectSound is made up of wav files, reference node values, forced PAN, and ADSR values.
Check to see if any of these values have changed in any way.

Of these, the reference node value is 3C and the forced PAN may be ignored since I believe it uses 0.
The remaining data is wav and ADSR.

Export the wav data and check if anything has changed from before the change.
Also check the ADSR value.

If the sound changes after importing the instrument, then these values must be something strange.

If you claim that the ROM instruments are not rewritten.
In that case, I would assume that this would mean that the results played back in sf2 are different from the results played back in the game.
In this case, I would assume that you may simply have failed to use sf2 export or you may have used it incorrectly.

I don’t quite know what you mean here

I’ve been using Polyphone, a soundfont editor, to preview my midis in anvil studio, I’m not trying to do anything involving importing an sf2.
I also suspect that you are spot on regarding instrument pitch, it might be an issue on my end

I have noticed that changing the reference note value does not remedy the pitch of notes using the instrument. This is my main concern as of now

I don’t quite know what you mean here

I wanted to make sure that you are really doing sf2 import, which FEBuilderGBA does not support, because it reads like you are using other software to do sf2 import.
Perhaps you are doing sf2 import.

I have noticed that changing the reference note value does not remedy the pitch of notes using the instrument. This is my main concern as of now

Vanilla uses 3C and I don’t think it should be changed.
I think it is probably a problem with the wav file.
There is an upper limit to the frequency of wavs available in GBAFE.
Applications running on a PC do not take the GBA upper limit into account.
When playing the poles, this wav is modulated to play the sound.
If the wav is even slightly different, it seems to me that the modulation would further accentuate the sound discrepancy and explain why the sound is played back differently from what is expected.

I am not trying to import an SF2 file.

The fact that vanilla uses 3c is not an issue.
the frequency of the wav is 13379, the same as vanilla, the only difference in the wav is the volume, so I don’t see how it could be a problem with the wav.

The instrument data in m4a engine is independent of the game title.
If you import an instrument from FE6 into FE7, it will play without any problem.
Therefore, your problem is occurring in other parts of the game.

If you are not importing sf2 data into ROM, then you should consider the possibility that when you export to sf2 or the software that is playing that midi is not able to handle sf2 well.
I don’t use sf2, so I can’t offer any specific advice at this time.
As the author of FEBuilderGBA, I just want to say that I don’t think this is a problem with FEBuilderGBA.

1 Like

Is there a way to transpose a sample’s code so that the sample is treated as up 1 octave in febuilder?
As for your assessment of the situation, i agree completely; my issue i raised originally was more anout the samples coded pitch than a software malfunction.

If I were to lower it an octave as an instrument, would it be to export the wav data, correct it with Audacity or something, and re-import it.
When importing the wav, FEBuilderGBA will suggest corrections, but please reject all of them.
This correction is for voice and vocal data, not for instrument data.
Do not make any extra corrections to the wav data for instrument data.

1 Like