Flipnote Files/PPM: Difference between revisions
| Line 358: | Line 358: | ||
|- style="background-color: #ddd;" | |- style="background-color: #ddd;" | ||
! Length | ! Length | ||
! Function | |||
! Description | ! Description | ||
|- | |- | ||
| | | Framecount | ||
| Sound effect usage. Each byte represents a frame | | Sound effect usage. | ||
| Each byte represents a frame. bit #1(from Right to Left) represents Sound effect 1, bit #2 represents Sound effect 2 and bit #3 represents Sound effect 3. the last 5 bits is padding. | |||
|- | |- | ||
| 0 - 3 | | 0 - 3 | ||
| Padding | | Padding | ||
| 0x00 * (0 to 3). Makes the offset to the next value dividable by 4. | |||
|- | |- | ||
| 4 | | 4 | ||
| Size of the background music | | Size of the background music. | ||
| The size of the background music in bytes in the audio data below. 0x0000000 if not used/emtpy. | |||
|- | |- | ||
| 4 | | 4 | ||
| Size of sound effect #1 | | Size of sound effect #1 | ||
| The size of the sound effect #1 in bytes in the audio data below. 0x0000000 if not used/emtpy. | |||
|- | |- | ||
| 4 | | 4 | ||
| Size of sound effect #2 | | Size of sound effect #2 | ||
| The size of the sound effect #3 in bytes in the audio data below. 0x0000000 if not used/emtpy. | |||
|- | |- | ||
| 4 | | 4 | ||
| Size of sound effect #3 | | Size of sound effect #3 | ||
| The size of the sound effect #3 in bytes in the audio data below. 0x0000000 if not used/emtpy. | |||
|- | |- | ||
| 1 | | 1 | ||
| | | Given Framespeed. | ||
| This is the speed of the flipnote. It's in the range of 1-8. To get the correct value, you must take 8, and subtract the decimal value of this byte. | |||
|- | |- | ||
| | | 1 | ||
| | | Current Framespeed when BGM was recorded. | ||
| This is the speed of the flipnote when the BGM was recorded/modified. It's in the range of 1-8. This is used to resample the sound to the new speed. To get the correct value, you must take 8, and subtract the decimal value of this byte. | |||
|- | |||
| 14 | |||
| Padding | |||
| 0x00 * 14 | |||
|} | |} | ||
I have yet to figure out the sound | Then comes the audio data. | ||
*First comes the BGM(if used) | |||
*Then comes sound effect #1(if used) | |||
*Then comes sound effect #2(if used) | |||
*Then comes sound effect #3(if used) | |||
To decode the sound data, you must multiply each byte by 16 and run it as 32000Hz PCM data. | |||
---- | |||
I have yet to figure out how to get rid of the noice when decoding sound...--[[User:Pbsds|pbsds]] 17:38, 6 June 2010 (UTC) | |||