Music pause/music resume?

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
derik
Regular
Posts: 57
Joined: Wed Oct 18, 2006 4:56 am
Contact:

Music pause/music resume?

#1 Post by derik »

I see we have a nifty music pause function
http://renpy.org/wiki/renpy/doc/referen ... 28pause%29
...unfortunately, it appears to be mentioned, and not documented. Bother.

I'm sure it's come up in one of the Version X released threads... but the forum search function hasn't managed to pop it up. Does anyone know?

(I want to be able to pause some music, and resume it at the same point several interactions later.)

User avatar
PyTom
Ren'Py Creator
Posts: 16096
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

#2 Post by PyTom »

IIRC, there was something like this way back in the 4 series, but I removed it when I rearchitected the music system around 5.1. Your best bet is to drop the volume. It had a bunch of problems dealing with savegames and the like.

Something we do support is to lower a music channel's volume, and then to raise it back up again. That gives a similar dramatic effect.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

derik
Regular
Posts: 57
Joined: Wed Oct 18, 2006 4:56 am
Contact:

#3 Post by derik »

PyTom wrote:IIRC, there was something like this way back in the 4 series, but I removed it when I rearchitected the music system around 5.1. Your best bet is to drop the volume. It had a bunch of problems dealing with savegames and the like.

Something we do support is to lower a music channel's volume, and then to raise it back up again. That gives a similar dramatic effect.
For this particular application- that will do.
*pokes his code*

Setting volume to 0, as in the documentation, does not mute things, it's still there, just quiet.
*pokes some more*
-2 seems to completely annihilate the sound.

*pokes some other stuff, puzzled*
Ahh... 5.6.6a isn't like 5.6.6 in a lot of little ways, isn't it?
*upgrades*
Man, this color-scheme picker is annoying...
When you say _preferences.text_cps 'isn't of interest' to users 5.6.7+, does that mean 'will be deprecated in the future?' Because I want to use it.

User avatar
PyTom
Ren'Py Creator
Posts: 16096
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

#4 Post by PyTom »

Well, you should never set it by hand, since that would override what the user set himself. And you can use config.default_text_cps to set the default value. You can use the (admittedly undocumented) slow_speed argument to Character to force the speed for a particular interaction... So I'm not sure what else _preferences.text_cps is good for.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

derik
Regular
Posts: 57
Joined: Wed Oct 18, 2006 4:56 am
Contact:

#5 Post by derik »

PyTom wrote:Well, you should never set it by hand, since that would override what the user set himself. And you can use config.default_text_cps to set the default value. You can use the (admittedly undocumented) slow_speed argument to Character to force the speed for a particular interaction... So I'm not sure what else _preferences.text_cps is good for.
I was looking at using ti to set the speed of a specific 'character' (a narrative intro box I want read out slowly.) I'd THOUGHT to use the callback to save the current speed to a variable at 'begin,' set it to, say, 25, and return it to the user's default on 'end.'

...but it sounds like this mysterious, undocumented slow_speed does that already.

Pray, tell me more!

User avatar
PyTom
Ren'Py Creator
Posts: 16096
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

#6 Post by PyTom »

Hmm... it seems to be broken in the current release. But I intend that you could give the what_slow_speed=<number> argument to a Character, and it would override the text_cps parameter.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

derik
Regular
Posts: 57
Joined: Wed Oct 18, 2006 4:56 am
Contact:

#7 Post by derik »

PyTom wrote:Hmm... it seems to be broken in the current release. But I intend that you could give the what_slow_speed=<number> argument to a Character, and it would override the text_cps parameter.
K. I'll leave it unimplemented for the moment then.

Thanks Tom!

Post Reply

Who is online

Users browsing this forum: No registered users