Skip to main content

Optimising Sounds

Similar to textures, sounds might be rather bloated due to source assets having stereo tracks at high bit rates. In many instances, and especially in Playable Ad settings, it is often acceptable to reduce the bitrate and even re-encode the sounds into mono format.

Let's start by navigating to the Assets section and the Sounds tab in Luna UI:

images-medium

The highlighted part of the screenshot above is the section that describes parameters applied to exported sounds by default. Let's break it down section by section.

Format

This control allows you to set whether the sound should be original (Default option), forced to Stereo or to Mono format.

MP3 is default

In order to support as many browsers and OS versions as possible, Playable encodes sounds into MP3 format by default.

Bitrate

This controls the bitrate of the sound, measured in Kb/s.

Custom script & Custom script extension

Similar to corresponding control in textures settings, it allows a developer to supply an arbitrary shell script to convert sound files into desirable formats using custom tools available on developer's machine.

  • {input} is replaced with full path to original WAV file (Luna always exports sounds as WAV files in the first place)
  • {output} is replaced with the full path to the destination
  • {temp} is replaced with a temporary path the script might use as a scratch pad

In order for Luna to properly compute the output path, developers should also supply the extension of the output file their custom script will write.

Per-sound settings

All of the above settings are also available on a per-folder and per-sound level. Developers can choose a folder of a file by ticking a checkbox in "Per-sound settings" section of the window and use the same fields to tweak parameters of a specific sound(s):

images-medium

You can also further compress your sound files using external software, and then re-import them into your project.