Difference between revisions of "User:MrSinistar/Sandbox"

From Retro Modding Wiki
Jump to: navigation, search
(SCLY Audio Object)
(SCLY RoomAcoustics: Cracked RoomAcoustics!)
Line 175: Line 175:
 
{|class="wikitable"
 
{|class="wikitable"
 
! Offset
 
! Offset
! Size
+
! Size (h)
 
! Description
 
! Description
 
|-
 
|-
 
| 0x0
 
| 0x0
 
| 2
 
| 2
| '''Reverb flag'''; 1 = on, 0 = off
+
| '''Active flag'''; 1 = on, 0 = off
 
|-
 
|-
| 0x4
+
| 0x2
 
| 4
 
| 4
| '''Position (float)'''
+
| {{unknown|'''Unknown'''}}; always 0x75
 
|-
 
|-
| 0x8
+
| 0x6
| 4
+
| 27
| '''Position (float)'''
+
| '''Padding'''
 
|-
 
|-
| 0xC
+
| 0x2D
| 4
+
| 1
| '''Rotation (float)'''
+
| {{unknown|'''Unknown'''}}; always 0x1
|-
+
| 0x10
+
| 4
+
| '''Rotation (float)'''
+
|-
+
| 0x14
+
| 4
+
| '''Rotation (float)'''
+
|-
+
| 0x18
+
| 4
+
| '''Sound Effects ID''' index number for [[ATBL]]
+
 
|-
 
|-
| 0x1C
+
| 0x2E
 
| 1
 
| 1
| '''Play Automatically'''; If this bool is turned on, but the active bool is not on, the corresponding trigger must send a Play message (0x14) to turn on the sound.
 
|-
 
| 0x1D
 
| 4
 
| '''Maximum Distance (float)'''; the bigger the float, the farther you can hear it!
 
|-
 
| 0x21
 
| 4
 
| '''Minimum Distance (float)'''; usually set to 0.2
 
|-
 
| 0x25
 
| 4
 
 
| '''Padding'''
 
| '''Padding'''
 
|-
 
|-
| 0x29
+
| 0x2F
 
| 4
 
| 4
| '''Priority'''
+
| '''Decay (float)'''; Reverb decay length (in seconds). Value must be between 0.01 and 10.0.  Can make it sound like small room to a large cathedral.
 
|-
 
|-
| 0x2D
+
| 0x33
 
| 4
 
| 4
| '''Max. Volume'''; 127 is loudest
+
| '''Predelay (float)'''; Length of time before reverb starts (in seconds). Value must be between 0.0 and 0.1.  Simulates latency for reflected sound waves over long distances.
 
|-
 
|-
| 0x31
+
| 0x37
 
| 4
 
| 4
| '''Min. Volume'''
+
| '''Damping (float)'''; Dampens the high-frequencies.  Value must be between 0.0 and 1.0. Sort of like a filter, 0.0 has lots of bass, 1.0 has lots of high end.
 
|-
 
|-
| 0x35
+
| 0x3B
 
| 4
 
| 4
| '''Panning''' 0=Left, 64=Center, 127=Right
+
| '''Color (float)'''; Basically, an equalizer.  Value must be between 0.0 and 1.0.  Balances out frequencies to simulate the acoustic properties of different surfaces in a room.
|-
+
| 0x39
+
| 1
+
| '''Play endlessly'''
+
|-
+
| 0x3A
+
| 1
+
| '''Play everywhere'''
+
|-
+
| 0x3B
+
| 1
+
| '''Active/Accepts Trigger Activations'''; this must be on and it's corresponding trigger has to activate/deactivate the sound object in order to play/stop sound.  Triggers sending a Play message (0x14) won't turn on the sound.
+
|-
+
| 0x3C
+
| 1
+
| {{unknown|'''Unknown'''}}
+
|-
+
| 0x3D
+
| 1
+
| '''Is sound affected by RoomAcoustics?'''; 1=yes, 0=no
+
|-
+
| 0x3E
+
| 1
+
| {{unknown|'''Unknown'''}}
+
 
|-
 
|-
 
| 0x3F
 
| 0x3F
| 1
+
| 4
| {{unknown|'''Unknown'''}}; Is On for Health pickups (ITD or Surround flag?)
+
| '''Mix (float)'''; Value must be between 0.0 and 1.0. 0.0 means that only the original sound will be audible, whereas 1.0 will only make the reverberated signal be heard.
 
|-
 
|-
| 0x40
+
| 0x43
| 4
+
| 25
| {{unknown|'''Unknown'''}}; (FF FF FF FF, usually descending...seen on cinematic sounds)
+
| '''Padding'''
 
|}
 
|}
  

