Jump to content

XML:SNDD: Difference between revisions

1,127 bytes added ,  5 June 2013
more tables / clean-up
(sound creation via Vago)
(more tables / clean-up)
Line 37: Line 37:
{|class="wikitable" width="100%"
{|class="wikitable" width="100%"
!width=33%|
!width=33%|
!align=right|PC version
!PC version
!align=right|Mac version
!Mac version
|-
|-
|width=33%|audacity
|width=33%|audacity
Line 81: Line 81:




===via Excel macro===
===via batch file===
{| border=0 cellspacing=20 cellpadding=0 align=right
| macro GUI<br>[http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/VBA/sound_setup_assistant.png http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/VBA/sound_setup_assistant_tn.png]
|}
 
You can use this [http://dl.dropbox.com/u/139715/OniGalore/SNDD_OSBD_macro.zip macro] to create single sounds with few clicks.
 
It lets you generate the OSBD (.amb + .grp) and SNDD file in one go.
 
No need to buy Windows version of Excel. The trail version will also do it.
 
 
===via batch files===
Get them [http://dl.dropbox.com/u/139715/OniGalore/sound_creation_via_batch_files.zip HERE], includes a short readme.
Get them [http://dl.dropbox.com/u/139715/OniGalore/sound_creation_via_batch_files.zip HERE], includes a short readme.




===via command lines===
===via command line===
For those who want to do it on their own.
For those who want to do it on their own.


Line 146: Line 134:


===OSBDfile.amb.xml===
===OSBDfile.amb.xml===
In case you want to create a simple sound file you can basically copy the code and change the red marked stuff.  
In case you want to create a simple sound file you can basically copy the code and change the red marked stuff in the examples.
: OSBDfile.grp.xml, OSBDfile.amb.xml, BINACJBOSound.xml are showing the code from the [http://mods.oni2.net/node/177 '''nyan cat mod'''].


(OSBDfile.grp.xml, OSBDfile.amb.xml, BINACJBOSound.xml are actully showing the code from the [http://mods.oni2.net/node/177 '''nyan cat mod'''].)


 
{| class="wikitable" width=100%
The .amb file can be called from BSL or from area-fixed sound object. (See level-specific file [[#BINACJBOSound.xml|BINACJBOSound.xml]].)
|width=120px| '''tag'''
 
|width=100px| '''type'''
The .amb file links to .grp file(s).
| '''description'''
 
|-
* <Priority>
| <AmbientSound>
| -
|
|-
|valign="top"| <Priority>
|valign="top"| flag
|
: Low
: Low
: Normal
: Normal
: High
: High
: Highest
: Highest
* <Flags>
|-
|valign="top"| <Flags>
|valign="top"| flag
|
: InterruptTracksOnStop - this flag must be set if you want to use BSL command ''sound_music_stop''
: InterruptTracksOnStop - this flag must be set if you want to use BSL command ''sound_music_stop''
: PlayOnce
: PlayOnce
: CanPan
: CanPan
* <BaseTrack1> - this links to the .grp file (for example: <font color=#AAAAAA>OSBD</font>nyan<font color=#AAAAAA>.grp.oni</font>), file prefix and suffix aren't used
|-
| <DetailTrackProperties>
| -
|
|-
| <SphereRadius>
| float
|
|-
| <ElapsedTime>
| -
|
|-
| <Min>
| float
|
|-
| <Max>
| float
|
|-
| <Volume>
| -
|
|-
| <Distance>
| -
|
|-
| <Min>
| float
|
|-
| <Max>
| float
|
|-
| <DetailTrack>
| char[32]
| <font color=#AAAAAA>OSBD</font>name<font color=#AAAAAA>.grp.oni</font>, file prefix and suffix aren't used
|-
| '''<BaseTrack1>'''
| char[32]
| <font color=#AAAAAA>OSBD</font>name<font color=#AAAAAA>.grp.oni</font>, file prefix and suffix aren't used
|-
| <BaseTrack2>
| char[32]
| <font color=#AAAAAA>OSBD</font>name<font color=#AAAAAA>.grp.oni</font>, file prefix and suffix aren't used
|-
| <InSound>
| char[32]
| <font color=#AAAAAA>OSBD</font>name<font color=#AAAAAA>.grp.oni</font>, file prefix and suffix aren't used
|-
| <OutSound>
| char[32]
| <font color=#AAAAAA>OSBD</font>name<font color=#AAAAAA>.grp.oni</font>, file prefix and suffix aren't used
|-
| <Treshold>
| int32
|
|-
| <MinOcclusion>
| float
|
|}




Line 203: Line 264:
|width=100px| '''type'''
|width=100px| '''type'''
| '''description'''
| '''description'''
|-
| <SoundGroup>
| -
|
|-
| <Volume>
| float
|
|-
| <Pitch>
| float
|
|-
|-
| <Flags>
| <Flags>
| flag
| flag
|
| PreventRepeat - forces to play different sounds if there are more than one permutations
: PreventRepeat - forces to play different sounds if there are more than one permutations
|-
|-
|valign="top"| <NumberOfChannels>
|valign="top"| <NumberOfChannels>
|valign="top"| integer
|valign="top"| int32
| Here you tell Oni if your sound file is mono or stereo. Windows' 44.1 kHz is an exception.
| Here you tell Oni if your sound file is mono or stereo. Windows' 44.1 kHz is an exception.


Line 229: Line 301:
: if grp's <NumberOfChannels> is 1 and sound file is 44.1 kHz, mono then the sound will play distorted
: if grp's <NumberOfChannels> is 1 and sound file is 44.1 kHz, mono then the sound will play distorted


|-
| <Permutations>
| -
| int32 array for the <Permutation> tags.
|-
| <Permutation>
| -
|
|-
| <Weight>
| int32
|
|-
| <Volume>
| -
|
|-
| <Min>
| float
|
|-
| <Max>
| float
|
|-
| <Pitch>
| -
|
|-
| <Min>
| float
|
|-
| <Max>
| float
|
|-
|-
| <Sound>
| <Sound>
Line 261: Line 369:
     </SoundGroup>
     </SoundGroup>
  </Oni>
  </Oni>


==BINACJBOSound.xml==
==BINACJBOSound.xml==
This is for area-fixed sounds.
This is for area-fixed sounds.
* <Position> - here you tell Oni where you want the sound to be [[OBD_talk:BINA/OBJC|located]]
 
* <Class> - this is the amb sound file (for example: <font color=#AAAAAA>SNDD</font>nyan<font color=#AAAAAA>.amb.oni</font>), file prefix and suffix aren't used
 
* <Sphere>
{| class="wikitable" width=100%
:* <MinRadius> - between min radius and sound origin (<Position>) is the sound volume equally strong
|width=120px| '''tag'''
:* <MaxRadius> - between max and min radius is a transition of the sound volume
|width=100px| '''type'''
* <Box> - alternative to <Sphere>
| '''description'''
:* <Min>''X1 Y1 Z1''</Min>
|-
:* <Max>''X2 Y2 Z2''</Max>
| <Objects>
| -
| This tag marks the file as BINACJBO.
|-
| <SNDG Id="...">
| integer
| This tag marks the file as sound collection. Id doesn't matter at import time.
|-
| <Header>
| -
|
|-
|valign="top"| <Flags>
|valign="top"| flag
| Ignore it. Those flags were used in the past.
: None
: Locked
: PlacedInGame
: Temporary
: Gunk
|-
| <Position>
| float x3
| here you tell Oni where you want the sound to be [[OBD_talk:BINA/OBJC|located]]
|-
| <Rotation>
| float x3
| Not really important.
|-
| <OSD>
| -
|
|-
| <Class>  
| char[32]
| <font color=#AAAAAA>SNDD</font>name<font color=#AAAAAA>.amb.oni</font>, file prefix and suffix aren't used
|-
| <Sphere>
| -
|
|-
| <MinRadius>
| float
| between min radius and sound origin (<Position>) is the sound volume equally strong
|-
| <MaxRadius>
| float
| between max and min radius is a transition of the sound volume
|-
| <Box>
| -
| alternative to <Sphere>
|-
| <Min>
| float x3
| X1 Y1 Z1
|-
| <Max>
| float x3
| X2 Y2 Z2
|}
 
 
An example:


         <SNDG Id="8805">
         <SNDG Id="8805">
             <Header>
             <Header>
                 <Flags></Flags>
                 <Flags></Flags>
                 <Position>125 10 2231</Position>
                 '''<Position><font color=#FF0000>125 10 2231</font></Position>'''
                 <Rotation>0 0 0</Rotation>
                 <Rotation>0 0 0</Rotation>
             </Header>
             </Header>
8,013

edits