Reference Manual: (offline | online) Quickstart: (offline | online)

# renpy.music.get_playing

Function: renpy.music.get_playing( | channel=7)

Returns the filename of the music playing on the given channel, or None if no music is playing on that channel. Note that None may be returned when the user sets the music volume to zero, even if the game script requested that music be played on that channel.

Added in 5.6.6.

## Example

    $ renpy.music.play(['a.ogg', 'a.ogg', 'b.ogg', 'a.ogg'])

    "Click to change the music."

    if renpy.music.get_playing() == 'a.ogg':
        $ renpy.music.queue('a_to_c.ogg')
    elif renpy.music.get_playing() == 'b.ogg':
        $ renpy.music.queue('b_to_c.ogg')

    $ renpy.music.queue(['c.ogg', 'c.ogg', 'd.ogg', 'c.ogg'], clear_queue=False)

    "Can you hear the music change?"

Reference Manual: (offline | online) Quickstart: (offline | online)