OBD:OSBD/OSGr: Difference between revisions

From OniGalore
Jump to navigation Jump to search
m (volume, pitch, repeats)
 
m (localized image)
 
(12 intermediate revisions by 4 users not shown)
Line 1: Line 1:
Minimal data, just to get the page started.
[[Image:osb_r_gr.gif]]


http://www6.fh-eberswalde.de/user/dkriesch/onistuff/images/osb_r_gr.gif
{{Table}}
 
{{OBDth}}
<TABLE BORDER=0 WIDTH=100% CELLPADDING=2 CELLSPACING=1 BGCOLOR="#000000">
{{OBDtr| 0x00 | int32  |FF0000| 72 47 53 4F | OSGr | Oni Sound Group }}
<TR ALIGN=CENTER BGCOLOR="#FFDDBB"><TD WIDTH=15%><B>Hex</B></TD><TD WIDTH=15%><B>Translation</B></TD><TD WIDTH=70%><B>Meaning</B></TD></TR>
{{OBDtr| 0x04 | int32  |FFFF00| B4 00 00 00 | 180 | size of OSGr chunk (from after this field and to the end) }}
<TR ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"><TD BGCOLOR="#FF0000">72&nbsp;47&nbsp;53&nbsp;4F</TD><TD>OSGr</TD><TD ALIGN=LEFT>Oni Sound Group</TD></TR>
{{OBDtr| 0x08 | int32  |FFC8C8| 06 00 00 00 | 6   | version (see below) }}
<TR ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"><TD BGCOLOR="#FFFF00">B4 00 00 00</TD><TD>180</TD><TD ALIGN=LEFT>180 bytes; size of the part that follows</TD></TR>
{{OBDtr| 0x0C | float  |FFFFC8| 00 00 80 3F | 1.0  | playback volume (present for version 2 and above, default is 1) }}
<TR ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"><TD BGCOLOR="#FFC8C8">06 00 00 00</TD><TD>6</TD><TD ALIGN=LEFT>unknown</TD></TR>
{{OBDtr| 0x10 | float  |C8FFC8| 00 00 80 3F | 1.0  | playback speed AKA pitch (present for version 3 and above, default is 1) }}
<TR ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"><TD BGCOLOR="#FFFFC8">00 00 80 3F</TD><TD>1.000000</TD><TD ALIGN=LEFT>playback volume</TD></TR>
{{OBDtr| 0x14 | int16  |C8FFFF| 00 00       | 0    | prevent repeats (present for version 6 and above, default is 1 for versions 4 and 5 and 0 for versions lower than 4) }}
<TR ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"><TD BGCOLOR="#C8FFC8">00 00 80 3F</TD><TD>1.000000</TD><TD ALIGN=LEFT>playback speed AKA pitch</TD></TR>
{{OBDtr| 0x16 | int16  |FFC8FF| 00 00       | 0    | last selected permutation (present for version 6 and above, default is 0, used with prevent repeats) }}
<TR ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"><TD BGCOLOR="#C8FFFF">00 00</TD><TD>0</TD><TD ALIGN=LEFT>unknown</TD></TR>
{{OBDtr| 0x18 | int32  |FFC800| 01 00 00 00 | 1    | number of channels (1 or 2, same as in the sound files linked from permutations) }}
<TR ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"><TD BGCOLOR="#FFC8FF">00 00</TD><TD>0</TD><TD ALIGN=LEFT>prevent repeats (0/1)</TD></TR>
{{OBDtr| 0x1C | int32  |C800C8| 03 00 00 00 | 3   | number of permutations }}
<TR ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"><TD BGCOLOR="#FFC800">01 00 00 00</TD><TD>1</TD><TD ALIGN=LEFT>unknown</TD></TR>
{{OBDtrBK|First permutation}}
<TR ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"><TD BGCOLOR="#C800C8">03 00 00 00</TD><TD>3</TD><TD ALIGN=LEFT>amount of packages that follow</TD></TR>
{{OBDtr| 0x00 | int32    |C87C64| 0A 00 00 00 | 10 | weight }}
<TR ALIGN=CENTER VALIGN=TOP BGCOLOR="#000000"><TD COLSPAN=3><FONT SIZE=2 COLOR="#FFFFFF">Below follows the first package.</FONT></TD></TR>
{{OBDtr| 0x04 | float    |B0C3D4| 00 00 80 3F | 1.0 | minimum volume }}
<TR ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"><TD BGCOLOR="#C87C64">0A 00 00 00</TD><TD>10</TD><TD ALIGN=LEFT>weight</TD></TR>
{{OBDtr| 0x08 | float    |E7CEA5| 00 00 80 3F | 1.0 | maximum volume }}
<TR ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"><TD BGCOLOR="#B0C3D4">00 00 80 3F</TD><TD>1.000000</TD><TD ALIGN=LEFT>minumum volume</TD></TR>
{{OBDtr| 0x0C | float    |FFDDDD| 33 33 33 3F | 0.7 | minimum pitch }}
<TR ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"><TD BGCOLOR="#E7CEA5">00 00 80 3F</TD><TD>1.000000</TD><TD ALIGN=LEFT>maximum volume</TD></TR>
{{OBDtr| 0x10 | float    |64AAAA| 33 33 33 3F | 0.7 | maximum pitch }}
<TR ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"><TD BGCOLOR="#FFDDDD">33 33 33 3F</TD><TD>0.700000</TD><TD ALIGN=LEFT>minimum pitch</TD></TR>
{{OBDtr| 0x14 | char[32] |EBEBEB| 61 63 35... | ac5lp1.aif | permutation sound name (reference to f.e. 09376-ac5lp1.aif.[[OBD:SNDD|SNDD]] of level 3) }}
<TR ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"><TD BGCOLOR="#64AAAA">33 33 33 3F</TD><TD>0.700000</TD><TD ALIGN=LEFT>maximum pitch</TD></TR>
|}
<TR ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"><TD BGCOLOR="#EBEBEB" COLSPAN=2><TT>ac5lp1.aif</TT></TD><TD ALIGN=LEFT>permutation sound name (reference to f.e. 09376-ac5lp1.aif.[[OBD:SNDD|SNDD]] of level 3)</TD></TR>
;Number of channels
</TABLE>
:By design the number of channels is supposed to be the same as that of the referenced SNDDs (this implies that all the SNDDs in a group are supposed to have the same channel count).
:If for whatever reason the channel counts in OSGr and SNDD are ''not'' consistent, then the behaviour depends on whether the OSGr is referenced from an OSIm or from an OSAm:
:*the channel count in an OSAm's OSGr determines the channel count of the decompressed sound buffer, therefore mono SNDDs will sound 2x higher/faster if the channel count in their OSGr is set to 2, and stereo SNDDs (e.g., music) will sound 2x lower/slower if the channel count in their OSGr is set to 1.
:*the channel count in an OSIm's OSGr seems to have no effect if the SNDDs are mono, i.e. setting the OSGr's channel count to 2 does not result in a higher pitch. As for stereo SNDDs, apparently they cannot be used in an OSIm's OSGr at all.
;Fury vocalizations
;Fury vocalizations
:Those are sped up by 1.14 in Oni, which explains why they sound weird when exported.
:Those are sped up by 1.14 in Oni, which explains why they sound weird when exported.
;Version
:Just as for other [[OSBD]], there have been several version of the binary format.
:Over time, some fields that used to be hardcoded became customizeable on a group-per-group basis.
:Thus, later versions include some extra fields as compared to earlier ones.
:The above example belongs to the latest OSGr version encountered in Oni: 6.
:Lower versions lack certain fields, and the following content is simply shifted backwards.
;Dialog from level0_Tools
[[Image:Tool dialog - Sound Group Properties.png]]
{{OBD}}

