Skip to content

Sound And Music#

Just like with background images, you can also access the sound effects and music resources which are included in the game. A comprehensive list of all sound-related resources is available in the sound galleries included in the game. For a more detailed look at Ren'Py's audio system, take a look at the original documentation. In general, you can do something like this:

play sound sfx_device

This will play the sound effect sfx_device on the audio channel sound. Note that there are multiple audio channels, or layers if you will, which serve different types of sounds. If you want to play music, you should use the music channel for example so that different sounds do not interfere with each other.

Adding custom sound files#

Just like with adding custom images, we also support adding custom audio files of two kinds, separated into distinct folders, the names of which are likely descriptive enough to understand what goes where:

music/
sfx/

The game supports MP3, OGG and OPUS formats. Otherwise the procedure is much like its visual equivalent, however the naming scheme is slightly different in that where the image system uses spaces, this system replaces them by underscores (_).

The file example/sfx/splash fun.ogg will be available in-game like this:

play sound example_sfx_splash_fun

Likewise, example/music/macleod.ogg appears like this:

play music example_bgm_macleod


Last update: November 27, 2020