importing_audio_samples.rst 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. .. _doc_importing_audio_samples:
  2. Importing audio samples
  3. =======================
  4. Supported files
  5. ---------------
  6. Godot provides two options to import your audio data: WAV and Ogg Vorbis.
  7. Each has different advantages.
  8. * WAV files use raw data or light compression (IMA-ADPCM). They are lightweight
  9. on the CPU to play back (hundreds of simultaneous voices in this format are
  10. fine). The downside is that they take up a lot of disk space.
  11. * Ogg Vorbis files use a stronger compression that results in much
  12. smaller file size, but require significantly more processing power to
  13. play back.
  14. .. note::
  15. MP3 support is available in Godot 3.3 and later.
  16. Here is a comparative chart.
  17. +-----------------------------+-------------------+
  18. | Format | 1 second of audio |
  19. +=============================+===================+
  20. | WAV 24-bit, 96 kHz, stereo | 576 KB |
  21. +-----------------------------+-------------------+
  22. | WAV 16-bit, 44 kHz, mono | 88 KB |
  23. +-----------------------------+-------------------+
  24. | WAV 16-bit, IMA-ADPCM, mono | 22 KB |
  25. +-----------------------------+-------------------+
  26. | Ogg Vorbis 128 Kb/s, stereo | 16 KB |
  27. +-----------------------------+-------------------+
  28. | Ogg Vorbis 96 Kb/s, stereo | 12 KB |
  29. +-----------------------------+-------------------+
  30. Consider using WAV for short and repetitive sound effects, and Ogg Vorbis
  31. for music, speech, and long sound effects.
  32. Best practices
  33. --------------
  34. Godot has an :ref:`extensive bus system <doc_audio_buses>` with built-in effects.
  35. This saves SFX artists the need to add reverb to the sound effects,
  36. reducing their size greatly and ensuring correct trimming. Say no to SFX
  37. with baked reverb!
  38. .. image:: img/reverb.png
  39. As you can see above, sound effects become huge with reverb added.
  40. Trimming
  41. ~~~~~~~~
  42. One issue that happens often is that the waveform is exported with long
  43. silences at the beginning and at the end. These are inserted by
  44. DAWs when saving to a waveform, increase their size unnecessarily and
  45. add latency to the moment they are played back.
  46. Importing as WAV with the **Trimming** option enabled solves
  47. this.
  48. Looping
  49. ~~~~~~~
  50. Godot supports looping in the samples (tools such as Sound Forge or
  51. Audition can add loop points to WAV files). This is useful for sound
  52. effects, such as engines, machine guns etc. Ping-pong looping is also
  53. supported.
  54. As an alternative, the Import dock has a **Loop** option that enables
  55. looping for the entire sample when importing.