How to set channel volume

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
Alvsvartr
Newbie
Posts: 7
Joined: Wed Aug 17, 2016 9:31 am
Soundcloud: nebelwand-ua
Contact:

How to set channel volume

#1 Post by Alvsvartr » Wed Jan 10, 2018 7:45 am

Dear friends,


Please, advise me on the following.
I've added a new music channnel with a command "renpy.music.register_channel("bgs", loop=True)", it works fine but it sounds too loud. I'd like to set the volume of this channel to 0.5 but all of the examples which are on the Internet result into nothing.

User avatar
Remix
Eileen-Class Veteran
Posts: 1021
Joined: Tue May 30, 2017 6:10 am
Completed: None... yet (as I'm still looking for an artist)
Projects: An un-named anime based trainer game
Contact:

Re: How to set channel volume

#2 Post by Remix » Wed Jan 10, 2018 9:14 am

Why not just use the mixer="music" parameter when you register, that way the volume is controlled by the Music Volume in Preferences?

Audio Channel Defaults

Remember that config.has_music will need to be set to True to show mixer in Preferences
Mad Scientist Todo List:
  • Finish Improved Event Handler
  • Implement DragonBones animation as a Creator Defined Container
  • Finish Catmull-Rom Spline pathing
  • Finish Bitmask collision and rebound vector system
  • Develop time based building mechanic
  • Others
  • *Find a superb artist and actually write a game*

Alvsvartr
Newbie
Posts: 7
Joined: Wed Aug 17, 2016 9:31 am
Soundcloud: nebelwand-ua
Contact:

Re: How to set channel volume

#3 Post by Alvsvartr » Wed Jan 10, 2018 11:06 am

Remix wrote:
Wed Jan 10, 2018 9:14 am
Why not just use the mixer="music" parameter when you register, that way the volume is controlled by the Music Volume in Preferences?

Audio Channel Defaults

Remember that config.has_music will need to be set to True to show mixer in Preferences
Thanks for your reply but there are some difficulties for me when using standard mixer when I'd like to make double or triple layered background sound. Thus there are bgs, bgs1, bgs2 and bgs3 channels in my project. May be it is stupid but I'm newbie and my specialization is music and texting not programming.

Alvsvartr
Newbie
Posts: 7
Joined: Wed Aug 17, 2016 9:31 am
Soundcloud: nebelwand-ua
Contact:

Re: How to set channel volume

#4 Post by Alvsvartr » Thu Jan 11, 2018 10:03 am

So, if we use this one in script file, it'll work but with annoying buzz sound. If it is impossible to fix this issue, it will be much better to make background sounds quieter in Cubase.

Code: Select all

$ renpy.music.set_volume(0.1, channel="bgs")
play bgs "bgs/rain.ogg" fadein 1.0

Post Reply

Who is online

Users browsing this forum: Google [Bot], jack_norton