Make music continue from splashscreen

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
User avatar
Tess
Regular
Posts: 59
Joined: Thu Aug 04, 2022 3:43 pm
Projects: The Songbird Guild
Organization: Yurisoft
Github: wainwt2
Discord: Tess#7782
Contact:

Make music continue from splashscreen

#1 Post by Tess »

I have music that I start playing on the splashscreen and I want to keep playing through the main menu. Unfortunately, all music stops when the main menu comes up.

I have

Code: Select all

define config.main_menu_stop_channels = ["sound","voice"]
in my options.rpy file to make sure the music channel isn't stopped, and I've experimented with both setting define.main_menu_music to None and not having that line there at all.

I assume this is some sort of auto-magic thing happening in the background of Ren'Py, I'm just not sure how to turn it off.

User avatar
Donmai
Eileen-Class Veteran
Posts: 1960
Joined: Sun Jun 10, 2012 1:45 am
Completed: Toire No Hanako, Li'l Red [NaNoRenO 2013], The One in LOVE [NaNoRenO 2014], Running Blade [NaNoRenO 2016], The Other Question, To The Girl With Sunflowers
Projects: Slumberland
Location: Brazil
Contact:

Re: Make music continue from splashscreen

#2 Post by Donmai »

You only need to define the main menu music as usual, then start playing the same music in your splash screen. When it reaches the main menu, the music player will notice it is the same music to play and will continue without interruption. I've been making this for years in my projects.
Image
No, sorry! You must be mistaking me for someone else.
TOIRE NO HANAKO (A Story About Fear)

User avatar
Tess
Regular
Posts: 59
Joined: Thu Aug 04, 2022 3:43 pm
Projects: The Songbird Guild
Organization: Yurisoft
Github: wainwt2
Discord: Tess#7782
Contact:

Re: Make music continue from splashscreen

#3 Post by Tess »

Awesome, that's good to know! Thank you so much!

The next step: the song has an intro that doesn't loop, then a main part that plays on loop after its done. It's easy to set up in the queue when I'm handling it myself, but Ren'Py's automagic code keeps either playing the intro on infinite loop or interrupting the intro with the main body file depending on which one I set config.main_menu_music to.

Is there a way to simply turn off the main menu music feature so I can code it custom?

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

Re: Make music continue from splashscreen

#4 Post by jeffster »

Yes, IIRC Main Menu stops "music" channel unless the current track is set in config.

You can define a channel with a different name - not "music" - and play your queue there.

There was a related discussion recently:
viewtopic.php?t=67971

Post Reply

Who is online

Users browsing this forum: Bing [Bot], Ocelot