Adjustable music playback bar

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
ojgenius
Newbie
Posts: 2
Joined: Fri Apr 29, 2022 11:30 am
Contact:

Adjustable music playback bar

#1 Post by ojgenius »

Hello lovely people! I'm a big newbie here and am stuck :(. I've created a music duration bar using the code below, which successfully shows me the duration of my audio clip as it's playing. I would like this bar to be user adjustable though. Anyone have any idea how to adjust or amend the code for this to be possible? Thanks in advance :D

Code: Select all

screen audio_duration():
    bar:
        value AudioPositionValue(channel='music')
        xalign 0.5
        yalign 0.5
        xsize 500
        xmaximum 500

label start:
    image bg black = "#000000"
    $ bgm_test = "test.mp3"

    scene bg black
    play music bgm_test
    #play music "test.mp3"
    call screen audio_duration

    return

jeffster
Veteran
Posts: 409
Joined: Wed Feb 03, 2021 9:55 pm
Contact:

Re: Adjustable music playback bar

#2 Post by jeffster »


Post Reply

Who is online

Users browsing this forum: Google [Bot]