View Single Post
  #1    
Old November 12th, 2009 (08:41 PM). Edited April 15th, 2010 by hashtag.
RedYoshi's Avatar
RedYoshi RedYoshi is offline
Wah! Yoshi!
 
Join Date: Feb 2008
Location: Yoshi's Island, DUH.
Age: 22
Gender: Male
Posts: 215
Before anything, read DJG's tutorial first to figure out how
to insert cries.

IMPORTANT:You should also have a good understanding of how to use a Hex-Editor and PokeCryGUI

Hello everyone, this is a tutorial that'll teach you how to re-point cries using a Hex-Editor and a nifty way to use custom instruments!


WAV file requisites:
The Wave file should be in 8bit format, with 11k hz frequency. I'm not sure if being Stereo or Mono will affect the encoding process.

Here are the 2 Programs I mainly use for sound editing.

Audacity - Very useful for practically anything. Good for Pitch/Volume adjusting.
http://audacity.sourceforge.net/

FlexiMusic Wave Editor - Simple to use WAV file editor which makes it simple to export in 8bit 11khz format, however it costs $20. The free trial lasts for a Week
http://www.fleximusic.com/waveditor/overview.htm

Re-Pointing Cries
Well, from what I've read from DJGs PokeCry tutorial, the Sample Size has to be bigger than the Sample WAV, which can make importing some cries a hassle. By re-pointing you will avoid any errors caused by overwriting existing data, as in screwing up the cry data of another Pokemon because of the newly inserted Cry Data being longer than the original.


CRY TABLES
Ruby US v1.0
0x452590

Sapphire US v1.0
0x4525EC

FireRed US v1.0
0x48C914

LeafGreen US v1.0
0x48C1F0

Emerald US v1.0
0x69DCF4


Let's Begin.
Choose the cry you will be re-pointing, in this case I'll use Bulbasaur's cry. I will be importing Shieldon's cry. The WAV file is much larger than the Sample/Original one.

PART ONE: Inserting Your Cry
Important Note: Load the Cry Table in PokeCryGUI and where it says PokeID type in the ID of the Pokemon whose cry you will be re-pointing
and hit SAMPLE. Now write down the SAMPLE OFFSET, it will be needed in a much later step.


So for me, Bulbasaur's SAMPLE OFFSET is 50 FB C4

So to begin with, insert your cry to an empty offset, please note that the encoded cry will take a good amount of free space.

For this tutorial I will use the offset 0x800000.
So set your "Sample Offset" to the offset you will be using; I will use 800000. MAKE SURE TO UNTICK "USE TABLE"



Now hit encode.


PART 2: Re-Pointing the Offset
Now that you've inserted the cry, its time to find the CRY POINTER
of the Pokemon whose cry you will be re-pointing. The cry uses 12 bytes (correct me if I used the wrong term here)
(example: FF FF FF FF FF FF FF FF FF FF FF FF)



The way to find your cry pointer in a hex editor would be by searching for this string in your hex editor

20 3C 00 00 (SAMPLE ID offset in REVERSE HEX)08 FF 00 FF 00

Use the code below:
Code:
20 3C 00 00 XX XX XX 08 FF 00 FF 00

My SampleID offset is: 50 FB C4
So my offset would be: 20 3C 00 00 C4 FB 50 08 FF 00 FF 00
and you should come up to your cry data pointer


So the data for Bulbasaur's cry in FireRed will look like this.



THE RED IS WHAT WE REALLY NEED TO LOOK AT
20 3C 00 00 C4 FB 50 08 FF 00 FF 00

See whats in red? It is your Sample Offset from PokeCryGUI, but in reverse hex.

Whats in red is your pointer to the Cry data, but again in Reverse Hex

This is what we will be editing in our Hex-Editor, for this step you will need to write the offset where you encoded the cry data (the free offset you used in the first part) in reverse hex.

I encoded the Cry data to the offset: 800000

So break this up into: 80 00 00 and flip it around to-> 00 00 80
now paste that in your hex editor where your pointer data is. (The part colored in Red...)



Hit save on your Hex-Editor and you're done! The cry has been re-pointed!
With re-pointing you can insert any size cry to any pokemon you want!

Now to move on to the funner parts of Cry Inserting.

Custom Instruments for Music
Quick example of a Custom Instrument:



Now, before anything, you should read AnimeX's tutorial on custom VoiceGroups to get a good idea on how instrument hex-data/pointer is written and such.

Important Note: This is still being experimented with, don't expect any perfect results your first time. I encourage others to try experimenting with this also, there are some instruments which aren't as easy to replace like the Strings and Timpani. Im guessing the Midi KeySplite table and Samples Type affect this.

Code:
*Samples Type (4 Bytes)
*Sample Pointer (4 Bytes)
*Midi key split table pointer (4 bytes)

Well, by now you should know how cry data is written in hex
(20 3C 00...). It uses 12 Bytes (correct me if I used the wrong term here xD) and instrument data also uses 12 bytes. The way PokeCry encodes cry data is similar to the encoded Instrument data.

VoiceGroups use pointers for their Instrument Data similar to the way Cries use pointers for their Cry Data.

In a nutshell: VoiceGroups use pointers, the same way Cries use pointers, and through copy/pasting, we can use the Cries as Instruments and Vice-Versa.

So my Bulbasaur Cry Pointer is
20 3C 00 00 C4 FB 50 08 FF 00 FF 00

I'll use the trumpet here as an example. The pointer for the Trumpet data in hex is
40 00 00 00 5C A5 48 08 E4 30 4A 08

See how they only use 12 bytes? If you were to paste your cry data over the trumpet data in any voice-group, the cry would be used as an instrument, and there you go, custom instruments. So here's a quick step guide.

1: Encode a cry/instrument sound to an empty offset.

2. Make a Pointer to your encoded data using the format below:
Code:
20 3C 00 00 XX XX XX 08 FF 00 FF 00
XX XX XX is where the offset you used should be (Reverse Hex!)


3. Go to the address of a VoiceGroup in your hex editor.
(List of VoiceGroups in Fire-Red)
(List of VoiceGroups in R/S/E)

4. Paste your Cry/Instrument Pointer over an instrument of your choice in any voicegroup.
Find the instrument pointers (Under the section titled "Hex Values")on AnimeX's Custom Voicegroup Tutorial

Important Note: You may have to adjust the Pitch of your WAV file for instruments in order for them to sound right in your Rom.

My best guess would be that the WAV file encoded is the C5 key (Middle Key in a Piano), though I don't have proof of this as of yet...


There you go, custom instruments! The end result should be similar to the video.



CREDITS:

DJG - For the tutorial on Cry Inserting
AnimeX - The tutorial on Custom Voice groups + the Instrument Hex Values
Magnius - The list of FireRed VoiceGroups
HackMew - The list of Cry Tables for PokeCry


DO NOT TAKE WITHOUT PERMISSION
Reply With Quote