JavaHut's AudioManager Extension (1st Plugin)

JavaHut

JavaHut
Member
Joined
Aug 20, 2016
Messages
21
Reaction score
37
First Language
English
Primarily Uses


AudioManager Extension v1.02

By: JavaHut
Required RMMV Version: 1.3.1+







Download
Download the script and impulse files here:
http://www.mediafire.com/download/21r6stjbbj1v1y9/JavaHut_AudioManagerEx.js
http://www.mediafire.com/download/mx35dblvhiwae68/impulses.zip


Demo
Download the demo here:
http://www.mediafire.com/download/v3q7vp79w31klp7/AudioManagerExDemo.zip


Note: Do NOT use the plugin file from the demo in your projects, as it may not be the most up to date version.


Introduction
This plugin provides more advanced sound functions to enhance the basic audio manager in RMMV.


Features
- Make sounds dynamic to allow volume/pan/filter changes as the player moves away/toward the sound event
- Choose from multiple sounds to play at random, with the option for varied pitch (For example: choose from step1, step2, or step3 with varied pitch, as the player walks across a surface)
- Add/Change loop and starting points for background music and background sounds
- Add reverb to any sound (See Author's Notes below)
- Fade in, fade to, or pause/resume background music and background sounds
- Allow for more than one background sound at the same time


How to Use
 

-Download the JavaHut_AudioManagerEx.js file and place it in your project's js/plugins folder. Once installed, Add it to the Plugin Manager, and click the Help... button for more info. If you are unsure about a plugin Parameter, double click the value and read the description.
-If using reverb, download the impulses.zip file (or supply your own impulses) and extract it to your project's audio folder. If you change the impulse folder name, be sure to adjust the plugin's Impulse Folder parameter.
-For the demo, download the demo file and extract it to your RMMV Games folder, and open the Game.rpgproject file in RMMV.



Author's Notes
 

-An important feature that is not present in the default AudioManager is a simple limiter on the audio signal to prevent it from peaking, which could cause speaker/ear damage. This plugin implements a limiter to control the output and keep it under the peak threshold.


-When the plugin is enabled, all sounds are somewhat lower in volume because of a custom panning system on the WebAudio buffers. Please take this into consideration and adjust accordingly.
-If a sound is set to dynamic, a falloff value of 20 or more is recommended for a more natural sound.
-If using reverb for a sound, be sure to use it sparingly, as it can cause heavy lag on slower computer systems.



FAQ
 

Plugin Commands
Q. Why does the plugin command not work?
A. Be sure to double-check your arguments. For example, if I use pauseBgs 2 thinking it will pause and fade out for 2 seconds, it won't work. This is because there is a required name argument before the fadeTime: pauseBgs myBgs 2.


Background Music / Sounds


Q. Why does the bgm or bgs loop, even when I set the plugin Loop Parameters to false?
A. Because the bgm or bgs file itself may contain loop points in the meta data. You can use a program like Audacity to remove the LOOPSTART and LOOPLENGTH tags.



Q. Why does the bgm or bgs continue playing after transferring the player to another map?
A. You have to use the pause plugin commands or fadeout RMMV event commands before transferring the player. If you don't want to manually clean up any unused bgs, set the Clean Bgs On Transfer plugin parameter to true.


Q. Why can I not resume or change loop points on a bgs after transferring the player to another map?
A. Check if the Clean Bgs On Transfer plugin parameter is set to true. If so, the system will erase any paused/faded bgs from the buffer list. If you decide to set it to false, be sure to use the eraseBgs plugin command to clean up your unused background sounds.


Dynamic Sounds
Q. Why does a dynamic background sound or sound effect erase after transferring the player to another map, even though the Clean Bgs On Transfer plugin parameter is set to false?
A. Dynamic sounds have to be deleted when the map changes because the events that they are tied to are not active on any other maps, and therefore cannot carry over.



Changelog
 

-Version 1.02: Fixed a bug that prevented paused BGM from using loop and starting points when resumed/played again.
  Added the eraseBgm plugin command to erase saved/paused BGM.


-Version 1.01: Fixed a bug that caused reverb to be cut off on short sounds.


-Version 1.00: Plugin completed.



Known Issues

None at this time.



Latest RMMV Version Tested
1.3.1


Bug Reporting
Please submit any bugs you find in the plugin to this forum post. And, if you have a suggestion for a plugin feature, feel free to post it here. Thank you for your support, and happy gaming!


Terms of Use & Disclaimer

-This plugin may be used for commercial or non-commercial use, as long as the script file remains unaltered. Credit to JavaHut is optional.
-JavaHut cannot be held responsible for any damages that may occur from using this plugin in your project. You agree to use this plugin with the acknowledgment that bugs may be present and cause issues within the project that contains it. Thank you for your understanding.
-Royalty-free impulse file info:
"huge" and "plate" impulses are from:
http://www.airwindows.com/airwindows-impulses/
All other impulses are from:
http://www.voxengo.com/impulses/
 
Last edited by a moderator:

Ossra

Formerly Exhydra
Veteran
Joined
Aug 21, 2013
Messages
965
Reaction score
708
First Language
English
Primarily Uses
RMMV
Excellent work! I wish I could get my code to look so nice.
 
Last edited by a moderator:

solaris1111

Veteran
Veteran
Joined
Jan 1, 2014
Messages
115
Reaction score
19
First Language
French
Primarily Uses
Oh WOW!!! Can't wait to test this at home!!! Thank you very much!!!
 

JavaHut

JavaHut
Member
Joined
Aug 20, 2016
Messages
21
Reaction score
37
First Language
English
Primarily Uses
Thanks to all for the feedback so far. I look forward to hearing your experience with the plugin and if there are any ways to improve upon it.


Please let me know if you find any bugs or things that you don't like about it. Thanks!
 

styx92

Veteran
Veteran
Joined
Jan 7, 2016
Messages
310
Reaction score
38
First Language
German
Primarily Uses
Your demo is awesome, i really want to use your plugin, but this is happened :(

Unbenannt4.PNG
 

JavaHut

JavaHut
Member
Joined
Aug 20, 2016
Messages
21
Reaction score
37
First Language
English
Primarily Uses
Your demo is awesome, i really want to use your plugin, but this is happened :(


Thanks for your feedback. The error you have is because you are probably using an earlier version of RMMV. The 1.3.1 is what you should be using in order to use the AudioManager Extension plugin. I don't recommend using the plugin in an earlier version of RMMV. I apologize, but I do not intend on supporting older versions. Let me know if you have any more issues. Thanks.
 
Last edited by a moderator:

styx92

Veteran
Veteran
Joined
Jan 7, 2016
Messages
310
Reaction score
38
First Language
German
Primarily Uses
Thanks for your feedback. The error you have is because you are probably using an earlier version of RMMV. The 1.3.1 is what you should be using in order to use the AudioManager Extension plugin. I don't recommend using the plugin in an earlier version of RMMV. I apologize, but I do not intend on supporting older versions. Let me know if you have any more issues. Thanks.
Yes you have right, i had only 1.3.0.


But thanks for you quick help :)
 

solaris1111

Veteran
Veteran
Joined
Jan 1, 2014
Messages
115
Reaction score
19
First Language
French
Primarily Uses
Can i use the same dynamic sound file for two events in the map? Exemple: In a sewer i put a kind of river sound where the water pass, but pretty far away, there is another water passage where i put the same event (copy/paste) but no sound when i get near that one. Those both events use a comment with the play bgs command. Both of them a set to parallel.


Thanky you for the help! This script is awesome. It give so much more to my game, like getting near a waterfall and being muted by the sound! :)
 
Last edited by a moderator:

solaris1111

Veteran
Veteran
Joined
Jan 1, 2014
Messages
115
Reaction score
19
First Language
French
Primarily Uses
I noticed that the BGM don't loop anymore even if the option is set to true. It happen since i put BGM fade time to 0.


UPDATE:


I also found that BGS that are played in a common event won't loop. Even if i use the loop comment before.


It feels like there is a problem with the looping option for bgm and bgs. + the auto clear bgs don't seem to work. If you want a demo of my game, don't hesitate to ask.


UPDATE 2 :


I also found that battle BGMs don't loop anymore. At this point, this wonderfull plugin is for majority of cases, not usable :(  Hope you'll pass by and find some fixes.
 
Last edited by a moderator:

Archeia

Level 99 Demi-fiend
Developer
Joined
Mar 1, 2012
Messages
14,719
Reaction score
14,558
First Language
Filipino
Primarily Uses
VNM
I noticed that the BGM don't loop anymore even if the option is set to true. It happen since i put BGM fade time to 0.


UPDATE:


I also found that BGS that are played in a common event won't loop. Even if i use the loop comment before.


It feels like there is a problem with the looping option for bgm and bgs. + the auto clear bgs don't seem to work. If you want a demo of my game, don't hesitate to ask.


UPDATE 2 :


I also found that battle BGMs don't loop anymore. At this point, this wonderfull plugin is for majority of cases, not usable :(  Hope you'll pass by and find some fixes.


This is also happening on my project ;_;
 

Skurge

" (GASP) What's going on!? "
Veteran
Joined
Jul 12, 2015
Messages
1,084
Reaction score
224
First Language
English
Primarily Uses
N/A
This might make a better replacement for the 3D audio plugin I currently have- which seems to have been abandoned with it's glitches.


Does this plugin allow me to manage when a sound is on and off with ease? And does audio play 100% without random cutouts to complete silence?


Sorry if i'm asking too many questions, I'm just trying to be careful with what I use :)
 

