Page 1 of 1

Music channel lowering its volume when sound plays

Posted: Mon Nov 23, 2015 4:05 am
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.

Re: Stop music channel from lowering volume when sound plays

Posted: Wed Dec 02, 2015 9:21 pm
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...

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

Posted: Thu Dec 03, 2015 12:19 pm
by ReAnimator
So loud sound makes music quiet?

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

Posted: Thu Dec 03, 2015 5:03 pm
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.

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

Posted: Fri Dec 04, 2015 2:55 am
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!

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

Posted: Fri Dec 04, 2015 4:23 am
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!

Re: Music channel lowering its volume when sound plays

Posted: Sat Dec 12, 2015 10:31 am
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?