XML:SNDD: Difference between revisions

From OniGalore
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 26: Line 26:
: compressed (ima4)
: compressed (ima4)
|}
|}


==Helpful conversion tools==
==Helpful conversion tools==
===for PC===
===for PC===
To create suitable files you could use this tool: [http://www.riverpast.com/en/prod/audioconverter/download/ River Past Audio Converter 7.8]. (Also mirrored [http://dl.dropbox.com/u/139715/modding_tools/audioconverter_wmf_setup.exe here].) The trail version let you convert sounds that are up to 4 minutes long.
To create suitable files you could use this tool: [http://www.riverpast.com/en/prod/audioconverter/download/ River Past Audio Converter 7.8]. (Also mirrored [http://dl.dropbox.com/u/139715/modding_tools/audioconverter_wmf_setup.exe here].) The trail version let you convert sounds that are up to 4 minutes long.


In order to make your sounds available on both sides - pc and mac - you need to create them twice (one time from a wav source and another time from an aif/aifc/afc source).
In order to make your sounds available on both sides - pc and mac - you need to create them twice (one time from a wav source and another time from an aif/aifc/afc source).
Line 36: Line 36:
[http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/XML_modding/mp3_to_compressed_aif.png http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/XML_modding/mp3_to_compressed_aif_tn.png] [http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/XML_modding/mp3_to_compressed_wav.png http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/XML_modding/mp3_to_compressed_wav_tn.png]
[http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/XML_modding/mp3_to_compressed_aif.png http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/XML_modding/mp3_to_compressed_aif_tn.png] [http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/XML_modding/mp3_to_compressed_wav.png http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/XML_modding/mp3_to_compressed_wav_tn.png]


 
When you're done you can use [http://mods.oni2.net/node/72 Onisplit GUI] to convert OSBDyourfile.grp.xml and OSBDyourfile.amb.xml to the .oni-file formate. Use the "manual command input":
When you're done you can use Onisplit GUI to convert two extra .xml to .oni files. Use the manuel input:
: -create output_directory input_directory/OSBD*.xml
: -create output_directory input_directory/OSBD*.xml
Make it that way they all have the same name:
* <font color=#AAAAAA>SNDD</font>yourfile<font color=#AAAAAA>.oni</font>
* <font color=#AAAAAA>OSBD</font>yourfile<font color=#AAAAAA>'''.grp'''.oni</font>
* <font color=#AAAAAA>OSBD</font>yourfile<font color=#AAAAAA>'''.amb'''.oni</font>


For more information about OSBD see [[#OSBD information|here]].
Music tracks can be split into several parts. However, I'd say do that only if you know what you are doing. If you are going to split music track look [[#OSBD information|here]].




Line 48: Line 51:


==OSBD information==
==OSBD information==
: OSBD_newmusic.amb.oni (The main file, links to the group, intro and ending files)
: OSBD_newmusic.amb.oni (The main file, links to the group, intro and ending files)
: OSBD_newmusic.grp.oni (Contain links to the music files)
: OSBD_newmusic.grp.oni (Contain links to the music files)
Line 59: Line 61:
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.
* <Oni Version="      "> - self-explanatory, isn't it?
* <Oni Version="      "> - self-explanatory, isn't it?
* <NumberOfChannels> - here you tell Oni if your sound file is mono (1) or stereo (2)
* <NumberOfChannels> - here you tell Oni if your sound file is mono (1) or stereo (2), if you set the wrong value the music will sound distorted
* <Sound> - this is the sound file (for example: <font color=#AAAAAA>SNDD</font>nyan<font color=#AAAAAA>.oni</font>), file prefix and suffix aren't used
* <Sound> - this is the sound file (for example: <font color=#AAAAAA>SNDD</font>nyan<font color=#AAAAAA>.oni</font>), file prefix and suffix aren't used


Line 94: Line 96:
* <Flags> - use "PlayOnce" if you don't want your sound to be repeated automatically
* <Flags> - use "PlayOnce" if you don't want your sound to be repeated automatically
* <BaseTrack1> - this is the grp sound file (for example: <font color=#AAAAAA>SNDD</font>nyan<font color=#AAAAAA>.grp.oni</font>), file prefix and suffix aren't used
* <BaseTrack1> - this is the grp sound file (for example: <font color=#AAAAAA>SNDD</font>nyan<font color=#AAAAAA>.grp.oni</font>), file prefix and suffix aren't used
(sample file)


  <?xml version="1.0" encoding="utf-8"?>
  <?xml version="1.0" encoding="utf-8"?>
Line 126: Line 130:
==BINACJBOSound.xml==
==BINACJBOSound.xml==
* <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
* <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
* <MinRadius> - between min radius and sound origin (<Position>) is the sound voulume equally strong
* <MinRadius> - between min radius and sound origin (<Position>) is the sound volume equally strong
* <MaxRadius> - between max and min radius is a transition of the sound volume
* <MaxRadius> - between max and min radius is a transition of the sound volume
(A block ("object") of sample code.)
(A block ("object") of sample code.)
Line 146: Line 150:
             </OSD>
             </OSD>
         </Object>
         </Object>
==sound-related BSL commands==
* [[BSL:Functions#sound|on this wiki]]
* [http://ssg.oni2.net/commands.htm#sound on ssg's website]




==[http://oni.bungie.org/community/forum/viewtopic.php?id=798 OCF thread about new music]==
==[http://oni.bungie.org/community/forum/viewtopic.php?id=798 OCF thread about new music]==
^
^

Revision as of 10:07, 24 April 2011

Unfinished building-60px.jpg

This page is unfinished. Can you fill in any missing information?
If it is not clear which part of the page is unfinished, ask on the talk page.

(More OSBD .grp / .amb information could be good and .imp is completly left out so far.)


How do I get sounds into Oni?

Source file requirements

First of, your sound files must meet these features:

PC retail MAC
.wav
mono / stereo
22.05KHz / 44.1KHz
uncompressed (PCM) / compressed (MS-ADPCM)
.aif / .aifc / .afc
mono / stereo
22.05KHz
compressed (ima4)


Helpful conversion tools

for PC

To create suitable files you could use this tool: River Past Audio Converter 7.8. (Also mirrored here.) The trail version let you convert sounds that are up to 4 minutes long.

In order to make your sounds available on both sides - pc and mac - you need to create them twice (one time from a wav source and another time from an aif/aifc/afc source).

mp3_to_compressed_aif_tn.png mp3_to_compressed_wav_tn.png

When you're done you can use Onisplit GUI to convert OSBDyourfile.grp.xml and OSBDyourfile.amb.xml to the .oni-file formate. Use the "manual command input":

-create output_directory input_directory/OSBD*.xml

Make it that way they all have the same name:

  • SNDDyourfile.oni
  • OSBDyourfile.grp.oni
  • OSBDyourfile.amb.oni

Music tracks can be split into several parts. However, I'd say do that only if you know what you are doing. If you are going to split music track look here.


for MAC

?


OSBD information

OSBD_newmusic.amb.oni (The main file, links to the group, intro and ending files)
OSBD_newmusic.grp.oni (Contain links to the music files)
OSBD_newmusic_in.grp.oni (Links to intro part of the music - Optional)
OSBD_newmusic_out.grp.oni (Links to the ending of the music - Optional)
SNDD_newmusic1.oni (The individual music files - Its best to break up the music into segments of perhaps 30 secs to a minute each - Oni may crash or become sluggish if you use a single file for the music -- EdT) (Can someone doublecheck this? --Paradox-01 19:54, 23 April 2011 (UTC))


OSBDfile.grp.xml

In case you want to create a simple sound file you can basically copy the code and change the red marked stuff.

  • <Oni Version=" "> - self-explanatory, isn't it?
  • <NumberOfChannels> - here you tell Oni if your sound file is mono (1) or stereo (2), if you set the wrong value the music will sound distorted
  • <Sound> - this is the sound file (for example: SNDDnyan.oni), file prefix and suffix aren't used

(sample file)

<?xml version="1.0" encoding="utf-8"?>
<Oni Version="0.9.52.0">
   <SoundGroup>
       <Volume>1</Volume>
       <Pitch>1</Pitch>
       <PreventRepeats>1</PreventRepeats>
       <LastSelectedPermutation>0</LastSelectedPermutation>
       <NumberOfChannels>2</NumberOfChannels>
       <Permutations>
           <Permutation>
               <Weight>10</Weight>
               <Volume>
                   <Min>1</Min>
                   <Max>1</Max>
               </Volume>
               <Pitch>
                   <Min>1</Min>
                   <Max>1</Max>
               </Pitch>
               <Sound>nyan</Sound>
           </Permutation>
       </Permutations>
   </SoundGroup>
</Oni>


OSBDfile.amb.xml

This file use the .grp file(s).
This file is used by area-fixed sounds. (See level-specific file BINACJBOSound.xml.)

  • <Flags> - use "PlayOnce" if you don't want your sound to be repeated automatically
  • <BaseTrack1> - this is the grp sound file (for example: SNDDnyan.grp.oni), file prefix and suffix aren't used

(sample file)

<?xml version="1.0" encoding="utf-8"?>
<Oni Version="0.9.52.0">
   <AmbientSound>
       <Priority>Normal</Priority>
       <Flags>InterruptTracksOnStop</Flags>
       <DetailTrackProperties>
           <SphereRadius>10</SphereRadius>
           <ElapsedTime>
               <Min>0</Min>
               <Max>0</Max>
           </ElapsedTime>
       </DetailTrackProperties>
       <Volume>
           <Distance>
               <Min>10</Min>
               <Max>50</Max>
           </Distance>
       </Volume>
       <DetailTrack></DetailTrack>
       <BaseTrack1>nyan</BaseTrack1>
       <BaseTrack2></BaseTrack2>
       <InSound></InSound>
       <OutSound></OutSound>
       <Treshold>3</Treshold>
       <MinOcclusion>0</MinOcclusion>
   </AmbientSound>
</Oni>


BINACJBOSound.xml

  • <Class> - this is the amb sound file (for example: SNDDnyan.amb.oni), file prefix and suffix aren't used
  • <MinRadius> - between min radius and sound origin (<Position>) is the sound volume equally strong
  • <MaxRadius> - between max and min radius is a transition of the sound volume

(A block ("object") of sample code.)

       <Object Id="8805" Type="SNDG">
           <Header>
               <Flags>0</Flags>
               <Position>125 10 2231</Position>
               <Rotation>0 0 0</Rotation>
           </Header>
           <OSD>
               <Class>nyan</BaseTrack1></Class>
               <Sphere>
                   <MinRadius>7</MinRadius>
                   <MaxRadius>21</MaxRadius>
               </Sphere>
               <Volume>1</Volume>
               <Pitch>1</Pitch>
           </OSD>
       </Object>


sound-related BSL commands


OCF thread about new music

^