renpy.music.set mixer - Ren'Py Visual Novel Engine

documentation index ◦ reference manual ◦ function index

# renpy.sound.set_mixer

Function: | renpy.sound.set_mixer | (channel, mixer):

Allows to associate any channel with a named mixer. By default, (prior Ren'Py 6.9.1 there were only 8 channels) there are three mixers, 'sfx' (channels 0-1), 'music' (3-4) and 'voice' (2). You can create your own mixer, but will need to add its own slider in the preference game menu if you wish to allow the user to set it. This function should only be called in an init block.

## Example

        # Prior Ren'Py 6.9.1 there were only 8 channels.
        # Adds channel number 5 to the 'Sound Volume' slider
        # in the preference game menu.
        renpy.sound.set_mixer(5,"sfx")

See also: Audio

documentation index ◦ reference manual ◦ function index