18,700
edits
(replaced old music scripting section with new one, correcting various information in the process) |
m (wording) |
||
Line 37: | Line 37: | ||
ffmpeg -i input.wav -acodec adpcm_ima_qt -ar 22050 output.aif | ffmpeg -i input.wav -acodec adpcm_ima_qt -ar 22050 output.aif | ||
The order of arguments is critical: the rate and encoding are being applied to the outputted file, whereas if they came before the input file's name they would be instructions on how to read the input sound. Here is a simple shell script for converting a folder of sounds from WAV to the AIFF format suitable for importing: | The order of arguments is critical: the rate and encoding are being applied to the outputted file, whereas if they came before the input file's name they would be instructions on how to read the input sound. Here is a simple Unix shell script for converting a folder of sounds from WAV to the AIFF format suitable for importing: | ||
#!/bin/sh<br /> | #!/bin/sh<br /> | ||
Line 54: | Line 54: | ||
==The .aif suffix== | ==The .aif suffix== | ||
When you are replacing existing Oni sounds, note that all of Oni's SNDD resources possess a ".aif" suffix as part of their <u>actual resource names</u> (yes, even the WAV-encoded sounds in Windows Oni). So if you import them with a name like "SNDDgears.aif", the file suffix gets changed to ".oni" upon import by OniSplit, and you end up with a resource simply titled "SNDDgears" in-game. Oni | When you are replacing existing Oni sounds, note that all of Oni's SNDD resources possess a ".aif" suffix as part of their <u>actual resource names</u> (yes, even the WAV-encoded sounds in Windows Oni). So if you import them with a name like "SNDDgears.aif", the file suffix gets changed to ".oni" upon import by OniSplit, and you end up with a resource simply titled "SNDDgears" in-game. Existing resources in Oni link to a sound titled "SNDDgears.aif", thus nothing will play. If you supply an AIFF file called "SNDDgears.aif.aif" or a WAV file called "SNDDgears.aif.wav", OniSplit will create the file "SNDDgears.aif.oni", and upon importing it, Oni will find the resource named "SNDDgears.aif" that it's seeking. | ||
==.oni file creation== | ==.oni file creation== | ||
Line 64: | Line 64: | ||
* Target Platform: choose the desired mode | * Target Platform: choose the desired mode | ||
* Tools > Sound Wizard | * Tools > Sound Wizard | ||
===Via command line=== | ===Via command line=== | ||
For those who want to do it on their own. | For those who want to do it on their own. | ||
OniSplit | : OniSplit.exe -create output_directory_'''Mac''' input_directory/'''*.aif''' | ||
: OniSplit.exe -create output_directory_'''Win''' input_directory/'''*.wav''' | |||
: -create output_directory_'''Win''' input_directory/'''*.wav''' | : OniSplit.exe -create output_directory input_directory/*.xml | ||
: -create output_directory input_directory/*.xml | |||
==OSBD information== | ==OSBD information== | ||
Line 94: | Line 76: | ||
* OSBD*.'''amb''' | * OSBD*.'''amb''' | ||
** music (call OSBD from BSL) | ** music (call the OSBD from BSL) | ||
** dialogue (call OSBD from BSL) | ** dialogue (call the OSBD from BSL) | ||
** [[XML:BINA/PAR3|BINA3RAP]] <AmbientSound> (action type) | ** [[XML:BINA/PAR3|BINA3RAP]] <AmbientSound> (action type) | ||
** [[#BINACJBOSound.xml|BINACJBOSound.xml]] (area-fixed sounds) | ** [[#BINACJBOSound.xml|BINACJBOSound.xml]] (area-fixed sounds) | ||
Line 111: | Line 93: | ||
** [[XML:TRIG|TRIG]] <TriggerSound> | ** [[XML:TRIG|TRIG]] <TriggerSound> | ||
For simplicity's sake you should follow Oni's example and give all the files related to one sound the same base 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> | |||
===Music .ambs=== | |||
: OSBD_newmusic.amb.oni ( | : OSBD_newmusic.amb.oni (the main file — links to the group, intro and ending files) | ||
: OSBD_newmusic.grp.oni ( | : OSBD_newmusic.grp.oni (links to the music files) | ||
: OSBD_newmusic_in.grp.oni ( | : OSBD_newmusic_in.grp.oni (links to intro part of the music — optional) | ||
: OSBD_newmusic_out.grp.oni ( | : OSBD_newmusic_out.grp.oni (links to the ending of the music — optional) | ||
: SNDD_newmusic1.oni ( | : SNDD_newmusic1.oni, SNDD_newmusic2.oni… (the individual music files) | ||
Breaking the main loop of the music into parts allows Oni to more | Breaking the main loop of the music into parts allows Oni to more quickly transition to the ending part when the music is commanded to stop playing. The shorter segments you can break the music into, the better – both for the sake of reaching the outro sooner, and because long segments can be taxing on the game. Oni's music averages 9 seconds per segment, and a segment rarely goes above 20 seconds. | ||
The parts of the music between intro and outro are played in a randomized order | The parts of the music between intro and outro are played in a randomized order to add more variety to the playback. Note that .grp files have a <Weight> tag under each <Permutation>. As with TRAC's <Weight> field, this can be used to set the relative probability that a music segment will be picked. Each permutation's weight is figured in relation to the total weight of all segments, so if a piece of music has four permutations and the first one has a <Weight> of 30 and the other three have <Weight>s of 10, the first segment has a 50% chance of being played. This feature is effectively unused in Oni's music, as all music OSBDs assign a weight of 10 to all <Permutation>s. | ||
===OSBDfile.imp.xml=== | ===OSBDfile.imp.xml=== | ||
Line 428: | Line 414: | ||
==BINACJBOSound.xml== | ==BINACJBOSound.xml== | ||
This is for sounds | This is for sounds anchored to a certain area. | ||
{| class="wikitable" width=100% | {| class="wikitable" width=100% | ||
Line 539: | Line 525: | ||
See [http://oni.bungie.org/forum/viewtopic.php?id=798 here]. | See [http://oni.bungie.org/forum/viewtopic.php?id=798 here]. | ||
==How to register sounds | ==How to register sounds for characters== | ||
...such as the sounds of heavy attacks and taunts. | ...such as the sounds of heavy attacks and taunts. | ||