19,041
edits
Paradox-01 (talk | contribs) m (<Pitch>2</Pitch> The better fix for 44.1 kHz.) |
(tried to clarify the 44 kHz issue; restructured some information) |
||
Line 20: | Line 20: | ||
|width=50% valign=top| | |width=50% valign=top| | ||
: .wav | : .wav | ||
: '''22. | : '''22.05 kHz (mono / stereo)''' or 44.1 kHz (mono) (see "44.1 kHz" section below) | ||
: 16-bit uncompressed ('''PCM''') or compressed ('''MS-ADPCM''') | : 16-bit uncompressed ('''PCM''') or compressed ('''MS-ADPCM''') | ||
|valign=top| | |valign=top| | ||
: .aif / .aifc / .afc | : .aif / .aifc / .afc | ||
: '''22. | : '''22.05 kHz (mono / stereo)''' | ||
: compressed ('''ima4''') | : compressed ('''ima4''') | ||
|} | |} | ||
[[Image:Audacity.png|right|thumb]] | |||
To create suitable files for importing into Oni using a GUI program, you could use [https://www.audacityteam.org/download/ Audacity] and its [https://manual.audacityteam.org/man/faq_installation_and_plug_ins.html#How_do_I_download_and_install_the_FFmpeg_Import.2FExport_Library.3F ffmpeg Export Library]. After you've installed Audacity and the ffmpeg library, go to '''Edit > Preferences... > Libraries''', click the Locate... button and find the installed library file. Open your sound file then go to '''File > Export... > Save As: ''yourfile.<font color="#CC0000">wav</font>'''''; Format: Custom FFmpeg Export; Options... > wav; '''pcm_s16le'''; Sample Rate: 22050; OK and save the file (adpcm_ms doesn't work as of Audacity 1.3 Beta). | To create suitable files for importing into Oni using a GUI program, you could use [https://www.audacityteam.org/download/ Audacity] and its [https://manual.audacityteam.org/man/faq_installation_and_plug_ins.html#How_do_I_download_and_install_the_FFmpeg_Import.2FExport_Library.3F ffmpeg Export Library]. After you've installed Audacity and the ffmpeg library, go to '''Edit > Preferences... > Libraries''', click the Locate... button and find the installed library file. Open your sound file then go to '''File > Export... > Save As: ''yourfile.<font color="#CC0000">wav</font>'''''; Format: Custom FFmpeg Export; Options... > wav; '''pcm_s16le'''; Sample Rate: 22050; OK and save the file (adpcm_ms doesn't work as of Audacity 1.3 Beta). | ||
* Mirror for backup purpose: http://mods.oni2.net/node/384 | * Mirror for backup purpose: http://mods.oni2.net/node/384 | ||
If you're using Windows, you may find that your newly-converted '''ima4''' AIFF files will not play. This does not mean the files themselves are broken — they will actually play on Macs, but not in Windows, despite having been created in Windows. The reason for this remains to be investigated. | |||
===44.1 kHz sounds=== | |||
If you are importing a 44.1 kHz mono sound, you should use <Channels>1</Channels> and <Pitch>2</Pitch> in your .grp file to prevent Oni from playing the sound at half-speed. <Channels>2</Channels> and <Pitch>1</Pitch> will also work for the same source file, but only because Oni interprets this to mean that odd-numbered samples are meant for the left channel and even-numbered samples for the right channel. This is not recommended since it's an unorthodox solution, though the result will probably sound the same in-game. | |||
===Mac AIFF creation=== | |||
If you want to convert sounds into the AIFF format for Macs, the major catch with Audacity is that its batch processing feature does not support AIFF exporting even though it's a part of the underlying ffmpeg program that Audacity uses. To convert a large number of sound files, you can install ffmpeg using your package manager of choice (MacPorts, Homebrew, etc.). Building can take a while, but you can also find pre-built ffmpeg binaries around the Web fairly easily. The basic command you want to use is: | If you want to convert sounds into the AIFF format for Macs, the major catch with Audacity is that its batch processing feature does not support AIFF exporting even though it's a part of the underlying ffmpeg program that Audacity uses. To convert a large number of sound files, you can install ffmpeg using your package manager of choice (MacPorts, Homebrew, etc.). Building can take a while, but you can also find pre-built ffmpeg binaries around the Web fairly easily. The basic command you want to use is: | ||
Line 54: | Line 56: | ||
done | done | ||
Note the double ".aif" suffix applied to the outputted files | Note the double ".aif" suffix applied to the outputted files. | ||
===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 will look for a sound titled "SNDDgears.aif", and nothing will play. Hence, we title the AIFF file "SNDDgears.aif.aif" so that OniSplit yields "SNDDgears.aif.oni" upon importing, which in turn produces the resource named "SNDDgears.aif" that Oni desires. | |||
==Oni file creation== | ==Oni file creation== | ||
Line 352: | Line 355: | ||
|valign="top"| <NumberOfChannels> | |valign="top"| <NumberOfChannels> | ||
|valign="top"| int32 | |valign="top"| int32 | ||
| Here you tell Oni if your sound file is mono or stereo | | Here you tell Oni if your sound file is mono or stereo. | ||
{|class="wikitable" width="100%" | {|class="wikitable" width="100%" | ||
Line 358: | Line 361: | ||
! 22.05 kHz, mono | ! 22.05 kHz, mono | ||
! 22.05 kHz, stereo | ! 22.05 kHz, stereo | ||
! 44.1 kHz, mono '''( | ! 44.1 kHz, mono '''(Windows-only)''' | ||
|- | |- | ||
|align="center"| NumberOfChannels | |align="center"| NumberOfChannels | ||
Line 666: | Line 669: | ||
===Step 4: Preparing the OSBD.grp=== | ===Step 4: Preparing the OSBD.grp=== | ||
Note that <NumberOfChannels> occurs once at the top level, meaning that all the SNDD files must have the same number of channels. | |||
{|class="wikitable" width="100%" | {|class="wikitable" width="100%" | ||
Line 672: | Line 675: | ||
! 22.05 kHz, mono | ! 22.05 kHz, mono | ||
! 22.05 kHz, stereo | ! 22.05 kHz, stereo | ||
! 44.1 kHz, mono '''( | ! 44.1 kHz, mono '''(Windows-only)''' | ||
|- | |- | ||
|align="center"| NumberOfChannels | |align="center"| NumberOfChannels | ||
|align="center"| 1 | |align="center"| 1 | ||
|align="center"| 2 | |align="center"| 2 | ||
|align="center"| ''' | |align="center"| '''1''' | ||
|} | |} | ||