Revision as of 01:43, 22 May 2015

AGSC uses MusyX data for the audio engine. Each sound has it's own "SoundMacro" and properties. The pool chunk is where the soundmacros are located. SoundMacros are small scripts that control how sounds are played in game, like pitch or vibrato or fade outs. Here's a description of the pool chunk:

Offset Size Description
0x0 4 Header size Looks like it's always 10
0x10 4 Macro size
0x14 2 Macro ID
0x18 Macro data, needs more research


STRG Commands are similar to CSS syntax. A ; terminates the command. & begins the command, so for example, &just=center;

Command Value Description
just center Justifies text
image SI,0.70,0.68,TXTR ID Displays an image. SI = Single Image? S,T and finally TXTR ID. Animation = SA, Animation Speed, S,T, TXTR ID, TXTR ID
main-color Hex Color Code Changes color of text.



SCLY Audio Object

Offset Size Description
0x0 1 SCLY Byte 0x14 denotes sound
0x1 N Sound name; zero-terminated
Offset Size Description
0x0 4 Position (float)
0x4 4 Position (float)
0x8 4 Position (float)
0xC 4 Rotation (float)
0x10 4 Rotation (float)
0x14 4 Rotation (float)
0x18 4 Sound Effects ID index number for ATBL
0x1C 1 Play Automatically; If this bool is turned on, but the active bool is not on, the corresponding trigger must send a Play message (0x14) to turn on the sound.
0x1D 4 Maximum Distance (float); the bigger the float, the farther you can hear it!
0x21 4 Minimum Distance (float); usually set to 0.2
0x25 4 Padding
0x29 4 Priority
0x2D 4 Max. Volume; 127 is loudest
0x31 4 Min. Volume
0x35 4 Panning 0=Left, 64=Center, 127=Right
0x39 1 Play endlessly
0x3A 1 Play everywhere
0x3B 1 Active/Accepts Trigger Activations; this must be on and it's corresponding trigger has to activate/deactivate the sound object in order to play/stop sound. Triggers sending a Play message (0x14) won't turn on the sound.
0x3C 1 Unknown
0x3D 1 Is sound affected by RoomAcoustics?; 1=yes, 0=no
0x3E 1 Unknown
0x3F 1 Unknown; Is On for Health pickups (ITD or Surround flag?)
0x40 4 Unknown; (FF FF FF FF, usually descending...seen on cinematic sounds)


so, if what we are assuming are the play automatically bool and the active bool are both on, then the sound plays immediately on spawn and never plays again, even when the trigger is suppose to activate it.

atbl bool = 0, 3rd bool = 1...sound doesn't play automatically but activates when going through trigger.

atbl bool = 1, 3rd bool = 1...sound plays automatically and deactives/activates correctly when going through trigger.

atbl bool = 1, 3rd bool = 0, nothing plays


SCLY RoomAcoustics

Offset Size (h) Description
0x0 2 Active flag; 1 = on, 0 = off
0x2 4 Unknown; always 0x75
0x6 27 Padding
0x2D 1 Unknown; always 0x1
0x2E 1 Padding
0x2F 4 Decay (float); Reverb decay length (in seconds). Value must be between 0.01 and 10.0. Can make it sound like small room to a large cathedral.
0x33 4 Predelay (float); Length of time before reverb starts (in seconds). Value must be between 0.0 and 0.1. Simulates latency for reflected sound waves over long distances.
0x37 4 Damping (float); Dampens the high-frequencies. Value must be between 0.0 and 1.0. Sort of like a filter, 0.0 has lots of bass, 1.0 has lots of high end.
0x3B 4 Color (float); Basically, an equalizer. Value must be between 0.0 and 1.0. Balances out frequencies to simulate the acoustic properties of different surfaces in a room.
0x3F 4 Mix (float); Value must be between 0.0 and 1.0. 0.0 means that only the original sound will be audible, whereas 1.0 will only make the reverberated signal be heard.
0x43 25 Padding






Powercannon render3.png Help us research and document! Join the discussion at: Metroid Prime Hacking Research thread @ Metroid2002.com
Morphball wire.png Morphball wirerender.png Morphball render.png
File formats that need major research File formats that need moderate research File formats that need minor research