diff options
author | Kurausukun <lord.uber1@gmail.com> | 2019-05-05 16:07:29 -0400 |
---|---|---|
committer | Kurausukun <lord.uber1@gmail.com> | 2019-05-05 16:07:29 -0400 |
commit | 2d695b1d875b5c0bb3da2fb0b972240adcc66deb (patch) | |
tree | b88c437f5c473ec1105cc3fa1fee8bcde5dfd8fe | |
parent | daf2734afccc229d52698a0316898ee20b206586 (diff) |
Updated Reduce Noise and Improve Sound Quality (Implementing a New Mixer) (markdown)
-rw-r--r-- | Reduce-Noise-and-Improve-Sound-Quality-(Implementing-a-New-Mixer).md | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Reduce-Noise-and-Improve-Sound-Quality-(Implementing-a-New-Mixer).md b/Reduce-Noise-and-Improve-Sound-Quality-(Implementing-a-New-Mixer).md index d2e697e..5aa4456 100644 --- a/Reduce-Noise-and-Improve-Sound-Quality-(Implementing-a-New-Mixer).md +++ b/Reduce-Noise-and-Improve-Sound-Quality-(Implementing-a-New-Mixer).md @@ -8,11 +8,11 @@ In [asm/m4a_1.s](https://github.com/pret/pokeemerald/blob/master/asm/m4a_1.s), r This is the code for the mixer. -In [src/m4a_2.c](https://github.com/pret/pokeemerald/blob/master/src/m4a_2.c), change the size of SoundMainRAM_Buffer to +In [src/m4a.c](https://github.com/pret/pokeemerald/blob/master/src/m4a.c), change the size of SoundMainRAM_Buffer to ```c 0xC00 ``` -Again in [src/m4a_2.c](https://github.com/pret/pokeemerald/blob/master/src/m4a_2.c), add this line right below the line mentioned above: +Again in [src/m4a.c](https://github.com/pret/pokeemerald/blob/master/src/m4a.c), add this line right below the line mentioned above: ```c BSS_CODE ALIGNED(4) u32 hq_buffer_ptr[size] = {0}; ``` @@ -38,7 +38,7 @@ Here, `[size]` is the length of one frame of audio, which varies by the sample r ``` Just find the sample rate you're using and use its corresponding frame size as the size of the array. For example, for the default sample rate, the size of the array is 0xE0 (note that the size of the array actually needs to be the frame size x 4; this is why this array is of type `u32` rather than `char` or `u8`). -Next, remove the following from [common_syms/m4a_2.txt](https://github.com/pret/pokeemerald/blob/master/common_syms/m4a_2.txt): +Next, remove the following from [common_syms/m4a.txt](https://github.com/pret/pokeemerald/blob/master/common_syms/m4a.txt): ``` gSoundInfo ``` @@ -51,7 +51,7 @@ That's the mixer stuff out of the way, and if it was done correctly, the game sh Optionally, you can also change the audio engine's sample rate if you're using higher-quality samples. However, be warned; this means that any fixed-frequency samples (most percussion samples) will be played at this frequency; if you keep these samples at a lower sample rate, they will get pitched up and not sound right. Resample your samples to the rate you're making the engine use, or use higher quality samples and downsample them to the proper rate. -In [src/m4a_2.c](https://github.com/pret/pokeemerald/blob/master/src/m4a_2.c), look for: +In [src/m4a.c](https://github.com/pret/pokeemerald/blob/master/src/m4a.c), look for: ```c SoundInit(&gSoundInfo); MPlayExtender(gCgbChans); @@ -69,7 +69,7 @@ For the sake of this tutorial, we'll be changing it to 36314Hz. So in that file, | (12 << SOUND_MODE_MASVOL_SHIFT) | (5 << SOUND_MODE_MAXCHN_SHIFT)); ``` -There's another call to set the sound frequency on [line 372](https://github.com/pret/pokeemerald/blob/master/src/m4a_2.c#L372); while it appears this code never actually affects anything since it gets overridden by the above change, for fool-proofing and if you're paranoid like me, you can change that one to match as well. +There's another call to set the sound frequency on [line 372](https://github.com/pret/pokeemerald/blob/master/src/m4a.c#L372); while it appears this code never actually affects anything since it gets overridden by the above change, for fool-proofing and if you're paranoid like me, you can change that one to match as well. Now all that's left, and this is optional as well, is fixing the reverb for your new sample rate. At rates other than the default rate of 13379Hz, the game's reverb sounds much less pronounced, and if you go high enough, it gets to the point that you can't even really tell it's there. This is honestly a matter of preference--some people think reverb sounds good, some people prefer not to have it--but for the sake of completeness and those who like reverb, I will explain how to get the reverb to sound like it does at the default sample rate. |