List of Opcodes: Difference between revisions
Happylappy (talk | contribs) |
Pan parameter details. All credit for this one goes to Chesyon; feel free to correct if I got a detail wrong |
||
| Line 4,624: | Line 4,624: | ||
|uint | |uint | ||
|pan | |pan | ||
|The panning of the SE. This parameter gets recalculated internally as <code>((''pan'' * 0x3f + ((''pan'' * 0x3f >> 7) >> 0x18)) >> 8) + 0x40</code>, which is eventually split up into two halfwords, then recalculated further into a signed byte. | |The panning of the SE. Has an intended range of -260 (left) to 260 (right), with 0 being the center. | ||
This parameter gets recalculated internally as <code>((''pan'' * 0x3f + ((''pan'' * 0x3f >> 7) >> 0x18)) >> 8) + 0x40</code>, which is eventually split up into two halfwords, then recalculated further into a signed byte. | |||
What this means is that: | What this means is that: | ||
* A ''pan'' parameter of 260 will result in sound panning only to the right channel. | * A ''pan'' parameter of 260 will result in sound panning only to the right channel. | ||
* A ''pan'' parameter of 261 will result in sound panning only to the left channel. | * A ''pan'' parameter of 261 will result in sound panning only to the left channel. | ||
|} | |} | ||
=== 0xf6 - se_ChangeVolume === | === 0xf6 - se_ChangeVolume === | ||
| Line 4,719: | Line 4,719: | ||
|uint | |uint | ||
|pan | |pan | ||
|The panning of the SE. This parameter gets recalculated internally as <code>((''pan'' * 0x3f + ((''pan'' * 0x3f >> 7) >> 0x18)) >> 8) + 0x40</code>, which is eventually split up into two halfwords, then recalculated further into a signed byte. | |The panning of the SE. Has an intended range of -260 (left) to 260 (right), with 0 being the center. | ||
This parameter gets recalculated internally as <code>((''pan'' * 0x3f + ((''pan'' * 0x3f >> 7) >> 0x18)) >> 8) + 0x40</code>, which is eventually split up into two halfwords, then recalculated further into a signed byte. | |||
What this means is that: | What this means is that: | ||
* A ''pan'' parameter of 260 will result in sound panning only to the right channel. | * A ''pan'' parameter of 260 will result in sound panning only to the right channel. | ||
* A ''pan'' parameter of 261 will result in sound panning only to the left channel. | * A ''pan'' parameter of 261 will result in sound panning only to the left channel. | ||
|} | |} | ||
=== 0xfa - se_PlayPan === | === 0xfa - se_PlayPan === | ||
| Line 4,746: | Line 4,746: | ||
|uint | |uint | ||
|pan | |pan | ||
|The panning of the SE. This parameter gets recalculated internally as <code>((''pan'' * 0x3f + ((''pan'' * 0x3f >> 7) >> 0x18)) >> 8) + 0x40</code>, which is eventually split up into two halfwords, then recalculated further into a signed byte. | |The panning of the SE. Has an intended range of -260 (left) to 260 (right), with 0 being the center. | ||
This parameter gets recalculated internally as <code>((''pan'' * 0x3f + ((''pan'' * 0x3f >> 7) >> 0x18)) >> 8) + 0x40</code>, which is eventually split up into two halfwords, then recalculated further into a signed byte. | |||
What this means is that: | What this means is that: | ||
* A ''pan'' parameter of 260 will result in sound panning only to the right channel. | * A ''pan'' parameter of 260 will result in sound panning only to the right channel. | ||
* A ''pan'' parameter of 261 will result in sound panning only to the left channel. | * A ''pan'' parameter of 261 will result in sound panning only to the left channel. | ||
|} | |} | ||
=== 0xfb - se_PlayVolume === | === 0xfb - se_PlayVolume === | ||