Dreadshadow

Lv 38 Tech Magician
Moderator
Joined
Mar 2, 2014
Messages
3,879
Reaction score
2,518
First Language
Greek
Primarily Uses
RMMV
So it seems that this plugin have some issues. Maybe it is a core MV update that made that happen? Anyway, I will follow this thread, because this plugin seems to be fantastic and it would be a shame not to be fixed. :)
 

ragnorak6608

Veteran
Veteran
Joined
May 25, 2014
Messages
54
Reaction score
1
First Language
English
Is this plugin still being supported? I can't seem to figure out why the battle bgm won't loop anymore when this plugin is ON.
 

Songsmith

Veteran
Veteran
Joined
Jun 17, 2016
Messages
64
Reaction score
3
First Language
English
Primarily Uses
N/A
I'm having the same problem... BGM isn't looping even when it's set to true. Any plugin/script masters hanging around who want to take a look?
 

Tuomo L

Oldbie
Veteran
Joined
Aug 6, 2012
Messages
2,294
Reaction score
1,270
First Language
Finnish
Primarily Uses
RMMV
It makes victory music not loop any more.
 

Songsmith

Veteran
Veteran
Joined
Jun 17, 2016
Messages
64
Reaction score
3
First Language
English
Primarily Uses
N/A
Bump for an amazing, now unusable plugin that probably just needs a little tweak. >< Anyone smart enough to figure out what MV core change must've broken the BGM looping?

