Music volume
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.
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.
Music volume
Hello, how can I change the music volume, both in game and in main menu?
I want to preset a volume because I deleted the settings menu so players won't be able to enter there.
Thank you, much appreciated.
I want to preset a volume because I deleted the settings menu so players won't be able to enter there.
Thank you, much appreciated.
- Donmai
- Eileen-Class Veteran
- Posts: 1960
- Joined: Sun Jun 10, 2012 1:45 am
- Completed: Toire No Hanako, Li'l Red [NaNoRenO 2013], The One in LOVE [NaNoRenO 2014], Running Blade [NaNoRenO 2016], The Other Question, To The Girl With Sunflowers
- Projects: Slumberland
- Location: Brazil
- Contact:
Re: Music volume
You can find that information in the Audio chapter of the documentation. Look here: https://www.renpy.org/doc/html/audio.ht ... set_volume
For example:
For example:
Code: Select all
$ renpy.music.set_volume(0.5, 0.6, channel="ambient")
No, sorry! You must be mistaking me for someone else.
TOIRE NO HANAKO (A Story About Fear)
TOIRE NO HANAKO (A Story About Fear)
Re: Music volume
Thank you for the reply. I looked at the forum and did what u said. instead of "ambient" I put the channel "music", but it doesn't change the volume at all. I tried different numbers and it's the same volume any number I try.
- vollschauer
- Veteran
- Posts: 231
- Joined: Sun Oct 11, 2015 9:38 am
- Github: vollschauer
- Contact:
Re: Music volume
To set a default volume use (options.rpy):
As far as I can remember I had once also trouble to use:
Try this ....
Code: Select all
## The default audio volumes
config.default_music_volume = 0.5
config.default_sfx_volume = 0.7
config.default_voice_volume = 1.0
Code: Select all
$ renpy.music.set_volume(0.5, 0.6, channel="ambient")
Code: Select all
python:
_preferences.set_volume('music', 0.5)
Re: Music volume
Still not working :/
I tried to set it from 0.1 to 1.0 but no difference. I don't know what else I could try
I tried to set it from 0.1 to 1.0 but no difference. I don't know what else I could try
- Divona
- Miko-Class Veteran
- Posts: 678
- Joined: Sun Jun 05, 2016 8:29 pm
- Completed: The Falconers: Moonlight
- Organization: Bionic Penguin
- itch: bionicpenguin
- Contact:
Re: Music volume
Here is the code I use. Test it out and it work for me:
It the last line of code that refresh the change after the first line.
Strangely, the:
should also work at adjust the music volume, though. But it does not affected the bar in the setting menu.
Make sure to put those code inside the label, for example:
Code: Select all
python:
_preferences.set_volume('music', 0.5)
renpy.restart_interaction()
Strangely, the:
Code: Select all
$ renpy.music.set_volume(0.5, 0, channel='music')
Make sure to put those code inside the label, for example:
Code: Select all
label main_menu:
python:
_preferences.set_volume('music', 0.5)
renpy.restart_interaction()
Last edited by Divona on Mon Sep 05, 2016 1:02 pm, edited 1 time in total.
- vollschauer
- Veteran
- Posts: 231
- Joined: Sun Oct 11, 2015 9:38 am
- Github: vollschauer
- Contact:
Re: Music volume
If it's still not working, then show your code ....maybe you doing it wrong ^^
Re: Music volume
@Divona
It works. Thank you for the help!
It works. Thank you for the help!
-
- Newbie
- Posts: 1
- Joined: Fri Apr 29, 2022 4:28 pm
- Soundcloud: Addiktnoid
- Contact:
Re: Music volume
I pasted this at the end of options.rpy and it works, but it makes the game loop forever while skipping the initial options screen.Divona wrote: ↑Mon Sep 05, 2016 12:47 pm Here is the code I use. Test it out and it work for me:
It the last line of code that refresh the change after the first line.Code: Select all
python: _preferences.set_volume('music', 0.5) renpy.restart_interaction()
Strangely, the:
should also work at adjust the music volume, though. But it does not affected the bar in the setting menu.Code: Select all
$ renpy.music.set_volume(0.5, 0, channel='music')
Make sure to put those code inside the label, for example:
Code: Select all
label main_menu: python: _preferences.set_volume('music', 0.5) renpy.restart_interaction()
could you post a picture of where i should post this code to make it work propperly
also, whats the code to lowering the sounds?
Thanx
Who is online
Users browsing this forum: No registered users