Music channel lowering its volume when sound plays

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
hassohappa
Regular
Posts: 33
Joined: Thu Oct 22, 2015 8:51 pm
Tumblr: me-patra
Contact:

Music channel lowering its volume when sound plays

#1 Post by hassohappa »

My music channel's volume decreases a ton when I hover over buttons, which play sfx in other channels. Is there a way to prevent this or adjust how much it gets quieter by/how long it stays quiet?

For some reason I don't have this problem with ctc sounds (when those play, they have no effect on the music channel).

Here is how I've registered my audio channels for ctc and buttons:

Code: Select all

init python:
    renpy.music.register_channel("ctc", "sfx", False) #ctc sound channel
    renpy.music.register_channel("test_one",  "sfx", False) #button channel 1
    renpy.music.register_channel("test_two", "sfx", False) #button channel 2
    renpy.music.register_channel("test_three", "sfx", False) #button channel 3
I've tried changing "sfx" to "sound" or "music", but it doesn't seem to make a difference.
Last edited by hassohappa on Fri Dec 04, 2015 4:23 am, edited 2 times in total.

User avatar
hassohappa
Regular
Posts: 33
Joined: Thu Oct 22, 2015 8:51 pm
Tumblr: me-patra
Contact:

Re: Stop music channel from lowering volume when sound plays

#2 Post by hassohappa »

Okay, I finally figured out what was causing the volume decrease!
It was all because of this one specific sound effect I was using for my buttons. It really didn't sound that loud to me, but apparently it was too loud, because when I de-amplified it in Audacity, the music stopped fading out. That was it. Problem solved...

ReAnimator
Regular
Posts: 67
Joined: Mon Dec 16, 2013 1:00 pm
Contact:

Re: [solved] Music channel lowering its volume when sound pl

#3 Post by ReAnimator »

So loud sound makes music quiet?

User avatar
hassohappa
Regular
Posts: 33
Joined: Thu Oct 22, 2015 8:51 pm
Tumblr: me-patra
Contact:

Re: [solved] Music channel lowering its volume when sound pl

#4 Post by hassohappa »

ReAnimator wrote:So loud sound makes music quiet?
Yup! Though on second thought, I can't tell whether Ren'py is automatically doing it, or if my computer's audio driver is somehow adjusting it.

If anyone is bored and feels like testing it, the effect is present in this imagebutton demo (it's a great demo, by the way!).
http://lemmasoft.renai.us/forums/viewto ... 51&t=22565
You'll have to press start so that the bgm will start playing, and then go to the Prefs (Config) page -- it's the most noticeable when the music volume is at about 20%. Every time I hover over an imagebutton, music fades out before slowly returning to its original volume over the course of several seconds. If I lower the sound volume or replace it with a different sound, this doesn't happen.

ReAnimator
Regular
Posts: 67
Joined: Mon Dec 16, 2013 1:00 pm
Contact:

Re: [solved] Music channel lowering its volume when sound pl

#5 Post by ReAnimator »

That's odd. I'm here because I also have similar problem. In my case it happens when I test voice volume via pref screen. Music volume gets lower, then enter the game, it get normal. If it's really a matter of loudness of the file, I'm shocked!

User avatar
hassohappa
Regular
Posts: 33
Joined: Thu Oct 22, 2015 8:51 pm
Tumblr: me-patra
Contact:

Re: [solved] Music channel lowering its volume when sound pl

#6 Post by hassohappa »

I'm really no expert, but I think it's either the loudness, or a combination of the sound being both loud and very short in duration, so it's sharp.

I'm going to unmark this as [solved] in hopes that someone more knowledgeable about Ren'py's audio checks the thread out! It would be nice to know for sure what will and won't cause the music channel to automatically lower its volume!

ReAnimator
Regular
Posts: 67
Joined: Mon Dec 16, 2013 1:00 pm
Contact:

Re: Music channel lowering its volume when sound plays

#7 Post by ReAnimator »

Hi,
I've been thinking about this and it seems you are right. The individual volume in Ren'py seems to be divided by the number of playing sound files. So if quiet sound plays while loud music is playing, it gets obvious. I think it's better to handle them simultaneously though. Isn't that possible?

Post Reply

Who is online

Users browsing this forum: Majestic-12 [Bot]