Edit: Maybe someone like @Galv could take a look at it? Javahut seems to be MIA.
 
Last edited:

OcRam

Servant of the Universe
Veteran
Joined
Aug 2, 2016
Messages
405
Reaction score
508
First Language
Finnish
Primarily Uses
RMMV
FIX TO "BGM not looping problem", if you don't need extended stuff in JavaHut's plugin for BGM:

Let's make our own plugin (to honor JavaHut's ToS) then override "AudioManager.playBgm" with RPG Maker MV default function (in version 1.5.0). Make sure that JavaHut's plugin is ordered BEFORE our fix plugin.

Make file in ./js/plugins/JavaHut_AudioManagerEx_FIX.js
Then edit file with notepad and insert code below >> Save

/*:
* @plugindesc V1.00 Fix to JavaHut_AudioManagerEx.js
* @author OcRam (free to use commercial/personal - free to edit)
*
* @Help Place this plugin AFTER JavaHut_AudioManagerEx.js
*
*/
var Imported = Imported || {};
Imported.OcRam_JHFix = true;
var OcRam_JHFix = OcRam_JHFix || {};
(function ($) {
// Fix to JavaHut's AudioManagerEx plugin
AudioManager.playBgm = function (bgm, pos) {
if (this.isCurrentBgm(bgm)) {
this.updateBgmParameters(bgm);
} else {
this.stopBgm();
if (bgm.name) {
if (Decrypter.hasEncryptedAudio && this.shouldUseHtml5Audio()) {
this.playEncryptedBgm(bgm, pos);
}
else {
this._bgmBuffer = this.createBuffer('bgm', bgm.name);
this.updateBgmParameters(bgm);
if (!this._meBuffer) {
this._bgmBuffer.play(true, pos || 0);
}
}
}
}
this.updateCurrentBgm(bgm, pos);
};
})(OcRam_JHFix);

My RPG Project (surely, but very very slowly) https://www.facebook.com/mightofdarkness/
 
Last edited:

Nectar

Bees love me.
Veteran
Joined
Jul 7, 2017
Messages
124
Reaction score
19
First Language
English
Primarily Uses
RMMV
I have five torches in a room, all have this as a comment

<dynamic>

<falloff:10>

<fadeTime:5>

<autopan:true>

Only one of the five torches actually plays the sound, the others don't.

Help please!
 

Kenode

Veteran
Veteran
Joined
Jun 17, 2018
Messages
66
Reaction score
24
First Language
Spanish
Primarily Uses
RMMV
Since this plugin seems to be abandoned, are there any alternatives to this plugin? I like the features, but the issues are making it unusable. I am getting the loop issue, sometimes the BGS takes too long to start playing, the BGS doesn't clear when changing maps even with auto clear bgs enabled, and when changing maps, new BGS/BGM set on the map settings won't play.
MBS Sound Emittance works great and it's super simple to set up, but I don't like how there's no limit to how much panning a sound can get (it can sound in just the left speaker while the right one is muted), and sadly it seems to be abandoned too.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

"What do you think the best place to visit on this cold days?" "Hell..."
Been so busy lately that I wonder if I should slowly start preparing the advent calendar resources so I have enough in december.
Man, I wish it was harder for mean d-holes to make me feel like crying.
Made 8 games. Was aiming for 20. Gonna go for 40. Because 20 + 20. /Bed.
Got myself card game plugin, its bit laggy but worth it

Forum statistics

Threads
94,535
Messages
921,710
Members
124,400
Latest member
Standanddeliver
Top