Request for help:I want to know if there is a way to automatically lower the volume of BGS and BGM in menu interfaces or non-map interfaces.

Request for help:
Almost every scene in my game has BGS and BGM, which makes it feel very noisy when opening the menu (since the game has a large amount of text, menus like the inventory are frequently used).
I want to know if there is a way to automatically lower the volume of BGS and BGM in menu interfaces or non-map interfaces, like a mask, without affecting the actual volume displayed in the settings. Then, when returning to the map scene, BGS and BGM automatically return to their normal volume.
Sorry to bother everyone, hope there is a solution!
Welcome to the forums!

So, there is a way to lower the BGM and BGS, and that's by using the event command Play BGM and Play BGS, just select the same filename of what's currently being played, and just lower the volume.

To return it back to normal, just reuse the same method at a different volume.

Also, you double-posting is a no no, you easily edit your original message using the "Edit" function.


Hope this helps.

edit:

Also for some forum posting tips, you don't to put "Request for help" in your thread title.

A good thread title is mostly those that are straight to the point.
Welcome to the forums!

So, there is a way to lower the BGM and BGS, and that's by using the event command Play BGM and Play BGS, just select the same filename of what's currently being played, and just lower the volume.

To return it back to normal, just reuse the same method at a different volume.

Also, you double-posting is a no no, you easily edit your original message using the "Edit" function.


Hope this helps.

edit:

Also for some forum posting tips, you don't to put "Request for help" in your thread title.

A good thread title is mostly those that are straight to the point.
Thank you very much, that was very helpful. It's indeed my first time posting, have no experience yet, HH
It's possible to globally adjust volume with the following script call:

JavaScript:
WebAudio.setMasterVolume(0.5); // half the default level

Thus, the following will lower the volume when you enter the menu and restore when you return to the map or title screen:

JavaScript:
const startMenu = Scene_Menu.prototype.start
Scene_Menu.prototype.start = function() {
    startMenu.call(this);
    WebAudio.setMasterVolume(0.5);
};
const startMap = Scene_Map.prototype.start
Scene_Map.prototype.start = function() {
    startMap.call(this);
    WebAudio.setMasterVolume(1);
};
const startTitle = Scene_Title.prototype.start
Scene_Title.prototype.start = function() {
    startTitle.call(this);
    WebAudio.setMasterVolume(1);
};

But that would be misleading when they open the options screen. It wouldn't affect the volume level shown in options, but if the player wants to adjust the volume, it'll be more helpful for them to have the real volume playing in the background as reference. So, I'd recommend adding this to the above code as well:

JavaScript:
const startOptions = Scene_Options.prototype.start
Scene_Options.prototype.start = function() {
    startOptions.call(this);
    WebAudio.setMasterVolume(1);
};
It's possible to globally adjust volume with the following script call:

JavaScript:
WebAudio._masterVolume = 0.5; // half the default level

Thus, the following will lower the volume when you enter the menu and restore when you return to the map or title screen:

JavaScript:
const startMenu = Scene_Menu.prototype.start
Scene_Menu.prototype.start = function() {
    startMenu.call(this);
    WebAudio._masterVolume = 0.5;
};
const startMap = Scene_Map.prototype.start
Scene_Map.prototype.start = function() {
    startMap.call(this);
    WebAudio._masterVolume = 1;
};
const startTitle = Scene_Title.prototype.start
Scene_Title.prototype.start = function() {
    startTitle.call(this);
    WebAudio._masterVolume = 1;
};

But that would be misleading when they open the options screen. It wouldn't affect the volume level shown in options, but if the player wants to adjust the volume, it'll be more helpful for them to have the real volume playing in the background as reference. So, I'd recommend adding this to the above code as well:

JavaScript:
const startOptions = Scene_Options.prototype.start
Scene_Options.prototype.start = function() {
    startOptions.call(this);
    WebAudio._masterVolume = 1;
};
Thanks! I tried these scripts, but they don't seem to work—including WebAudio._masterVolume = 0.5; which also didn’t work.
My version is MV 1.61. Or should I write these scripts as a plugin to use them?
Yeah put it as plugin but I think you need to use the WebAudio.setMasterVolume(0.5); so it affects currently playing song, not sure though.
Sorry, my mistake. It should've been obvious since the name started with an underscore… I've edited my previous post to fix it.

And yeah, the first example was a script call but the rest would go in a plugin.
Sorry, my mistake. It should've been obvious since the name started with an underscore… I've edited my previous post to fix it.

And yeah, the first example was a script call but the rest would go in a plugin.
Success! That's great, thank you for your help.

Original thread: https://forums.rpgmakerweb.com/threads/request-for-help-i-want-to-know-if-there-is-a-way-to-automatically-lower-the-volume-of-bgs-and-bgm-in-menu-interfaces-or-non-map-interfaces.181638/