Latest revision as of 23:47, 15 December 2022

Osb r gr.gif

Offset Type Raw Hex Value Description
0x00 int32 72 47 53 4F OSGr Oni Sound Group
0x04 int32 B4 00 00 00 180 size of OSGr chunk (from after this field and to the end)
0x08 int32 06 00 00 00 6 version (see below)
0x0C float 00 00 80 3F 1.0 playback volume (present for version 2 and above, default is 1)
0x10 float 00 00 80 3F 1.0 playback speed AKA pitch (present for version 3 and above, default is 1)
0x14 int16 00 00 0 prevent repeats (present for version 6 and above, default is 1 for versions 4 and 5 and 0 for versions lower than 4)
0x16 int16 00 00 0 last selected permutation (present for version 6 and above, default is 0, used with prevent repeats)
0x18 int32 01 00 00 00 1 number of channels (1 or 2, same as in the sound files linked from permutations)
0x1C int32 03 00 00 00 3 number of permutations
First permutation
0x00 int32 0A 00 00 00 10 weight
0x04 float 00 00 80 3F 1.0 minimum volume
0x08 float 00 00 80 3F 1.0 maximum volume
0x0C float 33 33 33 3F 0.7 minimum pitch
0x10 float 33 33 33 3F 0.7 maximum pitch
0x14 char[32] 61 63 35... ac5lp1.aif permutation sound name (reference to f.e. 09376-ac5lp1.aif.SNDD of level 3)
Number of channels
By design the number of channels is supposed to be the same as that of the referenced SNDDs (this implies that all the SNDDs in a group are supposed to have the same channel count).
If for whatever reason the channel counts in OSGr and SNDD are not consistent, then the behaviour depends on whether the OSGr is referenced from an OSIm or from an OSAm:
  • the channel count in an OSAm's OSGr determines the channel count of the decompressed sound buffer, therefore mono SNDDs will sound 2x higher/faster if the channel count in their OSGr is set to 2, and stereo SNDDs (e.g., music) will sound 2x lower/slower if the channel count in their OSGr is set to 1.
  • the channel count in an OSIm's OSGr seems to have no effect if the SNDDs are mono, i.e. setting the OSGr's channel count to 2 does not result in a higher pitch. As for stereo SNDDs, apparently they cannot be used in an OSIm's OSGr at all.
Fury vocalizations
Those are sped up by 1.14 in Oni, which explains why they sound weird when exported.
Version
Just as for other OSBD, there have been several version of the binary format.
Over time, some fields that used to be hardcoded became customizeable on a group-per-group basis.
Thus, later versions include some extra fields as compared to earlier ones.
The above example belongs to the latest OSGr version encountered in Oni: 6.
Lower versions lack certain fields, and the following content is simply shifted backwards.
Dialog from level0_Tools

Tool dialog - Sound Group Properties.png