This page is out of date

You've reached a page on the Ren'Py wiki. Due to massive spam, the wiki hasn't been updated in over 5 years, and much of the information here is very out of date. We've kept it because some of it is of historic interest, but all the information relevant to modern versions of Ren'Py has been moved elsewhere.

Some places to look are:

Please do not create new links to this page.


Adding a Sound Channel

By default, Ren'py only has a single channel for looping sounds - music. This can be a problem when you are trying to play a background sound (e.g. wind) as well as background music. The solution is to add one or more new channels of sound.

For each new channel, add something like this into your Options script:

renpy.music.register_channel("nature", "sfx", True)

The "nature" label is what the channel is named and can be anything you decide.

There are three possible volume mixers determined from Settings - "music", "sfx" and "voice". Since this will be a sound effect, SFX is used.

Finally, "True" determines that the sound loops.

You can play your background sound by using this code in your script:

play nature "nature.ogg"

For more information, see here.