Emphasize Audio

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
Voight-Kampff
Veteran
Posts: 351
Joined: Sat Sep 05, 2009 8:47 am
Contact:

Emphasize Audio

#1 Post by Voight-Kampff »

I've spent my entire life looking for the Emphasize Audio option. Well, okay, perhaps that's a bit hyperbolic. But it's definitely a feature I've wanted for a long time.

And, while I can see that we can specify the volume to use, and how long the effect lasts, is there any option to specify how the transition from one volume to the other occurs?

Is this an abrupt, discrete transition from one volume to another? Is there a short, hard coded linear transition? Can we specify the transition? For example, could we specify a logarithmic curve that takes, for example, 10 seconds to complete?

User avatar
PyTom
Ren'Py Creator
Posts: 16097
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:

Re: Emphasize Audio

#2 Post by PyTom »

It's a linear curve, and since it takes place deep in C code, you can't change the function that's used. (Since it has to be applied to every sample of audio, changing it would be too slow to do in python.) You can change the duration that's used, using config.emphasize_audio_time.

http://www.renpy.org/doc/html/config.ht ... audio_time

It defaults to .5 seconds by default.

IIRC, it's linear in terms of PCM samples, so sort of perceptually logarithmic - if my memory serves, and I'm tired enough it might not, each doubling of air pressure is perceived as the same increase in volume.
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

Voight-Kampff
Veteran
Posts: 351
Joined: Sat Sep 05, 2009 8:47 am
Contact:

Re: Emphasize Audio

#3 Post by Voight-Kampff »

Thank you. Again. As usual. :)

Post Reply

Who is online

Users browsing this forum: No registered users