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

documentation index ◦ reference manual ◦ function index

# renpy.music.set_pan

Function: | renpy.music.set_pan | (pan, delay, channel="music"):

This function allows sound and music to be panned between the two stereo channels.

pan - A number between -1 and 1 that control the placement of the audio. If this is -1, then all audio is sent to the left channel. If it's 0, then the two channels are equally balanced. If it's 1, then all audio is sent to the right ear.

delay - The amount of time it takes for the panning to occur.

channel - The channel the panning takes place on. This can be a sound or a music channel. Often, this is channel 7, the default music channel.

    play music "2f-final.ogg"
    "Now we're playing some music."

    $ renpy.music.set_pan(-1, 1)
    "It's only coming out of the left channel."

    $ renpy.music.set_pan(1, 2)
    "Now it's only out of the right channel."

    $ renpy.music.set_pan(0, 1)
    "And now it's centered."

documentation index ◦ reference manual ◦ function index